improved calculation fields

This commit is contained in:
Stefan Zermatten
2021-09-27 19:25:11 +02:00
parent 6dc7e12582
commit b471d0c5cf
3 changed files with 33 additions and 5 deletions

View File

@@ -2,9 +2,17 @@
<div class="computed-field">
<text-field
:value="model.calculation"
:rows="1"
v-bind="$attrs"
@change="(value, ack) => $emit('change', {path: ['calculation'], value, ack})"
/>
>
<template
v-if="model.value !== undefined || model.value !== null"
#value
>
{{ model.value }}
</template>
</text-field>
<calculation-error-list :errors="model.errors" />
</div>
</template>
@@ -19,7 +27,7 @@ export default {
props: {
model: {
type: Object,
default: () => {},
default: () => ({}),
},
},
}