0π
v-if
in v-for
:
<div v-for="item of data">
<div v-if="item.title === 'condition'">
{{ item.title }}
</div>
</div>
- [Vuejs]-Vuetify v-autocomplete custom filtering bug
- [Vuejs]-Use Vue only in part of an existing jQuery project
0π
It is unclear what your condition would be. ie. are you matching duplicates or to another value.
Either way, I would recommend that you use a computed
instead of a relying on a v-if
. This has numerous benefits, such as cleaner separation of template and logic, makes for easier reading an debugging, and easier to write the filtering logic in js.
Source:stackexchange.com