fix(runtime-core): component root should inherit scopeId from vnode
fix #1399
This commit is contained in:
parent
70ea76ae0c
commit
f3f94e4deb
@ -42,7 +42,6 @@ export function renderComponentRoot(
|
|||||||
): VNode {
|
): VNode {
|
||||||
const {
|
const {
|
||||||
type: Component,
|
type: Component,
|
||||||
parent,
|
|
||||||
vnode,
|
vnode,
|
||||||
proxy,
|
proxy,
|
||||||
withProxy,
|
withProxy,
|
||||||
@ -149,9 +148,8 @@ export function renderComponentRoot(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// inherit scopeId
|
// inherit scopeId
|
||||||
const parentScopeId = parent && parent.type.__scopeId
|
if (vnode.scopeId) {
|
||||||
if (parentScopeId) {
|
root = cloneVNode(root, { [vnode.scopeId]: '' })
|
||||||
root = cloneVNode(root, { [parentScopeId]: '' })
|
|
||||||
}
|
}
|
||||||
// inherit directives
|
// inherit directives
|
||||||
if (vnode.dirs) {
|
if (vnode.dirs) {
|
||||||
|
Loading…
Reference in New Issue
Block a user