微信小程序ucharts、echarts层级太高,遮挡底部tabbar,或者遮挡自定义头部区域

一般在开发者工具中正常显示,而在真机上则会遮挡,ucharts,echarts基于层级比tab高,调过两者的z-index是不生效的

使用cover-viewcover-image标签 代替原来 view和image标签即可

<cover-view class="ba_main customHeader">
  <cover-view class="statusBarHeight" style="height:{{statusBarHeight}};"></cover-view>
  <cover-view class="{{textAlign}} rel pa_lr_20" style="height:{{height}}">
    <cover-view class="flex-between">
      <cover-image src="wechat/image/personalcenterheadportrait.png" bindtap="openPersonal" style="width: 48rpx;height: 48rpx;"></cover-image>
      <cover-view class="hydlnr_1 loginName">12312313</cover-view>
    </cover-view>
    <cover-view class="ab mainTitle color_f">运力资源</cover-view>
  </cover-view>
</cover-view>

 

posted @ 2022-12-16 10:30  Fairy-Tail  阅读(3061)  评论(0编辑  收藏  举报