Fixed #1415 - Toast does not clear hide timeout on unmount
parent
81f2a65638
commit
0333cf1fce
|
@ -34,16 +34,22 @@ export default {
|
|||
}, this.message.life)
|
||||
}
|
||||
},
|
||||
beforeUnmount() {
|
||||
this.clearCloseTimeout();
|
||||
},
|
||||
methods: {
|
||||
close() {
|
||||
this.$emit('close', this.message);
|
||||
},
|
||||
onCloseClick() {
|
||||
this.clearCloseTimeout();
|
||||
this.close();
|
||||
},
|
||||
clearCloseTimeout() {
|
||||
if (this.closeTimeout) {
|
||||
clearTimeout(this.closeTimeout);
|
||||
this.closeTimeout = null;
|
||||
}
|
||||
|
||||
this.close();
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
|
Loading…
Reference in New Issue