Skip to content

Commit

Permalink
fix: tree custom icon auguments error vueComponent#223
Browse files Browse the repository at this point in the history
  • Loading branch information
tangjinzhou committed Oct 22, 2018
1 parent 3c59eb9 commit 9638e01
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion components/tree/DirectoryTree.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { initDefaultProps, getOptionProps } from '../_util/props-util'
// selectedKeys?: string[];
// }

function getIcon (h, props) {
function getIcon (props, h) {
const { isLeaf, expanded } = props
if (isLeaf) {
return <Icon type='file' />
Expand Down
2 changes: 1 addition & 1 deletion components/vc-tree/src/TreeNode.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ const TreeNode = {
)}
>
{typeof currentIcon === 'function'
? currentIcon(h, { ...this.$props }) : currentIcon}
? currentIcon({ ...this.$props }, h) : currentIcon}
</span>
) : this.renderIcon()
} else if (loadData && loading) {
Expand Down

0 comments on commit 9638e01

Please sign in to comment.