patchStyle have some problem
Version
3.2.33
Reproduction link
Steps to reproduce
1、click the move
button, tThe left value of the first div tag will increase by 10 to 20.
2、click the add
button, will add a div tag with content b
.
What is expected?
The left value of the first label should still be 20px
.
What is actually happening?
The left value of the first label becomes 10px
.
Any additional comments?
I tried to debug the code and created another link.
When I click the change
button, the code runs to patchStyle
and I find that the values of prev
and next
are the same, which I think doesn't seem right.
It's working as expected because you were updating the DOM directly, bypassing Vue's component state.
See the fix here.
Yes, I have solved it like this at the moment, but in vue2 the appearance is as I expected. this is a link.