update $Message
This commit is contained in:
parent
e7da556669
commit
6503055954
4 changed files with 9 additions and 2 deletions
|
@ -14,7 +14,8 @@
|
||||||
info () {
|
info () {
|
||||||
this.$Message.info({
|
this.$Message.info({
|
||||||
content: '这是一条普通的提示',
|
content: '这是一条普通的提示',
|
||||||
duration: 1000
|
duration: 1000,
|
||||||
|
background: true
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
success () {
|
success () {
|
||||||
|
|
|
@ -83,6 +83,9 @@
|
||||||
background: {
|
background: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
|
},
|
||||||
|
msgType: {
|
||||||
|
type: String
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
|
@ -103,7 +106,8 @@
|
||||||
{
|
{
|
||||||
[`${this.className}`]: !!this.className,
|
[`${this.className}`]: !!this.className,
|
||||||
[`${this.baseClass}-closable`]: this.closable,
|
[`${this.baseClass}-closable`]: this.closable,
|
||||||
[`${this.baseClass}-with-desc`]: this.withDesc
|
[`${this.baseClass}-with-desc`]: this.withDesc,
|
||||||
|
[`${this.baseClass}-with-background`]: this.background
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
},
|
},
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
:name="notice.name"
|
:name="notice.name"
|
||||||
:transition-name="notice.transitionName"
|
:transition-name="notice.transitionName"
|
||||||
:background="notice.background"
|
:background="notice.background"
|
||||||
|
:msg-type="notice.msgType"
|
||||||
:on-close="notice.onClose">
|
:on-close="notice.onClose">
|
||||||
</Notice>
|
</Notice>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -54,6 +54,7 @@ function notice (content = '', duration = defaults.duration, type, onClose = fun
|
||||||
onClose: onClose,
|
onClose: onClose,
|
||||||
closable: closable,
|
closable: closable,
|
||||||
type: 'message',
|
type: 'message',
|
||||||
|
msgType: type,
|
||||||
background: background
|
background: background
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue