微信小程序echarts层级太高
程序员文章站
2022-07-02 13:56:11
项目中因为需求,底部的tab导航栏是自己写的,在开发者工具中一切正常;但是在真机上页面滑动时,echarts的层级比tab高,调过两者的z-index后仍然如此。 经过查找后发现cover-view和cover-image替换tab的view后,可以解决以上的问题。 ......
项目中因为需求,底部的tab导航栏是自己写的,在开发者工具中一切正常;但是在真机上页面滑动时,echarts的层级比tab高,调过两者的z-index后仍然如此。
经过查找后发现和cover-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>