Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style is not cleared #10352

Closed
FireBushtree opened this issue Feb 18, 2024 · 3 comments · Fixed by #10373
Closed

style is not cleared #10352

FireBushtree opened this issue Feb 18, 2024 · 3 comments · Fixed by #10373

Comments

@FireBushtree
Copy link

Vue version

3.4.19

Link to minimal reproduction

https://play.vuejs.org/#eNqNUk1v2zAM/SuaL26BxkKQHTbDLbINBbYdtmEZsIsuqU0navUFiU6zGf7vo+Qmc9OiKGDAIvmo9/ioPvvgXLHrICuzKtReOmQBsHNXwkjtrEfWMw8tG1jrrWY5QXNhhKmtCch02LDLWD/LP4NSlv22XjVv8vMDIOAfBeyAqa2yvqRzExFtZ2qU1kTCVcSdnbNeGDY2Fbu16oA6e9Zagyv5F0qWz9+5fc4GYeir+CiYpFKAoJ1aI1DEWLWdszJdcymy9BfZVd8nvcNQ8e18hN10iCRgWStZ30XogxJC03EUUvERRR0Vn7BkF9no0EyvXXEbrCEPk37xUAgiK8eJYo6ci7HItogulJzXjaG2BpTc+cIAcuM0XxKM+86g1DBrrF4uirfF/D1vZMBpvoCgZzfe3gfwdIvILiY8nJI78DMPpgEP/rW8J22PuE9qT/gjfdwL2YKBlt/KzYkptdVOKvDfXdz6Y3PW9Hjuv6Yc+g6Ow9RbqO+eyd+G/TjUDw9J2cQAXPsN4Fi+Xn2DPZ2PRW2bLu73heJPCFZ1UeMI+9iZhmRPcEntl7RjaTa/wvUewYTDUFFociPh00I+vTD6f7mLYnF0cfgHZjw4YA==

Steps to reproduce

just see reproduction

What is expected?

the color: red style should be cleared

What is actually happening?

the color: red is still alive

System Info

No response

Any additional comments?

No response

@FireBushtree
Copy link
Author

i tried to fix it with this pr~

@hhk-png
Copy link

hhk-png commented Feb 21, 2024

This will only happen when style's value changed, from string to object or from object to string. And it will work correctly when its value type doesn't change. In typescript, operation to change type is not allowed. So it will only happened in javascript.

@Shyam-Chen
Copy link
Contributor

- :style="style"
+ :style="[style]"

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants