Fix:修复在节点文本编辑中和关联线文本编辑中时销毁思维导图文本编辑框未被销毁的问题

This commit is contained in:
wanglin2
2023-12-05 09:02:41 +08:00
parent 250ff30704
commit 83ce090402
2 changed files with 7 additions and 0 deletions

View File

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

View File

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