@halobear/vue-region
v2.0.2
Published
中国城市选择
Downloads
8
Readme
@halobear/vue-region
vue 中国城市选择
安装
yarn add @halobear/vue-region
使用
<template>
<div class="test-container">
<vue-region changeOnSelect v-model="region" :simple="false" @change="change"></vue-region>
<p>{{ region_name }}: {{ region.join("、") }}</p>
</div>
</template>
<script>
import VueRegion from '@halobear/vue-region'
export default {
components: {
VueRegion,
},
data() {
return {
region: ['0'],
region_name: '全国',
}
},
methods: {
change(value, name) {
this.region_name = name
},
},
}
</script>