Files
DiceCloud/app/imports/ui/components/computation/ComputedForCreature.vue
2020-04-23 19:32:48 +02:00

30 lines
551 B
Vue

<template lang="html">
<computed :value="value" :scope="scope" v-bind="$attrs"/>
</template>
<script>
import Computed from '/imports/ui/components/computation/Computed.vue';
export default {
inject: ['computationContext'],
components: {
Computed,
},
props: {
value: {
type: String,
},
},
meteor: {
creature(){
return Creatures.findOne(this.creatureId);
},
},
computed: {
scope(){
return this.computationContext.creature && this.computationContext.creature.variables;
}
}
}
</script>