<template>
<div id="app">
<v-region :town="true" :ui="true"
@values="regionChange"
:selected="selected">
</v-region>
<el-button @click="changeSelected">reset</el-button>
</div>
</template>
<script>
import Vue from 'vue'
import vRegion from 'v-region';
Vue.use(vRegion);
export default {
data() {
return {
selected: {
province: '350000',
city: '350100',
area: '350104',
town: '350104008'
},
};
},
methods: {
regionChange(d) {
console.log(2, d);
},
changeSelected() {
console.log(0, JSON.stringify(this.selected))
this.selected = {
province: '350000',
city: '350100',
area: '350104',
town: '350104008',
}
console.log(1, this.selected)
},
}
}
</script>