mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-05 04:37:47 +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>
|
|
}
|