From db757c4f779c812fd793eab8bb5282d2ea227557 Mon Sep 17 00:00:00 2001 From: morning-star <26325820+Sight-wcg@users.noreply.github.com> Date: Tue, 18 Jun 2024 13:51:55 +0800 Subject: [PATCH] =?UTF-8?q?fix(treeTable):=20=E8=8A=82=E7=82=B9=E5=B1=95?= =?UTF-8?q?=E5=BC=80=E5=90=8E=E5=85=A8=E9=80=89=E6=97=A0=E6=95=88=20(#2024?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/table.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/table.js b/src/modules/table.js index a912e781..06899f32 100644 --- a/src/modules/table.js +++ b/src/modules/table.js @@ -1794,7 +1794,7 @@ layui.define(['lay', 'laytpl', 'laypage', 'form', 'util'], function(exports){ if(isCheckAll){ tr.each(function(i){ - var index = Number(this.getAttribute('data-index')); + var index = this.getAttribute('data-index'); if(!ignoreTrIndex[index]){ var el = $(this); el.toggleClass(ELEM_CHECKED, getChecked(thisData[index][options.checkName])) @@ -1802,7 +1802,7 @@ layui.define(['lay', 'laytpl', 'laypage', 'form', 'util'], function(exports){ }); }else if(isCheckMult){ tr.each(function(i){ - var index = Number(this.getAttribute('data-index')); + var index = this.getAttribute('data-index'); if(opts.index[index] && !ignoreTrIndex[index]){ var el = $(this); el.toggleClass(ELEM_CHECKED, getChecked(thisData[index][options.checkName]))