From 8a67774e469f6fe8aa9d9a94b3f2dd0791edbc4d Mon Sep 17 00:00:00 2001 From: winixt Date: Mon, 20 Jun 2022 22:55:26 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E4=BC=98=E5=8C=96=20template?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../templates/app/h5/src/styles/common.less | 8 +++----- packages/fes-template-h5/src/styles/common.less | 8 +++----- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/packages/create-fes-app/templates/app/h5/src/styles/common.less b/packages/create-fes-app/templates/app/h5/src/styles/common.less index 8d2bd816..706444c2 100644 --- a/packages/create-fes-app/templates/app/h5/src/styles/common.less +++ b/packages/create-fes-app/templates/app/h5/src/styles/common.less @@ -26,8 +26,7 @@ a { /* 适配 iPhone X 顶部填充*/ @supports (top: env(safe-area-inset-top)){ - body, - .alien-screen-header { + body { padding-top: constant(safe-area-inset-top, 40px); padding-top: env(safe-area-inset-top, 40px); padding-top: var(safe-area-inset-top, 40px); @@ -36,10 +35,9 @@ a { /* 判断iPhoneX 将 footer 的 padding-bottom 填充到最底部 */ @supports (bottom: env(safe-area-inset-bottom)){ - body, - .alien-screen-footer { + body { padding-bottom: constant(safe-area-inset-bottom, 20px); padding-bottom: env(safe-area-inset-bottom, 20px); - padding-top: var(safe-area-inset-bottom, 20px); + padding-bottom: var(safe-area-inset-bottom, 20px); } } diff --git a/packages/fes-template-h5/src/styles/common.less b/packages/fes-template-h5/src/styles/common.less index 8d2bd816..7cc7d45a 100644 --- a/packages/fes-template-h5/src/styles/common.less +++ b/packages/fes-template-h5/src/styles/common.less @@ -26,8 +26,7 @@ a { /* 适配 iPhone X 顶部填充*/ @supports (top: env(safe-area-inset-top)){ - body, - .alien-screen-header { + body { padding-top: constant(safe-area-inset-top, 40px); padding-top: env(safe-area-inset-top, 40px); padding-top: var(safe-area-inset-top, 40px); @@ -36,10 +35,9 @@ a { /* 判断iPhoneX 将 footer 的 padding-bottom 填充到最底部 */ @supports (bottom: env(safe-area-inset-bottom)){ - body, - .alien-screen-footer { + body { padding-bottom: constant(safe-area-inset-bottom, 20px); padding-bottom: env(safe-area-inset-bottom, 20px); - padding-top: var(safe-area-inset-bottom, 20px); + padding-bottom: var(safe-area-inset-bottom, 20px); } }