fix: Update missing method onNewToastMessage (#3481)
This commit is contained in:
parent
0115b4ddc4
commit
98be3b33c1
1 changed files with 7 additions and 5 deletions
|
@ -34,11 +34,13 @@ export default {
|
|||
beforeDestroy() {
|
||||
bus.$off('newToastMessage', this.onNewToastMessage);
|
||||
},
|
||||
methods: {
|
||||
onNewToastMessage(message) {
|
||||
this.snackMessages.push({ key: new Date().getTime(), message });
|
||||
window.setTimeout(() => {
|
||||
this.snackMessages.splice(0, 1);
|
||||
}, this.duration);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
Loading…
Reference in a new issue