Skip to content

Commit 9638e01

Browse files
committed
fix: tree custom icon auguments error #223
1 parent 3c59eb9 commit 9638e01

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Diff for: components/tree/DirectoryTree.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import { initDefaultProps, getOptionProps } from '../_util/props-util'
1919
// selectedKeys?: string[];
2020
// }
2121

22-
function getIcon (h, props) {
22+
function getIcon (props, h) {
2323
const { isLeaf, expanded } = props
2424
if (isLeaf) {
2525
return <Icon type='file' />

Diff for: components/vc-tree/src/TreeNode.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ const TreeNode = {
358358
)}
359359
>
360360
{typeof currentIcon === 'function'
361-
? currentIcon(h, { ...this.$props }) : currentIcon}
361+
? currentIcon({ ...this.$props }, h) : currentIcon}
362362
</span>
363363
) : this.renderIcon()
364364
} else if (loadData && loading) {

0 commit comments

Comments
 (0)