mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
fix(Notify): should reset options
This commit is contained in:
parent
a0497d5858
commit
2ca2f171d0
@ -1,4 +1,5 @@
|
|||||||
export const RED = '#f44';
|
export const RED = '#f44';
|
||||||
export const BLUE = '#1989fa';
|
export const BLUE = '#1989fa';
|
||||||
|
export const WHITE = '#fff';
|
||||||
export const GREEN = '#07c160';
|
export const GREEN = '#07c160';
|
||||||
export const ORANGE = '#ff976a';
|
export const ORANGE = '#ff976a';
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
import { RED, WHITE } from '../common/color';
|
||||||
|
|
||||||
interface NotifyOptions {
|
interface NotifyOptions {
|
||||||
color?: string;
|
color?: string;
|
||||||
zIndex?: number;
|
zIndex?: number;
|
||||||
@ -11,7 +13,11 @@ interface NotifyOptions {
|
|||||||
|
|
||||||
const defaultOptions = {
|
const defaultOptions = {
|
||||||
selector: '#van-notify',
|
selector: '#van-notify',
|
||||||
duration: 3000
|
message: '',
|
||||||
|
duration: 3000,
|
||||||
|
zIndex: 110,
|
||||||
|
color: WHITE,
|
||||||
|
background: RED
|
||||||
};
|
};
|
||||||
|
|
||||||
function parseOptions(message: NotifyOptions | string): NotifyOptions {
|
function parseOptions(message: NotifyOptions | string): NotifyOptions {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user