`
import React, { useContext } from "react";
import PosColumnCard from "./PosColumnCard";
import PosColumnNav from "./PosColumnNav";
import { PosContent } from "../../hooks/PosHook";
import { Swiper, SwiperSlide } from "swiper/react";
import { Autoplay, Pagination, Navigation } from "swiper";
import "swiper/css";
import "swiper/css/grid";
function PosColumnSlider() {
const { setSwiper } = useContext(PosContent);
return (
<>
<div className="content">
<PosColumnNav />
<Swiper
grid={{
rows: 2,
fill: "row",
}}
onSwiper={setSwiper}
slidesPerView={1}
loop={true}
pagination={{
clickable: true,
}}
modules={[Autoplay, Pagination, Navigation]}
speed={1000}
>
<SwiperSlide>
<PosColumnCard />
</SwiperSlide>
<SwiperSlide>
<PosColumnCard />
</SwiperSlide>
<SwiperSlide>
<PosColumnCard />
</SwiperSlide>
<SwiperSlide>
<PosColumnCard />
</SwiperSlide>
<SwiperSlide>
<PosColumnCard />
</SwiperSlide>
<SwiperSlide>
<PosColumnCard />
</SwiperSlide>
<SwiperSlide>
<PosColumnCard />
</SwiperSlide>
</Swiper>
</div>
</>
);
}
export default PosColumnSlider;
我的所有幻燈片都在一列中,而不是兩行,幻燈片的其余部分轉(zhuǎn)到下一個滑塊。我希望我的滑動元素出現(xiàn)在2行中,其余的將放在下一個滑塊上。
`
我的所有幻燈片都在一列中,而不是兩行,幻燈片的其余部分轉(zhuǎn)到下一個滑塊。我希望我的滑動元素出現(xiàn)在2行中,其余的將放在下一個滑塊上。