diff --git a/react-ui/src/components/ResourceSelect/index.tsx b/react-ui/src/components/ResourceSelect/index.tsx index 3be2cd0c..adbe6ee4 100644 --- a/react-ui/src/components/ResourceSelect/index.tsx +++ b/react-ui/src/components/ResourceSelect/index.tsx @@ -63,7 +63,7 @@ function ResourceSelect({ defaultCheckedKeys = [`${value.image_id}-${value.id}`]; } } else if (value.id && value.version) { - defaultExpandedKeys = [value.id]; + defaultExpandedKeys = [`${value.id}`]; defaultCheckedKeys = [`${value.id}-${value.version}`]; } } diff --git a/react-ui/src/pages/NewHome/components/NavBar/index.tsx b/react-ui/src/pages/NewHome/components/NavBar/index.tsx index b0d624e8..7b23dcea 100644 --- a/react-ui/src/pages/NewHome/components/NavBar/index.tsx +++ b/react-ui/src/pages/NewHome/components/NavBar/index.tsx @@ -46,6 +46,7 @@ function NavBar() { if (token && jccToken) { window.open(`https://jcc.jointcloud.net?token=${jccToken}`, '_blank'); } else { + // 清除 token,强制登录 clearSessionToken(); gotoPageIfLogin('/home'); } diff --git a/react-ui/src/pages/Pipeline/components/PipelineNodeDrawer/index.tsx b/react-ui/src/pages/Pipeline/components/PipelineNodeDrawer/index.tsx index 9c3b6e56..e9fac78a 100644 --- a/react-ui/src/pages/Pipeline/components/PipelineNodeDrawer/index.tsx +++ b/react-ui/src/pages/Pipeline/components/PipelineNodeDrawer/index.tsx @@ -223,7 +223,10 @@ const PipelineNodeParameter = forwardRef( } const fieldValue = form.getFieldValue(formItemName); const activeTab = fieldValue?.activeTab as CommonTabKeys | undefined; - const expandedKeys = Array.isArray(fieldValue?.expandedKeys) ? fieldValue?.expandedKeys : []; + // 要求字符串格式 + const expandedKeys = Array.isArray(fieldValue?.expandedKeys) + ? fieldValue?.expandedKeys?.map((v: any) => v + '') + : []; const checkedKeys = Array.isArray(fieldValue?.checkedKeys) ? fieldValue?.checkedKeys : []; const { close } = openAntdModal(ResourceSelectorModal, { type, @@ -254,7 +257,7 @@ const PipelineNodeParameter = forwardRef( showValue, fromSelect: true, activeTab, - expandedKeys: [id], + expandedKeys: [`${id}`], checkedKeys: [`${id}-${version}`], }); }