From 352711c8718daff0682be08eb96acdb2a6e86476 Mon Sep 17 00:00:00 2001 From: wanglin2 <1013335014@qq.com> Date: Tue, 11 Oct 2022 18:36:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=B0=8F=E5=9C=B0=E5=9B=BE?= =?UTF-8?q?=E5=85=B3=E9=97=AD=E6=97=B6=E6=8A=A5=E9=94=99=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/pages/Edit/components/Navigator.vue | 6 ++++-- web/src/pages/Edit/components/NavigatorToolbar.vue | 3 +++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/web/src/pages/Edit/components/Navigator.vue b/web/src/pages/Edit/components/Navigator.vue index 3ff43eab..5d0ce644 100644 --- a/web/src/pages/Edit/components/Navigator.vue +++ b/web/src/pages/Edit/components/Navigator.vue @@ -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", () => { diff --git a/web/src/pages/Edit/components/NavigatorToolbar.vue b/web/src/pages/Edit/components/NavigatorToolbar.vue index 51863e57..0fb1e4ab 100644 --- a/web/src/pages/Edit/components/NavigatorToolbar.vue +++ b/web/src/pages/Edit/components/NavigatorToolbar.vue @@ -47,6 +47,9 @@ export default { openMiniMap: false } }, + mounted () { + this.toggleMiniMap(this.openMiniMap) + }, methods: { readonlyChange(value) { this.mindMap.setMode(value ? 'readonly' : 'edit')