mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-10 01:12:37 +00:00
Fixed #2989 - Toast: new close and life-end methods
This commit is contained in:
parent
d3e7b71b09
commit
57a490ffbd
5 changed files with 48 additions and 8 deletions
|
@ -62,7 +62,7 @@ export default {
|
|||
mounted() {
|
||||
if (this.message.life) {
|
||||
this.closeTimeout = setTimeout(() => {
|
||||
this.close();
|
||||
this.close({ message: this.message, type: 'life-end' });
|
||||
}, this.message.life);
|
||||
}
|
||||
},
|
||||
|
@ -70,12 +70,12 @@ export default {
|
|||
this.clearCloseTimeout();
|
||||
},
|
||||
methods: {
|
||||
close() {
|
||||
this.$emit('close', this.message);
|
||||
close(params) {
|
||||
this.$emit('close', params);
|
||||
},
|
||||
onCloseClick() {
|
||||
this.clearCloseTimeout();
|
||||
this.close();
|
||||
this.close({ message: this.message, type: 'close' });
|
||||
},
|
||||
clearCloseTimeout() {
|
||||
if (this.closeTimeout) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue