自定义导航栏在iphone XR手机中异常,原生的和自定义的同时出现
发布于 4 年前 作者 lujing 3790 次浏览 来自 官方Issues
//json
{
  "usingComponents": {},
  "navigationBarTitleText": "购买成功",
  "navigationStyle": "custom"
}
//wxml
<!-- 沉浸栏 -->
  <view style="width:100%;height:{{statusBarHeight}}px"></view>
  <!-- 标题栏 这里就可以自定义写标题 -->
  <view class="title">
    <view bindtap="goIndex"><image src="../../imgs/icon_arrow2.png"></image></view>
    <text>购买成功</text>
  </view>
//wxss
.title {
  height: 48px;
  line-height: 48px;
  text-align: center;
  position: relative;
}
.title view {
  position: absolute;
  width: 60rpx;
  height: 36rpx;
  top: 5rpx;
  left: 30rpx;
  padding: 0 20rpx;
}

2 回复

你好,微信版本更新至最新版本再试试,这个问题已经修复过的。

基础库2.4.4

回到顶部