From 8aa8e3db93b83eee09fc92853bf383b370571ed4 Mon Sep 17 00:00:00 2001 From: WeaveFox Bot Date: Thu, 14 May 2026 23:15:50 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=A4=A9=E5=9C=B0?= =?UTF-8?q?=E5=9B=BE=E5=9B=BE=E5=B1=82=E8=A2=AB=E8=A6=86=E7=9B=96=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98=20(#2852)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复 Issue #2852: 天地图的组件被地图覆盖 问题原因: - .tdt-pane 设置了 position: absolute - #tdt-L7 容器继承了父元素的定位方式 - 导致 L7 图层被天地图底图覆盖 解决方案: - 为 #tdt-L7 容器添加 position: relative 样式 - 使其建立新的定位上下文,防止被父元素覆盖 Reference: #2852 --- packages/maps/src/tdtmap/map.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/maps/src/tdtmap/map.ts b/packages/maps/src/tdtmap/map.ts index 3a23e12723..998499687a 100644 --- a/packages/maps/src/tdtmap/map.ts +++ b/packages/maps/src/tdtmap/map.ts @@ -116,6 +116,7 @@ export default class TdtMapService extends BaseMapService { overlayPane.parentElement.appendChild(container); container.id = 'tdt-L7'; const size = this.map.getSize(); + container.style.position = 'relative'; // 修复天地图图层被覆盖的问题 container.style.zIndex = '200'; //置于上层 container.style.width = `${size.x}px`; container.style.height = `${size.y}px`;