import{regionData,CodeToText} from 'element-china-area-data'
//引入element组件库中的插件
<el-cascader
v-model="areaData"
:options="options"
@change="handleChange">
</el-cascader>
options:regionData,
//三级联动
handleChange(arr){
this.ruleForm.address.province=CodeToText[arr[0]];
this.ruleForm.address.city=CodeToText[arr[1]];
this.ruleForm.address.district=CodeToText[arr[2]];
},
标签:arr,CodeToText,regionData,列表,ruleForm,联动,address,element,三级
From: https://blog.51cto.com/u_15476220/7535162