有没有遇到 红米手机 图片增加了 mode="aspectFill" 后无法正常展示图片,并且小程序表现的极其卡顿的情况?
<image class="swiper-item" src="{{item.url}}" mode="aspectFill"></image>
并且如果是一张图片,没有问题,多张就会出现问题,图片无法加载,十分卡顿!
版本库:2.12.0
手机及网络信息:
System: Android 9, WeChat 7.0.18.1740
Network: 4g
UA: Mozilla/5.0 (Linux; Android 9; Redmi 8A Build/PKQ1.190319.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/78.0.3904.62 XWEB/2690 MMWEBSDK/200801 Mobile Safari/537.36 MMWEBID/2415 MicroMessenger/7.0.18.1740(0x2700123A) Process/appbrand0 WeChat/arm32 NetType/4G Language/zh_CN ABI/arm32
WeChatLib: 2.12.2 (2020.8.31 15:27:57)
你好,麻烦提供出现问题的具体机型、微信版本号、系统版本号,以及能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)
<swiper indicator-dots indicator-color="#fff" autoplay interval="3000" circular class="album"> <block wx:for="{{item.img_list}}" wx:key="index" wx:for-index="imgindex"> <swiper-item bindtap="previewAlbum" data-shopindex="{{shopindex}}" data-imgindex="{{imgindex}}"> <image class="swiper-item" src="{{item.url}}" mode="aspectFill"></image> </swiper-item> </block> </swiper> .swiper-item { overflow: hidden; }
你可以写个代码片段发出来
<swiper indicator-dots indicator-color="#fff" autoplay interval="3000" circular class="album">
<block wx:for="{{item.img_list}}" wx:key="index" wx:for-index="imgindex">
<swiper-item bindtap="previewAlbum" data-shopindex="{{shopindex}}" data-imgindex="{{imgindex}}">
<image class="swiper-item" src="{{item.url}}" mode="aspectFill"></image>
</swiper-item>
</block>
</swiper>
.swiper-item {
overflow: hidden;
}
参考这个,弄一个代码片段分享出来
class="swiper-item",这里是什么样式
.swiper-item {
overflow: hidden;
}
display: block;
width: 100%;
height: 100%;