swiper display-multiple-items多个的时候报错
发布于 6 年前 作者 nagu 4211 次浏览 来自 问答

我用swiper作为分类tab,采用的是display-multiple-items=6 显示的是6个 分类底下内容也是用swiper ,内容滑动的情况下去带动category的 current值 ,没到到第二页的时候,css出现问题

<swiper display-multiple-items="{{Tool.mathCeil(category.length/2)}}" current="{{currentTab}}" skip-hidden-item-layout=“true”>

<swiper-item wx:for="{{category}}" class="{{currentTab==index?‘on’:’’}}" bindtap=“changeCategoryTab” data-index="{{index}}">{{item}} </swiper-item>

</swiper>

请问如何解决??

1 回复

好吧,我暂时用了current-item-id来处理,但是体验不是很好喽。

回到顶部