Files
DiceCloud/app/imports/client/ui/properties/treeNodeViews/TreeNodeView.vue
ThaumRystra b90cc2e467 Removed damage effects from tree views
The totals of those effects are already accounted for in the displayed number
2024-10-29 16:06:46 +02:00

42 lines
729 B
Vue

<template lang="html">
<component
:is="treeNodeView"
:model="model"
:selected="selected"
:class="{
'inactive': model.inactive,
}"
v-bind="$attrs"
/>
</template>
<script lang="js">
import treeNodeViewIndex from '/imports/client/ui/properties/treeNodeViews/treeNodeViewIndex';
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>
<style lang="css" scoped>
.inactive {
opacity: 0.6;
}
</style>