Ver código fonte

处理苹果手机底部安全区问题

newyun
corala 2 anos atrás
pai
commit
4ed5184046
2 arquivos alterados com 7 adições e 6 exclusões
  1. +3
    -3
      App.vue
  2. +4
    -3
      pages/mine/details2.vue

+ 3
- 3
App.vue Ver arquivo

@@ -7,11 +7,11 @@
uni.getSystemInfo({
success: function(e) {
// #ifdef MP-WEIXIN
Vue.prototype.StatusBar = e.statusBarHeight;
Vue.prototype.StatusBar = e.statusBarHeight; // 状态栏高度
let custom = wx.getMenuButtonBoundingClientRect();
Vue.prototype.Custom = custom;
Vue.prototype.CustomBar = custom.bottom + custom.top - e.statusBarHeight;
Vue.prototype.windowHeight = e.safeArea.height
Vue.prototype.CustomBar = custom.bottom + custom.top - e.statusBarHeight;// 底部菜单栏高度
Vue.prototype.windowHeight = e.safeArea.height // 内容区高度
// #endif
Vue.mixin({
data() {


+ 4
- 3
pages/mine/details2.vue Ver arquivo

@@ -2027,9 +2027,10 @@
width: 100%;
height: 170rpx;
border-top: 1px solid #E0E0E0;
padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom);

/* iphonex 等安全区设置,底部安全区适配 */
padding-bottom: constant(safe-area-inset-bottom); /* 兼容 iOS < 11.2 */
padding-bottom: env(safe-area-inset-bottom); /* 兼容 iOS >= 11.2 */
box-sizing: content-box;
.bottomhead {
width: 100%;
height: 81rpx;


Carregando…
Cancelar
Salvar