mirror of https://github.com/layui/layui
修复 treeTable 数据格式为简单类型时 IE9+ 兼容问题 (#1415)
commit
bd275360d8
|
@ -301,7 +301,11 @@ layui.define(['table'], function (exports) {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
// 返回顶层节点
|
// 返回顶层节点
|
||||||
return Object.values(nodes).filter(function (item) {
|
return Object.keys(nodes)
|
||||||
|
.map(function(k) {
|
||||||
|
return nodes[k];
|
||||||
|
})
|
||||||
|
.filter(function (item) {
|
||||||
return rootPid ? item[pIdKey] === rootPid : !item[pIdKey];
|
return rootPid ? item[pIdKey] === rootPid : !item[pIdKey];
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue