dedsudiyu 10 months ago
parent
commit
a5a3ef74e9
1 changed files with 5 additions and 2 deletions
  1. 5 2
      pages/component/navbar.vue

+ 5 - 2
pages/component/navbar.vue

@@ -1,6 +1,6 @@
 <template>
 	<view>
-		<view class="wx-head-mod" :style="{height:navHeight+'rpx',background:background}">
+		<view class="wx-head-mod" :style="{height:navHeight+'rpx',background:navBackground}">
 			<view class="wx-head-mod-nav" :style="{height:navigationBarHeight+'rpx',top:statusBarHeight+'rpx'}">
 				<view class="wx-head-mod-nav-content"
 					:style="{height:customHeight+'rpx',justifyContent:'left'}">
@@ -32,7 +32,8 @@
 				customHeight: 0, //胶囊高度
 				scaleFactor: 0, //比例系数
 				menubarLeft:0, //胶囊定位的左边left
-				windowWidth: 0
+				windowWidth: 0,
+				navBackground:null
 			};
 		},
 		methods: {
@@ -52,6 +53,8 @@
 			this.customHeight = SystemInfomations.menuButtonHeight //胶囊高度
 			this.menubarLeft = SystemInfomations.menuButtonLeft //胶囊左边界距离左上角的距离
 			// #endif
+			this.navBackground = this.background?this.background:'rgba(255,255,255,0)'
+			
 		}
 	}
 </script>