Skills can now apply to calcs by tag
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
v-if="showValue"
|
||||
#value
|
||||
>
|
||||
{{ model.value }}
|
||||
{{ displayedValue }}
|
||||
</template>
|
||||
<template #prepend>
|
||||
<slot name="prepend" />
|
||||
@@ -37,7 +37,7 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
showValue() {
|
||||
const value = this.model.value;
|
||||
let value = this.displayedValue;
|
||||
if (
|
||||
this.hideValue ||
|
||||
(value === undefined || value === null) ||
|
||||
@@ -45,6 +45,14 @@ export default {
|
||||
) return false;
|
||||
return true;
|
||||
},
|
||||
displayedValue() {
|
||||
let value = this.model.value;
|
||||
// Use the base value instead if the calculation has it, because effects can modify the value
|
||||
if (this.model.baseValue !== undefined) {
|
||||
value = this.model.baseValue;
|
||||
}
|
||||
return value;
|
||||
},
|
||||
errorList(){
|
||||
if (this.model.parseError){
|
||||
return [this.model.parseError, ...this.model.errors];
|
||||
|
||||
Reference in New Issue
Block a user