vtils

Home > utils > TreeData > removeNodes

TreeData.removeNodes() method

移除符合条件的所有节点。返回被移除的节点组成的数组。

Signature:

removeNodes(predicate: (payload: TreeDataTraverseFnPayload<TNode>) => boolean): TNode[];

Parameters

Parameter Type Description
predicate (payload: TreeDataTraverseFnPayload<TNode>) => boolean 条件

Returns:

TNode[]