软件盘弹出来后swiper不能左右滑动了?设置observer属性后总是显示最后几张图片,求解

移动端项目用了swiper做了几张图片左右的滑动,但是软件盘弹出后,swiper不能滑动了,设置observer:true, observeParents: true以后,可以滑动了,但是每次返回这个页面的时候显示的都是最后面的图片,求解。下面是配置代码。

<swiper :options="swiperOption">
  <swiper-slide v-for="item in hotList">
    <div class="content" @click="toActivityDetail(item)">
      <img :src="item.picPath" alt="">
      <div class="box">
        <div class="item-title">{{item.title}}</div>
      </div>
    </div>
  </swiper-slide>
</swiper>

swiperOption: {
  slidesPerView: 'auto',
  spaceBetween: 12.5,
  observer: true,
  observeParents: true
}
阅读 2k
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题