< block wx:for = "{{info}}" wx:for-item = "item" wx:key = "list" > //wx:key="list" 写其他值也行 但是要有
< navigator class = "info-item" url = "/pages/module/infos/info-detail/info-detail?id={{item.id}}&url={{item.url}}&title={{item.title}}" hover-class = "navigator-hover" > //hover-class="navigator-hover" 点击时的反馈
< img wx:if = "{{item.isnew==true}}" class = "info-item-isnew" src = "./images/info-new.png" data-ke-src = "./images/info-new.png" mode = "aspectFill" /> < img wx:else = "" class = "info-item-isnew j-hide" /> < view class = "info-item-content" > {{item.Content}}</ view >
< view class = "info-item-" ></ view >
</ navigator >
</ block >
// wx:if="{{条件}}" wx:else 这里 可以结合多个 wx:if="{{条件}}" 来实现else if ,类似于switch
|
有任何疑问或技术合作都可联系我
微信:yanfahezuo 【推荐】
QQ:596957738