Vue 3 v-else Directive
v-else The directive is used to represent the else block of v-if or v-else-if.
Basic Explanation
v-else The directive must immediately follow a v-if or v-else-if element, representing the content to render when none of the preceding conditions are met.
- Expected type: none (does not accept an expression)
- Purpose: represents the else block of v-if; it must be preceded by v-if or v-else-if.
Basic Usage
Example
Welcome back
Please log in
Vue 3 Built-in Directives