Skip to content

Commit a88c2c8

Browse files
committed
fix(componentRenderUtils): keep component root's patch flag the same as component-tag (vuejs#677)
1 parent e529955 commit a88c2c8

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

packages/runtime-core/src/componentRenderUtils.ts

+7
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,13 @@ export function renderComponentRoot(
6464
result = normalizeVNode(
6565
instance.render!.call(proxyToUse, proxyToUse, renderCache)
6666
)
67+
// root node should inherit class/style in component tag and patch
68+
if (vnode.patchFlag & PatchFlags.CLASS) {
69+
result.patchFlag |= PatchFlags.CLASS
70+
}
71+
if (vnode.patchFlag & PatchFlags.STYLE) {
72+
result.patchFlag |= PatchFlags.STYLE
73+
}
6774
} else {
6875
// functional
6976
const render = Component as FunctionalComponent

0 commit comments

Comments
 (0)