Vue常用V-标签
1.v-once: 只绑定一次
2.v-html
<div v-html='name'></div> //会渲染标签
var app = new Vue({
el:'#app',
data:{
name:'<p>123</p>'
}
})
<div v-html='>{{name}}</div> //不会渲染标签
3.v-if,v-else
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<script src="https://cdn.bootcss.com/vue/2.5.16/vue.js"></script>
</head>
<body>
<div id="app">
<div v-if="name=='1'">1</div>
<div v-else-if="name=='2'">2</div>
<div v-else>3</div>
<input type="text" name="" id="" v-model="name" />
</div>
<script>
new Vue({
el:'#app',
data:{
show:false,
name:'1'
}
})
</script>
</body>
</html>