Skip to content

Commit 10812c5

Browse files
committed
chore(deps): upgrade vue-global-config to v0.4
1 parent f095931 commit 10812c5

File tree

2 files changed

+4
-11
lines changed

2 files changed

+4
-11
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
"dependencies": {
6262
"lodash-es": "^4.17.21",
6363
"vue-demi": "^0.13.11",
64-
"vue-global-config": "^0.3.1"
64+
"vue-global-config": "^0.4.0"
6565
},
6666
"devDependencies": {
6767
"@antfu/eslint-config": "^0.34.1",

src/install.ts

+3-10
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { useGlobalConfig } from 'vue-global-config'
1+
import { resolveConfig } from 'vue-global-config'
22
import type { Plugin, install } from 'vue-demi'
33
import Component from './Component'
44
import type { Mode } from './Component'
@@ -25,22 +25,15 @@ const withInstall = <T, E extends Record<string, any>>(
2525

2626
const globalProps: Record<string, any> = {}
2727
const globalAttrs: Record<string, any> = {}
28-
const globalListeners: Record<string, any> = {}
29-
const globalHooks: Record<string, any> = {}
3028

3129
const ComponentWithInstall = withInstall(Component)
3230

3331
ComponentWithInstall.install = (app: any, options = {}) => {
34-
const { props, attrs, listeners, hooks } = useGlobalConfig(options, Component.props)
32+
const { props, attrs } = resolveConfig(options, Component.props)
3533
Object.assign(globalProps, props)
3634
Object.assign(globalAttrs, attrs)
37-
Object.assign(globalListeners, listeners)
38-
Object.assign(globalHooks, hooks)
3935
app.component(ComponentWithInstall.name, ComponentWithInstall)
4036
}
4137

38+
export { globalProps, globalAttrs, Mode }
4239
export default ComponentWithInstall
43-
export {
44-
globalProps, globalAttrs, globalListeners, globalHooks,
45-
Mode,
46-
}

0 commit comments

Comments
 (0)