mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-15 01:41:20 +08:00
11 lines
344 B
TypeScript
11 lines
344 B
TypeScript
import type { App, DefineComponent } from 'vue'
|
|
import type { SFCWithInstall } from './types'
|
|
|
|
/* istanbul ignore next */
|
|
export default <T extends DefineComponent<any, any, any>>(component: T) => {
|
|
;(component as any).install = (app: App): void => {
|
|
app.component(component.name, component)
|
|
}
|
|
return component as SFCWithInstall<T>
|
|
}
|