下载
npm i swiper
使用
import { Swiper, SwiperSlide } from "swiper/vue/swiper-vue";
import "swiper/swiper.min.css";
<swiper :slides-per-view="2" :space-between="10">
<swiper-slide>
</swiper-slide>
</swiper>
Swiper7的API变化
Swiper容器的默认类名变更为’.swiper’,之前是’.swiper-container’。新增两个3D过渡效果,自由模式和网格组件化。