From 559f0776123a2205863b5787d5b8e1e012d397d3 Mon Sep 17 00:00:00 2001 From: suerprisePlus <15810472099@163.com> Date: 星期三, 23 十月 2024 15:29:34 +0800 Subject: [PATCH] 灾害效果修改 --- src/views/visual/mapView/index.vue | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/views/visual/mapView/index.vue b/src/views/visual/mapView/index.vue index 4cecfec..dc30041 100644 --- a/src/views/visual/mapView/index.vue +++ b/src/views/visual/mapView/index.vue @@ -87,6 +87,7 @@ this.showEarth = true; this.mapViewStart(); this.$busEvent.$on('CHANGE_MAPINFO', (res) => { + this.setMapInfo(res); }); }, @@ -100,12 +101,15 @@ methods: { setMapInfo(res) { - // console.log(res); - if (res.length > 0) { + this.childObj = null + if (res && res.length > 0) { this.childObj = res; - setTimeout(() => { + this.$nextTick(() => { this.$refs && this.$refs.mapInfo && this.$refs.mapInfo.open(); - }, 200); + }) + + } else { + return } }, mapViewStart() { -- Gitblit v1.9.3