Browse Source

fix: deps and TypeScript types

feat-css-var
tangjinzhou 3 years ago
parent
commit
5bd34df5b3
  1. 6
      components/tree/DirectoryTree.tsx

6
components/tree/DirectoryTree.tsx

@ -98,7 +98,7 @@ export default defineComponent({
initExpandedKeys = Object.keys(keyEntities); initExpandedKeys = Object.keys(keyEntities);
} else if (props.defaultExpandParent) { } else if (props.defaultExpandParent) {
initExpandedKeys = conductExpandParent( initExpandedKeys = conductExpandParent(
props.expandedKeys || props.defaultExpandedKeys, props.expandedKeys || props.defaultExpandedKeys || [],
keyEntities, keyEntities,
); );
} else { } else {
@ -203,8 +203,8 @@ export default defineComponent({
}; };
// Windows / Mac single pick // Windows / Mac single pick
const ctrlPick: boolean = nativeEvent.ctrlKey || nativeEvent.metaKey; const ctrlPick: boolean = nativeEvent?.ctrlKey || nativeEvent?.metaKey;
const shiftPick: boolean = nativeEvent.shiftKey; const shiftPick: boolean = nativeEvent?.shiftKey;
// Generate new selected keys // Generate new selected keys
let newSelectedKeys: Key[]; let newSelectedKeys: Key[];

Loading…
Cancel
Save