浏览代码

fix(runtime-core): properties in methods should be writable and enumerable in DEV (#3301)

fix #3300
HcySunYang 5 年之前
父节点
当前提交
e3568bae27
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      packages/runtime-core/src/componentOptions.ts

+ 2 - 1
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)