in this example of vuetify documentation for data-tables as described
here, to customize the calories column we’re using the item.calories slot:
<div id="app">
<v-app id="inspire">
<v-data-table
:headers="headers"
:items="desserts"
class="elevation-1"
>
<template v-slot:item.calories="{ item }">
<v-chip
:color="getColor(item.calories)"
dark
>
{{ item.calories }}
</v-chip>
</template>
</v-data-table>
</v-app>
</div>
but i need v-for to customize all the columns, so that it can be something like:
<div id="app">
<v-app id="inspire">
<v-data-table
:headers="headers"
:items="desserts"
class="elevation-1"
>
<v-for :list="headers">
<template v-slot:item.header="{ item }">
<v-chip
:color="getColor(item.header)"
dark
>
{{ item.calories }}
</v-chip>
</template>
</v-for>
</v-data-table>
</v-app>
</div>
Unfortunately, this is not working.
Does anybody know how can I deal with this issue?
Thanks in advance!