From efbe47531105ce9ac6d25ffd242cac1c0d4d79e8 Mon Sep 17 00:00:00 2001 From: wangjiahai <1556608@qq.com> Date: Mon, 4 Dec 2023 19:06:27 +0800 Subject: [PATCH] 1111 --- components/NavBar/NavBar.vue | 37 ++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/components/NavBar/NavBar.vue b/components/NavBar/NavBar.vue index fbfe6eb..73db11a 100644 --- a/components/NavBar/NavBar.vue +++ b/components/NavBar/NavBar.vue @@ -3,30 +3,23 @@ - + - - - - - {{navTitle}} - - - - + + + - - {{navTitle}} - + 首页 - @@ -53,7 +46,6 @@ * 全局默认背景透明,supportChange= false 会对默认色变成不透明 */ const defaultTransparentBg = "linear-gradient(89.26deg, rgba(254,144,56,0) 0.75%,rgba(255,177,118,0) 99.78%)"; - let style = 'center' export default { name: "NavBar", @@ -106,6 +98,7 @@ enableWidth: 0, enableHeight: 0, fontSize: 0, + navStyle: 'left' }; }, mounted() { @@ -117,14 +110,14 @@ this.navBackground = defaultTransparentBg.replaceAll(",0)", ",1)") } } + // 赋值样式 + // this.navStyle = getApp().globalData.navInfo.navBar.style }, created() { // create阶段能拿取到了props的值,需要使用this.变量名 // 但是拿不到data的值 // 可以拿到script标签的全局属性,不要使用this,直接变量名就可以使用 let navInfo = getApp().globalData.navInfo - // 赋值全局样式 - style = navInfo.navBar.style // 总高度 this.navStatusHeight = navInfo.navStatusHeight + navInfo.unit this.statusBarHeight = navInfo.statusBarHeight + navInfo.unit @@ -133,7 +126,6 @@ this.enableWidth = navInfo.navBar.enableWidth + navInfo.unit this.enableHeight = navInfo.navBar.enableHeight + navInfo.unit this.fontSize = navInfo.navBar.fontSize + navInfo.unit - console.log(style); }, methods: { /** @@ -204,4 +196,13 @@ padding-left: 3px; flex-shrink: 0; } + + ._navIcon2 { + display: flex; + flex-direction: row; + align-items: center; + margin-left: 10px; + flex-shrink: 0; + padding-right: 4px; + } \ No newline at end of file