new changes

This commit is contained in:
Mamalizz
2025-02-02 18:00:20 +03:30
parent 121b641768
commit de3987aeea
@@ -17,10 +17,16 @@ defineProps<Props>();
// state
const { data : homeData } = useHomeData();
const { data: homeData, suspense } = useHomeData();
const swiper_instance = ref<SwiperClass | null>(null);
// queries
await useAsyncData(async () => {
await suspense();
});
// methods
const onSwiper = (swiper: SwiperClass) => {
@@ -79,7 +85,10 @@ const onSwiper = (swiper: SwiperClass) => {
</div>
<div class="w-full">
<Swiper :slides-per-view="3" :space-between="24" @swiper="onSwiper">
<SwiperSlide v-for="product in homeData!.products" :key="product.id">
<SwiperSlide
v-for="product in homeData!.products"
:key="product.id"
>
<ProductCard
:id="product.id"
brand="برند محصول"