From e3568bae276889cee60f4e84321a287125014e86 Mon Sep 17 00:00:00 2001 From: HcySunYang Date: Thu, 25 Feb 2021 22:04:28 +0800 Subject: [PATCH] fix(runtime-core): properties in methods should be writable and enumerable in DEV (#3301) fix #3300 --- packages/runtime-core/src/componentOptions.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/runtime-core/src/componentOptions.ts b/packages/runtime-core/src/componentOptions.ts index c836f125493..70948d41cf9 100644 --- a/packages/runtime-core/src/componentOptions.ts +++ b/packages/runtime-core/src/componentOptions.ts @@ -610,7 +610,8 @@ export function applyOptions( Object.defineProperty(ctx, key, { value: methodHandler.bind(publicThis), configurable: true, - enumerable: false + enumerable: true, + writable: true }) } else { ctx[key] = methodHandler.bind(publicThis)