fix: tree custom icon not work
parent
43c961c971
commit
1a61d1fa32
|
@ -1 +1 @@
|
|||
Subproject commit a69e38301cd2c54ecf47678ed4d1aa147eef2d7e
|
||||
Subproject commit 48d6f869a283826b5ec7bc9a75ea76142d43186c
|
|
@ -162,13 +162,9 @@ export default {
|
|||
const { on = {}, slots = {}, scopedSlots = {}, class: cls, style, ...restProps } = item;
|
||||
const treeNodeProps = {
|
||||
...restProps,
|
||||
icon:
|
||||
($scopedSlots[scopedSlots.icon] && $scopedSlots[scopedSlots.icon](item)) ||
|
||||
$slots[slots.icon] ||
|
||||
restProps.icon,
|
||||
icon: $scopedSlots[scopedSlots.icon] || $slots[slots.icon] || restProps.icon,
|
||||
switcherIcon:
|
||||
($scopedSlots[scopedSlots.switcherIcon] &&
|
||||
$scopedSlots[scopedSlots.switcherIcon](item)) ||
|
||||
$scopedSlots[scopedSlots.switcherIcon] ||
|
||||
$slots[slots.switcherIcon] ||
|
||||
restProps.switcherIcon,
|
||||
title:
|
||||
|
|
|
@ -416,7 +416,7 @@ const TreeNode = {
|
|||
// Icon + Title
|
||||
renderSelector(h) {
|
||||
const { selected, loading, dragNodeHighlight } = this;
|
||||
const icon = getComponentFromProp(this, 'icon');
|
||||
const icon = getComponentFromProp(this, 'icon', {}, false);
|
||||
const {
|
||||
vcTree: { prefixCls, showIcon, icon: treeIcon, draggable, loadData },
|
||||
} = this;
|
||||
|
|
Loading…
Reference in New Issue