vtils

Home > utils > TreeData > removeNode

TreeData.removeNode() method

移除符合条件的第一个节点。返回被移除的节点。

Signature:

removeNode(predicate: (payload: TreeDataTraverseFnPayload<TNode>) => boolean): TNode | undefined;

Parameters

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

Returns:

TNode | undefined