Demo:修复在大纲中插入新节点报错的问题
This commit is contained in:
parent
9625129691
commit
6bcead7784
@ -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
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user