From 8466a3e99ff6fb96326454ad80503a587655730f Mon Sep 17 00:00:00 2001 From: wanglin2 <1013335014@qq.com> Date: Tue, 17 Oct 2023 15:35:32 +0800 Subject: [PATCH] =?UTF-8?q?Demo=EF=BC=9A=E5=B0=8F=E5=9C=B0=E5=9B=BE?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E9=80=9A=E8=BF=87=E5=9B=BE=E7=89=87=E6=B8=B2?= =?UTF-8?q?=E6=9F=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/pages/Edit/components/Navigator.vue | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/web/src/pages/Edit/components/Navigator.vue b/web/src/pages/Edit/components/Navigator.vue index b6118776..1b8a7553 100644 --- a/web/src/pages/Edit/components/Navigator.vue +++ b/web/src/pages/Edit/components/Navigator.vue @@ -16,7 +16,9 @@ left: svgBoxLeft + 'px', top: svgBoxTop + 'px' }" - > + > + +
@@ -44,11 +46,12 @@ export default { top: 0, bottom: 0, right: 0 - } + }, + mindMapImg: '' } }, computed: { - ...mapState(['isDark']), + ...mapState(['isDark']) }, mounted() { this.$bus.$on('toggle_mini_map', this.toggle_mini_map) @@ -91,14 +94,16 @@ export default { drawMiniMap() { let { - svgHTML, + getImgUrl, viewBoxStyle, miniMapBoxScale, miniMapBoxLeft, miniMapBoxTop } = this.mindMap.miniMap.calculationMiniMap(this.boxWidth, this.boxHeight) // 渲染到小地图 - this.$refs.svgBox.innerHTML = svgHTML + getImgUrl(img => { + this.mindMapImg = img + }) this.viewBoxStyle = viewBoxStyle this.svgBoxScale = miniMapBoxScale this.svgBoxLeft = miniMapBoxLeft