docs_vue2/one/docs/demo/region-picker/default.vue
2021-09-15 20:03:51 +08:00

45 lines
661 B
Vue

<template>
<article>
<h4>Chinese Regions</h4>
<section>
<veui-region-picker
v-model="selected"
:datasource="region"
/>
</section>
<section>Selected IDs: {{ result }}</section>
</article>
</template>
<script>
import { RegionPicker } from 'veui'
import region from '@/common/region'
export default {
components: {
'veui-region-picker': RegionPicker
},
data () {
return {
region,
selected: null
}
},
computed: {
result () {
return (this.selected || []).join(', ') || '-'
}
}
}
</script>
<style lang="less" scoped>
h4 {
margin-top: 0;
}
section {
margin-bottom: 10px;
}
</style>