Skip to content

Commit

Permalink
fix(Tree-Select): 修复未使用keys别名 (#3520)
Browse files Browse the repository at this point in the history
* fix: 修复未使用keys别名

* fix: 修复未使用keys别名
  • Loading branch information
liect authored Oct 25, 2023
1 parent 3ae552f commit 38f9378
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/tree-select/tree-select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -127,21 +127,21 @@ export default defineComponent({
if (!isEmpty(props.treeProps) && !isEmpty((props.treeProps as TreeProps).keys)) {
return (props.treeProps as TreeProps).keys.label || 'label';
}
return 'label';
return props.keys?.label || 'label';
});

const realValue = computed(() => {
if (!isEmpty(props.treeProps) && !isEmpty((props.treeProps as TreeProps).keys)) {
return (props.treeProps as TreeProps).keys.value || 'value';
}
return 'value';
return props.keys?.value || 'value';
});

const realChildren = computed(() => {
if (!isEmpty(props.treeProps) && !isEmpty((props.treeProps as TreeProps).keys)) {
return (props.treeProps as TreeProps).keys.children || 'children';
}
return 'children';
return props.keys?.children || 'children';
});

// timelifes
Expand Down

0 comments on commit 38f9378

Please sign in to comment.