This is an automated email from the ASF dual-hosted git repository.

caishunfeng pushed a commit to branch 3.0.0-prepare
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git


The following commit(s) were added to refs/heads/3.0.0-prepare by this push:
     new 59d8f222c8 [Fix-10539] [Bug]  [UI] Copy task a to B, change the 
user-defined para… (#10611)
59d8f222c8 is described below

commit 59d8f222c8f391b993bdc2da6bb79c0f63b57cbb
Author: pinkhello <[email protected]>
AuthorDate: Mon Jun 27 10:53:13 2022 +0800

    [Fix-10539] [Bug]  [UI] Copy task a to B, change the user-defined para… 
(#10611)
    
    * 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
---
 .../src/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 dfe7b34ee3..da24ac5020 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<Graph | undefined>
   definition: Ref<WorkflowDefinition | undefined>
@@ -96,7 +97,7 @@ export function useTaskEdit(options: Options) {
     )
 
     const newDefinition = {
-      ...definition,
+      ...cloneDeep(definition),
       code,
       name
     } as NodeData

Reply via email to