1
- import { useGlobalConfig } from 'vue-global-config'
1
+ import { resolveConfig } from 'vue-global-config'
2
2
import type { Plugin , install } from 'vue-demi'
3
3
import Component from './Component'
4
4
import type { Mode } from './Component'
@@ -25,22 +25,15 @@ const withInstall = <T, E extends Record<string, any>>(
25
25
26
26
const globalProps : Record < string , any > = { }
27
27
const globalAttrs : Record < string , any > = { }
28
- const globalListeners : Record < string , any > = { }
29
- const globalHooks : Record < string , any > = { }
30
28
31
29
const ComponentWithInstall = withInstall ( Component )
32
30
33
31
ComponentWithInstall . install = ( app : any , options = { } ) => {
34
- const { props, attrs, listeners , hooks } = useGlobalConfig ( options , Component . props )
32
+ const { props, attrs } = resolveConfig ( options , Component . props )
35
33
Object . assign ( globalProps , props )
36
34
Object . assign ( globalAttrs , attrs )
37
- Object . assign ( globalListeners , listeners )
38
- Object . assign ( globalHooks , hooks )
39
35
app . component ( ComponentWithInstall . name , ComponentWithInstall )
40
36
}
41
37
38
+ export { globalProps , globalAttrs , Mode }
42
39
export default ComponentWithInstall
43
- export {
44
- globalProps , globalAttrs , globalListeners , globalHooks ,
45
- Mode ,
46
- }
0 commit comments