ประเมินบุคคล=> ปรับ paging
This commit is contained in:
parent
d04c6f30f5
commit
00d01ec986
3 changed files with 51 additions and 73 deletions
|
|
@ -13,36 +13,36 @@ const dataStore = useEvaluateDirectorDataStore();
|
|||
const mixin = useCounterMixin();
|
||||
const { messageError, showLoader, hideLoader, dialogRemove, success } = mixin;
|
||||
|
||||
const currentPage = ref<number>(1);
|
||||
const maxPage = ref<number>(1);
|
||||
const page = ref<number>(1);
|
||||
const rowsPerPage = ref<number>(10);
|
||||
// const currentPage = ref<number>(1);
|
||||
// const maxPage = ref<number>(1);
|
||||
// const page = ref<number>(1);
|
||||
// const rowsPerPage = ref<number>(10);
|
||||
|
||||
/**
|
||||
*pagination ของตาราง
|
||||
*/
|
||||
const pagination = ref({
|
||||
descending: false,
|
||||
page: page.value,
|
||||
rowsPerPage: rowsPerPage.value,
|
||||
page: 1,
|
||||
rowsPerPage: 10,
|
||||
});
|
||||
|
||||
watch(
|
||||
() => currentPage.value,
|
||||
() => {
|
||||
rowsPerPage.value = pagination.value.rowsPerPage;
|
||||
getList();
|
||||
}
|
||||
);
|
||||
// watch(
|
||||
// () => currentPage.value,
|
||||
// () => {
|
||||
// rowsPerPage.value = pagination.value.rowsPerPage;
|
||||
// getList();
|
||||
// }
|
||||
// );
|
||||
|
||||
watch(
|
||||
() => pagination.value.rowsPerPage,
|
||||
() => {
|
||||
rowsPerPage.value = pagination.value.rowsPerPage;
|
||||
currentPage.value = 1;
|
||||
getList();
|
||||
}
|
||||
);
|
||||
// watch(
|
||||
// () => pagination.value.rowsPerPage,
|
||||
// () => {
|
||||
// rowsPerPage.value = pagination.value.rowsPerPage;
|
||||
// currentPage.value = 1;
|
||||
// getList();
|
||||
// }
|
||||
// );
|
||||
|
||||
function getList() {
|
||||
showLoader();
|
||||
|
|
@ -180,7 +180,7 @@ onMounted(() => {
|
|||
v-model:pagination="pagination"
|
||||
:visible-columns="dataStore.visibleColumns"
|
||||
>
|
||||
<template v-slot:pagination="scope">
|
||||
<!-- <template v-slot:pagination="scope">
|
||||
<q-pagination
|
||||
v-model="currentPage"
|
||||
active-color="primary"
|
||||
|
|
@ -190,7 +190,7 @@ onMounted(() => {
|
|||
boundary-links
|
||||
direction-links
|
||||
></q-pagination>
|
||||
</template>
|
||||
</template> -->
|
||||
<template v-slot:header="props">
|
||||
<q-tr :props="props">
|
||||
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue