]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
fix(runtime-core): properties in methods should be writable and enumerable in DEV...
authorHcySunYang <HcySunYang@outlook.com>
Thu, 25 Feb 2021 14:04:28 +0000 (22:04 +0800)
committerGitHub <noreply@github.com>
Thu, 25 Feb 2021 14:04:28 +0000 (09:04 -0500)
fix #3300

packages/runtime-core/src/componentOptions.ts

index c836f125493f5e685fa9e477263bcc3bb58a1069..70948d41cf9ab215ce436f267267c4f7c83477e0 100644 (file)
@@ -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)