fix(leaveHistory): params

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2025-10-08 16:09:54 +07:00
parent fd717bbf49
commit ba09c07dab
2 changed files with 6 additions and 4 deletions

View file

@ -34,7 +34,11 @@ export function usePagination(
if (!newPagination?.page || !newPagination?.rowsPerPage) return;
pagination.value = { ...newPagination };
if (fetchFunction) {
if (
fetchFunction &&
pagination.value.rowsNumber &&
pagination.value.rowsNumber > 0
) {
await fetchFunction(); // เรียกฟังก์ชันที่ส่งเข้ามา
}
}

View file

@ -131,9 +131,7 @@ async function fetchDataPerson() {
system: (route.meta?.Key as string) || undefined,
},
{
params: {
...params.value,
},
params: params.value,
}
);
const result = res.data.result;