項目中由於需求,底部的tab導航欄是本身寫的,在開發者工具中一切正常;可是在真機上頁面滑動時,echarts的層級比tab高,調過二者的z-index後仍然如此。html
通過查找後發現cover-view和cover-image替換tab的view後,能夠解決以上的問題。echarts
<!--底部公共tabBar--> <cover-view class="tabbar-con"> <cover-view class="{{villageIs?'nav-btn-hover':'nav-btn'}}" bindtap="onGetVillage"> <cover-image class='icon_village_after icon' wx:if="{{villageIs}}" src=''></cover-image> <cover-image class='icon_village_before icon' wx:else src=''></cover-image> <cover-view>小區</cover-view> </cover-view> <cover-view class="{{shopcarIs?'nav-btn-hover':'nav-btn'}}" bindtap="onGetShopcar"> <cover-image class='icon_shop_after icon' wx:if="{{shopcarIs}}" src=''></cover-image> <cover-image class='icon_shop_before icon' wx:else src=''></cover-image> <cover-view>購物車</cover-view> </cover-view> <cover-view class="{{newsIs?'nav-btn-hover':'nav-btn'}}" bindtap="onGetNews"> <cover-image class='icon_news_after icon' wx:if="{{newsIs}}" src=''></cover-image> <cover-image class='icon_news_before icon' wx:else src=''></cover-image> <cover-view>新聞</cover-view> </cover-view> <cover-view class="{{mineIs?'nav-btn-hover':'nav-btn'}}" bindtap="onGetMine"> <cover-image class='icon_mine_after icon' wx:if="{{mineIs}}" src=''></cover-image> <cover-image class='icon_mine_before icon' wx:else src=''></cover-image> <cover-view>個人</cover-view> </cover-view> </cover-view>