0👍
You can try to use v-if and v-else block to conditionally render the component.
Example:
<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>
References:
- [Vuejs]-Import JS file placed in /public into JS file in /src
- [Vuejs]-Is it valid to provide to v-for unclosed tags for iteration in vue.js?
Source:stackexchange.com