From 00b948768b877b5c674d02fbf3634de675aed298 Mon Sep 17 00:00:00 2001 From: jianneng-fit2cloud Date: Tue, 5 Nov 2024 16:44:19 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=9B=BE=E8=A1=A8):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E7=AC=A6=E5=8F=B7=E5=9C=B0=E5=9B=BE=E6=8F=90=E7=A4=BA=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E9=94=99=E4=B9=B1=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/js/panel/charts/map/symbolic-map.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/map/symbolic-map.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/map/symbolic-map.ts index c7809aae30..0dd99fa78b 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/charts/map/symbolic-map.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/charts/map/symbolic-map.ts @@ -330,6 +330,15 @@ export class SymbolicMap extends L7ChartView { return resultMap } + /** + * 清除 popup + * @param container + */ + clearPopup = container => { + const containerElement = document.getElementById(container) + containerElement?.querySelectorAll('.l7-popup').forEach((element: Element) => element.remove()) + } + /** * 构建 tooltip * @param chart @@ -337,6 +346,7 @@ export class SymbolicMap extends L7ChartView { */ buildTooltip = (chart, container, pointLayer) => { const customAttr = chart.customAttr ? parseJson(chart.customAttr) : null + this.clearPopup(container) if (customAttr?.tooltip?.show) { const { tooltip } = deepCopy(customAttr) let showFields = tooltip.showFields || []