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"
dense
:pagination-label="paginationLabel"
:pagination="initialPagination"
:rows-per-page-options="[0]"
:pagination="pagination"
>
<template v-slot:header="props">
<q-tr :props="props">
@ -92,6 +91,9 @@
</q-th>
</q-tr>
</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">
<slot v-bind="props" name="columns"></slot>
</template>
@ -117,11 +119,18 @@ const filterRef = ref<any>(null)
const rows = ref<any[]>([])
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", "")