Files
DiceCloud/app/imports/ui/properties/treeNodeViews/TreeNodeView.vue
2021-08-10 15:02:24 +02:00

32 lines
578 B
Vue

<template lang="html">
<component
:is="treeNodeView"
:model="model"
:selected="selected"
/>
</template>
<script lang="js">
import treeNodeViewIndex from '/imports/ui/properties/treeNodeViews/treeNodeViewIndex.js';
export default {
name: 'TreeNodeView',
components: {
...treeNodeViewIndex
},
props: {
model: {
type: Object,
required: true,
},
selected: Boolean,
},
computed: {
treeNodeView(){
let type = this.model.type;
return treeNodeViewIndex[type] || treeNodeViewIndex.default;
},
}
}
</script>