if and else if in vue js script code example
Example 1: v-if vuejs
<h1 v-if="awesome">Vue is awesome !</h1>
<h1 v-else-if="sowSow">Vue is not very nice !</h1>
<h1 v-else>Vue is baaaad !</h1>
Example 2: elseif vuejs
<div v-if="type === 'A'">
A
</div>
<div v-else-if="type === 'B'">
B
</div>
<div v-else-if="type === 'C'">
C
</div>
<div v-else>
Not A/B/C
</div>