Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LevelTree ¶
type LevelTree[T LevelNode[E], E comparable] struct { Data T `json:"data"` Children []*LevelTree[T, E] `json:"children"` }
LevelTree 菜单和组织单位等分类层级树
func New ¶
func New[T LevelNode[E], E comparable](data []T, rootId E) []*LevelTree[T, E]
New 构建菜单和组织单位等分类层级树
[data] 一组带有pid的数据 [rootId] 树的起始ID
Click to show internal directories.
Click to hide internal directories.