ปรับ rowIndex table

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2023-11-30 17:24:21 +07:00
parent 2e904a95b8
commit a476af0ad9
2 changed files with 13 additions and 2 deletions

View file

@ -122,7 +122,13 @@ function updateRowsPerPagen(newPagination: any) {
@click.prevent="clickDetail(props.row)"
>
<div v-if="col.name == 'no'">
{{ props.rowIndex + 1 }}
<!-- {{ props.rowIndex + 1 }} -->
{{
(currentPage - 1) * Number(pagination.rowsPerPage) +
props.rowIndex +
1
}}
</div>
<div v-else-if="col.name == 'checkInLocation'">
<q-item style="padding: 0">

View file

@ -197,6 +197,7 @@ onMounted(() => {
:paging="true"
dense
class="custom-header-table"
:rows-per-page-options="[10, 25, 50, 100]"
:visible-columns="leaveStore.visibleColumns"
:pagination="pagination"
@update:pagination="updatedPagination"
@ -217,7 +218,11 @@ onMounted(() => {
@click.prevent="redirectToDetail(props.row.id)"
>
<div v-if="col.name == 'no'">
{{ props.rowIndex + 1 }}
{{
(currentPage - 1) * Number(pagination.rowsPerPage) +
props.rowIndex +
1
}}
</div>
<div v-else>