wip: Vue.util compat

This commit is contained in:
Evan You
2021-04-11 16:53:43 -04:00
parent c55f3ed0e8
commit 62bfdae043
6 changed files with 160 additions and 32 deletions

View File

@@ -497,20 +497,6 @@ export function createRenderContext(instance: ComponentInternalInstance) {
})
})
// expose global properties
const { globalProperties } = instance.appContext.config
Object.keys(globalProperties).forEach(key => {
Object.defineProperty(target, key, {
configurable: true,
enumerable: false,
get: () => {
const val = globalProperties[key]
return __COMPAT__ && isFunction(val) ? val.bind(instance.proxy) : val
},
set: NOOP
})
})
return target as ComponentRenderContext
}