省市区
1 下载
npm install v-distpicker --save
全局引入
import Distpicker from 'v-distpicker'
Vue.component('v-distpicker', Distpicker)
或者局部引入
import VDistpicker from 'v-distpicker'
export default {
components: VDistpicker
}
使用
<v-distpicker province="广东省" city="广州市" area="海珠区" @selected="onSelected"></v-distpicker>
onSelected(data) {
this.address.province = data.province.value
this.address.city = data.city.value
this.address.county = data.area.value
},
还没有评论,来说两句吧...