A good approach would be to create a computed property that merges the two arrays into an array of objects.
By doing this, you can effectively handle scenarios where the arrays have different lengths. For instance:
computed: {
fruit() {
const fruit = []
for (let i = 0, len = Math.max(this.apples.length, this.bananas.length); i < len; i++) {
fruit.push({
appleMessage: this.apples[i] && this.apples[i].message || 'no apple message',
bananaMessage: this.bananas[i] && this.bananas[i].message || 'no banana message'
})
}
return fruit
}
}
You can then iterate through the merged array like so:
<li v-for="f in fruit">
{{ f.appleMessage }}
{{ f.bananaMessage }}
</li>
Check out the demo here: http://jsfiddle.net/wzmL1y6q/