mirror of https://github.com/vuejs/core.git
wip: cache normalized options for dev check
This commit is contained in:
parent
caca46bb73
commit
004e23f9dd
|
@ -24,7 +24,7 @@ import {
|
||||||
} from './componentProps'
|
} from './componentProps'
|
||||||
import { setDynamicProp } from './dom/prop'
|
import { setDynamicProp } from './dom/prop'
|
||||||
import { renderEffect } from './renderEffect'
|
import { renderEffect } from './renderEffect'
|
||||||
import { emit } from './componentEmits'
|
import { emit, normalizeEmitsOptions } from './componentEmits'
|
||||||
|
|
||||||
export type VaporComponent = FunctionalVaporComponent | ObjectVaporComponent
|
export type VaporComponent = FunctionalVaporComponent | ObjectVaporComponent
|
||||||
|
|
||||||
|
@ -209,6 +209,12 @@ export class VaporComponentInstance implements GenericComponentInstance {
|
||||||
this.props = comp.props ? new Proxy(target, handlers[0]!) : {}
|
this.props = comp.props ? new Proxy(target, handlers[0]!) : {}
|
||||||
this.attrs = new Proxy(target, handlers[1])
|
this.attrs = new Proxy(target, handlers[1])
|
||||||
|
|
||||||
|
if (__DEV__) {
|
||||||
|
// cache normalized options for dev only emit check
|
||||||
|
this.propsOptions = normalizePropsOptions(comp)
|
||||||
|
this.emitsOptions = normalizeEmitsOptions(comp)
|
||||||
|
}
|
||||||
|
|
||||||
// determine fallthrough
|
// determine fallthrough
|
||||||
this.hasFallthrough = false
|
this.hasFallthrough = false
|
||||||
if (rawProps) {
|
if (rawProps) {
|
||||||
|
|
Loading…
Reference in New Issue