From 15ea0d2f53b76643605ceba0edd4014c77fa5a40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=97=A0=E6=9C=A8?= Date: Wed, 15 Sep 2021 19:50:26 +0800 Subject: [PATCH] fix(tree): node slot take no effect MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复BasicTree节点插槽不起作用的问题 --- CHANGELOG.zh_CN.md | 1 + src/components/Tree/src/Tree.vue | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.zh_CN.md b/CHANGELOG.zh_CN.md index bbde404c..98cb4971 100644 --- a/CHANGELOG.zh_CN.md +++ b/CHANGELOG.zh_CN.md @@ -4,6 +4,7 @@ - **BasicModal** - 修复点击遮罩、按下`Esc`键都不能关闭`Modal`的问题 - 修复点击关闭按钮、最大化按钮旁边的空白区域也会导致`Modal`关闭的问题 +- **BasicTree** 修复节点插槽不起作用的问题 ## 2.7.2(2021-09-14) diff --git a/src/components/Tree/src/Tree.vue b/src/components/Tree/src/Tree.vue index 752aff74..ed8a7287 100644 --- a/src/components/Tree/src/Tree.vue +++ b/src/components/Tree/src/Tree.vue @@ -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 && } -- GitLab