Subscribe on changes!

bound style attribute is not reflected

avatar
Jul 17th 2021

Version

3.2.0-beta.1

Reproduction link

sfc.vuejs.org

Steps to reproduce

This is a problem that has occurred since 3.2.0-beta.1.

Bound style attribute is not reflected. And interestingly, if you add an empty style attribute, the bound style will be reflected. e.g.

<h1 :style="`color: ${x};`" style="">Hello World!</h1>

See minimal reproduction.

What is expected?

bound style attribute will be reflected

What is actually happening?

bound style attribute is not reflected

avatar
Jul 17th 2021

Probably the reason for this is that the handling of the case where the style is a string is missing here.

Or maybe don't even need to generate the code to call normalizeStyle at the compilation stage.