From 5172beb9855590ed93287711cdeab6ac92757c1f Mon Sep 17 00:00:00 2001 From: oldHome Date: Sat, 28 Jun 2025 16:23:55 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E9=99=90=E9=A3=9E=E5=8C=BA=20=E7=A6=81?= =?UTF-8?q?=E9=A3=9E=E5=8C=BA=20menu=E7=BC=A9=E8=BF=9B=E6=8C=89=E9=92=AE?= =?UTF-8?q?=20=E6=A3=80=E6=B5=8B=20=E5=8D=8A=E7=A7=92=E5=90=8E=E5=86=8D?= =?UTF-8?q?=E5=88=B7=E6=96=B0=E5=9C=B0=E5=9B=BE=E7=BB=84=E4=BB=B6=20=20?= =?UTF-8?q?=E9=98=B2=E6=AD=A2=E5=88=B7=E6=96=B0=E5=A4=AA=E6=97=A9=20?= =?UTF-8?q?=E5=AE=B9=E5=99=A8=E8=BF=98=E6=B2=A1=E6=9C=89=E5=B1=95=E5=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../layout/components/main/nofly/setNofly.vue | 18 ++++++++++++++---- .../components/main/nofly/setRestrictfly.vue | 18 ++++++++++++++---- 2 files changed, 28 insertions(+), 8 deletions(-) diff --git a/src/views/layout/components/main/nofly/setNofly.vue b/src/views/layout/components/main/nofly/setNofly.vue index 60ffc95..48db50c 100644 --- a/src/views/layout/components/main/nofly/setNofly.vue +++ b/src/views/layout/components/main/nofly/setNofly.vue @@ -43,10 +43,20 @@ export default { }) } }, - isCollapse (val) { - if (val) { - this.$refs.mapbox.handleResize() - } + /** + * @description: 侧边栏缩进有变化时 地图重新自适应 + */ + isCollapse: { + handler (val) { + if (val) { + setTimeout(() => { + this.$nextTick(() => { + this.$refs.mapbox.handleResize() + }) + }, 500) + } + }, + deep: true } } } diff --git a/src/views/layout/components/main/nofly/setRestrictfly.vue b/src/views/layout/components/main/nofly/setRestrictfly.vue index 1e62f08..d0e0644 100644 --- a/src/views/layout/components/main/nofly/setRestrictfly.vue +++ b/src/views/layout/components/main/nofly/setRestrictfly.vue @@ -43,10 +43,20 @@ export default { }) } }, - isCollapse (val) { - if (val) { - this.$refs.mapbox.handleResize() - } + /** + * @description: 侧边栏缩进有变化时 地图重新自适应 + */ + isCollapse: { + handler (val) { + if (val) { + setTimeout(() => { + this.$nextTick(() => { + this.$refs.mapbox.handleResize() + }) + }, 500) + } + }, + deep: true } } }