3664关注11432浏览
我通过动态判断添加的图片 在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上不显示
-
至过去的我
2044人对此回答表示赞同
我是未来的你,你现在是不是在年找寻小程序答案。你不要感觉诧异,给你来信原因,就是让你不在后悔。今天去学习如何推广小程序,相信......点击查看更多> -
大青
17人对此回答表示赞同
我们也碰到这个问题了
展开170回复分享发布于 6年前评论(0)
收起评论
-
Kinsley
9人对此回答表示赞同
关注,通遇到类似问题
展开92回复分享发布于 6年前评论(2)
收起评论
-
末代恋人 2019-01-03 14:44
哦哦,感谢回复。
回复 -
万发财 2019-01-05 12:12
我放弃这种写法了让设计改了页面
回复
-
-
Brayden
6人对此回答表示赞同
没有数据没有错误信息提醒的吗?
展开60回复分享发布于 6年前评论(0)
收起评论