[pricelist] fix copy object of state

This commit is contained in:
Tim Gröger 2021-04-10 00:14:39 +02:00
parent 7a3a151688
commit 459a9fea08
1 changed files with 2 additions and 1 deletions

View File

@ -72,7 +72,8 @@ export default defineComponent({
emits: { save: () => true, cancel: () => true },
setup(props, { emit }) {
onBeforeMount(() => {
edit_drink.value = Object.assign({}, props.drink);
edit_drink.value = <Drink>JSON.parse(JSON.stringify(props.drink));
console.log('edit_drink', edit_drink.value)
});
const edit_drink = ref<Drink>();