[pricelist] fix copy object of state
This commit is contained in:
parent
7a3a151688
commit
459a9fea08
|
@ -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>();
|
||||
|
|
Loading…
Reference in New Issue