diff --git a/packages/common/color.ts b/packages/common/color.ts index c850d2a1..0e6205b5 100644 --- a/packages/common/color.ts +++ b/packages/common/color.ts @@ -1,4 +1,5 @@ export const RED = '#f44'; export const BLUE = '#1989fa'; +export const WHITE = '#fff'; export const GREEN = '#07c160'; export const ORANGE = '#ff976a'; diff --git a/packages/notify/notify.ts b/packages/notify/notify.ts index e9649dbd..4bc91328 100644 --- a/packages/notify/notify.ts +++ b/packages/notify/notify.ts @@ -1,3 +1,5 @@ +import { RED, WHITE } from '../common/color'; + interface NotifyOptions { color?: string; zIndex?: number; @@ -11,7 +13,11 @@ interface NotifyOptions { const defaultOptions = { selector: '#van-notify', - duration: 3000 + message: '', + duration: 3000, + zIndex: 110, + color: WHITE, + background: RED }; function parseOptions(message: NotifyOptions | string): NotifyOptions {