mirror of https://github.com/layui/layui
修复 treeTable 数据格式为简单类型时的 IE 兼容问题
parent
6681db80a8
commit
09a0572e27
|
@ -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