Selaa lähdekoodia

feat: 添加自动滚动

year 2 kuukautta sitten
vanhempi
commit
e0450bf89d
1 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  1. 2 2
      src/app/[locale]/(enter)/login/adbox.tsx

+ 2 - 2
src/app/[locale]/(enter)/login/adbox.tsx

@@ -2,7 +2,7 @@
 import { AdItem } from "@/api/customservice";
 import { useRouter } from "@/i18n/routing";
 import React from "react";
-import { Pagination } from "swiper/modules";
+import { Autoplay, Pagination } from "swiper/modules";
 import { Swiper, SwiperSlide } from "swiper/react";
 
 interface AdboxProps {
@@ -34,7 +34,7 @@ const Adbox: React.FC<AdboxProps> = ({ data }) => {
             <Swiper
                 spaceBetween={10}
                 autoplay
-                modules={[Pagination]}
+                modules={[Pagination, Autoplay]}
                 pagination={{ clickable: true }}
             >
                 {!!data?.length &&