diff --git a/src/components/MapBox.vue b/src/components/MapBox.vue index a44f453..4728f7d 100644 --- a/src/components/MapBox.vue +++ b/src/components/MapBox.vue @@ -562,7 +562,9 @@ export default { */ handleResize () { if (this.map) { - this.map.resize() + setTimeout(() => { + this.map.resize() + }, 300) } } }, diff --git a/src/views/layout/components/main/planes/index.vue b/src/views/layout/components/main/planes/index.vue index a621c7e..c46b036 100644 --- a/src/views/layout/components/main/planes/index.vue +++ b/src/views/layout/components/main/planes/index.vue @@ -135,9 +135,7 @@ export default { isCollapse: { handler (val) { if (val) { - setTimeout(() => { - this.$refs.mapbox.handleResize() - }, 500) + this.$refs.mapbox.handleResize() } } }