fix(Notify): safe-area not work in android (#2393)

fix #2372
This commit is contained in:
rex 2019-11-26 20:28:45 +08:00 committed by GitHub
parent 45f4c6c133
commit 69c83bc539
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 6 deletions

View File

@ -15,11 +15,6 @@
width: 100%; width: 100%;
} }
&__safe-area {
height: constant(safe-area-inset-top);
height: env(safe-area-inset-top);
}
&--primary { &--primary {
.theme(background-color, '@notify-primary-background-color'); .theme(background-color, '@notify-primary-background-color');
} }

View File

@ -29,6 +29,11 @@ VantComponent({
} }
}, },
created() {
const { statusBarHeight } = wx.getSystemInfoSync();
this.setData({ statusBarHeight });
},
methods: { methods: {
show() { show() {
const { duration, onOpened } = this.data; const { duration, onOpened } = this.data;

View File

@ -23,7 +23,6 @@ const defaultOptions = {
duration: 3000, duration: 3000,
zIndex: 110, zIndex: 110,
color: WHITE, color: WHITE,
safeAreaInsetTop: false,
onClick: () => {}, onClick: () => {},
onOpened: () => {}, onOpened: () => {},
onClose: () => {} onClose: () => {}