After manipulating the DOM and re-rendering, the DOM is restored. #8134
seveny
started this conversation in
General Discussions
Replies: 2 comments
-
Beta Was this translation helpful? Give feedback.
0 replies
-
Have you looked at https://vuejs.org/api/built-in-directives.html#v-memo |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
"vue": "3.2.47"
Here is the minimal example:
`
`
Now I need to manipulate the DOM, and after updating the data, the component will re-render, causing the styles of the previously manipulated DOM to be overridden by the template. This used to work properly in Vue2.
The current problem is that there are a considerable amount of code that manipulates the DOM like this , and the business is not willing to make changes because it involves a large number of components. We also do not want to reflect all DOM manipulations in the template. Does anyone know any other ways to make the DOM manipulations effective? I'm eagerly looking forward to your replies. Thank you.
Beta Was this translation helpful? Give feedback.
All reactions