mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
fix(safe-area): adapt iphone12
This commit is contained in:
parent
33a6a70ba6
commit
6a99c797f7
@ -8,7 +8,7 @@ function getSafeArea() {
|
|||||||
wx.getSystemInfo({
|
wx.getSystemInfo({
|
||||||
success: ({ model, statusBarHeight }) => {
|
success: ({ model, statusBarHeight }) => {
|
||||||
const deviceType = model.replace(/\s/g, '-');
|
const deviceType = model.replace(/\s/g, '-');
|
||||||
const iphoneNew = /iphone-x|iPhone11|iPhone12/i.test(deviceType);
|
const iphoneNew = /iphone-x|iPhone11|iPhone12|iPhone13/i.test(deviceType);
|
||||||
|
|
||||||
cache = {
|
cache = {
|
||||||
isIPhoneX: iphoneNew,
|
isIPhoneX: iphoneNew,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user