diff --git a/components/uni-navbar-lite/uni-navbar-lite.uvue b/components/uni-navbar-lite/uni-navbar-lite.uvue index 0b374b5e9d97b1a7143d881606733ddbc745a9b4..4f209e4e85855e71ff478e4dcbb926706a4cbbc0 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 a73fc1a27cb12b85115e78d780618e5cf2d781e2..bc617ca6e3258d992f85b53650c330daa91a3a26 100644 --- a/pages/template/navbar-lite/navbar-lite.uvue +++ b/pages/template/navbar-lite/navbar-lite.uvue @@ -4,19 +4,20 @@ 点击此处,将标题切换为{{isLeft?'居中':'左侧'}}显示 - + + + + 设置自定义导航栏前景色白色 + + + + 设置自定义导航栏前景色黑色 + + 内容:{{item}} - - - - - +