Skip to content

KBE3D / KBCore / utils / treeToList

函数: treeToList()

treeToList<T>(tree: any, config?: Partial<TreeMappingConfig>): T[]

树结构数据转成集合

类型参数

T

T = any

参数

tree

any

目标树结构

config?

Partial<TreeMappingConfig> = {}

配置项

返回

T[]

集合

备注

ts
 DEFAULT_CONFIG: TreeMappingConfig = {
   children: 'children',
 }

KBE3D @3.0.0 Copyright © 2024-present KBE3D