vtils

Home > utils > TreeData > traverseNodeBFS

TreeData.traverseNodeBFS() method

广度优先遍历节点。

Signature:

traverseNodeBFS(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