fix(treeTable): 表格删除所有行之后,全选按钮选中的问题 (#1759)

pull/1784/head
morning-star 8 months ago committed by GitHub
parent 2fa8d57015
commit 26abb14c9d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -1622,6 +1622,8 @@ layui.define(['table'], function (exports) {
data = data.filter(function (item) {
return !item[options.disabledName];
});
if(data.length > 0){
layui.each(data, function (i1, item1) {
if (item1[checkName] || item1[LAY_CHECKBOX_HALF]) {
isIndeterminate = true;
@ -1633,6 +1635,10 @@ layui.define(['table'], function (exports) {
return true;
}
})
}else{
isAll = false;
}
isIndeterminate = isIndeterminate && !isAll;
form.render(tableView.find('input[name="layTableCheckbox"][lay-filter="layTableAllChoose"]').prop({
'checked': isAll,

Loading…
Cancel
Save