fix: tree-select nodeKey default selected (#7172) (#7181)

Fix the problem that nodeKey initialization is invalid
This commit is contained in:
Xc
2022-05-09 09:36:53 +08:00
committed by GitHub
parent 56fee15685
commit c3d5106f6d

View File

@@ -20,7 +20,7 @@ export default defineComponent({
const select = ref<InstanceType<typeof ElSelect>>()
const tree = ref<InstanceType<typeof ElTree>>()
const key = computed(() => props.valueKey || props.nodeKey || 'value')
const key = computed(() => props.nodeKey || props.valueKey || 'value')
const selectProps = useSelect(props, context, { select, tree, key })
const treeProps = useTree(props, context, { select, tree, key })