From 93bc6c5196ad4d7e0930f2e3a4390d27f7a256ce Mon Sep 17 00:00:00 2001
From: mehaotian <490272692@qq.com>
Date: Tue, 19 Sep 2023 17:09:38 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E8=87=AA=E5=AE=9A=E4=B9=89=E5=AF=BC?=
=?UTF-8?q?=E8=88=AA=E6=A0=8F=E5=A2=9E=E5=8A=A0=E7=8A=B6=E6=80=81=E6=A0=8F?=
=?UTF-8?q?=E8=AE=BE=E7=BD=AE=20,=E6=A0=87=E9=A2=98=E5=B7=A6=E4=BE=A7?=
=?UTF-8?q?=E6=98=BE=E7=A4=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../uni-navbar-lite/uni-navbar-lite.uvue | 26 ++++++++++++-------
pages/template/navbar-lite/navbar-lite.uvue | 18 +++++++++----
2 files changed, 30 insertions(+), 14 deletions(-)
diff --git a/components/uni-navbar-lite/uni-navbar-lite.uvue b/components/uni-navbar-lite/uni-navbar-lite.uvue
index 679b1f3a..797e3364 100644
--- a/components/uni-navbar-lite/uni-navbar-lite.uvue
+++ b/components/uni-navbar-lite/uni-navbar-lite.uvue
@@ -4,7 +4,7 @@
{{unicode}}
-
+
{{title}}
@@ -23,11 +23,7 @@
type: String,
default: ''
},
- open: {
- type: Boolean,
- default: false
- },
- disabled: {
+ isLeft: {
type: Boolean,
default: false
}
@@ -54,11 +50,19 @@
fail(err) {
console.log(err);
},
- })
-
+ })
const sys = uni.getSystemInfoSync()
const statusBarHeight = sys.statusBarHeight
this.statusBarHeight = statusBarHeight
+ },
+ mounted() {
+ // TODO 暂时加定时器,否则不生效
+ setTimeout(() => {
+ uni.setNavigationBarColor({
+ frontColor: '#000000',
+ backgroundColor: '#ffffff'
+ })
+ }, 100)
},
methods: {
back() {
@@ -103,8 +107,12 @@
bottom: 0;
left: 45px;
right: 45px;
- display: flex;
+ display: flex;
+ flex-direction: row;
justify-content: center;
align-items: center;
+ }
+ .is-left {
+ justify-content: flex-start;
}
diff --git a/pages/template/navbar-lite/navbar-lite.uvue b/pages/template/navbar-lite/navbar-lite.uvue
index 44e388a7..b7ac93e1 100644
--- a/pages/template/navbar-lite/navbar-lite.uvue
+++ b/pages/template/navbar-lite/navbar-lite.uvue
@@ -1,9 +1,12 @@
-
+
+
+ 点击标题切换为左侧显示
+
- 内容:{{item+1}}
+ 内容:{{item}}
@@ -13,11 +16,16 @@
export default {
data() {
return {
- title: 'Hello uni-app'
+ title: 'Hello uni-app',
+ isLeft: false
}
},
- onLoad() {},
- methods: {}
+ onLoad() { },
+ methods: {
+ onClick(){
+ this.isLeft = !this.isLeft
+ }
+ }
}
--
GitLab