From 1c14272b9a5d63f1259fede6fa636a6fe1cf84b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B2=81=E6=9C=88=E5=B0=8F=E5=81=B7?= <470459819@qq.com> Date: Wed, 6 Jul 2022 02:30:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dtable=E6=89=93=E5=8D=B0?= =?UTF-8?q?=E9=94=99=E5=88=97=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/table.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/modules/table.js b/src/modules/table.js index add230be..f90fd8e9 100644 --- a/src/modules/table.js +++ b/src/modules/table.js @@ -1622,10 +1622,16 @@ layui.define(['laytpl', 'laypage', 'form', 'util'], function(exports){ html.append(that.layMain.find('table').html()); //输出表体 html.append(that.layTotal.find('table').html()) //输出合计行 - + html.find('th.layui-table-patch').remove(); //移除补丁 - html.find('.layui-table-col-special').remove(); //移除特殊列 - + layui.each(html.find('thead>tr>th.layui-table-col-special'), function (thIndex, thElem) { + thElem = $(thElem); + if (!thElem.children('.laytable-cell-group').length) { // 表头特殊列中和并列不移除 + thElem.remove(); + } + }) + html.find('tbody>tr>td.layui-table-col-special').remove(); // 移除表体特殊列 + printWin.document.write(style + html.prop('outerHTML')); printWin.document.close(); printWin.print();