update $Message

This commit is contained in:
梁灏 2019-09-06 09:34:52 +08:00
parent e7da556669
commit 6503055954
4 changed files with 9 additions and 2 deletions

View file

@ -14,7 +14,8 @@
info () {
this.$Message.info({
content: '这是一条普通的提示',
duration: 1000
duration: 1000,
background: true
});
},
success () {

View file

@ -83,6 +83,9 @@
background: {
type: Boolean,
default: false
},
msgType: {
type: String
}
},
data () {
@ -103,7 +106,8 @@
{
[`${this.className}`]: !!this.className,
[`${this.baseClass}-closable`]: this.closable,
[`${this.baseClass}-with-desc`]: this.withDesc
[`${this.baseClass}-with-desc`]: this.withDesc,
[`${this.baseClass}-with-background`]: this.background
}
];
},

View file

@ -15,6 +15,7 @@
:name="notice.name"
:transition-name="notice.transitionName"
:background="notice.background"
:msg-type="notice.msgType"
:on-close="notice.onClose">
</Notice>
</div>

View file

@ -54,6 +54,7 @@ function notice (content = '', duration = defaults.duration, type, onClose = fun
onClose: onClose,
closable: closable,
type: 'message',
msgType: type,
background: background
});