不老刘
不老刘
  • 发布:2020-07-31 15:41
  • 更新:2021-11-22 14:44
  • 阅读:1283

【疑似bug反馈】只有一张图的情况,swiper 组件问题

分类:uni-app

下拉刷新,swiper组件里面图片重新赋值后,会造成图片无法显示。原因是

<div class="uni-swiper-slide-frame" style="width: 100%; height: 100%; transform: translate(200%, 0px) translateZ(0px);">

200%那个地方应该是0%才对。

试了,只有加上 disable-touch="true" 才能避免,但这不是好办法。

完整代码如下:

<swiper style="padding: 20upx 20upx 0px  20upx" class="screen-swiper" :circular="true" autoplay="true" interval="2000" duration="500" :indicator-dots="false">  
            <swiper-item v-for="(item,index) in Slideshowimg" :key="index">  
                <image :src="item.imgUrl" mode="widthFix"></image>  
            </swiper-item>  
</swiper>
2020-07-31 15:41 负责人:无 分享
已邀请:
不老刘

不老刘 (作者)

新版貌似没这个问题了。

DCloud_UNI_GSQ

DCloud_UNI_GSQ

临时解决方案,在赋值以前设置disable-touch为true,赋值后设置为false

DCloud_UNI_LXH

DCloud_UNI_LXH

最新版已修复

该问题目前已经被锁定, 无法添加新回复