fix bug
This commit is contained in:
parent
5246a694d4
commit
53fc2493e3
9 changed files with 100 additions and 45 deletions
|
|
@ -127,6 +127,10 @@ export const useChangeRoundDataStore = defineStore(
|
|||
console.log(profileId);
|
||||
profileId.value = id;
|
||||
}
|
||||
|
||||
const maxPageMain = ref<number>(0);
|
||||
const totalListMain = ref<number>(0);
|
||||
|
||||
function fetchDataForCardId(dataDetail: any) {
|
||||
if (dataDetail) {
|
||||
showLoader();
|
||||
|
|
@ -141,6 +145,10 @@ export const useChangeRoundDataStore = defineStore(
|
|||
})
|
||||
.then((res) => {
|
||||
const apiData = res.data.result.data;
|
||||
totalListMain.value = res.data.result.total;
|
||||
maxPageMain.value = Math.ceil(
|
||||
totalListMain.value / dataDetail.pageSize
|
||||
);
|
||||
if (apiData.length > 0) {
|
||||
checkCilck.value = false;
|
||||
rows.value = apiData.map((e: any) => ({
|
||||
|
|
@ -238,6 +246,9 @@ export const useChangeRoundDataStore = defineStore(
|
|||
changePage,
|
||||
total,
|
||||
maxPage,
|
||||
|
||||
totalListMain,
|
||||
maxPageMain,
|
||||
};
|
||||
}
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue