小程序 swiper 组件,3D视图,左侧内容无法显示?

swiper 组件,刚进入时 current:0 左侧不显示,要手动滑一下才显示 current:2.
刚进入时的状态
image.png
稍微滑动一下后的正常状态
image.png

//curInfo:0

<swiper class="swiper" current="{{curInfo}}" circular="true" previous-margin="184rpx" next-margin="184rpx"bindchange="changeSwiper">
  <swiper-item wx:for="{{3}}" wx:key="item" class="flex-center item_swiper">
    <view class="flex-center swiper_info">
      <text class="title_50 text_600">{{index}}</text>
    </view>
  </swiper-item>
</swiper>


.swiper {
width: 100vw;
height: 460rpx;
background-color: #FDF0F7;
border-top: 10rpx solid #111111;
border-bottom: 10rpx solid #111111;
}

.item_swiper {
width: 100% !important;
height: 100% !important;
justify-content: center;
}

.swiper_info {
width: 380rpx !important;
height: 380rpx !important;
background-color: #FEC82E;
border-radius: 100%;
justify-content: center;
}

.swiper_case {
width: 100%;
height: 100%;
}
阅读 2k
1 个回答

你的 curInfo0 肯定就是你一开始的截图的状态啊,当前的下标又不是 1

并且你想要显示多个滑块,也没有设置 display-multiple-items 属性。

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题