mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2026-11-17 17:13:34 +08:00
refactor(前端): 修正表格加载回调的参数命名
背景与目的:表格加载回调中的 tabldId 存在拼写错误,影响代码阅读和维护。 主要改动:将该局部参数及全部引用统一为 tableId。 影响范围与兼容性:不改变函数签名位置、判断逻辑、提示行为或表格刷新流程。 验证入口及实际结果:差异复核确认仅有局部参数重命名,与开发仓库对应静态组件一致;node --check 和差异检查通过。本次未进行浏览器交互验收。
This commit is contained in:
parent
3d4525e5a0
commit
9a472fc6c0
@ -100,11 +100,11 @@ $(function () {
|
||||
};
|
||||
|
||||
/*! 获取加载回调 */
|
||||
this.onConfirm.getLoadCallable = function (tabldId, callable, options) {
|
||||
this.onConfirm.getLoadCallable = function (tableId, callable, options) {
|
||||
typeof callable === 'function' && callable();
|
||||
options = options || {};
|
||||
let errorAlert = options.errorAlert === true || String(options.errorAlert) === 'true';
|
||||
if (!tabldId && !errorAlert) return false;
|
||||
if (!tableId && !errorAlert) return false;
|
||||
return function (ret, time) {
|
||||
// 单独处理 javascript: 返回内容处理
|
||||
if (typeof ret.data === 'string' && ret.data.indexOf('javascript:') === 0) {
|
||||
@ -117,9 +117,9 @@ $(function () {
|
||||
}
|
||||
return true;
|
||||
}
|
||||
if (!tabldId) return true;
|
||||
time === 'false' ? $.layTable.reload(tabldId) : $.msg.success(ret.info, time, function () {
|
||||
$.layTable.reload(tabldId);
|
||||
if (!tableId) return true;
|
||||
time === 'false' ? $.layTable.reload(tableId) : $.msg.success(ret.info, time, function () {
|
||||
$.layTable.reload(tableId);
|
||||
});
|
||||
return false;
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user