App breaks when using both HTML style and inline style.
Version
3.2.2
Reproduction link
Steps to reproduce
Using both style
and :style
breaks the app.
Minimal code to reproduce:
<h1 style="font-size: 34px" :style="{ 'font-weight': 'bold'}">Hello World</h1>
What is expected?
Both styles should be applied together
What is actually happening?
App crashes.
In Firefox following error message is seen:
Uncaught TypeError: CSS2Properties doesn't have an indexed property setter for '0'
In Chrome:
Uncaught TypeError: Failed to set an indexed property on 'CSSStyleDeclaration': Indexed property setter is not supported.
I don't know the exact version this issue start to happen, but same code works with vue 2.6.14. The same code works for me in Vue 3, until I update the package today.
as a workaround use v-bind instead, see sfc