mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-11-30 10:18:02 +08:00
parent
bbcd54ce7f
commit
3d77bcd29b
@ -6,12 +6,13 @@ import type { ConfigProviderContext } from '@element-plus/tokens'
|
||||
const INSTALLED_KEY = Symbol('INSTALLED_KEY')
|
||||
|
||||
export const makeInstaller = (components: Plugin[] = []) => {
|
||||
const install = (app: App, options: ConfigProviderContext = {}) => {
|
||||
const install = (app: App, options?: ConfigProviderContext) => {
|
||||
if (app[INSTALLED_KEY]) return
|
||||
|
||||
app[INSTALLED_KEY] = true
|
||||
components.forEach((c) => app.use(c))
|
||||
provideGlobalConfig(options, app, true)
|
||||
|
||||
if (options) provideGlobalConfig(options, app, true)
|
||||
}
|
||||
|
||||
return {
|
||||
|
Loading…
Reference in New Issue
Block a user