RegionPicker
Demos
Chinese Regions
<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>
API
Props
Name | Type | Default | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
datasource | Array<Object> | [] | The datasource of the region picker. The type of node item is
| |||||||||||||||
selected | Array<string> | - |
The array of selected | |||||||||||||||
include-indeterminate | boolean | false | Whether to include indeterminate node into selected nodes. Non-leaf nodes inside datasource will be in indeterminate state if their descendant nodes are partially selected. | |||||||||||||||
disabled | boolean | false | Whether the region picker is disabled. | |||||||||||||||
readonly | boolean | false | Whether the region picker is read-only. |
Slots
Name | Description | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
label | The label content of each node. Displays the
Additionally, custom properties apart from the listed ones will also be passes into the scope object via When |
Events
Name | Description |
---|---|
select |
Triggered when the selection changed. The callback parameter list is |