mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
fix(Popup): compatible_safe_bottom_in_iphone11 (#2465)
This commit is contained in:
parent
3562c74d4f
commit
0d75716a29
@ -6,12 +6,12 @@ function getSafeArea() {
|
|||||||
resolve(cache);
|
resolve(cache);
|
||||||
} else {
|
} else {
|
||||||
wx.getSystemInfo({
|
wx.getSystemInfo({
|
||||||
success: ({ model, screenHeight, statusBarHeight }) => {
|
success: ({ model, statusBarHeight }) => {
|
||||||
const iphoneX = /iphone x/i.test(model);
|
const deviceType = model.replace(/\s/g, '-');
|
||||||
const iphoneNew = /iPhone11/i.test(model) && screenHeight === 812;
|
const iphoneNew = /iphone-x|iPhone11|iPhone12/i.test(deviceType);
|
||||||
|
|
||||||
cache = {
|
cache = {
|
||||||
isIPhoneX: iphoneX || iphoneNew,
|
isIPhoneX: iphoneNew,
|
||||||
statusBarHeight
|
statusBarHeight
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user