Skip to content

Commit e84740a

Browse files
committed
feat: remove global config
1 parent 2132e0b commit e84740a

File tree

4 files changed

+3
-82
lines changed

4 files changed

+3
-82
lines changed

src/utils/global-config.ts

Lines changed: 0 additions & 65 deletions
This file was deleted.

src/utils/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
export * from './format'
2-
export * from './global-config'
32
export * from './types'
43
export * from './with-install'

src/utils/installer.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import type { App, Plugin } from 'vue'
2-
import type { InstallOptions } from './types'
32
import { version } from '../../package.json'
4-
import { provideGlobalConfig } from './global-config'
53

64
export const INSTALLED_KEY = Symbol('INSTALLED_KEY')
75

@@ -11,16 +9,13 @@ declare module 'vue' {
119
}
1210
}
1311

14-
export function createInstaller(components: Plugin[] = []): { install: (app: App, options?: InstallOptions) => void, version: string } {
15-
const install = (app: App, options?: InstallOptions): void => {
12+
export function createInstaller(components: Plugin[] = []): { install: (app: App) => void, version: string } {
13+
const install = (app: App): void => {
1614
if (app[INSTALLED_KEY])
1715
return
1816

1917
app[INSTALLED_KEY] = true
2018
components.forEach(c => app.use(c))
21-
22-
if (options)
23-
provideGlobalConfig(options, app, true)
2419
}
2520

2621
return {

src/utils/types.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
import type { App, InjectionKey, Plugin, Ref } from 'vue'
2-
3-
export type MaybeRef<T> = T | Ref<T>
4-
5-
export interface InstallOptions {
6-
size?: MaybeRef<string>
7-
}
8-
9-
export type ProvideFn = (<T>(key: string | InjectionKey<T>, value: T) => App<any>) | (<T>(key: string | number | InjectionKey<T>, value: T) => void) | undefined
1+
import type { Plugin } from 'vue'
102

113
export type InstallWithSFC<T> = T & Plugin

0 commit comments

Comments
 (0)