diff --git a/packages/hooks/src/useRefs.ts b/packages/hooks/src/useRefs.ts index 62ac5dbcc..efbaabd27 100644 --- a/packages/hooks/src/useRefs.ts +++ b/packages/hooks/src/useRefs.ts @@ -1,9 +1,9 @@ -import type { Ref } from 'vue'; +import type { ComponentPublicInstance, Ref } from 'vue'; import { onBeforeUpdate, shallowRef } from 'vue'; function useRefs(): { refs: Ref; - setRefs: (index: number) => (el: T) => void; + setRefs: (index: number) => (el: Element | ComponentPublicInstance | null) => void; } { const refs = shallowRef([]) as Ref; @@ -11,8 +11,8 @@ function useRefs(): { refs.value = []; }); - const setRefs = (index: number) => (el: T) => { - refs.value[index] = el; + const setRefs = (index: number) => (el: Element | ComponentPublicInstance | null) => { + refs.value[index] = el as T; }; return { diff --git a/src/components/Drawer/src/BasicDrawer.vue b/src/components/Drawer/src/BasicDrawer.vue index b3fd12226..6ab326f77 100644 --- a/src/components/Drawer/src/BasicDrawer.vue +++ b/src/components/Drawer/src/BasicDrawer.vue @@ -1,5 +1,5 @@