com-tools
Version:
com-tools 提供了一些通用的工具函数;
60 lines (30 loc) • 1.01 kB
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [com-tools](./com-tools.md) > [flatGroupTree](./com-tools.flatgrouptree.md)
## flatGroupTree() function
扁平化组树
**Signature:**
```typescript
export declare function flatGroupTree<Member>(tree: GroupTree<Member, PropertyKey>): {
members: Member[];
nodes: GroupTree<Member, PropertyKey>[];
};
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
tree
</td><td>
[GroupTree](./com-tools.grouptree.md)<!-- --><Member, PropertyKey>
</td><td>
</td></tr>
</tbody></table>
**Returns:**
{ members: Member\[\]; nodes: [GroupTree](./com-tools.grouptree.md)<!-- --><Member, PropertyKey>\[\]; }
返回启平后的 所有成员 和 所有节点 + members - 包含树中所有节点的成员 + nodes - 树的所有节点
## Remarks