From 83ce090402c031044f81e0fe0bd9f4955cf753d2 Mon Sep 17 00:00:00 2001 From: wanglin2 <1013335014@qq.com> Date: Tue, 5 Dec 2023 09:02:41 +0800 Subject: [PATCH] =?UTF-8?q?Fix=EF=BC=9A=E4=BF=AE=E5=A4=8D=E5=9C=A8?= =?UTF-8?q?=E8=8A=82=E7=82=B9=E6=96=87=E6=9C=AC=E7=BC=96=E8=BE=91=E4=B8=AD?= =?UTF-8?q?=E5=92=8C=E5=85=B3=E8=81=94=E7=BA=BF=E6=96=87=E6=9C=AC=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E4=B8=AD=E6=97=B6=E9=94=80=E6=AF=81=E6=80=9D=E7=BB=B4?= =?UTF-8?q?=E5=AF=BC=E5=9B=BE=E6=96=87=E6=9C=AC=E7=BC=96=E8=BE=91=E6=A1=86?= =?UTF-8?q?=E6=9C=AA=E8=A2=AB=E9=94=80=E6=AF=81=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- simple-mind-map/index.js | 6 ++++++ web/src/pages/Edit/components/Edit.vue | 1 + 2 files changed, 7 insertions(+) diff --git a/simple-mind-map/index.js b/simple-mind-map/index.js index 9b3dc452..27c182e2 100644 --- a/simple-mind-map/index.js +++ b/simple-mind-map/index.js @@ -487,6 +487,12 @@ class MindMap { // 销毁 destroy() { this.emit('beforeDestroy') + // 清除节点编辑框 + this.renderer.textEdit.hideEditTextBox() + // 清除关联线文字编辑框 + if (this.associativeLine) { + this.associativeLine.hideEditTextBox() + } // 移除插件 ;[...MindMap.pluginList].forEach(plugin => { if (this[plugin.instanceName].beforePluginDestroy) { diff --git a/web/src/pages/Edit/components/Edit.vue b/web/src/pages/Edit/components/Edit.vue index bd9435ce..20e3805c 100644 --- a/web/src/pages/Edit/components/Edit.vue +++ b/web/src/pages/Edit/components/Edit.vue @@ -188,6 +188,7 @@ export default { this.$bus.$off('node_tree_render_end', this.handleHideLoading) this.$bus.$off('showLoading', this.handleShowLoading) window.removeEventListener('resize', this.handleResize) + this.mindMap.destroy() }, methods: { handleStartTextEdit() {