Answer the question
In order to leave comments, you need to log in
Loop propagation to adjacent Vue.js blocks?
<div v-if="type == 0" v-for="item in items" class="item" key="item">
...
</div>
<div v-else class="cats item" key="cats">
...
</div>
Answer the question
In order to leave comments, you need to log in
Well, obviously v-for has higher precedence, so it's done in both cases.
What to do? Add a v-for
wrapper to the element, into which you transfer the v-if
.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question