1.在data里面加入参数
statusBarHeight: uni.getSystemInfoSync ().statusBarHeight,//状态栏高度
2.对返回按钮处理
<!-- 空出状态栏高度--> <view :style="'height:'+statusBarHeight+'px;'"></view> <!-- 返回按钮 --> <div class="font-30 font-bold color-white" style="height: 44px;line-height: 44px; display: flex;align-items: center;padding-left: 10px;" @click="closePage()"> <u-icon name="arrow-left" size="30" class="color-white"></u-icon> <text class=" ml10">返回</text> </div>
标签:uniapp,真机,自定义,微信,statusBarHeight,状态栏 From: https://www.cnblogs.com/zhangyouwu/p/17523359.html