react-fykc-region-select

a region select

Usage no npm install needed!

<script type="module">
  import reactFykcRegionSelect from 'https://cdn.skypack.dev/react-fykc-region-select';
</script>

README

/* 参数 regions:数据源 */ regions:PropTypes.array, onAreaChange:PropTypes.func, val:PropTypes.object, showCity:PropTypes.bool, showDistrict:PropTypes.bool, showClear:PropTypes.bool,

返回参数 valueObj 格式{ provinceId:null, provinceName:null, cityId:null, cityName:null, districtId:null, districtName:null, } selectVal 格式 北京-北京-昌平区

regions格式 { "status": { "desc": "操作成功", "code": 0 }, "data": [{ "value": 1, "label": "中国", "children": [{ "value": 32, "label": "重庆", "children": [{ "value": 394, "label": "重庆", "children": [{ "value": 3328, "label": "永川区" }] }] }] }] }