diff --git a/packages/notify/index.less b/packages/notify/index.less index 8ecac97d..ca640b6f 100644 --- a/packages/notify/index.less +++ b/packages/notify/index.less @@ -15,11 +15,6 @@ width: 100%; } - &__safe-area { - height: constant(safe-area-inset-top); - height: env(safe-area-inset-top); - } - &--primary { .theme(background-color, '@notify-primary-background-color'); } diff --git a/packages/notify/index.ts b/packages/notify/index.ts index aab98973..b0eac383 100644 --- a/packages/notify/index.ts +++ b/packages/notify/index.ts @@ -29,6 +29,11 @@ VantComponent({ } }, + created() { + const { statusBarHeight } = wx.getSystemInfoSync(); + this.setData({ statusBarHeight }); + }, + methods: { show() { const { duration, onOpened } = this.data; diff --git a/packages/notify/notify.ts b/packages/notify/notify.ts index 7aad3f8f..071fa2f8 100644 --- a/packages/notify/notify.ts +++ b/packages/notify/notify.ts @@ -23,7 +23,6 @@ const defaultOptions = { duration: 3000, zIndex: 110, color: WHITE, - safeAreaInsetTop: false, onClick: () => {}, onOpened: () => {}, onClose: () => {}