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