优化$.modal.close方法

pull/213/MERGE
Ricky 2020-09-18 12:13:31 +08:00
parent 59a45cf5ad
commit 5d73b1d8de
1 changed files with 7 additions and 3 deletions

View File

@ -722,9 +722,13 @@ var table = {
$.modal.alert(content, modal_status.WARNING); $.modal.alert(content, modal_status.WARNING);
}, },
// 关闭窗体 // 关闭窗体
close: function () { close: function (index) {
var index = parent.layer.getFrameIndex(window.name); if($.common.isEmpty(index)){
parent.layer.close(index); var index = parent.layer.getFrameIndex(window.name);
parent.layer.close(index);
} else {
layer.close(index);
}
}, },
// 关闭全部窗体 // 关闭全部窗体
closeAll: function () { closeAll: function () {