From 3e851940e8f5d155a069d15a55fb57e7d9ea6344 Mon Sep 17 00:00:00 2001 From: Amy0104 <97265214+Amy0104@users.noreply.github.com> Date: Sun, 24 Apr 2022 14:15:53 +0800 Subject: [PATCH] [Fix][UI Next][V1.0.0-Beta] Fix the startup parameter display error. (#9692) * [Fix][UI Next][V1.0.0-Beta] Fix the startup parameter display error. * [Fix][UI Next][V1.0.0-Beta] Change the key of the startup parameter item. --- .../workflow/definition/components/start-modal.tsx | 10 +++++++--- .../workflow/definition/components/use-modal.ts | 11 ++++++++++- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/dolphinscheduler-ui-next/src/views/projects/workflow/definition/components/start-modal.tsx b/dolphinscheduler-ui-next/src/views/projects/workflow/definition/components/start-modal.tsx index 7cfe800af3..42359f07fb 100644 --- a/dolphinscheduler-ui-next/src/views/projects/workflow/definition/components/start-modal.tsx +++ b/dolphinscheduler-ui-next/src/views/projects/workflow/definition/components/start-modal.tsx @@ -186,8 +186,12 @@ export default defineComponent({ }) watch( - () => props.row, - () => getStartParamsList(props.row.code) + () => props.show, + () => { + if (props.show) { + getStartParamsList(props.row.code) + } + } ) return { @@ -381,7 +385,7 @@ export default defineComponent({ ) : ( {this.startParamsList.map((item, index) => ( - + { state.importForm.name = '' state.importForm.file = '' @@ -237,9 +241,14 @@ export function useModal( } const getStartParamsList = (code: number) => { + if (cachedStartParams[code]) { + variables.startParamsList = cloneDeep(cachedStartParams[code]) + return + } queryProcessDefinitionByCode(code, variables.projectCode).then( (res: any) => { variables.startParamsList = res.processDefinition.globalParamList + cachedStartParams[code] = cloneDeep(variables.startParamsList) } ) }