-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
patchStyle have some problem #5772
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
Comments
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. |
@LinusBorg |
This is working as expected because you are setting In any case, you are not supposed to directly manipulate the DOM that is being handled by Vue. |
Version
3.2.33
Reproduction link
sfc.vuejs.org/
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 contentb
.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 topatchStyle
and I find that the values ofprev
andnext
are the same, which I think doesn't seem right.The text was updated successfully, but these errors were encountered: