fix(DirectoryTree): selectedKeys updating (#5732)

- In `multiple` mode, it should emit single value instead of multiple values on single click.
This commit is contained in:
Gin 2022-06-22 09:26:41 +08:00 committed by GitHub
parent 62dc2402f3
commit bddf64e0ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -239,7 +239,7 @@ export default defineComponent({
);
} else {
// Single click
newSelectedKeys = keys;
newSelectedKeys = [key];
lastSelectedKey.value = key;
cachedSelectedKeys.value = newSelectedKeys;
newEvent.selectedNodes = convertDirectoryKeysToNodes(