From be4d55537515386e68248dd6867874ecc7db4772 Mon Sep 17 00:00:00 2001 From: mk <2403457699@qq.com> Date: Tue, 21 Nov 2023 17:58:35 +0800 Subject: [PATCH] =?UTF-8?q?=E9=BC=A0=E6=A0=87=E7=A7=BB=E5=85=A5popup?= =?UTF-8?q?=E6=9C=AA=E5=AE=9A=E4=B9=89=E5=AF=BC=E8=87=B4=E5=9C=B0=E5=9B=BE?= =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/dataBoard/cpts/map/index.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/views/dataBoard/cpts/map/index.vue b/src/views/dataBoard/cpts/map/index.vue index 722d34d2a..9e9bf3704 100644 --- a/src/views/dataBoard/cpts/map/index.vue +++ b/src/views/dataBoard/cpts/map/index.vue @@ -551,8 +551,12 @@ export default { `); scene.addPopup(popup); }); + polygonLayer.on("mouseout", (e) => { - popup.remove(); + // 如果popup初始化没成功报错导致地图初始化失败 + if(popup){ + popup.remove(); + } }); polygonLayer.on("click", (e) => { if (this.level === "grid") {