diff --git a/react-ui/src/pages/AutoML/components/CreateForm/TrialConfig.tsx b/react-ui/src/pages/AutoML/components/CreateForm/TrialConfig.tsx index c9e5b61f..f0fdfa5d 100644 --- a/react-ui/src/pages/AutoML/components/CreateForm/TrialConfig.tsx +++ b/react-ui/src/pages/AutoML/components/CreateForm/TrialConfig.tsx @@ -1,5 +1,6 @@ import SubAreaTitle from '@/components/SubAreaTitle'; import { AutoMLTaskType } from '@/enums'; +import { modalConfirm } from '@/utils/ui'; import { MinusCircleOutlined, PlusCircleOutlined } from '@ant-design/icons'; import { Button, Col, Flex, Form, Input, InputNumber, Radio, Row, Select } from 'antd'; import { classificationMetrics, regressionMetrics } from './ExecuteConfig'; @@ -72,8 +73,15 @@ function TrialConfig() { shape="circle" size="middle" type="text" - onClick={() => remove(name)} icon={} + onClick={() => { + modalConfirm({ + title: '确定要删除该指标权重吗?', + onOk: () => { + remove(name); + }, + }); + }} > {index === fields.length - 1 && ( - ) : null} - - - - {fields.map(({ key, name, ...restField }) => ( - - - - - = - - - - - - ))} - {fields.length > 0 ? ( - - ) : null} - - )} - + + + + + {(fields, { add, remove }) => ( + <> + {fields.map(({ key, name, ...restField }, index) => ( + + + + + = + + + + + + {index === fields.length - 1 && ( + + )} + + + ))} + {fields.length === 0 && ( + + + + )} + + )} + + + + +