Notification: add closeAll

This commit is contained in:
Leopoldthecoder
2018-01-29 12:32:46 +08:00
committed by 杨奕
parent 2fa6935e58
commit cdc14756ae
7 changed files with 12 additions and 9 deletions

View File

@@ -84,4 +84,10 @@ Notification.close = function(id, userOnClose) {
}
};
Notification.closeAll = function() {
for (let i = instances.length - 1; i >= 0; i--) {
instances[i].close();
}
};
export default Notification;