fix(tree-select): wrong title slot (#4459)

close #4457
pull/4474/head
zkwolf 3 years ago committed by GitHub
parent 1ed4923ea1
commit f35bafb88a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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

Loading…
Cancel
Save