perf: 优化tree getIcon方法类型定义 (#2825)

This commit is contained in:
前端爱码士 2023-06-05 11:04:56 +08:00 committed by GitHub
parent 1e8fab3fe5
commit 19fd49e22d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -129,7 +129,7 @@
getSelectedNode,
} = useTree(treeDataRef, getFieldNames);
function getIcon(params: Recordable, icon?: string) {
function getIcon(params: TreeItem, icon?: string) {
if (!icon) {
if (props.renderIcon && isFunction(props.renderIcon)) {
return props.renderIcon(params);