refactor(fragments): remove visible anchors for fragments

This commit is contained in:
Evan You
2020-02-26 16:32:06 -05:00
parent 439752822c
commit 11d2fb2594
19 changed files with 95 additions and 192 deletions

View File

@@ -19,8 +19,6 @@ export function ssrRenderSlot(
parentComponent: ComponentInternalInstance
) {
const slotFn = slots[slotName]
// template-compiled slots are always rendered as fragments
push(`<!---->`)
if (slotFn) {
if (slotFn.length > 1) {
// only ssr-optimized slot fns accept more than 1 arguments
@@ -33,5 +31,4 @@ export function ssrRenderSlot(
} else if (fallbackRenderFn) {
fallbackRenderFn()
}
push(`<!---->`)
}

View File

@@ -238,9 +238,7 @@ function renderVNode(
push(children ? `<!--${children}-->` : `<!---->`)
break
case Fragment:
push(`<!---->`)
renderVNodeChildren(push, children as VNodeArrayChildren, parentComponent)
push(`<!---->`)
break
default:
if (shapeFlag & ShapeFlags.ELEMENT) {