1- import { useGlobalConfig } from 'vue-global-config'
1+ import { resolveConfig } from 'vue-global-config'
22import type { Plugin , install } from 'vue-demi'
33import Component from './Component'
44import type { Mode } from './Component'
@@ -25,22 +25,15 @@ const withInstall = <T, E extends Record<string, any>>(
2525
2626const globalProps : Record < string , any > = { }
2727const globalAttrs : Record < string , any > = { }
28- const globalListeners : Record < string , any > = { }
29- const globalHooks : Record < string , any > = { }
3028
3129const ComponentWithInstall = withInstall ( Component )
3230
3331ComponentWithInstall . 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 }
4239export default ComponentWithInstall
43- export {
44- globalProps , globalAttrs , globalListeners , globalHooks ,
45- Mode ,
46- }
0 commit comments