Skip to content

getRegionListByPid ​

▸ getRegionListByPid(regionData, pid?): { id: number ; name: string }[]

根据区号获取子区域列表

参数 ​

NameTypeDefault valueDescription
regionDataRecord<number, string[]>undefined区域数据
pidstring'086'

返回值 ​

{ id: number ; name: string }[]

示例

ts
REGION_DATA 通常从 shared-constants 引入
getRegionListByPid(REGION_DATA, '086')

源码 ​

get-region-list-by-pid.js