fix: tree-select loop error

pull/3271/head
tanjinzhou 2020-11-27 13:35:19 +08:00
parent 8c94b78346
commit 28aeea6f0b
1 changed files with 2 additions and 2 deletions

View File

@ -93,10 +93,10 @@ const TreeSelect = defineComponent({
let newLabel = typeof label === 'function' ? label() : label; let newLabel = typeof label === 'function' ? label() : label;
let newTitle = typeof title === 'function' ? title() : title; let newTitle = typeof title === 'function' ? title() : title;
if (!newLabel && slots.label && $slots[slots.label]) { if (!newLabel && slots.label && $slots[slots.label]) {
newLabel = $slots.label(item); newLabel = <>{$slots.label(item)}</>;
} }
if (!newTitle && slots.title && $slots[slots.title]) { if (!newTitle && slots.title && $slots[slots.title]) {
newTitle = $slots.title(item); newTitle = <>{$slots.title(item)}</>;
} }
const treeNodeProps = { const treeNodeProps = {
...item, ...item,