fix(tree): node slot take no effect

修复BasicTree节点插槽不起作用的问题
This commit is contained in:
无木 2021-09-15 19:50:26 +08:00
parent ba2c1a3bf5
commit 15ea0d2f53
2 changed files with 3 additions and 2 deletions

View File

@ -4,6 +4,7 @@
- **BasicModal**
- 修复点击遮罩、按下`Esc`键都不能关闭`Modal`的问题
- 修复点击关闭按钮、最大化按钮旁边的空白区域也会导致`Modal`关闭的问题
- **BasicTree** 修复节点插槽不起作用的问题
## 2.7.2(2021-09-14)

View File

@ -422,8 +422,8 @@
class={`${prefixCls}-title pl-2`}
onClick={handleClickNode.bind(null, item[keyField], item[childrenField])}
>
{slots?.title ? (
getSlot(slots, 'title', item)
{item.slots?.title ? (
getSlot(slots, item.slots?.title, item)
) : (
<>
{icon && <TreeIcon icon={icon} />}