From af148fef27583e472dd539b655ba0047fb977245 Mon Sep 17 00:00:00 2001 From: wanglin2 <1013335014@qq.com> Date: Tue, 4 Apr 2023 22:54:24 +0800 Subject: [PATCH] =?UTF-8?q?Demo:=E4=BF=AE=E5=A4=8D=E5=9C=A8=E5=A4=A7?= =?UTF-8?q?=E7=BA=B2=E5=86=85=E6=B7=BB=E5=8A=A0=E6=96=B0=E8=8A=82=E7=82=B9?= =?UTF-8?q?=E6=97=B6=E8=8A=82=E7=82=B9=E9=94=99=E4=B9=B1=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/pages/Edit/components/Outline.vue | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/web/src/pages/Edit/components/Outline.vue b/web/src/pages/Edit/components/Outline.vue index 2859ff2d..158371e7 100644 --- a/web/src/pages/Edit/components/Outline.vue +++ b/web/src/pages/Edit/components/Outline.vue @@ -50,6 +50,7 @@ export default { } }, notHandleDataChange: false, + isCreateNode: false } }, computed: { @@ -76,6 +77,10 @@ export default { }, methods: { onBlur(e, node) { + if (this.isCreateNode) { + this.isCreateNode = false + return + } node.data._node.setText(e.target.innerText) }, @@ -97,12 +102,14 @@ export default { // 插入兄弟节点 insertNode() { this.notHandleDataChange = false + this.isCreateNode = true this.mindMap.execCommand('INSERT_NODE', false) }, // 插入下级节点 insertChildNode() { this.notHandleDataChange = false + this.isCreateNode = true this.mindMap.execCommand('INSERT_CHILD_NODE', false) },