fix: Update missing method onNewToastMessage (#3481)

This commit is contained in:
Pranav Raj S 2021-11-30 10:57:44 -08:00 committed by GitHub
parent 0115b4ddc4
commit 98be3b33c1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -34,11 +34,13 @@ export default {
beforeDestroy() {
bus.$off('newToastMessage', this.onNewToastMessage);
},
onNewToastMessage(message) {
this.snackMessages.push({ key: new Date().getTime(), message });
window.setTimeout(() => {
this.snackMessages.splice(0, 1);
}, this.duration);
methods: {
onNewToastMessage(message) {
this.snackMessages.push({ key: new Date().getTime(), message });
window.setTimeout(() => {
this.snackMessages.splice(0, 1);
}, this.duration);
},
},
};
</script>