新增 table 的合计行模板 `TOTAL_ROW` 特定字段

pull/1194/head
贤心 2023-01-25 19:05:49 +08:00
parent 366968e2b1
commit 61637f260c
1 changed files with 3 additions and 2 deletions

View File

@ -1340,6 +1340,7 @@ layui.define(['lay', 'laytpl', 'laypage', 'form', 'util'], function(exports){
if(typeof totalRow === 'string'){ if(typeof totalRow === 'string'){
return laytpl(totalRow).render($.extend({ return laytpl(totalRow).render($.extend({
TOTAL_NUMS: TOTAL_NUMS || totalNums[field], TOTAL_NUMS: TOTAL_NUMS || totalNums[field],
TOTAL_ROW: totalRowData || {},
LAY_COL: item3 LAY_COL: item3
}, item3)); }, item3));
} }
@ -2275,7 +2276,7 @@ layui.define(['lay', 'laytpl', 'laypage', 'form', 'util'], function(exports){
}); });
})(); })();
//初始化 // 初始化
table.init = function(filter, settings){ table.init = function(filter, settings){
settings = settings || {}; settings = settings || {};
var that = this; var that = this;
@ -2347,7 +2348,7 @@ layui.define(['lay', 'laytpl', 'laypage', 'form', 'util'], function(exports){
tableIns.reloadData({ tableIns.reloadData({
data: options.data data: options.data
}) });
} }
}); });