微信小程序echarts层级太高

项目中因为需求,底部的tab导航栏是自己写的,在开发者工具中一切正常;但是在真机上页面滑动时,echarts的层级比tab高,调过两者的z-index后仍然如此。

经过查找后发现cover-viewcover-image替换tab的view后,可以解决以上的问题。

<!--底部公共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>

部分内容来源于网络,如有侵权请联系删除::狂人日记 » 微信小程序echarts层级太高

赞 (1) 打赏

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏