docs_vue2/one/docs/demo/region-picker/default.vue

45 lines
666 B
Vue
Raw Normal View History

2020-08-13 11:47:56 +08:00
<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 docs>
h4 {
margin-top: 0;
}
section {
margin-bottom: 10px;
}
</style>