Enabled editing of attribute damage in library forms
This commit is contained in:
@@ -62,7 +62,7 @@
|
||||
@change="change('description', ...arguments)"
|
||||
/>
|
||||
<calculation-error-list :calculations="model.descriptionCalculations" />
|
||||
|
||||
{{ cntxt }}
|
||||
<form-section
|
||||
name="Advanced"
|
||||
standalone
|
||||
@@ -94,7 +94,7 @@
|
||||
class="damage-field text-center"
|
||||
style="max-width: 300px;"
|
||||
hint="The attribute's final value is reduced by this amount"
|
||||
disabled
|
||||
:disabled="!context.isLibraryForm"
|
||||
:value="model.damage"
|
||||
:error-messages="errors.damage"
|
||||
@change="change('damage', ...arguments)"
|
||||
@@ -124,6 +124,9 @@
|
||||
import CalculationErrorList from '/imports/ui/properties/forms/shared/CalculationErrorList.vue';
|
||||
|
||||
export default {
|
||||
inject: {
|
||||
context: { default: {} }
|
||||
},
|
||||
components: {
|
||||
FormSection,
|
||||
CalculationErrorList,
|
||||
@@ -179,6 +182,12 @@
|
||||
});
|
||||
return data;
|
||||
},
|
||||
computed: {
|
||||
cntxt(){
|
||||
console.log(this.context);
|
||||
return this.context;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'model.attributeType': function(newVal, oldVal){
|
||||
if (newVal === 'hitDice' && !this.model.hitDiceSize){
|
||||
@@ -187,7 +196,7 @@
|
||||
this.$emit('change', {path: ['hitDiceSize'], value: undefined});
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user