Commit 15ea0d2f53b76643605ceba0edd4014c77fa5a40
1 parent
ba2c1a3b
fix(tree): node slot take no effect
修复BasicTree节点插槽不起作用的问题
Showing
2 changed files
with
3 additions
and
2 deletions
CHANGELOG.zh_CN.md
src/components/Tree/src/Tree.vue
... | ... | @@ -422,8 +422,8 @@ |
422 | 422 | class={`${prefixCls}-title pl-2`} |
423 | 423 | onClick={handleClickNode.bind(null, item[keyField], item[childrenField])} |
424 | 424 | > |
425 | - {slots?.title ? ( | |
426 | - getSlot(slots, 'title', item) | |
425 | + {item.slots?.title ? ( | |
426 | + getSlot(slots, item.slots?.title, item) | |
427 | 427 | ) : ( |
428 | 428 | <> |
429 | 429 | {icon && <TreeIcon icon={icon} />} | ... | ... |