[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

View File

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