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