From 014b0dd508bc541cce547c95c8526428e91f8d28 Mon Sep 17 00:00:00 2001 From: zhangfengchen <1027307161@qq.com> Date: Thu, 21 May 2026 14:46:49 +0800 Subject: [PATCH] =?UTF-8?q?chore(s-layout):=20=E6=94=AF=E6=8C=81=E5=AE=9A?= =?UTF-8?q?=E4=B9=89=E9=A1=B6=E9=83=A8=E5=AF=BC=E8=88=AA=E6=A0=8F=E8=83=8C?= =?UTF-8?q?=E6=99=AF=E9=A2=9C=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sheep/components/s-layout/s-layout.vue | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/sheep/components/s-layout/s-layout.vue b/sheep/components/s-layout/s-layout.vue index 78e46569..109c56e9 100644 --- a/sheep/components/s-layout/s-layout.vue +++ b/sheep/components/s-layout/s-layout.vue @@ -12,6 +12,7 @@ :color="color" :tools="tools" :opacityBgUi="opacityBgUi" + :backgroundColor="navbarBackgroundColor" @search="(e) => emits('search', e)" :defaultSearch="defaultSearch" /> @@ -80,6 +81,11 @@ type: String, default: 'bg-white', }, + // 顶部导航栏背景颜色(仅在 navbar === 'normal' 时生效) + navbarBackgroundColor: { + type: String, + default: '', + }, color: { type: String, default: '', @@ -213,16 +219,16 @@ // #endif // 组件中使用 onMounted 监听页面加载,不是页面组件不使用 onShow - onMounted(()=>{ + onMounted(() => { // #ifdef MP-ALIPAY uni.setNavigationBarTitle({ - title: "", + title: '', }); // #endif if (!isEmpty(shareInfo.value)) { sheep.$platform.share.updateShareInfo(shareInfo.value); } - }) + });