แก้ ส่ง id เเละ paging

This commit is contained in:
setthawutttty 2024-10-30 17:50:58 +07:00
parent be5a4bcd53
commit d335cdb7bf
8 changed files with 277 additions and 86 deletions

View file

@ -337,6 +337,11 @@ function searchData() {
});
}
function getSearch() {
page.value = 1;
searchData();
}
/**
* function update PageSize
*/
@ -405,12 +410,12 @@ watch(
}
);
/**
* callback function ทำงานการคนหาขอมลคนครองเมอมการ update Pagination
*/
watch([() => page.value, () => pageSize.value], () => {
searchData();
});
watch(
() => pageSize.value,
async () => {
getSearch();
}
);
</script>
<template>
@ -600,7 +605,7 @@ watch([() => page.value, () => pageSize.value], () => {
color="teal-5"
class="full-height"
icon="search"
@click="searchData"
@click="getSearch()"
/>
</div>
@ -689,6 +694,7 @@ watch([() => page.value, () => pageSize.value], () => {
size="sm"
boundary-links
direction-links
@update:model-value="searchData"
></q-pagination>
</template>
</d-table>