dedsudiyu 10 月之前
父节点
当前提交
a5a3ef74e9
共有 1 个文件被更改,包括 5 次插入2 次删除
  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>