小程序自定義tabbar custom-tab-bar 6s出不來解決方案,cover-view不兼容


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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM