mirror of
https://github.com/wanglin2/mind-map.git
synced 2026-02-21 18:37:43 +08:00
修复小地图关闭时报错的问题
This commit is contained in:
parent
27291fe5c9
commit
352711c871
@ -48,8 +48,10 @@ export default {
|
||||
this.$bus.$on("toggle_mini_map", (show) => {
|
||||
this.showMiniMap = show;
|
||||
this.$nextTick(() => {
|
||||
this.init();
|
||||
this.drawMiniMap();
|
||||
if (show) {
|
||||
this.init();
|
||||
this.drawMiniMap();
|
||||
}
|
||||
});
|
||||
});
|
||||
this.$bus.$on("data_change", () => {
|
||||
|
||||
@ -47,6 +47,9 @@ export default {
|
||||
openMiniMap: false
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
this.toggleMiniMap(this.openMiniMap)
|
||||
},
|
||||
methods: {
|
||||
readonlyChange(value) {
|
||||
this.mindMap.setMode(value ? 'readonly' : 'edit')
|
||||
|
||||
Loading…
Reference in New Issue
Block a user