[improvement] Tabbar: add iPhone X layout feature for fixed tabbar (#3149)

This commit is contained in:
TimonPeng
2019-04-18 15:52:26 +08:00
committed by neverland
parent 5b82d67784
commit 2b44f1a8dd
4 changed files with 19 additions and 1 deletions

View File

@@ -16,6 +16,10 @@ export default sfc({
type: Boolean,
default: true
},
safeAreaInsetBottom: {
type: Boolean,
default: false
},
zIndex: {
type: Number,
default: 1
@@ -51,7 +55,13 @@ export default sfc({
return (
<div
style={{ zIndex: this.zIndex }}
class={['van-hairline--top-bottom', bem({ fixed: this.fixed })]}
class={[
'van-hairline--top-bottom',
bem({
fixed: this.fixed,
'safe-area-inset-bottom': this.safeAreaInsetBottom
})
]}
>
{this.slots()}
</div>