How does vue’s loop v-for loop 2 items at a time?

  node.js, question

This is what I have achieved now, but I always feel that something is wrong.

< ul v-for = "(item, index) in items" v-if = "index% 2==0" >
 <li>{{items[index].name}}</li>
 < li>{{items[index plus 1].name}}</li >
 </ul>

If you can use template syntax directly, don’t do extra calculations:

<template v-for="(item,index) in items">
 < ul v-if="index% 2 == 0 ">
 <li>{{items[index].name}}</li>
 < Li v-if = "index < items.length" > {{items [index plus 1].name}}</li >
 </ul>
 </template>