From 061d614aefa240055101689b21d2a1bcffd44666 Mon Sep 17 00:00:00 2001 From: mehaotian <490272692@qq.com> Date: Sat, 27 Jan 2024 10:42:09 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20navbar-lite=20=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E5=AE=9A=E6=97=B6=E5=99=A8=EF=BC=8C=E4=BC=98=E5=8C=96=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E7=A4=BA=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../uni-navbar-lite/uni-navbar-lite.uvue | 12 ++++------- pages/template/navbar-lite/navbar-lite.uvue | 21 ++++++++++--------- 2 files changed, 15 insertions(+), 18 deletions(-) diff --git a/components/uni-navbar-lite/uni-navbar-lite.uvue b/components/uni-navbar-lite/uni-navbar-lite.uvue index 0b374b5e..4f209e4e 100644 --- a/components/uni-navbar-lite/uni-navbar-lite.uvue +++ b/components/uni-navbar-lite/uni-navbar-lite.uvue @@ -64,13 +64,10 @@ this.statusBarHeight = statusBarHeight; }, mounted() { - // TODO 暂时加定时器,否则不生效 - setTimeout(() => { - uni.setNavigationBarColor({ - frontColor: "#000000", - backgroundColor: "#ffffff", - }); - }, 100); + uni.setNavigationBarColor({ + frontColor: "#000000", + backgroundColor: "#ffffff", + }); }, methods: { back() { @@ -89,7 +86,6 @@ } .uni-navbar { - /* border: 1px #eee solid; */ background-color: #007aff; } diff --git a/pages/template/navbar-lite/navbar-lite.uvue b/pages/template/navbar-lite/navbar-lite.uvue index a73fc1a2..bc617ca6 100644 --- a/pages/template/navbar-lite/navbar-lite.uvue +++ b/pages/template/navbar-lite/navbar-lite.uvue @@ -4,19 +4,20 @@ 点击此处,将标题切换为{{isLeft?'居中':'左侧'}}显示 - + + + + 设置自定义导航栏前景色白色 + + + + 设置自定义导航栏前景色黑色 + + 内容:{{item}} - - - - - + -- GitLab