From f7e222d64e8568f7043d5721b232dad0686c88d0 Mon Sep 17 00:00:00 2001 From: chenxianhui Date: Fri, 26 Jan 2024 16:18:28 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E7=82=B9=E9=80=89=E5=BC=B9=E7=AA=97?= =?UTF-8?q?=E5=85=B3=E9=97=AD=E5=90=8E=EF=BC=8C=E6=B8=85=E9=99=A4=E5=86=85?= =?UTF-8?q?=E5=AE=B9=EF=BC=8C=E9=98=B2=E6=AD=A2=E8=A7=86=E9=A2=91=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E6=92=AD=E6=94=BE=20review=20by=20qiw?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/mapboxgl/web-map/control/identify/Identify.vue | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/mapboxgl/web-map/control/identify/Identify.vue b/src/mapboxgl/web-map/control/identify/Identify.vue index 539353c4..d6932763 100644 --- a/src/mapboxgl/web-map/control/identify/Identify.vue +++ b/src/mapboxgl/web-map/control/identify/Identify.vue @@ -232,6 +232,7 @@ export default { }, // 过滤数据, 添加popup addPopup(feature, fields) { + this.viewModel.popup?.off('close', this.clearPopup); this.popupProps = {}; if (feature.properties) { // 过滤字段 @@ -252,10 +253,15 @@ export default { this.$nextTick(() => { this.isHide = false; // 显示内容 this.viewModel.addPopup(coordinates, this.$refs.Popup); + this.viewModel.popup.on('close', this.clearPopup); setPopupArrowStyle(this.tablePopupBgData); }); } }, + clearPopup() { + // 如果不清除弹窗内容,当弹窗内容有视频,且开启自动播放+弹窗/全屏时,会导致更改配置时,即使没打开点选弹窗,视频也会自动弹窗播放 + this.popupProps = {}; + }, // 添加高亮图层 addOverlayToMap(layer, filter) { // 先移除之前的高亮layer