From 4b14e9ec3176b8b3e6c4a9aea967888a91ab4c02 Mon Sep 17 00:00:00 2001 From: Mamalizz Date: Sun, 15 Dec 2024 22:47:27 +0330 Subject: [PATCH] added buttons --- .../global/product-detail/RelatedProducts.vue | 59 ++++++++++++------- 1 file changed, 38 insertions(+), 21 deletions(-) diff --git a/frontend/components/global/product-detail/RelatedProducts.vue b/frontend/components/global/product-detail/RelatedProducts.vue index 4644bc3..728f45e 100644 --- a/frontend/components/global/product-detail/RelatedProducts.vue +++ b/frontend/components/global/product-detail/RelatedProducts.vue @@ -13,51 +13,68 @@ type Props = { defineProps(); +// state + +const swiper_instance = ref(null); + // methods const onSwiper = (swiper: SwiperClass) => { - console.log(swiper); -}; -const onSlideChange = () => { - console.log("slide change"); + swiper_instance.value = swiper; };