From f88626e73ae775abd2fbf2250e5a821476a31ddf Mon Sep 17 00:00:00 2001 From: sunxiaobin89 <285584806@qq.com> Date: Tue, 21 Jun 2022 00:19:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DeachCols=E9=81=8D=E5=8E=86?= =?UTF-8?q?=E4=B8=8D=E5=88=B0=E9=9A=90=E8=97=8F=E5=88=97=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/table.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/modules/table.js b/src/modules/table.js index 36cb72af..6770e6f1 100644 --- a/src/modules/table.js +++ b/src/modules/table.js @@ -1914,13 +1914,12 @@ layui.define(['laytpl', 'laypage', 'layer', 'form', 'util'], function(exports){ // 找到它的子列所在cols的下标 var i2 = i1 + (parseInt(item2.rowspan) || 1); layui.each(cols[i2], function (i22, item22) { - if (item22.hide) return; //如果子列已经被标注为{PARENT_COL_INDEX},或者子列累计 colspan 数等于父列定义的 colspan,则跳出当前子列循环 if (item22.PARENT_COL_INDEX || (childIndex >= 1 && childIndex == (item2.colspan || 1))) return; item22.PARENT_COL_INDEX = index; item2.CHILD_COLS.push(item22); - childIndex = childIndex + parseInt(item22.colspan > 1 ? item22.colspan : 1); + childIndex = childIndex + (item22.hide ? 0 : parseInt(item22.colspan > 1 ? item22.colspan : 1)); eachChildCols(index, cols, i2, item22); }); }