Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
levy committed Oct 12, 2019
2 parents 661eefc + 90f1554 commit 8988384
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
14 changes: 14 additions & 0 deletions template/frameworks/mobile/assets/global.less
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
body {
font-size: 28px;
.safe-area-inset-bottom();
}

.text-center {
Expand Down Expand Up @@ -34,3 +35,16 @@ body {
position: relative;
height: 120px;
}

// 安全区适配 (https://developer.mozilla.org/en-US/docs/Web/CSS/@viewport/viewport-fit)
.safe-area-inset-bottom {
padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom);
}
// vant 组件安全区全局适配
.van-tabbar--fixed,
.van-goods-action,
.van-submit-bar,
.van-popup--bottom {
.safe-area-inset-bottom();
}
4 changes: 4 additions & 0 deletions template/nuxt/nuxt.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,11 @@ module.exports = {
title: '',
meta: [
{charset: 'utf-8'},
<%_ if (template === 'mobile') { _%>
{name: 'viewport', content: 'width=device-width, initial-scale=1, user-scalable=no, viewport-fit=cover'},
<%_ } else { _%>
{name: 'viewport', content: 'width=device-width, initial-scale=1'},
<%_ } _%>
{'http-equiv': 'x-ua-compatible', content: 'IE=edge, chrome=1'},
{
hid: 'description',
Expand Down

0 comments on commit 8988384

Please sign in to comment.