summary checkout
This commit is contained in:
@ -1,9 +1,10 @@
|
||||
<template>
|
||||
<div
|
||||
class="w-[150px] sm:w-[260px] md:w-[330px] px-2 py-3 sm:py-5 sm:px-[15px] bg-block rounded-2xl flex flex-col items-center gap-[15px] sm:gap-[50px]">
|
||||
<img :src="`/api/public/file/${props.product?.cover_picture_uuid}.webp`" alt="Product Image"
|
||||
class="h-[95px] sm:h-[180px] md:h-[205px] rounded-[5px]"
|
||||
onerror="this.onerror=null; this.src='/photo.svg';" />
|
||||
<img :src="`/api/public/file/${props.product?.cover_picture_uuid}.webp`" alt="Product Image" :class="[
|
||||
'h-[95px] sm:min-h-[180px] md:min-h-[205px] rounded-[5px]',
|
||||
isError ? 'max-w-[50%]' : ''
|
||||
]" @error="handleImageError" />
|
||||
|
||||
<div class="flex flex-col justify-between h-full w-full gap-[7px] sSm:gap-[15px]">
|
||||
<div class="flex flex-col gap-[7px] sm:gap-[15px] w-full">
|
||||
@ -33,4 +34,11 @@ const props = defineProps({
|
||||
});
|
||||
|
||||
const productStore = useProductStore()
|
||||
|
||||
const isError = ref(false);
|
||||
|
||||
function handleImageError(event: Event) {
|
||||
isError.value = true;
|
||||
(event.target as HTMLImageElement).src = '/photo.svg';
|
||||
}
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user