Home >Web Front-end >JS Tutorial >The reason why the page flickers when rendering the page when binding data to the vue page

The reason why the page flickers when rendering the page when binding data to the vue page

不言
不言Original
2018-07-14 17:43:473015browse

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn