From b7c6c0668f8750e3f9907da7d957e444cca5888c Mon Sep 17 00:00:00 2001 From: xuan Date: Mon, 5 Sep 2022 16:43:04 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20fix(=E9=AB=98=E5=BA=A6):=20?= =?UTF-8?q?=E8=B0=83=E6=95=B4page=E9=AB=98=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app.scss | 5 +++-- src/custom-tab-bar/index.module.scss | 2 +- src/styles/common.scss | 3 +++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/app.scss b/src/app.scss index 2ff25c6..e4f700b 100644 --- a/src/app.scss +++ b/src/app.scss @@ -8,8 +8,9 @@ [相关说明](https://developers.weixin.qq.com/community/develop/doc/000a60f7d58a982f08d7ddfc456000) */ +// 总高度 - 自定义tabbar高度 - apple小黑条高度 page { - height: 100%; + height: calc(100% - #{$customTabBarHeight} - constant(safe-area-inset-bottom)); + height: calc(100% - #{$customTabBarHeight} - env(safe-area-inset-bottom)); background-color: #f7f7f7; } - diff --git a/src/custom-tab-bar/index.module.scss b/src/custom-tab-bar/index.module.scss index 9a301ff..3075c58 100644 --- a/src/custom-tab-bar/index.module.scss +++ b/src/custom-tab-bar/index.module.scss @@ -3,7 +3,7 @@ left: 0; bottom: 0; width: 100%; - height: 100px; + height: $customTabBarHeight; display: flex; flex-flow: row nowrap; padding-bottom: env(safe-area-inset-bottom); diff --git a/src/styles/common.scss b/src/styles/common.scss index 5549c46..50eed22 100644 --- a/src/styles/common.scss +++ b/src/styles/common.scss @@ -16,6 +16,9 @@ $font_size: 28px; $font_size_medium: 24px; $font_size_min: 22px; +$customTabBarHeight: 100px; + + //安全底部距离 .common_safe_area_y { width: 100%;