使用v-show做条件渲染
<h2 v-show="false">欢迎来到{{name}}/h2>
<h2 v-show="1 === 1">欢迎来到{{name}}j/h2>
使用v-if做条件渲染
<h2 v-if="false">欢迎来到{{name}}</h2>
<h2 v-if="1 === 1">欢迎来到{{name}}</h2>
v-else和v-else-if
<div v-if="n === 1">Angular</div>
<div v-else-if="n === 2">React</div>
<div v-else-if="n === 3 ">Vue</div>
<div v-else>哈哈</div>
Vue template用法