diff --git a/docs/src/index.tpl b/docs/src/index.tpl index 1e0f8d6d8..1a4bd73b4 100644 --- a/docs/src/index.tpl +++ b/docs/src/index.tpl @@ -2,7 +2,7 @@ - + diff --git a/packages/actionsheet/en-US.md b/packages/actionsheet/en-US.md index 1c9607ebf..fd9723e64 100644 --- a/packages/actionsheet/en-US.md +++ b/packages/actionsheet/en-US.md @@ -85,6 +85,7 @@ Actionsheet will get another style if there is a `title` prop. | close-on-click-overlay | Whether to close when click overlay | `Boolean` | `true` | | lazy-render | Whether to lazy render util appeared | `Boolean` | `true` | | get-container | Return the mount node for actionsheet | `String | () => HTMLElement` | - | +| safe-area-inset-bottom | Whether to enable bottom safe area adaptation, to enable those features use `viewport-fit=cover` in the `viewport` meta tag | `Boolean` | `false` | ### Event diff --git a/packages/actionsheet/index.less b/packages/actionsheet/index.less index 95f1e67ab..2683235a2 100644 --- a/packages/actionsheet/index.less +++ b/packages/actionsheet/index.less @@ -60,4 +60,9 @@ color: @action-sheet-close-icon-color; font-size: @action-sheet-close-icon-size; } + + &--safe-area-inset-bottom { + padding-bottom: constant(safe-area-inset-bottom); + padding-bottom: env(safe-area-inset-bottom); + } } diff --git a/packages/actionsheet/index.tsx b/packages/actionsheet/index.tsx index a5e1afd83..c4400dda8 100644 --- a/packages/actionsheet/index.tsx +++ b/packages/actionsheet/index.tsx @@ -23,6 +23,7 @@ export type ActionsheetProps = PopupMixinProps & { title?: string; actions: ActionsheetItem[]; cancelText?: string; + safeAreaInsetBottom?: boolean; }; const [sfc, bem] = use('actionsheet'); @@ -79,7 +80,7 @@ function Actionsheet( return ( 或一个返回节点的函数 | `String | () => HTMLElement` | - | - | +| safe-area-inset-bottom | 是否开启 iPhone X 底部安全区适配,需要在 `viewport` meta 标签中设置 `viewport-fit=cover` | `Boolean` | `false` | 1.6.15 | ### Event diff --git a/packages/tabbar/en-US.md b/packages/tabbar/en-US.md index 0dc825120..6fcd3c19a 100644 --- a/packages/tabbar/en-US.md +++ b/packages/tabbar/en-US.md @@ -69,9 +69,9 @@ export default { |------|------|------|------| | v-model | Index of current tab | `Number` | - | | fixed | Whether to fixed bottom | `Boolean` | `true` | -| safe-area-inset-bottom | Whether to iPhone X bottom safe area adaptation, to enable those features use `viewport-fit=cover` in the `viewport` meta tag | `Boolean` | `false` | 1.6.15 | | z-index | Z-index | `Number` | `1` | | active-color | Color of active tab item | `String` | `#1989fa` | +| safe-area-inset-bottom | Whether to enable bottom safe area adaptation, to enable those features use `viewport-fit=cover` in the `viewport` meta tag | `Boolean` | `false` | ### Tabbar Event diff --git a/packages/tabbar/index.js b/packages/tabbar/index.js index 01e004ea6..3ea06934d 100644 --- a/packages/tabbar/index.js +++ b/packages/tabbar/index.js @@ -12,14 +12,11 @@ export default sfc({ props: { value: Number, activeColor: String, + safeAreaInsetBottom: Boolean, fixed: { type: Boolean, default: true }, - safeAreaInsetBottom: { - type: Boolean, - default: false - }, zIndex: { type: Number, default: 1 diff --git a/packages/tabbar/index.less b/packages/tabbar/index.less index b2d862887..5ac33da58 100644 --- a/packages/tabbar/index.less +++ b/packages/tabbar/index.less @@ -13,7 +13,6 @@ } &--safe-area-inset-bottom { - padding-bottom: 0; padding-bottom: constant(safe-area-inset-bottom); padding-bottom: env(safe-area-inset-bottom); } diff --git a/packages/tabbar/zh-CN.md b/packages/tabbar/zh-CN.md index 3933b16c7..ed6ca7edc 100644 --- a/packages/tabbar/zh-CN.md +++ b/packages/tabbar/zh-CN.md @@ -84,9 +84,9 @@ export default { |------|------|------|------|------| | v-model | 当前选中标签的索引 | `Number` | - | - | | fixed | 是否固定在底部 | `Boolean` | `true` | - | -| safe-area-inset-bottom | 是否开启 iPhone X 底部安全区适配,同时需要在 `viewport` meta 标签中设置 `viewport-fit=cover` | `Boolean` | `false` | 1.6.15 | | z-index | 元素 z-index | `Number` | `1` | 1.1.9 | | active-color | 选中标签的颜色 | `String` | `#1989fa` | 1.5.1 | +| safe-area-inset-bottom | 是否开启 iPhone X 底部安全区适配,需要在 `viewport` meta 标签中设置 `viewport-fit=cover` | `Boolean` | `false` | 1.6.15 | ### Tabbar Event