From b8de9ee7520dae4b9a9d555a4aa898c43613e6fd Mon Sep 17 00:00:00 2001 From: pinkhello Date: Mon, 27 Jun 2022 10:53:13 +0800 Subject: [PATCH] =?UTF-8?q?[Fix-10539]=20[Bug]=20=20[UI]=20Copy=20task=20a?= =?UTF-8?q?=20to=20B,=20change=20the=20user-defined=20para=E2=80=A6=20(#10?= =?UTF-8?q?611)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fixed 10539: [Bug] [ui]Copy task a to B, change the user-defined parameters of Task B, and change the parameters of task a * fixed 10539: [Bug] [ui]Copy task a to B, change the user-defined parameters of Task B, and change the parameters of task a * feat: reactor code * feat: remove console.info * fixed: reactor deepclone * feat: code style --- .../views/projects/workflow/components/dag/use-task-edit.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dolphinscheduler-ui/src/views/projects/workflow/components/dag/use-task-edit.ts b/dolphinscheduler-ui/src/views/projects/workflow/components/dag/use-task-edit.ts index 9f305825c0..8748f39be6 100644 --- a/dolphinscheduler-ui/src/views/projects/workflow/components/dag/use-task-edit.ts +++ b/dolphinscheduler-ui/src/views/projects/workflow/components/dag/use-task-edit.ts @@ -16,7 +16,7 @@ */ import { ref, onMounted, watch } from 'vue' -import { remove } from 'lodash' +import { remove, cloneDeep } from 'lodash' import { TaskType } from '@/views/projects/task/constants/task-type' import { formatParams } from '@/views/projects/task/components/node/format-data' import { useCellUpdate } from './dag-hooks' @@ -29,6 +29,7 @@ import type { EditWorkflowDefinition } from './types' + interface Options { graph: Ref definition: Ref @@ -96,7 +97,7 @@ export function useTaskEdit(options: Options) { ) const newDefinition = { - ...definition, + ...cloneDeep(definition), code, name } as NodeData