From 76b0caa62e1eceb3c4111a31869ae56a6414c225 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Gr=C3=B6ger?= Date: Fri, 19 Nov 2021 21:57:25 +0100 Subject: [PATCH] [fix] fix issue #4. preview load when image is deleted --- src/components/DrinkModify.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/DrinkModify.vue b/src/components/DrinkModify.vue index 2ed8841..467ed6e 100644 --- a/src/components/DrinkModify.vue +++ b/src/components/DrinkModify.vue @@ -240,7 +240,7 @@ export default defineComponent({ edit_drink.value?.receipt?.splice(event, 1); } - const drinkPic = ref(); + const drinkPic = ref(); const imgsrc = ref(); const deletePic = ref(false); @@ -274,6 +274,9 @@ export default defineComponent({ if (imgsrc.value) { return imgsrc.value; } + if (deletePic.value && !imgsrc.value) { + return 'no-image.svg'; + } if (edit_drink.value?.has_image) { return `${api.defaults.baseURL || ''}/pricelist/drinks/${ edit_drink.value.id