[Vuejs]-How to display data in vuetify datatable

0👍

If you are using new Vuetify version you need to define a slot for each header.

<template v-slot:item.price="{item}">
£{{item.artpack.price}}
</template>

headers:[{text: 'Pack Price', value: 'price'}]

You use same concept for the rest of the fields where you need modified data displayed.

0👍

You’re looking for the item slot…

<template v-slot:item="{ item }">
    <tr>
        <td>{{item.artpack.name}}</td>
        <td>{{item.email}}</td>
        <td>{{item.valid}}</td>
        <td>{{item.expiration_time}}</td>
        <td>{{item.download_count}}</td>
        <td>£{{item.artpack.price}}</td>
        <td>{{item.action}}</td>
    </tr>
</template>

Demo

Leave a comment