image标签中lazy-load属性在自定义组件中失效
测试平台:Android、iOS
以下是模拟器中的效果截图,真机中也有同样的问题
我们已经确认过图片链接都是有效的,并且不使用自定义组件就正常
wxml代码片段
< scroll-view scroll-y = "true" > < recommend recommend-id = "{{ recommendId }}" ></ recommend > </ scroll-view > |
自定义组件wxml片段
< view class = "mod_recommend" wx:if = "{{ list && list.length }}" > < view class = "mod_recommend_list" > < view class = "mod_recommend_list_item" wx:for = "{{ list }}" wx:key = "item.sku" > < view class = "mrli_cover" > < image src = "{{ item.img }}" lazy-load = "true" mode = "aspectFit" ></ image > </ view > < view class = "mrli_info" > < view class = "mrli_info_name" >{{ item.t }}</ view > </ view > </ view > </ view > </ view > |
麻烦小程序的童鞋帮忙看下,多谢。