[Vuejs]-How to use 2 v-for and pass props data to child components in Vue.js

0👍

You can make a new component for description list. Array of description will be passed to that component and you can display those array of descriptions.

<template>
   <ul v-for="(description, key) in descriptions" :key="'item-' + key" class="features-description-ul">
     <li class="features-desc-list">{{description}}</li>
   </ul>
</template>

export default {
  name: "DescriptionList",
  props:{
    descriptions:{
     type: Array,
     required: true
    }
  }
}

And than inside your previous code <DescriptionList :descriptions=item.descriptionTwo />

Leave a comment