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() {