feat(web): use App replace confirm
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
* @Author: ZhaoYing
|
||||
* @Date: 2026-02-02 15:26:44
|
||||
* @Last Modified by: ZhaoYing
|
||||
* @Last Modified time: 2026-02-02 15:26:44
|
||||
* @Last Modified by: ZhaoYing
|
||||
* @Last Modified time: 2026-03-25 18:14:20
|
||||
*/
|
||||
/**
|
||||
* SliderInput Component
|
||||
@@ -107,7 +107,7 @@ const SliderInput: FC<SliderInputProps> = ({
|
||||
<div className={`rb:w-full ${className}`}>
|
||||
{/* Optional label */}
|
||||
{label && (
|
||||
<div className="rb:text-sm rb:font-medium rb:text-[#475467]">
|
||||
<div className="rb:text-[#5B6167] rb:leading-5 rb:mb-1">
|
||||
{label}
|
||||
</div>
|
||||
)}
|
||||
@@ -127,7 +127,7 @@ const SliderInput: FC<SliderInputProps> = ({
|
||||
/>
|
||||
</Col>
|
||||
{/* Input number component */}
|
||||
<Col flex="120px">
|
||||
<Col flex="80px">
|
||||
<InputNumber
|
||||
min={min}
|
||||
max={max}
|
||||
@@ -135,7 +135,7 @@ const SliderInput: FC<SliderInputProps> = ({
|
||||
value={internalValue}
|
||||
onChange={handleInputChange}
|
||||
disabled={disabled}
|
||||
className={`rb:w-full ${inputClassName}`}
|
||||
className={`rb:w-full! ${inputClassName}`}
|
||||
controls
|
||||
/>
|
||||
</Col>
|
||||
|
||||
@@ -10,7 +10,6 @@ import { useTranslation } from 'react-i18next';
|
||||
import { cookieUtils } from '@/utils/request'
|
||||
import { fileUpload } from '@/api/fileStorage'
|
||||
|
||||
const { confirm } = Modal;
|
||||
const { Dragger } = Upload;
|
||||
|
||||
interface UploadFilesProps extends Omit<UploadProps, 'onChange'> {
|
||||
@@ -91,14 +90,14 @@ const UploadFiles = forwardRef<UploadFilesRef, UploadFilesProps>(({
|
||||
...props
|
||||
}, ref) => {
|
||||
const { t } = useTranslation();
|
||||
const { message } = App.useApp()
|
||||
const { message, modal } = App.useApp()
|
||||
const [fileList, setFileList] = useState<UploadFile[]>(propFileList);
|
||||
const [accept, setAccept] = useState<string | undefined>();
|
||||
|
||||
// 处理文件移除
|
||||
const handleRemove = (file: UploadFile) => {
|
||||
// 显示确认弹窗
|
||||
confirm({
|
||||
modal.confirm({
|
||||
title: `${t('common.confirmRemoveFile')}`,
|
||||
okText: `${t('common.confirm')}`,
|
||||
okType: 'danger',
|
||||
|
||||
Reference in New Issue
Block a user