Поправлена сортировка
This commit is contained in:
@@ -26,17 +26,16 @@
|
|||||||
>
|
>
|
||||||
<template v-slot:header="props">
|
<template v-slot:header="props">
|
||||||
<q-tr :props="props">
|
<q-tr :props="props">
|
||||||
<q-th
|
<q-th class="td-mp" key="num" :props="props"><span v-html="props.cols[0].label"></span></q-th>
|
||||||
v-for="col in props.cols"
|
<q-th class="td-mp" key="date" :props="props"><span v-html="props.cols[1].label"></span></q-th>
|
||||||
:key="col.name"
|
<q-th class="td-mp" key="desc" :props="props" colspan="3">
|
||||||
:props="props"
|
<span v-html="props.cols[2].label"></span>
|
||||||
>
|
|
||||||
<span v-html="col.label"></span>
|
|
||||||
</q-th>
|
</q-th>
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template v-slot:body="props">
|
<template v-slot:body="props">
|
||||||
<q-tr :props="props">
|
<q-tr :props="props">
|
||||||
<q-td key="num" :props="props" class="td-mp" auto-width>
|
<q-td key="num" :props="props" class="td-mp" auto-width>
|
||||||
<div class="break-word" style="width: 25px">
|
<div class="break-word" style="width: 25px">
|
||||||
@@ -260,12 +259,14 @@ class RecentBooksPage extends Vue {
|
|||||||
name: 'num',
|
name: 'num',
|
||||||
label: '#',
|
label: '#',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
sortable: true,
|
||||||
field: 'num',
|
field: 'num',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'date',
|
name: 'date',
|
||||||
label: 'Время<br>просм.',
|
label: 'Время<br>просм.',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
field: 'touchDateTime',
|
||||||
sortable: true,
|
sortable: true,
|
||||||
sort: (a, b, rowA, rowB) => rowA.touchDateTime - rowB.touchDateTime,
|
sort: (a, b, rowA, rowB) => rowA.touchDateTime - rowB.touchDateTime,
|
||||||
},
|
},
|
||||||
@@ -273,6 +274,7 @@ class RecentBooksPage extends Vue {
|
|||||||
name: 'desc',
|
name: 'desc',
|
||||||
label: 'Название',
|
label: 'Название',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
field: 'descString',
|
||||||
sortable: true,
|
sortable: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -391,9 +393,10 @@ class RecentBooksPage extends Vue {
|
|||||||
touchDate: t[0],
|
touchDate: t[0],
|
||||||
touchTime: t[1],
|
touchTime: t[1],
|
||||||
desc: {
|
desc: {
|
||||||
title: `${title}${perc}${textLen}`,
|
|
||||||
author,
|
author,
|
||||||
|
title: `${title}${perc}${textLen}`,
|
||||||
},
|
},
|
||||||
|
descString: `${author}${title}${perc}${textLen}`,
|
||||||
url: book.url,
|
url: book.url,
|
||||||
path: book.path,
|
path: book.path,
|
||||||
key: book.key,
|
key: book.key,
|
||||||
|
|||||||
Reference in New Issue
Block a user