From 0c654d77c74f5343de0442abb631f95a668afe5d Mon Sep 17 00:00:00 2001 From: AnandaTon Date: Wed, 8 Nov 2023 15:26:29 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=80=E0=B8=9E=E0=B8=B4=E0=B9=88=E0=B8=A1?= =?UTF-8?q?=20pagination=20=20=E0=B8=A3=E0=B8=B2=E0=B8=A2=E0=B8=81?= =?UTF-8?q?=E0=B8=B2=E0=B8=A3=E0=B8=A5=E0=B8=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/05_leave/componenst/Table.vue | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/src/modules/05_leave/componenst/Table.vue b/src/modules/05_leave/componenst/Table.vue index 55aea8a..d4c26e8 100644 --- a/src/modules/05_leave/componenst/Table.vue +++ b/src/modules/05_leave/componenst/Table.vue @@ -82,8 +82,7 @@ :virtual-scroll-sticky-size-start="48" dense :pagination-label="paginationLabel" - :pagination="initialPagination" - :rows-per-page-options="[0]" + :pagination="pagination" > + @@ -117,11 +119,18 @@ const filterRef = ref(null) const rows = ref([]) const type = ref("ทั้งหมด") const status = ref("ทั้งหมด") - +const pagination = ref({ + sortBy: "desc", + descending: false, + page: 1, + rowsPerPage: 10, +}) const initialPagination = ref({ rowsPerPage: 0, }) - +const paginationLabel = (start: string, end: string, total: string) => { + return start + "-" + end + " ใน " + total +} const props = defineProps({ count: Number, pass: Number, @@ -145,10 +154,6 @@ const updateVisible = (value: []) => { emit("update:inputvisible", value) } -const paginationLabel = (start: string, end: string, total: string) => { - return start + "-" + end + " ใน " + total -} - const resetFilter = () => { // reset ค่าที่ค้นหาเมื่อกดปุ่ม X ในกล่องค้นหา emit("update:inputfilter", "")