From 4af5b1cda4d2ce6049f7dfafb25f99a498196bc4 Mon Sep 17 00:00:00 2001 From: sight <26325820+Sight-wcg@users.noreply.github.com> Date: Sat, 13 Jan 2024 13:45:27 +0800 Subject: [PATCH] =?UTF-8?q?feat(table):=20=E6=96=B0=E5=A2=9E=20table.getTo?= =?UTF-8?q?talRow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/table.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/modules/table.js b/src/modules/table.js index d32a8ddb..7f532542 100644 --- a/src/modules/table.js +++ b/src/modules/table.js @@ -1551,6 +1551,15 @@ layui.define(['lay', 'laytpl', 'laypage', 'form', 'util'], function(exports){ that.renderTotal(data, totalRowData) } + /** + * 获取合计行数据 + * @param {string} id 表格 ID + */ + table.getTotalRow = function(id){ + var that = getThisTable(id); + return that.dataTotal; + } + //找到对应的列元素 Class.prototype.getColElem = function(parent, key){ var that = this;