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