From 206dafd796fa6c5a4598a78c8110409555a757d8 Mon Sep 17 00:00:00 2001
From: zxl <763096477@qq.com>
Date: 星期二, 13 一月 2026 10:16:54 +0800
Subject: [PATCH] 图片资源
---
components/TopBar.vue | 31 ++++++++++++++++++++++---------
1 files changed, 22 insertions(+), 9 deletions(-)
diff --git a/components/TopBar.vue b/components/TopBar.vue
index b1d6ffe..4ef03ea 100644
--- a/components/TopBar.vue
+++ b/components/TopBar.vue
@@ -1,5 +1,5 @@
<template>
- <view class="top-bar" :style="{paddingTop: statusBarHeight + 'px'}">
+ <view class="top-bar" :style="{paddingTop: statusBarHeight + 'px', backgroundColor: bgColor}" :class="{'has-bg': bgColor !== 'transparent'}">
<view class="top-bar-content">
<!-- 鏍囬鍒楄〃 -->
<scroll-view class="title-scroll" scroll-x="true" scroll-with-animation :scroll-left="scrollLeft">
@@ -31,6 +31,10 @@
textColor: {
type: String,
default: 'white'
+ },
+ bgColor: {
+ type: String,
+ default: 'transparent'
}
},
data() {
@@ -39,9 +43,14 @@
scrollLeft: 0,
titleList: [
{
- index: 'home',
+ index: 'home1',
pagePath: '/pages/tabbar/index/home',
title: '鎺ㄨ崘'
+ },
+ {
+ index: 'kitchenCustomize',
+ pagePath: '/pages/kitchen/KitchenCustomize',
+ title: '绉佸帹瀹氬埗'
},
{
index: 'shop',
@@ -53,11 +62,11 @@
pagePath: '/pages/mine/activity/reportActivity',
title: '娲诲姩'
},
- {
- index: 'health',
- pagePath: '/pages/health/healthVideo',
- title: '澶у仴搴�'
- }
+ // {
+ // index: 'health',
+ // pagePath: '/pages/health/healthVideo',
+ // title: '澶у仴搴�'
+ // }
]
};
},
@@ -99,6 +108,10 @@
right: 0;
z-index: 999;
}
+
+ .top-bar.has-bg {
+ box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
+ }
.top-bar .top-bar-content {
box-sizing: border-box;
@@ -108,7 +121,7 @@
.top-bar .title-scroll {
width: 100%;
- height: 80rpx;
+ height: 40px;
white-space: nowrap;
}
@@ -144,4 +157,4 @@
/* background-color: white; */
border-radius: 4rpx;
}
-</style>
\ No newline at end of file
+</style>
--
Gitblit v1.8.0