mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-04 12:17:37 +08:00
55348b30b6
* style: use prettier * style: just prettier format, no code changes * style: eslint fix object-shorthand, prefer-const * style: fix no-void * style: no-console
11 lines
331 B
TypeScript
11 lines
331 B
TypeScript
import type { App, DefineComponent } from 'vue'
|
|
import type { SFCWithInstall } from './types'
|
|
|
|
/* istanbul ignore next */
|
|
export default <T>(component: T) => {
|
|
;(component as any).install = (app: App) => {
|
|
app.component((component as unknown as DefineComponent).name, component)
|
|
}
|
|
return component as SFCWithInstall<T>
|
|
}
|