Explorar el Código

[Fix-8746][UI] Rectify the issue with affecting the original node's data when editing the form of the copied node. (#8791)

calvin hace 3 años
padre
commit
41b66b6adb

+ 5 - 0
dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/canvas/contextMenu.vue

@@ -45,6 +45,7 @@
   import { mapState, mapActions, mapMutations } from 'vuex'
   import { findComponentDownward, uuid } from '@/module/util/'
   import MenuItem from './menuItem.vue'
+  import _ from 'lodash'
 
   export default {
     name: 'dag-context-menu',
@@ -131,6 +132,10 @@
               code,
               name: taskName
             }
+            if (targetTask.taskParams) {
+              task.taskParams = _.cloneDeep(targetTask.taskParams)
+            }
+
             this.dagCanvas.addNode(code, this.currentTask.type, {
               x: targetNode.position.x + 100,
               y: targetNode.position.y + 100