mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
build: compile 0.5.24
This commit is contained in:
parent
0d75716a29
commit
9b7381291a
8
dist/mixins/safe-area.js
vendored
8
dist/mixins/safe-area.js
vendored
@ -6,11 +6,11 @@ function getSafeArea() {
|
|||||||
}
|
}
|
||||||
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
|
||||||
};
|
};
|
||||||
resolve(cache);
|
resolve(cache);
|
||||||
|
@ -9,11 +9,11 @@ function getSafeArea() {
|
|||||||
else {
|
else {
|
||||||
wx.getSystemInfo({
|
wx.getSystemInfo({
|
||||||
success: function (_a) {
|
success: function (_a) {
|
||||||
var model = _a.model, screenHeight = _a.screenHeight, statusBarHeight = _a.statusBarHeight;
|
var model = _a.model, statusBarHeight = _a.statusBarHeight;
|
||||||
var iphoneX = /iphone x/i.test(model);
|
var deviceType = model.replace(/\s/g, '-');
|
||||||
var iphoneNew = /iPhone11/i.test(model) && screenHeight === 812;
|
var iphoneNew = /iphone-x|iPhone11|iPhone12/i.test(deviceType);
|
||||||
cache = {
|
cache = {
|
||||||
isIPhoneX: iphoneX || iphoneNew,
|
isIPhoneX: iphoneNew,
|
||||||
statusBarHeight: statusBarHeight
|
statusBarHeight: statusBarHeight
|
||||||
};
|
};
|
||||||
resolve(cache);
|
resolve(cache);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user