你可以把原生的cover-view标签换成 view,替换下就可以了,我前段时间也是这样,希望对你用
<view class="tab-bar">
<view class="tab-bar-border"></view>
<view wx:for="{{list}}" wx:key="index" class="tab-bar-item" data-path="{{item.pagePath}}" data-index="{{index}}" bindtap="switchTab">
<image class="itemimage" src="{{selected === index ? item.selectedIconPath : item.iconPath}}"></image>
<view class="itemview" style="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;
}