This commit is contained in:
杨鹏
2025-10-10 21:56:04 +08:00
parent 1aba303ed9
commit 0f450c6691
4 changed files with 35 additions and 40 deletions
+19 -24
View File
@@ -6,10 +6,8 @@
:key="item.text"
@tap="sheep.$router.go(item.url)"
>
<cover-view class="content-box">
<cover-image class="tabbar-icon" :src="sheep.$url.cdn(item.iconUrl)" />
<cover-view class="active-line" v-show="activeUrl === item.url" />
</cover-view>
<cover-image class="tabbar-icon" :src="sheep.$url.cdn(item.iconUrl)" />
<cover-view class="active-line" v-show="activeUrl === item.url" />
</cover-view>
</cover-view>
</template>
@@ -47,28 +45,25 @@
background: #fff;
.cover-tabbar-item {
flex: 1;
width: 20%;
height: 20px;
position: relative;
.content-box {
display: flex;
flex-direction: column;
align-items: center;
position: relative;
height: 32px;
.tabbar-icon {
width: 16px;
height: 16px;
position: absolute;
left: calc(50% - 8px);
top: 0;
}
.tabbar-icon {
width: 25px;
height: 25px;
}
.active-line {
width: 20rpx;
height: 1rpx;
background: #000;
position: absolute;
left: calc(50% - 10rpx);
bottom: 0rpx;
}
.active-line {
width: 12px;
height: 1px;
background: #000;
position: absolute;
left: calc(50% - 6px);
bottom: 0;
}
}
}