Gathering detailed insights and metrics for element-china-area-data
Gathering detailed insights and metrics for element-china-area-data
Gathering detailed insights and metrics for element-china-area-data
Gathering detailed insights and metrics for element-china-area-data
🇨🇳 Element UI && antd Cascader级联选择器 中国省市区三级、二级联动option数据
npm install element-china-area-data
Typescript
Module System
Node Version
NPM Version
TypeScript (92.94%)
HTML (5.92%)
Shell (1.14%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
1,329 Stars
31 Commits
216 Forks
22 Watchers
2 Branches
1 Contributors
Updated on Jul 04, 2025
Latest Version
6.1.0
Package Id
element-china-area-data@6.1.0
Unpacked Size
803.94 kB
Size
164.30 kB
File Count
26
NPM Version
8.19.3
Node Version
16.19.1
Published on
Sep 13, 2023
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
1
23
1npm install element-china-area-data -S
1import { 2 provinceAndCityData, 3 pcTextArr, 4 regionData, 5 pcaTextArr, 6 codeToText, 7} from "element-china-area-data";
provinceAndCityData
省市二级联动数据,汉字+coderegionData
省市区三级联动数据pcTextArr
省市联动数据,纯汉字pcaTextArr
省市区联动数据,纯汉字codeToText
是个大对象,属性是区域码,属性值是汉字 用法例如:codeToText['110000']
输出北京市
省市二级联动:
1<template> 2 <div id="app"> 3 <el-cascader 4 size="large" 5 :options="provinceAndCityData" 6 v-model="selectedOptions"> 7 </el-cascader> 8 </div> 9</template> 10 11<script> 12 import { provinceAndCityData } from 'element-china-area-data' 13 export default { 14 data () { 15 return { 16 provinceAndCityData, 17 selectedOptions: [] 18 } 19 }, 20 } 21</script>
省市二级联动,纯汉字:
1<template> 2 <div id="app"> 3 <el-cascader 4 size="large" 5 :options="pcTextArr" 6 v-model="selectedOptions"> 7 </el-cascader> 8 </div> 9</template> 10 11<script> 12 import { pcTextArr } from 'element-china-area-data' 13 export default { 14 data () { 15 return { 16 pcTextArr, 17 selectedOptions: [] 18 } 19 }, 20 } 21</script>
省市区三级联动
1<template> 2 <div id="app"> 3 <el-cascader 4 size="large" 5 :options="regionData" 6 v-model="selectedOptions"> 7 </el-cascader> 8 </div> 9</template> 10 11<script> 12 import { regionData } from 'element-china-area-data' 13 export default { 14 data () { 15 return { 16 regionData, 17 selectedOptions: [] 18 } 19 }, 20 } 21</script>
省市区三级联动,纯汉字
1<template> 2 <div id="app"> 3 <el-cascader 4 size="large" 5 :options="pcaTextArr" 6 v-model="selectedOptions"> 7 </el-cascader> 8 </div> 9</template> 10 11<script> 12 import { pcaTextArr } from 'element-china-area-data' 13 export default { 14 data () { 15 return { 16 pcaTextArr, 17 selectedOptions: [] 18 } 19 }, 20 } 21</script>
1<script src="https://unpkg.com/element-china-area-data@6.0.0/dist/element-china-area-data.iife.js"></script> 2<script> 3 new Vue({ 4 el: "#app", 5 data: function () { 6 return { 7 codeToText: elementChinaAreaData.codeToText, 8 provinceAndCityData: elementChinaAreaData.provinceAndCityData, 9 pcTextArr: elementChinaAreaData.pcTextArr, 10 regionData: elementChinaAreaData.regionData, 11 pcaTextArr: elementChinaAreaData.pcaTextArr, 12 selectedOptions1: ["11", "110101"], 13 selectedOptions2: ["12", "1201", "120101"], 14 selectedOptions3: ["北京市", "朝阳区"], 15 selectedOptions4: ["北京市", "市辖区", "朝阳区"], 16 }; 17 }, 18 }); 19</script>
Administrative-divisions-of-China
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
0 existing vulnerabilities detected
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More