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 { on = {}, slots = {}, scopedSlots = {}, class: cls, style, ...restProps } = item;
|
||||||
const treeNodeProps = {
|
const treeNodeProps = {
|
||||||
...restProps,
|
...restProps,
|
||||||
icon:
|
icon: $scopedSlots[scopedSlots.icon] || $slots[slots.icon] || restProps.icon,
|
||||||
($scopedSlots[scopedSlots.icon] && $scopedSlots[scopedSlots.icon](item)) ||
|
|
||||||
$slots[slots.icon] ||
|
|
||||||
restProps.icon,
|
|
||||||
switcherIcon:
|
switcherIcon:
|
||||||
($scopedSlots[scopedSlots.switcherIcon] &&
|
$scopedSlots[scopedSlots.switcherIcon] ||
|
||||||
$scopedSlots[scopedSlots.switcherIcon](item)) ||
|
|
||||||
$slots[slots.switcherIcon] ||
|
$slots[slots.switcherIcon] ||
|
||||||
restProps.switcherIcon,
|
restProps.switcherIcon,
|
||||||
title:
|
title:
|
||||||
|
|
|
@ -416,7 +416,7 @@ const TreeNode = {
|
||||||
// Icon + Title
|
// Icon + Title
|
||||||
renderSelector(h) {
|
renderSelector(h) {
|
||||||
const { selected, loading, dragNodeHighlight } = this;
|
const { selected, loading, dragNodeHighlight } = this;
|
||||||
const icon = getComponentFromProp(this, 'icon');
|
const icon = getComponentFromProp(this, 'icon', {}, false);
|
||||||
const {
|
const {
|
||||||
vcTree: { prefixCls, showIcon, icon: treeIcon, draggable, loadData },
|
vcTree: { prefixCls, showIcon, icon: treeIcon, draggable, loadData },
|
||||||
} = this;
|
} = this;
|
||||||
|
|
Loading…
Reference in New Issue