From bcb661cc3fe4bfd26f4b393577ad44f778fefd3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Gr=C3=B6ger?= Date: Mon, 15 Nov 2021 21:11:21 +0100 Subject: [PATCH] [fix] force load picture not from cache --- src/components/CalculationTable.vue | 4 +++- src/components/DrinkModify.vue | 9 ++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/components/CalculationTable.vue b/src/components/CalculationTable.vue index ceac1dc..f04348d 100644 --- a/src/components/CalculationTable.vue +++ b/src/components/CalculationTable.vue @@ -557,7 +557,9 @@ export default defineComponent({ function image(id: number | undefined) { if (id) { - return `${api.defaults.baseURL || ''}/pricelist/drinks/${id}/picture?thumbnail`; + return `${ + api.defaults.baseURL || '' + }/pricelist/drinks/${id}/picture?thumbnail?t=${new Date()}`; } return 'no-image.svg'; } diff --git a/src/components/DrinkModify.vue b/src/components/DrinkModify.vue index da7c229..2ed8841 100644 --- a/src/components/DrinkModify.vue +++ b/src/components/DrinkModify.vue @@ -138,7 +138,8 @@ - + + @@ -266,7 +267,7 @@ export default defineComponent({ } const image = computed(() => { - console.log(imgsrc.value, deletePic.value, edit_drink.value) + console.log(imgsrc.value, deletePic.value, edit_drink.value); if (deletePic.value) { return 'no-image.svg'; } @@ -274,7 +275,9 @@ export default defineComponent({ return imgsrc.value; } if (edit_drink.value?.has_image) { - return `${api.defaults.baseURL || ''}/pricelist/drinks/${edit_drink.value.id}/picture?thumbnail`; + return `${api.defaults.baseURL || ''}/pricelist/drinks/${ + edit_drink.value.id + }/picture?thumbnail?t=${new Date()}`; } return 'no-image.svg'; });