我通过动态判断添加的图片 在ios上不显示
app.globalData.tabbar.list = [
{
pagePath: “/pages/record/record”,
text: “考勤记录”,
iconPath: “star.png”,
selectedIconPath: “score.png”,
selected: true
},
{
pagePath: “/pages/statistics/statistics”,
text: “考勤统计”,
iconPath: “star.png”,
selectedIconPath: “score.png”,
selected: false
},
{
pagePath: “/pages/personalCenter/index/index”,
text: “个人中心”,
iconPath: “star.png”,
selectedIconPath: “score.png”,
selected: false
}
]
<cover-view class=“tabbar_box” style=“z-index:1000;background-color:{{tabbar[0].backgroundColor}}; {{tabbar[0].position == ‘top’ ? ‘top:0’ : ‘bottom:0’}}”>
<cover-view wx:for="{{tabbar[0].list}}" wx:for-item=“item” wx:key=“index” class=‘box box_row_center’ style=“width:{{1/tabbar[0].list.length*100}}%;background-color:#fff”>
<cover-view class=" tabbar_nav " data-pagepath=’{{item.pagePath}}’ bindtap=‘goToTabber’ style="width:100%; color:{{item.selected ? tabbar.selectedColor : tabbar.color}} " open-type="redirect ">
<cover-image class=“tabbar_icon " src=”/public/img/{{item.selected ? item.selectedIconPath : item.iconPath}} "></cover-image>
<cover-view>{{item.text}}</cover-view>
</cover-view>
</cover-view>
</cover-view>
因为会根据进来的人显示不同的tabber 动态渲染cover-image ios上不显示