项目场景:
项目场景:页面轮播图可以一次显示多个slide,同时当点击左右按钮时可以切换多张。展示效果参考下图:
页面的轮播是用swiper来实现的
解决方案:
1.安装swiper
yarn add swiper -S
2.页面中引用swiper
<template>
<swiper
:modules="modules"
:slides-per-view="3"
:slides-per-group="3"
:space-between="50"
:navigation="navigation"
:pagination="pagination"
@swiper="onSwiper"
@slideChange="onSlideChange"
>
<swiper-slide>Slide