修正 layTable.load 的 time 参数

This commit is contained in:
Anyon 2022-04-06 18:11:04 +08:00
parent 1dbb55082e
commit 5159fc32cc

View File

@ -104,10 +104,14 @@ $(function () {
/*! 获取加载回调 */ /*! 获取加载回调 */
onConfirm.getLoadCallable = function (tabldId, callable) { onConfirm.getLoadCallable = function (tabldId, callable) {
typeof callable === 'function' && callable(); typeof callable === 'function' && callable();
return tabldId ? function (ret) { return tabldId ? function (ret, time) {
if (ret.code > 0) return $.msg.success(ret.info, 3, function () { if (ret.code > 0) {
$.layTable.reload(tabldId); if (time === 'false') $.layTable.reload(tabldId);
}) && false; else $.msg.success(ret.info, time, function () {
$.layTable.reload(tabldId);
});
return false;
}
} : false; } : false;
} }
@ -295,8 +299,9 @@ $(function () {
this.success(XMLHttpRequest.responseText); this.success(XMLHttpRequest.responseText);
} }
}, success: function (ret) { }, success: function (ret) {
if (typeof callable === 'function' && callable.call(that, ret) === false) return false; time = time || ret.wait || undefined;
return typeof ret === 'object' ? $.msg.auto(ret, time || ret.wait || undefined) : that.show(ret); if (typeof callable === 'function' && callable.call(that, ret, time) === false) return false;
return typeof ret === 'object' ? $.msg.auto(ret, time) : that.show(ret);
}, complete: function () { }, complete: function () {
$.msg.page.done(); $.msg.page.done();
$.msg.close(loadidx); $.msg.close(loadidx);