Showing
2 changed files
with
10 additions
and
6 deletions
@@ -588,13 +588,15 @@ layui.define(['xmSelect', 'md5'], function (exports) { | @@ -588,13 +588,15 @@ layui.define(['xmSelect', 'md5'], function (exports) { | ||
588 | id: id, | 588 | id: id, |
589 | content: laytpl(res.body).render(JSON.stringify(params)), | 589 | content: laytpl(res.body).render(JSON.stringify(params)), |
590 | success: function (layero, index) { | 590 | success: function (layero, index) { |
591 | - if (typeof done==="function") { | 591 | + if(done) { |
592 | + if (typeof done === "function") { | ||
592 | done(layero, index); | 593 | done(layero, index); |
593 | - }else if(done.success){ | 594 | + } else if (done.success) { |
594 | done.success() | 595 | done.success() |
595 | - }else { | 596 | + } else { |
596 | return | 597 | return |
597 | } | 598 | } |
599 | + } | ||
598 | }, | 600 | }, |
599 | yes: function (index, layero) { | 601 | yes: function (index, layero) { |
600 | if (fn && fn(index)) { | 602 | if (fn && fn(index)) { |
@@ -588,13 +588,15 @@ layui.define(['xmSelect', 'md5'], function (exports) { | @@ -588,13 +588,15 @@ layui.define(['xmSelect', 'md5'], function (exports) { | ||
588 | id: id, | 588 | id: id, |
589 | content: laytpl(res.body).render(JSON.stringify(params)), | 589 | content: laytpl(res.body).render(JSON.stringify(params)), |
590 | success: function (layero, index) { | 590 | success: function (layero, index) { |
591 | - if (typeof done==="function") { | 591 | + if(done) { |
592 | + if (typeof done === "function") { | ||
592 | done(layero, index); | 593 | done(layero, index); |
593 | - }else if(done.success){ | 594 | + } else if (done.success) { |
594 | done.success() | 595 | done.success() |
595 | - }else { | 596 | + } else { |
596 | return | 597 | return |
597 | } | 598 | } |
599 | + } | ||
598 | }, | 600 | }, |
599 | yes: function (index, layero) { | 601 | yes: function (index, layero) { |
600 | if (fn && fn(index)) { | 602 | if (fn && fn(index)) { |
-
Please register or login to post a comment