fix(ssr): fix class/style rendering + ssrRenderComponent export name

This commit is contained in:
Evan You
2020-02-14 20:48:06 -05:00
parent 66b5f0b480
commit 688ad92391
3 changed files with 11 additions and 7 deletions

View File

@@ -176,10 +176,12 @@ export const ssrTransformElement: NodeTransform = (node, context) => {
// static key attr
if (attrName === 'class') {
openTag.push(
` class="`,
(dynamicClassBinding = createCallExpression(
context.helper(SSR_RENDER_CLASS),
[value]
))
)),
`"`
)
} else if (attrName === 'style') {
if (dynamicStyleBinding) {
@@ -187,10 +189,12 @@ export const ssrTransformElement: NodeTransform = (node, context) => {
mergeCall(dynamicStyleBinding, value)
} else {
openTag.push(
` style="`,
(dynamicStyleBinding = createCallExpression(
context.helper(SSR_RENDER_STYLE),
[value]
))
)),
`"`
)
}
} else {