feat(Notify): duration to be string

This commit is contained in:
陈嘉涵
2020-01-29 15:21:40 +08:00
parent bb5f28e10e
commit 2546ca58b8
3 changed files with 7 additions and 10 deletions
+5 -8
View File
@@ -16,8 +16,8 @@ import { PopupMixinProps } from '../mixins/popup/type';
export type NotifyProps = PopupMixinProps & {
type: 'primary' | 'success' | 'danger' | 'warning';
color: string;
message: string | number;
duration: number;
message: number | string;
duration: number | string;
className?: any;
background: string;
};
@@ -54,18 +54,15 @@ function Notify(
Notify.props = {
...popupMixinProps,
color: String,
background: String,
className: null as any,
message: [Number, String],
duration: [Number, String],
className: null as any,
background: String,
getContainer: [String, Function],
type: {
type: String,
default: 'danger',
},
duration: {
type: Number,
default: 3000,
},
};
export default createComponent<NotifyProps>(Notify);