Vue 3 v-else-if Directive
v-else-if The directive is used to represent the else-if block of v-if, and can be chained to form multi-condition branching.
Basic Explanation
v-else-if The directive must immediately follow a v-if or another v-else-if element, representing another condition when the previous one is not met.
- Expected type: any
- Purpose: represents the else-if block of v-if; it must be preceded by v-if or v-else-if. Can be chained.
Basic Usage
Example
Type A
Type B
Type C
Other types
Vue 3 Built-in Directives