player-bar绝对定位,将tab-bar的overflow属性置为unset,开发工具上显示正常,真机上却不能显示。如图所示。
<cover-view class="tab-bar">
<cover-view class="player-bar">123</cover-view>
<cover-view class="tab-bar-border"></cover-view>
<cover-view class="tab-bar-box">
<cover-view wx:for="{{list}}" wx:key="index" class="tab-bar-item" data-path="{{item.pagePath}}" data-index="{{index}}" bindtap="switchTab">
<cover-image src="{{selected === index ? item.selectedIconPath : item.iconPath}}"></cover-image>
<cover-view style="color: {{selected === index ? selectedColor : color}}">{{item.text}}</cover-view>
</cover-view>
</cover-view>
</cover-view>
没有 unset的属性值吧 你试试auto之后 加!important
.tab-bar {
position: fixed;
bottom: 0;
left: 0;
right: 0;
height: 60px; (这个高度加高)
background: white;
display: flex;
padding-bottom: env(safe-area-inset-bottom);
}
.tab-bar-border {
background-color: rgba(7, 1, 1, 0.33);
position: absolute;
left: 0;
top: 10px;(这里的数值加大,到你合适的位置 你在真机上在看下)
width: 100%;
height: 1px;
transform: scaleY(0.5);
}