fix(Notify): should reset options

This commit is contained in:
陈嘉涵 2019-08-28 14:08:53 +08:00
parent a0497d5858
commit 2ca2f171d0
2 changed files with 8 additions and 1 deletions

View File

@ -1,4 +1,5 @@
export const RED = '#f44';
export const BLUE = '#1989fa';
export const WHITE = '#fff';
export const GREEN = '#07c160';
export const ORANGE = '#ff976a';

View File

@ -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 {