DemoDataTableBasic.vue
648 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<script setup>
import data from '@/views/demos/forms/tables/data-table/datatable'
const headers = [
{
title: 'ID',
key: 'id',
},
{
title: 'NAME',
key: 'fullName',
},
{
title: 'EMAIL',
key: 'email',
},
{
title: 'DATE',
key: 'startDate',
},
{
title: 'EXPERIENCE',
key: 'experience',
},
{
title: 'AGE',
key: 'age',
},
]
</script>
<template>
<VDataTable
:headers="headers"
:items="data"
:items-per-page="5"
class="text-no-wrap"
>
<template #item.id="{ item }">
<span class="text-h6">{{ item.id }}</span>
</template>
</VDataTable>
</template>