<!DOCTYPE html>
<html>
<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>Document</title>
<style>
[v-cloak] {
display: none
}
</style>
</head>
<body>
<div id='app' v-cloak>
<!--
v-cloak 解决{{}}时页面闪烁问题->
1. 给vue管理的容器标签div#app添加v-cloak
2. 样式代码中,选中拥有v-cloak属性的元素,设置样式display:none
-->
<p>{{msg}}</p>
<p>{{msg}}</p>
<p>{{msg}}</p>
<p>{{msg}}</p>
<p>{{msg}}</p>
</div>
<!-- <script src='./vue.js'></script> -->
<script src="https://cdn.jsdelivr.net/npm/vue@2.5.22/dist/vue.js"></script>
<script>
new Vue({
el: '#app',
data: {
msg: "abc"
},
methods: {
}
});
</script>
</body>
</html>
原文:https://www.cnblogs.com/divtab/p/10940296.html