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