no message

This commit is contained in:
setthawutttty 2023-08-22 17:06:53 +07:00
parent e7a05d8bd9
commit c29f8defb8
9 changed files with 318 additions and 87 deletions

View file

@ -125,17 +125,7 @@ const fectListDecased = async () => {
});
};
const paging = ref<boolean>(true);
const pagination = ref({
sortBy: "desc",
descending: false,
page: 1,
rowsPerPage: 10,
});
const paginationLabel = (start: string, end: string, total: string) => {
if (paging.value == true) return " " + start + "-" + end + " ใน " + total;
else return start + "-" + end + " ใน " + total;
};
//
const filterKeyword = ref<string>("");
@ -147,6 +137,12 @@ const resetFilter = () => {
const nextPage = (id: string) => {
router.push("/deceased/" + id);
};
const pagination = ref({
sortBy: "createdAt",
descending: true,
page: 1,
rowsPerPage: 10,
});
</script>
<template>
<div class="toptitle text-dark col-12 row items-center">
@ -196,7 +192,7 @@ const nextPage = (id: string) => {
/>
</div>
<div class="col-12 q-pt-sm">
<q-table
<d-table
ref="table"
:columns="columns"
:rows="rows"
@ -208,7 +204,6 @@ const nextPage = (id: string) => {
dense
class="custom-header-table"
:visible-columns="visibleColumns"
:pagination-label="paginationLabel"
v-model:pagination="pagination"
>
<template v-slot:header="props">
@ -257,19 +252,7 @@ const nextPage = (id: string) => {
</q-td>
</q-tr>
</template>
<template v-slot:pagination="scope">
<q-pagination
v-model="pagination.page"
active-color="primary"
color="primary"
:max="scope.pagesNumber"
:max-pages="5"
size="sm"
boundary-links
direction-links
></q-pagination>
</template>
</q-table>
</d-table>
</div>
</div>
</div>