小程序swiper组件的display-multiple-items的使用方法

发布于 7 年前作者 chaoxue14807 次浏览最后编辑 7 年前来自 ask

我想用swiper组件实现 一个界面显示多个滑块

比如我一页里面想可以看到四个滑块

但是使用display-multiple-items属性之后 没有效果

<swiper display-multiple-items=“4” autoplay=“true”>

<swiper-item class=“item” wx:for=“{{compere}}” wx:key=“{{index}}” style=“display: flex;flex-direction: column;align-items: center;justify-content: center;”>

<image class=“item-head” src=“{{item.icon}}”></image>

<view class=“item-name”>{{item.nickName}}</view>

</swiper-item>

</swiper>

3 回复
juanguo
juanguo1 楼6 年前

我也遇到了这中情况,基础库是1.7.4,但是吧基础库调成1.9.1就可以正常显示了,应该是基础库的问题

rfan
rfan2 楼6 年前

请问项目设置中的基础库版本是?

yong35
yong353 楼5 年前

你的这个问题解决没???