feat: agregar imagen por defecto para productos sin foto en catálogo

This commit is contained in:
2026-05-29 18:38:01 -05:00
parent a36fbd289e
commit d049357231
2 changed files with 10 additions and 8 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

View File

@@ -15,7 +15,10 @@
<v-icon size="28" color="primary" class="mr-2 d-sm-none flex-shrink-0"
>mdi-store</v-icon
>
<v-icon size="36" color="primary" class="mr-3 d-none d-sm-inline flex-shrink-0"
<v-icon
size="36"
color="primary"
class="mr-3 d-none d-sm-inline flex-shrink-0"
>mdi-store</v-icon
>
<div
@@ -235,6 +238,7 @@ import Cart from "@/components/catalog/Cart.vue";
import PaginationControls from "@/components/catalog/PaginationControls.vue";
import { useCartStore } from "@/stores/cart";
import { inject, ref, computed, onMounted, onUnmounted } from "vue";
import not_image_product from "@/assets/not_image_for_product.jpeg";
export default {
components: {
@@ -375,9 +379,7 @@ export default {
this.items = data.map((product) => ({
...product,
quantity: 0,
img:
product.img ||
`https://picsum.photos/600/600?random=${product.id}`,
img: product.img || not_image_product,
}));
})
.catch((error) => {
@@ -581,7 +583,7 @@ export default {
.page-header .search-field :deep(.v-field__input) {
font-size: 0.875rem;
}
.page-header .search-field {
width: 100%;
max-width: 100%;
@@ -669,7 +671,7 @@ export default {
.product-grid {
margin: 0 -6px;
}
.product-col {
padding: 6px;
}
@@ -680,7 +682,7 @@ export default {
.product-grid {
margin: 0 -8px;
}
.product-col {
padding: 8px;
}
@@ -691,7 +693,7 @@ export default {
.product-grid {
margin: 0 -12px;
}
.product-col {
padding: 12px;
}