zhengkaixin 1 gadu atpakaļ
vecāks
revīzija
a8a03831d5

+ 3 - 3
uni_modules/uview-ui/components/u-navbar/u-navbar.vue

@@ -1,7 +1,7 @@
 <template>
 	<view class="">
 		<view class="u-navbar" :style="[navbarStyle]" :class="{ 'u-navbar-fixed': isFixed, 'u-border-bottom': borderBottom }">
-			<view class="u-status-bar" :style="{ height: statusBarHeight + 'px' }"></view>
+			<view class="u-status-bar" :style="{ height: statusBarHeight* + 'rpx' }"></view>
 			<view class="u-navbar-inner" :style="[navbarInnerStyle]">
 				<view class="u-back-wrap" v-if="isBack" @tap="goBack">
 					<view class="u-icon-wrap">
@@ -30,7 +30,7 @@
 			</view>
 		</view>
 		<!-- 解决fixed定位后导航栏塌陷的问题 -->
-		<view class="u-navbar-placeholder" v-if="isFixed && !immersive" :style="{ width: '100%', height: Number(navbarHeight) + statusBarHeight + 'px' }"></view>
+		<view class="u-navbar-placeholder" v-if="isFixed && !immersive" :style="{ width: '100%', height: (Number(navbarHeight) + statusBarHeight)*2 + 'rpx' }"></view>
 	</view>
 </template>
 
@@ -180,7 +180,7 @@
 			navbarInnerStyle() {
 				let style = {};
 				// 导航栏宽度,如果在小程序下,导航栏宽度为胶囊的左边到屏幕左边的距离
-				style.height = this.navbarHeight + 'px';
+				style.height = this.navbarHeight*2 + 'rpx';
 				// // 如果是各家小程序,导航栏内部的宽度需要减少右边胶囊的宽度
 				// #ifdef MP
 				let rightButtonWidth = systemInfo.windowWidth - menuButtonInfo.left;