Fixed damage multiplier forms and viewers
This commit is contained in:
@@ -11,12 +11,13 @@
|
||||
<smart-select
|
||||
label="Damage Type"
|
||||
style="flex-basis: 300px;"
|
||||
multiple
|
||||
:items="damageTypes"
|
||||
:value="model.damageType"
|
||||
:error-messages="errors.damageType"
|
||||
:value="model.damageTypes"
|
||||
:error-messages="errors.damageTypes"
|
||||
:menu-props="{auto: true, lazy: true}"
|
||||
:debounce-time="debounceTime"
|
||||
@change="(value, ack) => $emit('change', {path: ['damageType'], value, ack})"
|
||||
@change="(value, ack) => $emit('change', {path: ['damageTypes'], value, ack})"
|
||||
/>
|
||||
<smart-select
|
||||
label="Value"
|
||||
@@ -59,15 +60,6 @@
|
||||
}, {
|
||||
value: 'slashing',
|
||||
text: 'Slashing',
|
||||
}, {
|
||||
value: 'magicalBludgeoning',
|
||||
text: 'Magical Bludgeoning',
|
||||
}, {
|
||||
value: 'magicalPiercing',
|
||||
text: 'Magical Piercing',
|
||||
}, {
|
||||
value: 'magicalSlashing',
|
||||
text: 'Magical Slashing',
|
||||
}, {
|
||||
value: 'acid',
|
||||
text: 'Acid',
|
||||
@@ -113,6 +105,9 @@
|
||||
},
|
||||
],
|
||||
};},
|
||||
methods: {
|
||||
log: console.log
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<template lang="html">
|
||||
<div>
|
||||
<property-name :value="model.name"/>
|
||||
<div>
|
||||
{{model.damageType}} {{operation}}
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<property-name :value="model.name" />
|
||||
<div v-if="model.damageTypes.length">
|
||||
{{ operation }} to {{ model.damageTypes.join(', ') }} damage
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -14,9 +14,9 @@ export default {
|
||||
computed: {
|
||||
operation(){
|
||||
switch (this.model.value){
|
||||
case 0: return "immunity";
|
||||
case 0.5: return "resistance";
|
||||
case 2: return "vulnerability";
|
||||
case 0: return 'Immunity';
|
||||
case 0.5: return 'Resistance';
|
||||
case 2: return 'Vulnerability';
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user