diff --git a/src/notify/Notify.tsx b/src/notify/Notify.tsx index 8ccfbcc4d..09370b116 100644 --- a/src/notify/Notify.tsx +++ b/src/notify/Notify.tsx @@ -1,6 +1,5 @@ // Utils import { createNamespace } from '../utils'; -import { WHITE } from '../utils/constant'; import { inherit } from '../utils/functional'; // Mixins @@ -54,6 +53,7 @@ function Notify( Notify.props = { ...popupMixinProps, + color: String, background: String, className: null as any, message: [Number, String], @@ -62,10 +62,6 @@ Notify.props = { type: String, default: 'danger', }, - color: { - type: String, - default: WHITE, - }, duration: { type: Number, default: 3000, diff --git a/src/notify/index.less b/src/notify/index.less index 6bf356cfd..e0c2a040a 100644 --- a/src/notify/index.less +++ b/src/notify/index.less @@ -3,6 +3,7 @@ .van-notify { box-sizing: border-box; padding: @notify-padding; + color: @notify-text-color; font-size: @notify-font-size; line-height: @notify-line-height; diff --git a/src/notify/index.ts b/src/notify/index.ts index 8e33dc360..8dbb9f1aa 100644 --- a/src/notify/index.ts +++ b/src/notify/index.ts @@ -1,6 +1,5 @@ import Vue from 'vue'; import VanNotify from './Notify'; -import { WHITE } from '../utils/constant'; import { isObject, isServer } from '../utils'; import { mount } from '../utils/functional'; import { NotifyOptions } from 'types/notify'; @@ -60,7 +59,7 @@ function defaultOptions(): NotifyOptions { type: 'danger', value: true, message: '', - color: WHITE, + color: undefined, background: undefined, duration: 3000, className: '', diff --git a/src/notify/test/__snapshots__/index.spec.js.snap b/src/notify/test/__snapshots__/index.spec.js.snap index c3e4f0f92..68a85cc1c 100644 --- a/src/notify/test/__snapshots__/index.spec.js.snap +++ b/src/notify/test/__snapshots__/index.spec.js.snap @@ -1,13 +1,13 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`create a notify 1`] = `