Overhaul of character action components, actions now consume resources
This commit is contained in:
30
app/imports/ui/properties/treeNodeViews/TreeNodeView.vue
Normal file
30
app/imports/ui/properties/treeNodeViews/TreeNodeView.vue
Normal file
@@ -0,0 +1,30 @@
|
||||
<template lang="html">
|
||||
<component
|
||||
:is="treeNodeView"
|
||||
:model="model"
|
||||
:selected="selected"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import treeNodeViewIndex from '/imports/ui/properties/treeNodeViews/treeNodeViewIndex.js';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
...treeNodeViewIndex
|
||||
},
|
||||
props: {
|
||||
model: {
|
||||
type: Object,
|
||||
required: true,
|
||||
},
|
||||
selected: Boolean,
|
||||
},
|
||||
computed: {
|
||||
treeNodeView(){
|
||||
let type = this.model.type;
|
||||
return treeNodeViewIndex[type] || treeNodeViewIndex.default;
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user