当前位置: 移动技术网 > IT编程>网页制作>Html5 > 小程序自定义tabbar custom-tab-bar 6s出不来解决方案,cover-view不兼容

小程序自定义tabbar custom-tab-bar 6s出不来解决方案,cover-view不兼容

2019年11月01日  | 移动技术网IT编程  | 我要评论

1.从微信小程序的官网扣下来的demo,实际测试中,发现6s ios10 系统不兼容,里面的内容出不来

<cover-view class="tab-bar">
  <cover-view class="tab-bar-border"></cover-view>
  <cover-view wx:for="{{list}}" wx:key="index" class="tab-bar-item" data-path="{{item.pagepath}}" data-index="{{index}}" bindtap="switchtab">
    <cover-image src="{{item.checked ? item.selectediconpath : item.iconpath}}" ></cover-image>
    <cover-view >{{item.text}}</cover-view>
  </cover-view>
</cover-view>

2.实际效果如下: 底部的tabbar没出来

3.把 cover-view 改成 view  把  cover-image 改成 image 标签

<view class="tab-bar">
  <view class="tab-bar-border"></view>
  <view wx:for="{{list}}" wx:key="index" class="tab-bar-item" data-path="{{item.pagepath}}" data-index="{{index}}" bindtap="switchtab">
    <image src="{{item.checked ? item.selectediconpath : item.iconpath}}" ></image>
    <view >{{item.text}}</view>
  </view>
</view>

4. 记得把你的css 样式也改一下啊  默认的  class 有cover-view cover-image

5.现在的效果如下

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网