【类 型】:factor 刷新地图 加一个延迟执行

【原  因】:容器变化需要时间  在容器变宽 之后  再刷新地图
【过  程】:
【影  响】:
This commit is contained in:
tk 2024-07-25 13:01:35 +08:00
parent b072965257
commit b3e41420f0
2 changed files with 4 additions and 4 deletions

View File

@ -562,7 +562,9 @@ export default {
*/
handleResize () {
if (this.map) {
this.map.resize()
setTimeout(() => {
this.map.resize()
}, 300)
}
}
},

View File

@ -135,9 +135,7 @@ export default {
isCollapse: {
handler (val) {
if (val) {
setTimeout(() => {
this.$refs.mapbox.handleResize()
}, 500)
this.$refs.mapbox.handleResize()
}
}
}