|
|
@@ -18,6 +18,7 @@ const wipMap = new WeakMap<ComponentNode, WIPEntry>()
|
|
|
interface WIPEntry {
|
|
|
tag: AttributeNode | DirectiveNode
|
|
|
propsExp: string | JSChildNode | null
|
|
|
+ scopeId: string | null
|
|
|
}
|
|
|
|
|
|
// phase 1: build props
|
|
|
@@ -45,7 +46,8 @@ export function ssrTransformTransitionGroup(
|
|
|
}
|
|
|
wipMap.set(node, {
|
|
|
tag,
|
|
|
- propsExp
|
|
|
+ propsExp,
|
|
|
+ scopeId: context.scopeId || null
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
@@ -58,7 +60,7 @@ export function ssrProcessTransitionGroup(
|
|
|
) {
|
|
|
const entry = wipMap.get(node)
|
|
|
if (entry) {
|
|
|
- const { tag, propsExp } = entry
|
|
|
+ const { tag, propsExp, scopeId } = entry
|
|
|
if (tag.type === NodeTypes.DIRECTIVE) {
|
|
|
// dynamic :tag
|
|
|
context.pushStringPart(`<`)
|
|
|
@@ -66,6 +68,9 @@ export function ssrProcessTransitionGroup(
|
|
|
if (propsExp) {
|
|
|
context.pushStringPart(propsExp)
|
|
|
}
|
|
|
+ if (scopeId) {
|
|
|
+ context.pushStringPart(` ${scopeId}`)
|
|
|
+ }
|
|
|
context.pushStringPart(`>`)
|
|
|
|
|
|
processChildren(
|
|
|
@@ -89,6 +94,9 @@ export function ssrProcessTransitionGroup(
|
|
|
if (propsExp) {
|
|
|
context.pushStringPart(propsExp)
|
|
|
}
|
|
|
+ if (scopeId) {
|
|
|
+ context.pushStringPart(` ${scopeId}`)
|
|
|
+ }
|
|
|
context.pushStringPart(`>`)
|
|
|
processChildren(node, context, false, true)
|
|
|
context.pushStringPart(`</${tag.value!.content}>`)
|