feat: add pagination
This commit is contained in:
parent
32b51ff84b
commit
fde6335706
1 changed files with 27 additions and 32 deletions
|
|
@ -225,10 +225,6 @@ const pageState = reactive({
|
|||
quotationModal: false,
|
||||
employeeModal: false,
|
||||
productServiceModal: false,
|
||||
|
||||
currentMaxPage: 1,
|
||||
currentPage: 1,
|
||||
pageSize: 30,
|
||||
});
|
||||
|
||||
const statData = ref<
|
||||
|
|
@ -445,9 +441,7 @@ onMounted(async () => {
|
|||
flowStore.rotate();
|
||||
});
|
||||
|
||||
watch(
|
||||
() => pageState.currentTab,
|
||||
async () => {
|
||||
async function fetchQuotationList() {
|
||||
const ret = await quotationStore.getQuotationList({
|
||||
page: quotationPage.value,
|
||||
pageSize: quotationPageSize.value,
|
||||
|
|
@ -470,8 +464,9 @@ watch(
|
|||
}
|
||||
|
||||
flowStore.rotate();
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
watch(() => pageState.currentTab, fetchQuotationList);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
@ -804,10 +799,10 @@ watch(
|
|||
</div>
|
||||
<nav class="col-4 row justify-end">
|
||||
<PaginationComponent
|
||||
v-model:current-page="pageState.currentPage"
|
||||
v-model:max-page="pageState.currentMaxPage"
|
||||
v-model:current-page="quotationPage"
|
||||
v-model:max-page="quotationPageMax"
|
||||
:fetch-data="fetchQuotationList"
|
||||
/>
|
||||
<!-- :fetch-data="async () => await fetchUserList()" -->
|
||||
</nav>
|
||||
</footer>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue