fix: tree custom icon auguments error #223
parent
3c59eb995f
commit
9638e018b3
|
@ -19,7 +19,7 @@ import { initDefaultProps, getOptionProps } from '../_util/props-util'
|
||||||
// selectedKeys?: string[];
|
// selectedKeys?: string[];
|
||||||
// }
|
// }
|
||||||
|
|
||||||
function getIcon (h, props) {
|
function getIcon (props, h) {
|
||||||
const { isLeaf, expanded } = props
|
const { isLeaf, expanded } = props
|
||||||
if (isLeaf) {
|
if (isLeaf) {
|
||||||
return <Icon type='file' />
|
return <Icon type='file' />
|
||||||
|
|
|
@ -358,7 +358,7 @@ const TreeNode = {
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{typeof currentIcon === 'function'
|
{typeof currentIcon === 'function'
|
||||||
? currentIcon(h, { ...this.$props }) : currentIcon}
|
? currentIcon({ ...this.$props }, h) : currentIcon}
|
||||||
</span>
|
</span>
|
||||||
) : this.renderIcon()
|
) : this.renderIcon()
|
||||||
} else if (loadData && loading) {
|
} else if (loadData && loading) {
|
||||||
|
|
Loading…
Reference in New Issue