Home > utils > TreeData > count
计算符合条件的节点个数。不给出条件则计算所有节点的个数。
Signature:
count(predicate?: (payload: TreeDataTraverseFnPayload<TNode>) => boolean): number;
Parameter | Type | Description |
---|---|---|
predicate | (payload: TreeDataTraverseFnPayload<TNode>) => boolean | 条件 |
Returns:
number