vtils

Home > utils > TreeData > traverseNodeDFS

TreeData.traverseNodeDFS() method

深度优先遍历节点。

Signature:

traverseNodeDFS(node: OneOrMore<TNode> | ((payload: TreeDataTraverseFnPayload<TNode>) => boolean), fn: OneOrMore<TreeDataTraverseFn<TNode> | false>): this;

Parameters

Parameter Type Description
node OneOrMore<TNode> | ((payload: TreeDataTraverseFnPayload<TNode>) => boolean)  
fn OneOrMore<TreeDataTraverseFn<TNode> | false> 遍历函数

Returns:

this