Demo:修复基础样式侧边栏打开状态下,导入思维导图数据后侧边栏数据未更新的问题

This commit is contained in:
wanglin2 2023-08-12 15:10:46 +08:00
parent 0d992bd6b1
commit 680320ba76

View File

@ -863,10 +863,21 @@ export default {
this.enableNodeRichText = this.localConfig.openNodeRichText
this.mousewheelAction = this.localConfig.mousewheelAction
this.mousewheelZoomActionReverse = this.localConfig.mousewheelZoomActionReverse
this.$bus.$on('setData', this.onSetData)
},
beforeDestroy() {
this.$bus.$off('setData', this.onSetData)
},
methods: {
...mapMutations(['setLocalConfig']),
onSetData() {
if (this.activeSidebar !== 'baseStyle') return
setTimeout(() => {
this.initStyle()
}, 0)
},
/**
* @Author: 王林
* @Date: 2021-05-05 14:02:12