[bugfix] Toast: clear in multiple mode (#2635)

This commit is contained in:
neverland 2019-01-27 17:11:17 +08:00 committed by GitHub
parent d0a316c77b
commit e4327a3ebd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -51,6 +51,8 @@ function Toast(options = {}) {
toast.value = false;
if (!singleton && !isServer) {
clearTimeout(toast.timer);
queue = queue.filter(item => item !== toast);
document.body.removeChild(toast.$el);
toast.$destroy();
}