[pricelist][calculation] fixed overloade

This commit is contained in:
Tim Gröger 2021-04-04 23:20:53 +02:00
parent f5b370e743
commit 89cd109587
1 changed files with 4 additions and 4 deletions

View File

@ -68,8 +68,8 @@ export default defineComponent({
},
},
setup(props) {
const _volume = ref<number>();
const volume = computed({
const _volume = ref<number|undefined>();
const volume = computed<number|undefined>({
get: () => {
if (_volume.value !== undefined) {
return _volume.value;
@ -77,9 +77,9 @@ export default defineComponent({
if (props.props.volumes.length > 0) {
return props.props.volumes[0].id;
}
return null;
return undefined;
},
set: (val: number) => (_volume.value = val),
set: (val: number|undefined) => (_volume.value = val),
});
return { volume };
},