This commit is contained in:
Parsa Nazer
2025-12-26 12:49:48 +03:30
36 changed files with 29 additions and 6 deletions
+3 -2
View File
@@ -47,10 +47,11 @@ withDefaults(defineProps<Props>(), {
:title="product.name"
:picture="product.image ?? product.variants[0].images[0].image"
:colors="product.colors"
:price="product.variants[0].price_after_discount ?? product.variants[0].price"
:price="product.best_deal_price_before_discount"
:rate="product.rating"
:dark-layer="true"
:tag="`${product.variants[0].discount}% تخفیف`"
:tag="product.best_deal_discount > 0 ? `${product.best_deal_discount}% تخفیف` : undefined"
:price-after="product.best_deal_discount > 0 ? product.best_deal_price_after_discount : undefined"
/>
</li>
</ul>
@@ -93,9 +93,13 @@ const onSwiper = (swiper: SwiperClass) => {
:title="product.name"
:picture="product.image ?? product.variants[0].images[0].image"
:colors="product.colors"
:price="product.variants[0].price"
:rate="product.rating"
:dark-layer="true"
:price="product.best_deal_price_before_discount"
:tag="product.best_deal_discount > 0 ? `${product.best_deal_discount}% تخفیف` : undefined"
:price-after="
product.best_deal_discount > 0 ? product.best_deal_price_after_discount : undefined
"
/>
</SwiperSlide>
</Swiper>
@@ -22,6 +22,7 @@ type Props = {
colors: string[];
price: string;
picture: string;
priceAfter?: string;
tag?: string;
rate?: number;
darkLayer?: boolean;
@@ -110,10 +111,14 @@ const parallaxStyle = computed(() => {
<span class="typo-sub-h-sm font-normal w-full truncate">
{{ title }}
</span>
<div class="flex items-center justify-between w-full mt-1">
<span class="typo-p-xs !font-bold whitespace-nowrap">
<div class="flex flex-col w-full mt-1">
<span
class="typo-p-xs whitespace-nowrap"
:class="priceAfter ? 'line-through' : '!font-bold'"
>
{{ price }}
</span>
<span v-if="priceAfter" class="whitespace-nowrap !font-bold">{{ priceAfter }}</span>
</div>
</div>
</div>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 61 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 115 KiB

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 117 KiB

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 117 KiB

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 93 KiB

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 89 KiB

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 328 KiB

After

Width:  |  Height:  |  Size: 119 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 63 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 KiB

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.3 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 KiB

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 125 KiB

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 98 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 118 KiB

After

Width:  |  Height:  |  Size: 64 KiB

+14 -1
View File
@@ -107,11 +107,24 @@ declare global {
colors: string[];
added_to_favorites: boolean;
image: string | null;
best_deal_price_before_discount: string;
best_deal_price_after_discount: string;
best_deal_discount: number;
};
type ProductListItem = Pick<
Product,
"id" | "variants" | "name" | "rating" | "slug" | "category" | "colors" | "image"
| "id"
| "variants"
| "name"
| "rating"
| "slug"
| "category"
| "colors"
| "image"
| "best_deal_discount"
| "best_deal_price_after_discount"
| "best_deal_price_before_discount"
>;
type Article = {