Demo:修复在大纲中插入新节点报错的问题

This commit is contained in:
wanglin2 2023-08-10 08:50:26 +08:00
parent 9625129691
commit 6bcead7784

View File

@ -61,7 +61,7 @@ export default {
},
currentData: null,
notHandleDataChange: false,
handleNodeTreeRenderEnd: false,
isHandleNodeTreeRenderEnd: false,
beInsertNodeUid: '',
insertType: '',
isInTreArea: false,
@ -106,8 +106,8 @@ export default {
return
}
//
if (this.handleNodeTreeRenderEnd) {
this.handleNodeTreeRenderEnd = false
if (this.isHandleNodeTreeRenderEnd) {
this.isHandleNodeTreeRenderEnd = false
this.refresh()
this.$nextTick(() => {
this.afterCreateNewNode()
@ -236,7 +236,7 @@ export default {
//
insertNode() {
this.notHandleDataChange = true
this.handleNodeTreeRenderEnd = true
this.isHandleNodeTreeRenderEnd = true
this.beInsertNodeUid = createUid()
this.mindMap.execCommand('INSERT_NODE', false, [], {
uid: this.beInsertNodeUid
@ -246,7 +246,7 @@ export default {
//
insertChildNode() {
this.notHandleDataChange = true
this.handleNodeTreeRenderEnd = true
this.isHandleNodeTreeRenderEnd = true
this.beInsertNodeUid = createUid()
this.mindMap.execCommand('INSERT_CHILD_NODE', false, [], {
uid: this.beInsertNodeUid