From e5f3559f2f73ec93e00776c7bac8fb924193d283 Mon Sep 17 00:00:00 2001 From: cp3hnu Date: Thu, 12 Dec 2024 09:12:59 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BF=AE=E6=94=B9=E6=A8=A1=E5=9E=8B?= =?UTF-8?q?=E9=83=A8=E7=BD=B2=E7=8E=AF=E5=A2=83=E5=8F=98=E9=87=8F=E7=9A=84?= =?UTF-8?q?=E4=BA=A4=E4=BA=92=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/CreateForm/TrialConfig.tsx | 10 +- .../components/ExperimentInstance/index.tsx | 2 +- .../ModelDeployment/CreateVersion/index.less | 28 ++- .../ModelDeployment/CreateVersion/index.tsx | 175 ++++++++++-------- .../ModelDeployment/ServiceInfo/index.tsx | 4 +- 5 files changed, 133 insertions(+), 86 deletions(-) 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 && ( + + + + )} + + )} + + + + +