mirror of https://github.com/layui/layui
修复 treeTable 新增根节点时没有带选中状态的节点在初始化的时候报错的问题 (#1414)
Co-authored-by: sunxiaobin <sunxiaobin@kailashtech>pull/1415/head
parent
d058c58456
commit
6681db80a8
|
@ -1291,7 +1291,7 @@ layui.define(['table'], function (exports) {
|
|||
|
||||
// 若未传入 LAY_CHECKED 属性,则继承父节点的 checked 状态
|
||||
layui.each(newNodes, function(i, item){
|
||||
if(!(checkName in item)){
|
||||
if(!(checkName in item) && parentNode){
|
||||
item[checkName] = parentNode[checkName];
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue