fix: tree custom icon auguments error #223
parent
3c59eb995f
commit
9638e018b3
|
@ -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' />
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue