Browse Source

MessageBox: fix multi alert bug

kingwl 8 years ago
parent
commit
d5f4603f59
1 changed files with 6 additions and 0 deletions
  1. 6 0
      packages/message-box/src/main.js

+ 6 - 0
packages/message-box/src/main.js

@@ -87,6 +87,12 @@ const showNextMsg = () => {
       if (options.callback === undefined) {
         instance.callback = defaultCallback;
       }
+
+      let oldCb = instance.callback;
+      instance.callback = action => {
+        oldCb(action);
+        showNextMsg();
+      };
       ['modal', 'showClose', 'closeOnClickModal', 'closeOnPressEscape'].forEach(prop => {
         if (instance[prop] === undefined) {
           instance[prop] = true;