S
S
sldo_ru2020-05-07 18:42:43
JavaScript
sldo_ru, 2020-05-07 18:42:43

How to loop v-for 5 times?

There is a loop that displays the elements of an array. I need the elements to be displayed one after the other 5 times. How can this be implemented?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Pastukhov, 2020-05-07
@sldo_ru

<div v-for="item, index in [].concat(arr, arr, arr, arr, arr)" : key="index">
  {{ arr }}
</div>

<template v-for="item in 5" >
  <div v-for="item, index in arr" : key="index">
    {{ arr }}
 </div>
</template>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question