From 45fc9b25837fb616ef489fb4f97ed12ab73efc4b Mon Sep 17 00:00:00 2001 From: yangchangtao Date: Tue, 2 Apr 2024 14:28:11 +0800 Subject: [PATCH] fix(runtime-core): support for dynamically assigning new properties to $options objects in vue/compat --- packages/runtime-core/src/compat/instance.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/runtime-core/src/compat/instance.ts b/packages/runtime-core/src/compat/instance.ts index 5beaf5f5ebb..342979aac3a 100644 --- a/packages/runtime-core/src/compat/instance.ts +++ b/packages/runtime-core/src/compat/instance.ts @@ -132,7 +132,7 @@ export function installCompatInstanceProperties(map: PublicPropertiesMap) { // inject additional properties into $options for compat // e.g. vuex needs this.$options.parent $options: i => { - const res = extend({}, resolveMergedOptions(i)) + const res = resolveMergedOptions(i) res.parent = i.proxy!.$parent res.propsData = i.vnode.props return res