fix(treeTable): 节点展开后全选无效 (#2024)

pull/2034/head
morning-star 2024-06-18 13:51:55 +08:00 committed by GitHub
parent ab64a2f84e
commit db757c4f77
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -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]))