From c8efe13930a1152cf69586e57d522c177d29c6f9 Mon Sep 17 00:00:00 2001 From: szdot Date: Thu, 25 Jul 2024 01:19:15 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E7=B1=BB=20=20=E5=9E=8B=E3=80=91?= =?UTF-8?q?=EF=BC=9Afix=20=E5=9C=B0=E5=9B=BE=E7=BB=84=E4=BB=B6=E6=94=B9?= =?UTF-8?q?=E7=94=A8=20=E5=86=85=E7=BD=AE=E7=9A=84resize()=E6=96=B9?= =?UTF-8?q?=E6=B3=95=E6=9D=A5=E5=88=B7=E6=96=B0=20=E5=AE=BD=E5=BA=A6=20?= =?UTF-8?q?=E3=80=90=E5=8E=9F=20=20=E5=9B=A0=E3=80=91=EF=BC=9A=E5=BC=BA?= =?UTF-8?q?=E5=88=B6=E5=88=B7=E6=96=B0=20=E4=BC=9A=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E5=9C=B0=E5=9B=BE=E4=B8=8A=E7=BB=98=E5=88=B6=20=E5=85=A8?= =?UTF-8?q?=E9=83=A8=E6=B6=88=E5=A4=B1=20=E3=80=90=E8=BF=87=20=20=E7=A8=8B?= =?UTF-8?q?=E3=80=91=EF=BC=9A=20=E3=80=90=E5=BD=B1=20=20=E5=93=8D=E3=80=91?= =?UTF-8?q?=EF=BC=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/MapBox.vue | 8 ++++++ .../layout/components/main/planes/index.vue | 27 ++++++++----------- 2 files changed, 19 insertions(+), 16 deletions(-) diff --git a/src/components/MapBox.vue b/src/components/MapBox.vue index 6d857c4..fc1dbdf 100644 --- a/src/components/MapBox.vue +++ b/src/components/MapBox.vue @@ -506,6 +506,14 @@ export default { this.map.panBy([x, y], { duration: 333 // 过渡持续时间,以毫秒为单位 }) + }, + /** + * @description:重置地图大小 + */ + handleResize () { + if (this.map) { + this.map.resize() + } } }, beforeDestroy () { diff --git a/src/views/layout/components/main/planes/index.vue b/src/views/layout/components/main/planes/index.vue index 76c200d..407dfa7 100644 --- a/src/views/layout/components/main/planes/index.vue +++ b/src/views/layout/components/main/planes/index.vue @@ -1,6 +1,6 @@