需要手动给元素高度 
<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
posted on 2023-01-10 10:41  仔仔爱学习  阅读(404)  评论(0)    收藏  举报