Discussion
Discussion copied to clipboard
Vue Chunk , open and close div in v-for list items
Hello Guys , there is a way to make the CHUNK function Vue ? For Each 4 items , it display a DIV and CLose THE DIV in the end .
like this -
Total of 6 Items display -
<div class="row-fluid">
my Item 1 ,my item 2 , item 3 , item 4
</div>
<div class="row-fluid">
my Item 1 ,my item 2
</div>
Total of 3 Items display -
<div class="row-fluid">
my Item 1 ,my item 2 , item 3
</div>
In Vue Like this -
<div v-for="(item , index ) in products" >
<div class="product-item">
{{ $product.title }}
{{ $product.description}}
</div>
</div>
But I dont know how could I chunk this in VUE (open and close the div ) Does some one knows ? Thanks