-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.vue
49 lines (44 loc) · 913 Bytes
/
app.vue
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
44
45
46
47
48
49
<template>
<div>
<DataTable
scrollable
scrollHeight="400px"
:virtualScrollerOptions="{ itemSize: 10 }"
:value="rows ?? []"
>
<Column
v-for="col of columns"
:key="col.field"
:field="col.field"
:header="col.header"
:column-key="col.field"
class="cell-content text-nowrap"
>
<template #body="{ data, field }">
<div>
{{ data[field] }}
{{ col.unit }}
</div>
</template>
</Column>
</DataTable>
<br />
<div>TOTAL ROWS: {{ rows.length }}</div>
</div>
</template>
<script setup lang="ts">
import { columns, rows } from "./assets/config/config";
const cars = ref();
const date = ref();
</script>
<style>
.p-datatable-table {
width: 100%;
}
.cell-content {
padding: 12px;
}
.p-column-header-content {
background-color: #dd9999;
}
</style>