Таблица починина

This commit is contained in:
iriska-gri committed 2024-03-06 12:33:31 +03:00
1 parent 323ff1242d
commit 09a192e83e
1 file changed
+24 -26
@@ -5,35 +5,14 @@
>
<template v-slot:filling>
<my-helper :pretext="expanded"/>
<!-- <v-data-table
v-model:expanded="expanded"
:headers="dessertHeaders"
:items="dataActivusers"
item-value="user.fio"
show-expand
>
<template v-slot:top>
<v-toolbar flat>
<v-toolbar-title>Expandable Table</v-toolbar-title>
</v-toolbar>
</template>
<template v-slot:expanded-row="{ columns, item }">
<tr>
<td :colspan="columns.length">
More info about {{ item.name }}
</td>
</tr>
</template>
</v-data-table> -->
<v-data-table-virtual
v-model:expanded="expanded"
:headers="dessertHeaders"
:items="dataActivusers"
item-value="user.fio"
item-value="user.id"
show-expand
class="h-0 cursor-default "
:sort-by="[{ key: 'info.count', order: 'desc' }]"
@@ -46,6 +25,7 @@
:from_which = "'top-user'"
/>
</template>
<template v-slot:headers="{ columns, isSorted, getSortIcon, toggleSort }">
<tr>
<template v-for="column in columns" :key="column.key">
@@ -79,7 +59,7 @@
More info about {{ item.name }}
</td>
</tr>
<!-- <tr>
<tr>
<td :colspan="columns.length">
<v-card class="my-2 elevation-0" color='grey'>
<v-divider/>
@@ -131,7 +111,7 @@
</td>
</tr> -->
</tr>
</template>
</v-data-table-virtual>
@@ -163,6 +143,24 @@ export default {
},
setup(props) {
const desserts = [
{
name: 'Frozen Yogurt',
calories: 159,
fat: 6.0,
carbs: 24,
protein: 4.0,
iron: 1,
},
{
name: 'Ice cream sandwich',
calories: 237,
fat: 9.0,
carbs: 37,
protein: 4.3,
iron: 1,
}]
const dataActivusers = computed({
get() {
@@ -278,7 +276,7 @@ export default {
subtable,
getColor,
getColor2,
desserts
}
}