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

slim
calvin 2022-03-10 11:36:01 +08:00 committed by GitHub
parent 0bce1a96a1
commit 41b66b6adb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -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