添加新的阅读页面入口,更新自定义标签栏以使用 SVG 图标,优化分享按钮样式和布局,提升用户体验。
This commit is contained in:
@@ -5,13 +5,10 @@
|
||||
<!-- 首页 -->
|
||||
<view class="tab-bar-item" data-path="{{list[0].pagePath}}" data-index="0" bindtap="switchTab">
|
||||
<view class="icon-wrapper">
|
||||
<!-- 首页图标 -->
|
||||
<view class="icon {{selected === 0 ? 'icon-active' : ''}}">
|
||||
<view class="icon-home">
|
||||
<view class="home-roof"></view>
|
||||
<view class="home-body"></view>
|
||||
</view>
|
||||
</view>
|
||||
<image class="tab-icon {{selected === 0 ? 'icon-active' : ''}}"
|
||||
src="/assets/icons/home.svg"
|
||||
mode="aspectFit"
|
||||
style="color: {{selected === 0 ? selectedColor : color}}"></image>
|
||||
</view>
|
||||
<view class="tab-bar-text" style="color: {{selected === 0 ? selectedColor : color}}">{{list[0].text}}</view>
|
||||
</view>
|
||||
@@ -19,13 +16,10 @@
|
||||
<!-- 目录 -->
|
||||
<view class="tab-bar-item" data-path="{{list[1].pagePath}}" data-index="1" bindtap="switchTab">
|
||||
<view class="icon-wrapper">
|
||||
<view class="icon {{selected === 1 ? 'icon-active' : ''}}">
|
||||
<view class="icon-list">
|
||||
<view class="list-line"></view>
|
||||
<view class="list-line"></view>
|
||||
<view class="list-line"></view>
|
||||
</view>
|
||||
</view>
|
||||
<image class="tab-icon {{selected === 1 ? 'icon-active' : ''}}"
|
||||
src="/assets/icons/list.svg"
|
||||
mode="aspectFit"
|
||||
style="color: {{selected === 1 ? selectedColor : color}}"></image>
|
||||
</view>
|
||||
<view class="tab-bar-text" style="color: {{selected === 1 ? selectedColor : color}}">{{list[1].text}}</view>
|
||||
</view>
|
||||
@@ -33,10 +27,9 @@
|
||||
<!-- 找伙伴 - 中间突出按钮(根据配置显示) -->
|
||||
<view class="tab-bar-item special-item" wx:if="{{matchEnabled}}" data-path="{{list[2].pagePath}}" data-index="2" bindtap="switchTab">
|
||||
<view class="special-button {{selected === 2 ? 'special-active' : ''}}">
|
||||
<view class="icon-users">
|
||||
<view class="user-circle user-1"></view>
|
||||
<view class="user-circle user-2"></view>
|
||||
</view>
|
||||
<image class="special-icon"
|
||||
src="/assets/icons/sparkles.svg"
|
||||
mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="tab-bar-text special-text" style="color: {{selected === 2 ? selectedColor : color}}">{{list[2].text}}</view>
|
||||
</view>
|
||||
@@ -44,12 +37,10 @@
|
||||
<!-- 我的 -->
|
||||
<view class="tab-bar-item" data-path="{{list[3].pagePath}}" data-index="{{matchEnabled ? 3 : 2}}" bindtap="switchTab">
|
||||
<view class="icon-wrapper">
|
||||
<view class="icon {{(matchEnabled && selected === 3) || (!matchEnabled && selected === 2) ? 'icon-active' : ''}}">
|
||||
<view class="icon-user">
|
||||
<view class="user-head"></view>
|
||||
<view class="user-body"></view>
|
||||
</view>
|
||||
</view>
|
||||
<image class="tab-icon {{(matchEnabled && selected === 3) || (!matchEnabled && selected === 2) ? 'icon-active' : ''}}"
|
||||
src="/assets/icons/user.svg"
|
||||
mode="aspectFit"
|
||||
style="color: {{(matchEnabled && selected === 3) || (!matchEnabled && selected === 2) ? selectedColor : color}}"></image>
|
||||
</view>
|
||||
<view class="tab-bar-text" style="color: {{(matchEnabled && selected === 3) || (!matchEnabled && selected === 2) ? selectedColor : color}}">{{list[3].text}}</view>
|
||||
</view>
|
||||
|
||||
@@ -68,105 +68,18 @@
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
/* ===== 首页图标 ===== */
|
||||
.icon-home {
|
||||
position: relative;
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
/* ===== SVG 图标样式 ===== */
|
||||
.tab-icon {
|
||||
width: 48rpx;
|
||||
height: 48rpx;
|
||||
display: block;
|
||||
filter: brightness(0) saturate(100%) invert(60%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(95%) contrast(85%);
|
||||
}
|
||||
|
||||
.home-roof {
|
||||
position: absolute;
|
||||
top: 4rpx;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-left: 18rpx solid transparent;
|
||||
border-right: 18rpx solid transparent;
|
||||
border-bottom: 14rpx solid #8e8e93;
|
||||
.tab-icon.icon-active {
|
||||
filter: brightness(0) saturate(100%) invert(72%) sepia(54%) saturate(2933%) hue-rotate(134deg) brightness(101%) contrast(101%);
|
||||
}
|
||||
|
||||
.home-body {
|
||||
position: absolute;
|
||||
bottom: 4rpx;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
width: 28rpx;
|
||||
height: 18rpx;
|
||||
background: #8e8e93;
|
||||
border-radius: 0 0 4rpx 4rpx;
|
||||
}
|
||||
|
||||
.icon-active .home-roof {
|
||||
border-bottom-color: #00CED1;
|
||||
}
|
||||
|
||||
.icon-active .home-body {
|
||||
background: #00CED1;
|
||||
}
|
||||
|
||||
/* ===== 目录图标 ===== */
|
||||
.icon-list {
|
||||
width: 36rpx;
|
||||
height: 32rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.list-line {
|
||||
width: 100%;
|
||||
height: 6rpx;
|
||||
background: #8e8e93;
|
||||
border-radius: 3rpx;
|
||||
}
|
||||
|
||||
.list-line:nth-child(2) {
|
||||
width: 75%;
|
||||
}
|
||||
|
||||
.list-line:nth-child(3) {
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.icon-active .list-line {
|
||||
background: #00CED1;
|
||||
}
|
||||
|
||||
/* ===== 我的图标 ===== */
|
||||
.icon-user {
|
||||
position: relative;
|
||||
width: 36rpx;
|
||||
height: 40rpx;
|
||||
}
|
||||
|
||||
.user-head {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
width: 16rpx;
|
||||
height: 16rpx;
|
||||
background: #8e8e93;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.user-body {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
width: 28rpx;
|
||||
height: 18rpx;
|
||||
background: #8e8e93;
|
||||
border-radius: 14rpx 14rpx 0 0;
|
||||
}
|
||||
|
||||
.icon-active .user-head,
|
||||
.icon-active .user-body {
|
||||
background: #00CED1;
|
||||
}
|
||||
|
||||
/* ===== 找伙伴 - 中间特殊按钮 ===== */
|
||||
.special-item {
|
||||
@@ -199,39 +112,10 @@
|
||||
margin-top: 4rpx;
|
||||
}
|
||||
|
||||
/* ===== 找伙伴图标 (双人) ===== */
|
||||
.icon-users {
|
||||
position: relative;
|
||||
/* ===== 找伙伴特殊按钮图标 ===== */
|
||||
.special-icon {
|
||||
width: 56rpx;
|
||||
height: 44rpx;
|
||||
}
|
||||
|
||||
.user-circle {
|
||||
position: absolute;
|
||||
width: 28rpx;
|
||||
height: 28rpx;
|
||||
border-radius: 50%;
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.user-circle::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
bottom: -12rpx;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
width: 22rpx;
|
||||
height: 14rpx;
|
||||
background: #ffffff;
|
||||
border-radius: 11rpx 11rpx 0 0;
|
||||
}
|
||||
|
||||
.user-1 {
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.user-2 {
|
||||
top: 0;
|
||||
right: 0;
|
||||
height: 56rpx;
|
||||
display: block;
|
||||
filter: brightness(0) saturate(100%) invert(100%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(100%) contrast(100%);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user