feat(Map): 添加只读模式支持

master
LiuJiaNan 2026-04-13 11:44:54 +08:00
parent e8aa0495c3
commit 727d27bd69
2 changed files with 4 additions and 0 deletions

View File

@ -11,6 +11,8 @@ export interface MapProps {
area?: string; area?: string;
/** 是否显示所属区域 */ /** 是否显示所属区域 */
showArea?: boolean; showArea?: boolean;
/** 是否只查看 */
disable?: boolean;
/** 确认选择回调 */ /** 确认选择回调 */
onConfirm?: (longitude: number | string, latitude: number | string, extra: { area: string }) => void; onConfirm?: (longitude: number | string, latitude: number | string, extra: { area: string }) => void;
/** 地图类型,默认 baidu */ /** 地图类型,默认 baidu */

View File

@ -13,6 +13,7 @@ const Map = (props) => {
required = true, required = true,
area = "", area = "",
showArea = false, showArea = false,
disable = false,
type = "baidu", type = "baidu",
} = props; } = props;
@ -68,6 +69,7 @@ const Map = (props) => {
area={area} area={area}
type={type} type={type}
showArea={showArea} showArea={showArea}
disable={disable}
onConfirm={handleMapConfirm} onConfirm={handleMapConfirm}
/> />
</> </>