From 90c15e81d40fb918ee280db033c8b7e179d00011 Mon Sep 17 00:00:00 2001 From: oldHome Date: Sun, 1 Jun 2025 03:19:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A6=82=E5=86=B5=E5=9C=B0=E5=9B=BE=20?= =?UTF-8?q?=E5=B0=BA=E5=AF=B8=E5=8F=98=E5=8C=96=20=20=E8=87=AA=E9=80=82?= =?UTF-8?q?=E5=BA=94=20=20=E4=BD=BF=E7=94=A8=E7=BB=84=E4=BB=B6=E5=86=85?= =?UTF-8?q?=E9=83=A8=E5=AE=9A=E4=B9=89=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/layout/components/main/home/index.vue | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/src/views/layout/components/main/home/index.vue b/src/views/layout/components/main/home/index.vue index 8b0d79e..4edb614 100644 --- a/src/views/layout/components/main/home/index.vue +++ b/src/views/layout/components/main/home/index.vue @@ -1,6 +1,6 @@ @@ -11,7 +11,6 @@ export default { name: 'Home', data () { return { - mapBoxKey: 0 // 初始化一个变量用于控制map-box组件的重新渲染 } }, components: { @@ -63,16 +62,10 @@ export default { } }, /** - * @description: 侧边栏缩进有变化时 地图重新自适应 + * @description: 侧边栏显隐 */ - isCollapse: { - handler (val) { - if (val) { - setTimeout(() => { - this.mapBoxKey++ // 更新mapBoxKey以触发map-box组件的重新渲染 - }, 500) - } - } + isCollapse () { + return this.$store.state.app.isCollapse } }, destroyed () {