chore: pass undefined to slotScopeId

This commit is contained in:
daiwei 2024-12-10 14:00:23 +08:00
parent 21454ce627
commit 4d7a697734
2 changed files with 23 additions and 23 deletions

View File

@ -44,7 +44,7 @@ describe('ssr: v-show', () => {
const _component_Foo = _resolveComponent("Foo")
_push(\`<div\${_ssrRenderAttrs(_attrs)}>\`)
_push(_ssrRenderComponent(_component_Foo, { style: {color:'red'} }, null, _parent, '', {
_push(_ssrRenderComponent(_component_Foo, { style: {color:'red'} }, null, _parent, undefined, {
style: (_ctx.foo) ? null : { display: "none" }
}))
_push(\`</div>\`)
@ -63,7 +63,7 @@ describe('ssr: v-show', () => {
return function ssrRender(_ctx, _push, _parent, _attrs) {
_push(\`<div\${_ssrRenderAttrs(_attrs)}>\`)
_ssrRenderVNode(_push, _createVNode(_resolveDynamicComponent("Foo"), { style: {color:'red'} }, null), _parent, '', {
_ssrRenderVNode(_push, _createVNode(_resolveDynamicComponent("Foo"), { style: {color:'red'} }, null), _parent, undefined, {
style: (_ctx.foo) ? null : { display: "none" }
})
_push(\`</div>\`)

View File

@ -201,7 +201,7 @@ export const ssrTransformComponent: NodeTransform = (node, context) => {
]),
`_parent`,
]
if (vShowExp) args.push(`''`, vShowExp)
if (vShowExp) args.push(`undefined`, vShowExp)
node.ssrCodegenNode = createCallExpression(
context.helper(SSR_RENDER_VNODE),
args,
@ -213,7 +213,7 @@ export const ssrTransformComponent: NodeTransform = (node, context) => {
slots,
`_parent`,
]
if (vShowExp) args.push(`''`, vShowExp)
if (vShowExp) args.push(`undefined`, vShowExp)
node.ssrCodegenNode = createCallExpression(
context.helper(SSR_RENDER_COMPONENT),
args,