update Message style #1881
This commit is contained in:
parent
297648f1e6
commit
e7ad415432
2 changed files with 7 additions and 4 deletions
|
@ -16,7 +16,7 @@
|
|||
content: '这是一条普通提示2',
|
||||
duration: 500,
|
||||
onClose () {
|
||||
console.log(123)
|
||||
// console.log(123)
|
||||
},
|
||||
closable: true
|
||||
})
|
||||
|
|
|
@ -104,9 +104,12 @@
|
|||
},
|
||||
handleLeave (el) {
|
||||
if (this.type === 'message') {
|
||||
el.style.height = 0;
|
||||
el.style.paddingTop = 0;
|
||||
el.style.paddingBottom = 0;
|
||||
// 优化一下,如果当前只有一个 Message,则不使用 js 过渡动画,这样更优美
|
||||
if (document.getElementsByClassName('ivu-message-notice').length !== 1) {
|
||||
el.style.height = 0;
|
||||
el.style.paddingTop = 0;
|
||||
el.style.paddingBottom = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Add table
Reference in a new issue