refactor(ssr): adjust ssr fragment anchor content
This commit is contained in:
@@ -111,7 +111,7 @@ export function processChildren(
|
||||
asFragment = false
|
||||
) {
|
||||
if (asFragment) {
|
||||
context.pushStringPart(`<!--1-->`)
|
||||
context.pushStringPart(`<!--[-->`)
|
||||
}
|
||||
for (let i = 0; i < children.length; i++) {
|
||||
const child = children[i]
|
||||
@@ -136,7 +136,7 @@ export function processChildren(
|
||||
}
|
||||
}
|
||||
if (asFragment) {
|
||||
context.pushStringPart(`<!--0-->`)
|
||||
context.pushStringPart(`<!--]-->`)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -33,12 +33,12 @@ export function ssrProcessFor(node: ForNode, context: SSRTransformContext) {
|
||||
needFragmentWrapper
|
||||
)
|
||||
// v-for always renders a fragment
|
||||
context.pushStringPart(`<!--1-->`)
|
||||
context.pushStringPart(`<!--[-->`)
|
||||
context.pushStatement(
|
||||
createCallExpression(context.helper(SSR_RENDER_LIST), [
|
||||
node.source,
|
||||
renderLoop
|
||||
])
|
||||
)
|
||||
context.pushStringPart(`<!--0-->`)
|
||||
context.pushStringPart(`<!--]-->`)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user