Skip to content

KBE3D / KBCore / utils / findPathAll

函数: findPathAll()

findPathAll(tree: any, func: TreeCallbackFn, config?: Partial<TreeMappingConfig>): any[]

找到符合条件的最终节点集合,并将节点的父级一级一级向上全部返回

参数

tree

any

目标树结构

func

TreeCallbackFn

回调函数

config?

Partial<TreeMappingConfig> = {}

配置项

返回

any[]

[[...祖,父,子], [...祖,父,子], ...]

备注

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

KBE3D @3.0.0 Copyright © 2024-present KBE3D