Home >Web Front-end >JS Tutorial >The reason why the page flickers when rendering the page when binding data to the vue page
This article mainly introduces the reasons why the page flickers when rendering the page when binding data to the vue page. It has a certain reference value. Now I share it with you. Friends in need can refer to it
<style type="text/css"> [v-cloak] { display: none; } </style>
<p id="app" v-cloak> <h1>{{message}}</h1> <h1>{{name}}</h1> </p>
Reason: Because JavaScript operates DOM, it will wait for DOM loading to complete (DOM ready). For vuejs and angularjs, they will go back to parse the html view template after the DOM is ready.
The above is the entire content of this article. I hope it will be helpful to everyone's learning. For more related content, please pay attention to PHP Chinese website!
Related recommendations:
Analysis of function declaration and function expression in js
Use of Element form validation in vue method
The above is the detailed content of The reason why the page flickers when rendering the page when binding data to the vue page. For more information, please follow other related articles on the PHP Chinese website!