I have a table in vuetify where I want to create a template for 14 of the columns. Instead of making 14 different templates like this:

    <v-data-table disable-pagination

        <template v-slot:[`item.date_0`]="{ item }">
            <ScheduleIcon :item="item.date_0" />

        <template v-slot:[`item.date_1`]="{ item }">
            <ScheduleIcon :item="item.date_1" />

        <template v-slot:[`item.date_2`]="{ item }">
            <ScheduleIcon :item="item.date_2" />


I want to make a v-for loop with an index from 0-13 and at the same time use that index-value in the slot and props variables. Something like this is pseudo-code:

            <template v-slot:[`item.date_INDEX`]="{ item }" v-for="index in 13" :key="index">
                <ScheduleIcon :item="item.date_INDEX" />

How would I do this? The v-for give me the following error:

<template> cannot be keyed. Place the key on real elements instead.
Anonymous Asked question May 14, 2021