修复小地图关闭时报错的问题

This commit is contained in:
wanglin2 2022-10-11 18:36:16 +08:00
parent 27291fe5c9
commit 352711c871
2 changed files with 7 additions and 2 deletions

View File

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

View File

@ -47,6 +47,9 @@ export default {
openMiniMap: false
}
},
mounted () {
this.toggleMiniMap(this.openMiniMap)
},
methods: {
readonlyChange(value) {
this.mindMap.setMode(value ? 'readonly' : 'edit')