From 572efdbc1da6ed932cf64db289d8977295fd2ce9 Mon Sep 17 00:00:00 2001 From: cp3hnu Date: Wed, 19 Mar 2025 17:04:26 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E9=9B=86=E4=B9=8B=E5=90=8E=EF=BC=8C=E6=B2=A1?= =?UTF-8?q?=E6=9C=89=E5=88=A0=E9=99=A4=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- react-ui/.nvmrc | 2 +- react-ui/src/components/CodeSelect/index.tsx | 7 ++ .../src/components/ParameterInput/index.tsx | 18 ++-- .../src/components/ParameterSelect/config.tsx | 26 +----- .../src/components/ParameterSelect/index.tsx | 12 ++- .../src/components/ResourceSelect/index.tsx | 82 +++++++++---------- .../components/CreateForm/DatasetConfig.tsx | 1 - .../components/CreateForm/ExecuteConfig.tsx | 7 +- .../Experiment/components/LogGroup/index.tsx | 24 +++--- .../ModelDeployment/CreateVersion/index.tsx | 2 - react-ui/src/pages/Pipeline/Info/index.jsx | 2 +- react-ui/src/stories/CodeSelect.stories.tsx | 1 + .../src/stories/ParameterInput.stories.tsx | 70 ++++++---------- .../src/stories/ResourceSelect.stories.tsx | 4 +- 14 files changed, 119 insertions(+), 139 deletions(-) diff --git a/react-ui/.nvmrc b/react-ui/.nvmrc index 8ddbc0c6..216afccf 100644 --- a/react-ui/.nvmrc +++ b/react-ui/.nvmrc @@ -1 +1 @@ -v18.16.0 +v18.20.7 diff --git a/react-ui/src/components/CodeSelect/index.tsx b/react-ui/src/components/CodeSelect/index.tsx index d2afbb94..c6486d1e 100644 --- a/react-ui/src/components/CodeSelect/index.tsx +++ b/react-ui/src/components/CodeSelect/index.tsx @@ -30,6 +30,7 @@ function CodeSelect({ onChange, ...rest }: CodeSelectProps) { + // 选择代码配置 const selectResource = () => { const { close } = openAntdModal(CodeSelectorModal, { onOk: (res) => { @@ -59,6 +60,11 @@ function CodeSelect({ }); }; + // 删除 + const handleRemove = () => { + onChange?.(undefined); + }; + return (