From 0bace90a2349cccc51e722e8a93697691317792e Mon Sep 17 00:00:00 2001 From: zhaowei Date: Fri, 23 May 2025 15:46:27 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=85=A8=E5=B1=80=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E8=84=B1=E6=95=8F=E7=9A=84=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/AddExperimentModal/index.tsx | 19 ++++++------------- .../components/ViewParamsModal/index.tsx | 5 +---- .../components/GlobalParamsDrawer/index.tsx | 4 ++-- 3 files changed, 9 insertions(+), 19 deletions(-) diff --git a/react-ui/src/pages/Experiment/components/AddExperimentModal/index.tsx b/react-ui/src/pages/Experiment/components/AddExperimentModal/index.tsx index 710a4df4..cdc5d577 100644 --- a/react-ui/src/pages/Experiment/components/AddExperimentModal/index.tsx +++ b/react-ui/src/pages/Experiment/components/AddExperimentModal/index.tsx @@ -30,7 +30,7 @@ interface Workflow { } // 根据参数设置输入组件 -export const getParamComponent = (paramType: number, isSensitive?: number): JSX.Element => { +export const getParamComponent = (paramType: number): JSX.Element => { // 防止后台返回不是 number 类型 if (Number(paramType) === 3) { return ( @@ -40,9 +40,9 @@ export const getParamComponent = (paramType: number, isSensitive?: number): JSX. ); } - if (isSensitive && Number(isSensitive) === 1) { - return ; - } + // if (isSensitive && Number(isSensitive) === 1) { + // return ; + // } return ; }; @@ -202,11 +202,7 @@ function AddExperimentModal({ {globalParam.length > 0 && ( - +
{(fields) => @@ -219,10 +215,7 @@ function AddExperimentModal({ name={[name, 'param_value']} rules={getParamRules(globalParam[name]['param_type'], true)} > - {getParamComponent( - globalParam[name]['param_type'], - globalParam[name]['is_sensitive'], - )} + {getParamComponent(globalParam[name]['param_type'])} )) } diff --git a/react-ui/src/pages/Experiment/components/ViewParamsModal/index.tsx b/react-ui/src/pages/Experiment/components/ViewParamsModal/index.tsx index 8bd49817..3ad671a4 100644 --- a/react-ui/src/pages/Experiment/components/ViewParamsModal/index.tsx +++ b/react-ui/src/pages/Experiment/components/ViewParamsModal/index.tsx @@ -47,10 +47,7 @@ function ParamsModal({ open, onCancel, globalParam = [] }: ParamsModalProps) { name={[name, 'param_value']} label={getParamLabel(globalParam[name])} > - {getParamComponent( - globalParam[name]['param_type'], - globalParam[name]['is_sensitive'], - )} + {getParamComponent(globalParam[name]['param_type'])} )) } diff --git a/react-ui/src/pages/Pipeline/components/GlobalParamsDrawer/index.tsx b/react-ui/src/pages/Pipeline/components/GlobalParamsDrawer/index.tsx index 669f21aa..da764698 100644 --- a/react-ui/src/pages/Pipeline/components/GlobalParamsDrawer/index.tsx +++ b/react-ui/src/pages/Pipeline/components/GlobalParamsDrawer/index.tsx @@ -148,7 +148,7 @@ const GlobalParamsDrawer = forwardRef( > {getParamComponent(type)} - {type !== 3 && ( + {/* {type !== 3 && ( - )} + )} */} ); }}