refactor(runtime-core): make setup attrs proxy dev only

This commit is contained in:
Evan You
2020-04-06 17:57:27 -04:00
parent ec4a4c1e06
commit c5f0f63b91
5 changed files with 30 additions and 8 deletions

View File

@@ -5,7 +5,8 @@ import {
EMPTY_OBJ,
capitalize,
hyphenate,
isFunction
isFunction,
def
} from '@vue/shared'
import { ComponentInternalInstance } from './component'
import { callWithAsyncErrorHandling, ErrorCodes } from './errorHandling'
@@ -96,7 +97,7 @@ export function normalizeEmitsOptions(
}
const normalized: ObjectEmitsOptions = {}
options.forEach(key => (normalized[key] = null))
Object.defineProperty(options, '_n', { value: normalized })
def(options, '_n', normalized)
return normalized
} else {
return options