From 2ef25bcf0111f21fcf7971922e2c307ef05547fe Mon Sep 17 00:00:00 2001
From: zxl <763096477@qq.com>
Date: 星期三, 30 七月 2025 11:18:41 +0800
Subject: [PATCH] 厨神,大健康视频分享二维码

---
 components/TopBar.vue |   15 ++++++++++-----
 1 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/components/TopBar.vue b/components/TopBar.vue
index 64913f8..60d3e81 100644
--- a/components/TopBar.vue
+++ b/components/TopBar.vue
@@ -8,10 +8,11 @@
 						v-for="(item, index) in titleList" 
 						:key="index"
 						:class="{active: selectedTitleIndex === item.index, 'title-item': true}"
+						:style="{color: textColor}"
 						@click="changeTab(item)"
 					>
 						<text>{{item.title}}</text>
-						<view class="underline" v-if="selectedTitleIndex === item.index"></view>
+						<view class="underline" :style="{backgroundColor: textColor}" v-if="selectedTitleIndex === item.index"></view>
 					</view>
 				</view>
 			</scroll-view>
@@ -26,6 +27,10 @@
 			selectedTitleIndex: {
 				type: String,
 				default: 'home'
+			},
+			textColor: {
+				type: String,
+				default: 'white'
 			}
 		},
 		data() {
@@ -34,7 +39,7 @@
 				scrollLeft: 0,
 				titleList: [
 					{
-						index: 'home',
+						index: 'home1',
 						pagePath: '/pages/tabbar/index/home',
 						title: '鎺ㄨ崘'
 					},
@@ -103,7 +108,7 @@
 		
 		.top-bar .title-scroll {
 			width: 100%;
-			height: 80rpx;
+			height: 40px;
 			white-space: nowrap;
 		}
 		
@@ -117,7 +122,7 @@
 			position: relative;
 			padding: 0 24rpx;
 			font-size: 32rpx;
-			color: white;
+			/* color: white; */
 			height: 100%;
 			display: flex;
 			align-items: center;
@@ -136,7 +141,7 @@
 			transform: translateX(-50%);
 			width: calc(100% - 76rpx);
 			height: 4rpx;
-			background-color: white;
+			/* background-color: white; */
 			border-radius: 4rpx;
 		}
 </style>
\ No newline at end of file

--
Gitblit v1.8.0