- array2Tree<T>(data, childrenKey?, idKey?, pidKey?, rootPid?): Tree<T>[]
-
Type Parameters
-
T extends Record<string | number | symbol, any> = TreeNode
Parameters
-
data: T[]
-
childrenKey: string = 'children'
-
idKey: keyof T = ...
-
pidKey: keyof T = ...
-
rootPid: string = ''
Returns Tree<T>[]
树状数据数组
Description
将数组组装为树结构