省市区联动选择,基于 Element UI. 组合数据来源:area-data
Install the pkg with npm:
npm i --save vue-area-linkage
or yarn
yarn add vue-area-linkage
import Vue from 'vue';
import VueAreaLinkage from 'vue-area-linkage';
Vue.use(VueAreaLinkage)
// basic
<area-select v-model="selected"></area-select>
<area-cascader v-model="selected2"></area-cascader>
//setting
<area-select type='all' :lavel='2' v-model="selected"></area-select>
<area-cascader type='all' v-model="selected2" :lavel='2'></area-cascader>
More demo to visit here.
MIT.