diff --git a/src/components/MapBox.vue b/src/components/MapBox.vue index 595d2ea..d5bda49 100644 --- a/src/components/MapBox.vue +++ b/src/components/MapBox.vue @@ -561,7 +561,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() } } }