fix(compiler-dom): properly stringify class/style bindings when hoisting static strings
This commit is contained in:
@@ -101,7 +101,7 @@ describe('ssr: element', () => {
|
||||
expect(
|
||||
getCompiledString(`<div style="color:red;" :style="bar"></div>`)
|
||||
).toMatchInlineSnapshot(
|
||||
`"\`<div style=\\"\${_ssrRenderStyle([_hoisted_1, _ctx.bar])}\\"></div>\`"`
|
||||
`"\`<div style=\\"\${_ssrRenderStyle([{\\"color\\":\\"red\\"}, _ctx.bar])}\\"></div>\`"`
|
||||
)
|
||||
})
|
||||
|
||||
@@ -184,7 +184,7 @@ describe('ssr: element', () => {
|
||||
)
|
||||
).toMatchInlineSnapshot(`
|
||||
"\`<div\${_ssrRenderAttrs(_mergeProps({
|
||||
style: [_hoisted_1, _ctx.b]
|
||||
style: [{\\"color\\":\\"red\\"}, _ctx.b]
|
||||
}, _ctx.obj))}></div>\`"
|
||||
`)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user