v-if
只有当表达式值为真时才被渲染
<h1 v-if="awesome">Vue is awesome!</h1>
v-else
<button @click="awesome = !awesome">Toggle(切换)</button> <h1 v-if="awesome">Vue is awesome!</h1> <h1 v-else>Oh no 标签:show,awesome,元素,else,切换,渲染,条件 From: https://www.cnblogs.com/zmhz/p/17344130.html