From 6c85d8ff3d1fef324ff82c612c80eba60ea0b895 Mon Sep 17 00:00:00 2001 From: lvming Date: Fri, 18 Oct 2024 12:05:14 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=AD=A3=20typescript=20?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Map/Map.tsx | 2 ++ src/common/index.tsx | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Map/Map.tsx b/src/Map/Map.tsx index c3f982b..0bc8596 100644 --- a/src/Map/Map.tsx +++ b/src/Map/Map.tsx @@ -49,6 +49,8 @@ export interface MapProps { className?: string; /** 地图容器父元素的style样式 */ style?: CSSProperties; + /** 可选子组件 */ + children?: ReactNode; }; const eventsMap: Events = [ diff --git a/src/common/index.tsx b/src/common/index.tsx index 27d11f0..bb81f81 100644 --- a/src/common/index.tsx +++ b/src/common/index.tsx @@ -3,5 +3,5 @@ export {default as Component} from './Component'; export interface MapChildrenProps { /** *地图实例,来自父元素``的继承,无需手动传入 */ - map: BMapGL.Map; + map?: BMapGL.Map; }; \ No newline at end of file