mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-05 12:48:04 +08:00
cb6300c739
* refactor(components): [dialog] refactor - fix TS type. - enhance prop type `beforeClose` - move `token.ts` to `@element-plus/tokens` * refactor: resolve review comments * test: fix slots
10 lines
281 B
TypeScript
10 lines
281 B
TypeScript
import type { ComponentPublicInstance, Ref } from 'vue'
|
|
|
|
export const composeRefs = (...refs: Ref<HTMLElement | undefined>[]) => {
|
|
return (el: Element | ComponentPublicInstance | null) => {
|
|
refs.forEach((ref) => {
|
|
ref.value = el as HTMLElement | undefined
|
|
})
|
|
}
|
|
}
|