在页面中: uni.getSystemInfoSync()
manifest.json中
"app-plus" : {
"safearea" : {
"bottom" : {
"offset" : "auto"
}
}
}
产品分类: uniapp/App
PC开发环境操作系统: Windows
PC开发环境操作系统版本号: win10
HBuilderX类型: 正式
HBuilderX版本号: 3.99
手机系统: iOS
手机系统版本号: iOS 16
手机厂商: 苹果
手机机型: iPhone X
页面类型: vue
vue版本: vue2
打包方式: 云端
项目创建方式: HBuilderX
在页面中: uni.getSystemInfoSync()
manifest.json中
"app-plus" : {
"safearea" : {
"bottom" : {
"offset" : "auto"
}
}
}
safeAreaInsets.bottom 出现正确的值,并且safeArea.height值正确
"safeArea": {
"left": 0,
"right": 375,
"top": 44,
"bottom": 690,
"width": 375,
"height": 646
},
"safeAreaInsets": {
"top": 44,
"right": 0,
"bottom": 0,
"left": 0
},
"screenHeight": 812,
"screenWidth": 375,
"statusBarHeight": 44
使用 uni.getSystemInfoSync() 获取的值如下,
1 . 似乎 safeArea.height 过于小了,screenHeight的值是812,再怎么减,也不会减到646这么小
2 . iphone X实际是有底部安全区的,但是safeAreaInsets.bottom却是0
0 个回复