ปรับ pagin รายการลงเวลาปฏิบัติงาน
This commit is contained in:
parent
69927cf089
commit
e8bcbe5fff
3 changed files with 9 additions and 3 deletions
|
|
@ -28,7 +28,7 @@ const $q = useQuasar(); //ใช้ noti quasar
|
|||
/** ตัวแปร querySting*/
|
||||
const keyword = ref<string>("");
|
||||
const page = ref<number>(1);
|
||||
const rowsPerPage = ref<number>(3);
|
||||
const rowsPerPage = ref<number>(10);
|
||||
const maxPage = ref<number>(1);
|
||||
const filetStatus = ref<string>("ALL");
|
||||
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ const rows = ref<TableRows[]>([]);
|
|||
/** ตัวแปร QueryString*/
|
||||
const keyword = ref<string>("");
|
||||
const page = ref<number>(1);
|
||||
const rowsPerPage = ref<number>(2);
|
||||
const rowsPerPage = ref<number>(10);
|
||||
const maxPage = ref<number>(1);
|
||||
|
||||
/** function เรียกข้อมูลรายการลงเวลาปฏิบัติงาน (รายการลงเวลา) */
|
||||
|
|
|
|||
|
|
@ -84,6 +84,11 @@ function closeDetail() {
|
|||
watch([() => currentPage.value, () => pagination.value.rowsPerPage], () => {
|
||||
updateProp(pagination.value, currentPage.value);
|
||||
});
|
||||
|
||||
function updateRowsPerPagen(newPagination: any) {
|
||||
pagination.value.rowsPerPage = newPagination.rowsPerPage;
|
||||
currentPage.value = 1;
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
@ -98,7 +103,8 @@ watch([() => currentPage.value, () => pagination.value.rowsPerPage], () => {
|
|||
class="custom-header-table"
|
||||
:visible-columns="workStore.visibleColumns"
|
||||
:rows-per-page-options="[10, 25, 50, 100]"
|
||||
v-model:pagination="pagination"
|
||||
:pagination="pagination"
|
||||
@update:pagination="updateRowsPerPagen"
|
||||
>
|
||||
<template v-slot:header="props">
|
||||
<q-tr :props="props">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue