feat(devtools): expose vnode and component on elements

This commit is contained in:
Guillaume Chau 2020-08-29 04:53:25 +02:00
parent 4421c00903
commit 38ca7e8e4e

View File

@ -755,6 +755,10 @@ function baseCreateRenderer(
hostSetScopeId(el, treeOwnerId + '-s')
}
}
if (__DEV__ || __FEATURE_PROD_DEVTOOLS__) {
el.__vnode = vnode
el.__vueParentComponent = parentComponent
}
if (dirs) {
invokeDirectiveHook(vnode, null, parentComponent, 'beforeMount')
}