fix(runtime-core): rework vnode hooks handling

- peroperly support directive on components (e.g. <foo v-show="x">)
- consistently invoke raw vnode hooks on component vnodes (fix #684)
This commit is contained in:
Evan You
2020-02-10 13:15:36 -05:00
parent 8a87074df0
commit cfadb98011
4 changed files with 204 additions and 26 deletions

View File

@@ -113,6 +113,7 @@ export interface ComponentInternalInstance {
data: Data
props: Data
attrs: Data
vnodeHooks: Data
slots: Slots
proxy: ComponentPublicInstance | null
// alternative proxy used only for runtime-compiled render functions using
@@ -186,6 +187,7 @@ export function createComponentInstance(
data: EMPTY_OBJ,
props: EMPTY_OBJ,
attrs: EMPTY_OBJ,
vnodeHooks: EMPTY_OBJ,
slots: EMPTY_OBJ,
refs: EMPTY_OBJ,