修复 treeTable 数据格式为简单类型时 IE9+ 兼容问题 (#1415)
This commit is contained in:
commit
bd275360d8
@ -301,9 +301,13 @@ layui.define(['table'], function (exports) {
|
||||
}
|
||||
})
|
||||
// 返回顶层节点
|
||||
return Object.values(nodes).filter(function (item) {
|
||||
return rootPid ? item[pIdKey] === rootPid : !item[pIdKey];
|
||||
})
|
||||
return Object.keys(nodes)
|
||||
.map(function(k) {
|
||||
return nodes[k];
|
||||
})
|
||||
.filter(function (item) {
|
||||
return rootPid ? item[pIdKey] === rootPid : !item[pIdKey];
|
||||
})
|
||||
}
|
||||
|
||||
Class.prototype.flatToTree = function (tableData) {
|
||||
|
Loading…
Reference in New Issue
Block a user