fix: tree custom icon auguments error #223

pull/263/head
tangjinzhou 2018-10-22 21:24:38 +08:00
parent 3c59eb995f
commit 9638e018b3
2 changed files with 2 additions and 2 deletions

View File

@ -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' />

View File

@ -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) {