Within my application, I frequently utilize a list and list_item component. To provide a general idea:
contact_list.vue
<template lang="pug">
.table
.table-header.table-row
.table-col Contact
.table-col Info
.table-body
contact-list-item(v-for='contact in contacts',
:contact='contact',
@click='doSomething()')
</template>
contact_list_item.vue
<template lang="pug">
.table-row(@click='emitClickEvent')
.table-col {{ contact.name }}
.table-col {{ contact.info }}
</template>
For instances where I use the contact_list within a specific component, I aim to include a slot that adds additional columns to the contact_list_item component. This slot will utilize data from the particular contact being displayed in the contact_list_item component to create these extra columns.
What would be the best approach to achieve this? Would using slots be recommended?
Thank you in advance.