当前位置:首页 > 微信 > 正文

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

11-25 微信

标签:check   switch   highlight   htm   color   cte   程序   index   微信小程序   

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.现在的效果如下

技术图片

技术图片

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

标签:check   switch   highlight   htm   color   cte   程序   index   微信小程序   

温馨提示: 本文由杰米博客推荐,转载请保留链接: https://www.jmwww.net/weixin/15668.html

博客主人杰米WWW
杰米博客,为大家提供seo以及it方面技巧喜欢的朋友收藏哦!
  • 11365文章总数
  • 2266821访问次数
  • 建站天数
  • 头条文章

    图文推荐

    站长推荐

    友情链接