提交 abb10b13 编写于 作者: Q qiang

fix: 解决tabbar组件在iPhoneX上超出底部安全区的问题

上级 af816073
......@@ -12,7 +12,7 @@
"test:unit": "cross-env NODE_ENV=test UNI_PLATFORM=h5 mocha-webpack --require tests/unit/setup.js --webpack-config build/webpack.config.test.js tests/unit/**/*.spec.js"
},
"dependencies": {},
"private": true,
"private": true,
"devDependencies": {
"@vue/cli-plugin-babel": "^3.1.1",
"@vue/cli-plugin-eslint": "^3.1.4",
......
......@@ -54,11 +54,17 @@ uni-tabbar .uni-tabbar {
width: 100%;
z-index: 998;
box-sizing: border-box;
padding-bottom: 0;
padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom);
}
uni-tabbar .uni-tabbar ~ .uni-placeholder {
width: 100%;
height: 50px;
margin-bottom: 0;
margin-bottom: constant(safe-area-inset-bottom);
margin-bottom: env(safe-area-inset-bottom);
}
uni-tabbar .uni-tabbar * {
......
......@@ -19,6 +19,8 @@ uni-page-head[uni-page-head-type="default"] ~ uni-page-wrapper {
.uni-app--showtabbar uni-page-wrapper {
display: block;
height: calc(100% - 50px);
height: calc(100% - 50px - constant(safe-area-inset-bottom));
height: calc(100% - 50px - env(safe-area-inset-bottom));
}
.uni-app--showtabbar uni-page-wrapper::after {
......@@ -26,10 +28,14 @@ uni-page-head[uni-page-head-type="default"] ~ uni-page-wrapper {
display: block;
width: 100%;
height: 50px;
height: calc(50px + constant(safe-area-inset-bottom));
height: calc(50px + env(safe-area-inset-bottom));
}
.uni-app--showtabbar uni-page-head[uni-page-head-type="default"] ~ uni-page-wrapper {
height: calc(100% - 44px - 50px);
height: calc(100% - 44px - 50px - constant(safe-area-inset-bottom));
height: calc(100% - 44px - 50px - env(safe-area-inset-bottom));
}
uni-page-body {
......
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册