城市区域列表数据 三级联动_vue2

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]];
 
  },