fix bug tree select custom slot cann't use custom name (#2827)

pull/2890/head
Fei Teng 2020-09-17 16:33:47 +08:00 committed by GitHub
parent 6e35cec375
commit 4851d10f60
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -81,10 +81,10 @@ const TreeSelect = {
let newLabel = typeof label === 'function' ? label(this.$createElement) : label;
let newTitle = typeof title === 'function' ? title(this.$createElement) : title;
if (!newLabel && scopedSlots.label && $scopedSlots[scopedSlots.label]) {
newLabel = $scopedSlots.label(item);
newLabel = $scopedSlots[scopedSlots.label](item);
}
if (!newTitle && scopedSlots.title && $scopedSlots[scopedSlots.title]) {
newTitle = $scopedSlots.title(item);
newTitle = $scopedSlots[scopedSlots.title](item);
}
const treeNodeProps = {
...item,