diff --git a/packages/components/map/index.vue b/packages/components/map/index.vue index 17545d9c..6ae63af0 100644 --- a/packages/components/map/index.vue +++ b/packages/components/map/index.vue @@ -513,11 +513,17 @@ }) defineExpose({ // 父组件获取map实例方法 - getMapInstance: () => map + getMapInstance: () => map, + // 父组件/外部获取map组件 options + getBaseMapOptions: () => props, + // 设置地图是否可拖动 + setDragging }) provide('getMapInstance', () => map) provide('parentUidGetter', uid) provide('baseMapSetCenterAndZoom', (_center: { lng: number; lat: number }) => setCenterAndZoom(_center)) + provide('baseMapSetDragging', (enableDragging: boolean) => setDragging(enableDragging)) + provide('getBaseMapOptions', () => props)