参考:vue官网 1、代码:
内置指令
[v-cloak] { display: none }
abcd
提示
{{cons}}
{{content}}
alert("======")
new Vue({
el: '#example',
data: {
cons:'hello world',
content: '百度一下',
result:'你好',
res:'haha'
},
methods: {
hint () {
alert(this.$refs.msg.innerHTML)
}
}
})
2、效果图: 1)、{{cons}}出现闪现效果,如下图: 2、v-cloak防止闪现效果如下:
[v-cloak] { display: none }
{{content}}
3、完整效果图: