vue 避免渲染时闪烁
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>vue 避免渲染闪烁</title>
<style type="text/css">
[v-clock] {
display: none;
}
</style>
</head>
<body>
<div id="app" v-clock>
<div>
{{ message }}
</div>
</div>
<script src="https://cdn.bootcss.com/vue/2.5.17-beta.0/vue.min.js"></script>
<script type="text/javascript">
new Vue({
el: '#app',
data: {
message: 99999
}
})
</script>
</body>
</html>
作者:孟繁贵 Email:meng010387@126.com 期待共同进步!