Merge branch 'develop' into dev-tee

This commit is contained in:
setthawutttty 2023-11-08 15:30:58 +07:00
commit ddbcb40488

View file

@ -82,8 +82,7 @@
:virtual-scroll-sticky-size-start="48" :virtual-scroll-sticky-size-start="48"
dense dense
:pagination-label="paginationLabel" :pagination-label="paginationLabel"
:pagination="initialPagination" :pagination="pagination"
:rows-per-page-options="[0]"
> >
<template v-slot:header="props"> <template v-slot:header="props">
<q-tr :props="props"> <q-tr :props="props">
@ -92,6 +91,9 @@
</q-th> </q-th>
</q-tr> </q-tr>
</template> </template>
<template v-slot:pagination="scope">
<q-pagination v-model="pagination.page" active-color="primary" color="dark" :max="scope.pagesNumber" :max-pages="5" size="sm" boundary-links direction-links></q-pagination>
</template>
<template #body="props"> <template #body="props">
<slot v-bind="props" name="columns"></slot> <slot v-bind="props" name="columns"></slot>
</template> </template>
@ -117,11 +119,18 @@ const filterRef = ref<any>(null)
const rows = ref<any[]>([]) const rows = ref<any[]>([])
const type = ref("ทั้งหมด") const type = ref("ทั้งหมด")
const status = ref("ทั้งหมด") const status = ref("ทั้งหมด")
const pagination = ref({
sortBy: "desc",
descending: false,
page: 1,
rowsPerPage: 10,
})
const initialPagination = ref({ const initialPagination = ref({
rowsPerPage: 0, rowsPerPage: 0,
}) })
const paginationLabel = (start: string, end: string, total: string) => {
return start + "-" + end + " ใน " + total
}
const props = defineProps({ const props = defineProps({
count: Number, count: Number,
pass: Number, pass: Number,
@ -145,10 +154,6 @@ const updateVisible = (value: []) => {
emit("update:inputvisible", value) emit("update:inputvisible", value)
} }
const paginationLabel = (start: string, end: string, total: string) => {
return start + "-" + end + " ใน " + total
}
const resetFilter = () => { const resetFilter = () => {
// reset X // reset X
emit("update:inputfilter", "") emit("update:inputfilter", "")