修复小地图关闭时报错的问题
This commit is contained in:
parent
27291fe5c9
commit
352711c871
@ -48,8 +48,10 @@ export default {
|
|||||||
this.$bus.$on("toggle_mini_map", (show) => {
|
this.$bus.$on("toggle_mini_map", (show) => {
|
||||||
this.showMiniMap = show;
|
this.showMiniMap = show;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.init();
|
if (show) {
|
||||||
this.drawMiniMap();
|
this.init();
|
||||||
|
this.drawMiniMap();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
this.$bus.$on("data_change", () => {
|
this.$bus.$on("data_change", () => {
|
||||||
|
|||||||
@ -47,6 +47,9 @@ export default {
|
|||||||
openMiniMap: false
|
openMiniMap: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
mounted () {
|
||||||
|
this.toggleMiniMap(this.openMiniMap)
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
readonlyChange(value) {
|
readonlyChange(value) {
|
||||||
this.mindMap.setMode(value ? 'readonly' : 'edit')
|
this.mindMap.setMode(value ? 'readonly' : 'edit')
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user