mirror of
https://github.com/element-plus/element-plus.git
synced 2026-03-13 07:51:17 +08:00
refactor: enhance type definition (#3062)
* chore: add vue-tsc for type check * refactor(components): respect Vue's own style type * refactor(components): improve props type * chore(build): improve types * fix(components): remove unnecessary props * perf(components): use shallowRef * fix(components): add missing property type for table * refactor(components): improve time-picker types * refactor(components): extract import type * refactor(components): improve popper types * refactor(components): upload list types * fix(docs): fix type * better type * fix: remove index
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { onMounted, onUpdated, onBeforeUnmount, ref, watch } from 'vue'
|
||||
import { onMounted, onUpdated, onBeforeUnmount, watch, shallowRef } from 'vue'
|
||||
import { EVENT_CODE } from '@element-plus/utils/aria'
|
||||
import { on, off } from '@element-plus/utils/dom'
|
||||
import TreeStore from './tree-store'
|
||||
@@ -10,8 +10,8 @@ interface UseKeydownOption {
|
||||
el$: Ref<HTMLElement>
|
||||
}
|
||||
export function useKeydown({ el$ }: UseKeydownOption, store: Ref<TreeStore>) {
|
||||
const treeItems = ref<Nullable<HTMLElement>[]>([])
|
||||
const checkboxItems = ref<Nullable<HTMLElement>[]>([])
|
||||
const treeItems = shallowRef<Nullable<HTMLElement>[]>([])
|
||||
const checkboxItems = shallowRef<Nullable<HTMLElement>[]>([])
|
||||
|
||||
onMounted(() => {
|
||||
initTabIndex()
|
||||
|
||||
Reference in New Issue
Block a user