在iphone6中 自定义tabbar不显示问题?
发布于 5 年前 作者 lujun 13980 次浏览 来自 问答

iphone6

ios10.3.2(14F89)

微信版本:7.0.14

3 回复

你可以把原生的cover-view标签换成 view,替换下就可以了,我前段时间也是这样,希望对你用

<view class="tab-bar">

  <view class="tab-bar-border"></view>

  <view wx:for="{{list}}wx:key="indexclass="tab-bar-itemdata-path="{{item.pagePath}}data-index="{{index}}bindtap="switchTab">

    <image class="itemimagesrc="{{selected === index ? item.selectedIconPath : item.iconPath}}"></image>

    <view class="itemviewstyle="color: {{selected === index ? selectedColor : color}}">{{item.text}}</view>

  </view>

</view>

.tab-bar {

  position: fixed;

  bottom: 0;

  left: 0;

  right: 0;

  height: 48px;

  background: white;

  display: flex;

  padding-bottom: env(safe-area-inset-bottom);

}


.tab-bar-border {

  background-color: rgba(0, 0, 0, 0.33);

  position: absolute;

  left: 0;

  top: 0;

  width: 100%;

  height: 1px;

  transform: scaleY(0.5);

}


.tab-bar-item {

  flex: 1;

  text-align: center;

  display: flex;

  justify-content: center;

  align-items: center;

  flex-direction: column;

}


.itemimage {

  width: 27px;

  height: 27px;

}


.itemview {

  font-size: 10px;

}


会不会层级问题 给盖住了

回到顶部