fix(tree): 修正获取父级节点方法的类型定义

- 修改 onGetNodePaths 方法签名,接受 nodes 参数并返回 void
- 移除方法的返回值类型定义 Record<string, any>[]
- 更新类型定义以匹配实际的函数实现
master
LiuJiaNan 2026-04-09 15:12:23 +08:00
parent 5b0f334a30
commit 21c4ea0500
1 changed files with 1 additions and 1 deletions

View File

@ -16,7 +16,7 @@ export interface BasicLeftTreeProps extends Omit<TreeProps, "fieldNames"> {
/** 决定 onGetNodePaths 是否包含自身节点,默认 true */
getNodePathsIsIncludeOneself?: boolean;
/** 获取父级节点 */
onGetNodePaths?: () => Record<string, any>[];
onGetNodePaths?: (nodes: Record<string, any>[]) => void;
/** 获取数据 */
onGetData?: (data: Record<string, any>[]) => void;
}