fixed定位的cover-image 通过for渲染出来的图片在手机上不显示
发布于 6 年前 作者 xiuying46 13994 次浏览 来自 问答

我通过动态判断添加的图片   在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上不显示

3 回复

关注,通遇到类似问题

ios下cover-image图片经常渲染不出来。加了wx:if还是解决不了

你好,没有数据没有错误信息提醒的吗?

我们也碰到这个问题了

回到顶部