需要手动给元素高度
<swiper
class="my-swiper"
:modules="modules"
:direction="'vertical'"
:loop="true"
:slides-per-view="1"
:space-between="50"
:autoplay="autoplayOptions"
>
<swiper-slide v-for="(item,index) in list" style="height: 100vh">
<style scoped>
.my-swiper{
height: 100vh;
}
转自:https://www.jianshu.com/p/38d1e6650f79