VUE Notes

When you need to operate the re-rendered DOM node, such as adding a sliding operation to the traversed carousel graph, or calculating the height for the newly rendered message, etc., you can perform JS operations after the DOM is flushed, rendered and loaded. Add the code to be executed in this.$nextTick().

this.$nextTick(() => {
 // the code you want to execute
 })




Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324817010&siteId=291194637