<view class="navbar">
<view wx:for="{
{navbar}}" data-idx="{
{index}}" class="item {
{currentTab==index ? 'active' : 'active1'}}" wx:key="unique" bindtap="navbarTap">{
{item}}</view>
</view>
<view hidden="{
{currentTab!==0}}">
tab_01
</view>
<view hidden="{
{currentTab!==1}}">
tab_02
</view>
<view hidden="{
{currentTab!==2}}">
tab_03
</view>
/* pages/dhl/dhl.wxss */
page {
display: flex;
flex-direction: column;
height: 100%;
}
.navbar {
flex: none;
display: flex;
background: #fff;
}
.navbar .item {
position: relative;
flex: auto;
text-align: center;
line-height: 80rpx;
}
.navbar .item.activ