微信小程序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层级太高

上一篇:微信/QQ打开网址弹出引导页引导在外部浏览器中打开


下一篇:微信小程序获取验证码倒计时