Answer the question
In order to leave comments, you need to log in
How to keep pagination on page reload?
There is a vuetify table component:
<v-data-table
:headers="headers"
:items="tableData"
:items-per-page="5"
class="elevation-1"
:loading="loadingTable"
loading-text="Загрузка данных, подождите..."
no-data-text="Отсутствуют данные"
:footer-props="{
itemsPerPageOptions: [5, 10, 15],
}"
>
<template v-slot:item.type="{ item }">
<span
class="typeText"
:class="{
'redText': item.type === 'Расходы',
'greenText': item.type === 'Доходы',
}"
>{{ item.type }}</span>
</template>
<template v-slot:item.open="{ item }">
<v-tooltip bottom>
<template v-slot:activator="{ on }">
<v-btn text icon color="gray" v-on="on" @click="clickHandler(item)">
<v-icon>mdi-open-in-new </v-icon>
</v-btn>
</template>
<span>Подробнее</span>
</v-tooltip>
</template>
</v-data-table>
Answer the question
In order to leave comments, you need to log in
how to set pagination page (for example 2nd or 3rd)
data: () => ({
page: 1,
...
}),
<v-data-table
:page.sync="page"
...
how to set handler on click on forward arrow
watch: {
page(val) {
...
},
},
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question