[fix] force load picture not from cache
This commit is contained in:
parent
b0c3eeb6fc
commit
bcb661cc3f
|
@ -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';
|
||||
}
|
||||
|
|
|
@ -138,7 +138,8 @@
|
|||
</q-card-section>
|
||||
<q-card-actions class="justify-around">
|
||||
<q-btn label="Abbrechen" @click="cancel" />
|
||||
<q-btn v-if="can_delete" label="Löschen" color="negative" @click="delete_drink" />
|
||||
<!--<q-btn v-if="can_delete" label="Löschen" color="negative" @click="delete_drink" />-->
|
||||
<q-btn label="Löschen" color="negative" @click="delete_drink" />
|
||||
<q-btn label="Speichern" color="primary" @click="save" />
|
||||
</q-card-actions>
|
||||
</q-card>
|
||||
|
@ -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 <string>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';
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue