You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
406 B
19 lines
406 B
|
6 years ago
|
<script>
|
||
|
|
import Tree from './Tree'
|
||
|
|
import Tab from './Tab'
|
||
|
|
|
||
|
|
export default {
|
||
|
|
name: "RegionSelector",
|
||
|
|
|
||
|
|
functional: true,
|
||
|
|
|
||
|
|
props: {
|
||
|
|
type: {type: String, default: 'tab', validator: v => ['tree', 'tab'].includes(v)}
|
||
|
|
},
|
||
|
|
|
||
|
|
render(h, context) {
|
||
|
|
return h(context.props.type === 'tree' ? Tree : Tab, context.data)
|
||
|
|
}
|
||
|
|
}
|
||
|
|
</script>
|