fix bug ==> เปลี่ยนหน้าแสดงรายการการลา
This commit is contained in:
parent
ca8fa3b420
commit
1ec4a97538
1 changed files with 10 additions and 4 deletions
|
|
@ -88,13 +88,16 @@ function updatePagination(p: number, ps: number) {
|
||||||
|
|
||||||
/** function updatePageSize*/
|
/** function updatePageSize*/
|
||||||
function updatePageSize(newPageSize: any) {
|
function updatePageSize(newPageSize: any) {
|
||||||
currentPage.value = 1;
|
|
||||||
pagination.value.rowsPerPage = newPageSize.rowsPerPage;
|
pagination.value.rowsPerPage = newPageSize.rowsPerPage;
|
||||||
}
|
}
|
||||||
|
|
||||||
watch([() => currentPage.value, () => pagination.value.rowsPerPage], () => {
|
watch(
|
||||||
|
() => pagination.value.rowsPerPage,
|
||||||
|
() => {
|
||||||
|
currentPage.value = 1;
|
||||||
updatePagination(currentPage.value, pagination.value.rowsPerPage);
|
updatePagination(currentPage.value, pagination.value.rowsPerPage);
|
||||||
});
|
}
|
||||||
|
);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
@ -269,6 +272,9 @@ watch([() => currentPage.value, () => pagination.value.rowsPerPage], () => {
|
||||||
size="sm"
|
size="sm"
|
||||||
boundary-links
|
boundary-links
|
||||||
direction-links
|
direction-links
|
||||||
|
@update:model-value="
|
||||||
|
updatePagination(currentPage, pagination.rowsPerPage)
|
||||||
|
"
|
||||||
></q-pagination>
|
></q-pagination>
|
||||||
</template>
|
</template>
|
||||||
<template #body="props">
|
<template #body="props">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue