refactor: remove useless pageCount in pagination config
This commit is contained in:
@@ -117,8 +117,6 @@ const tablePagination = reactive<PaginationProps>({
|
|||||||
page: 1,
|
page: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
pageSizes: [5, 10, 20, 50, 80, 100],
|
pageSizes: [5, 10, 20, 50, 80, 100],
|
||||||
// itemCount: 0,
|
|
||||||
// pageCount: 1,
|
|
||||||
prefix: ({ itemCount }) => {
|
prefix: ({ itemCount }) => {
|
||||||
return h('div', {}, { default: () => `共${itemCount}条` });
|
return h('div', {}, { default: () => `共${itemCount}条` });
|
||||||
},
|
},
|
||||||
@@ -147,7 +145,6 @@ const onAfterModalLeave = () => {
|
|||||||
resetFilterFields();
|
resetFilterFields();
|
||||||
tablePagination.page = 1;
|
tablePagination.page = 1;
|
||||||
tablePagination.pageSize = 10;
|
tablePagination.pageSize = 10;
|
||||||
tablePagination.pageCount = 1;
|
|
||||||
tablePagination.itemCount = 0;
|
tablePagination.itemCount = 0;
|
||||||
tableData.value = [];
|
tableData.value = [];
|
||||||
};
|
};
|
||||||
@@ -182,9 +179,8 @@ const { mutate: getStaionAlarmList, isPending: isTableLoading } = useMutation({
|
|||||||
return res;
|
return res;
|
||||||
},
|
},
|
||||||
onSuccess: (res) => {
|
onSuccess: (res) => {
|
||||||
const { records, pages, size, total } = res;
|
const { records, size, total } = res;
|
||||||
tablePagination.pageSize = parseInt(size);
|
tablePagination.pageSize = parseInt(size);
|
||||||
tablePagination.pageCount = parseInt(pages);
|
|
||||||
tablePagination.itemCount = parseInt(total);
|
tablePagination.itemCount = parseInt(total);
|
||||||
tableData.value = records;
|
tableData.value = records;
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -110,7 +110,6 @@ const tablePagination = reactive<PaginationProps>({
|
|||||||
page: 1,
|
page: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
pageSizes: [5, 10, 20, 50, 80, 100],
|
pageSizes: [5, 10, 20, 50, 80, 100],
|
||||||
pageCount: 1,
|
|
||||||
itemCount: 0,
|
itemCount: 0,
|
||||||
prefix: ({ itemCount }) => {
|
prefix: ({ itemCount }) => {
|
||||||
return h('div', {}, { default: () => `共${itemCount}条` });
|
return h('div', {}, { default: () => `共${itemCount}条` });
|
||||||
@@ -147,9 +146,8 @@ const { mutate: getAlarmList, isPending: isTableLoading } = useMutation({
|
|||||||
return res;
|
return res;
|
||||||
},
|
},
|
||||||
onSuccess: (res) => {
|
onSuccess: (res) => {
|
||||||
const { records, pages, size, total } = res;
|
const { records, size, total } = res;
|
||||||
tablePagination.pageSize = parseInt(size);
|
tablePagination.pageSize = parseInt(size);
|
||||||
tablePagination.pageCount = parseInt(pages);
|
|
||||||
tablePagination.itemCount = parseInt(total);
|
tablePagination.itemCount = parseInt(total);
|
||||||
tableData.value = records;
|
tableData.value = records;
|
||||||
},
|
},
|
||||||
@@ -162,7 +160,6 @@ const onClickReset = () => {
|
|||||||
resetSearchFields();
|
resetSearchFields();
|
||||||
tablePagination.page = 1;
|
tablePagination.page = 1;
|
||||||
tablePagination.pageSize = 10;
|
tablePagination.pageSize = 10;
|
||||||
tablePagination.pageCount = 1;
|
|
||||||
tablePagination.itemCount = 0;
|
tablePagination.itemCount = 0;
|
||||||
getAlarmList();
|
getAlarmList();
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -91,7 +91,6 @@ const tablePagination = reactive<PaginationProps>({
|
|||||||
page: 1,
|
page: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
pageSizes: [5, 10, 20, 50, 80, 100],
|
pageSizes: [5, 10, 20, 50, 80, 100],
|
||||||
pageCount: 1,
|
|
||||||
itemCount: 0,
|
itemCount: 0,
|
||||||
prefix: ({ itemCount }) => {
|
prefix: ({ itemCount }) => {
|
||||||
return h('div', {}, { default: () => `共${itemCount}条` });
|
return h('div', {}, { default: () => `共${itemCount}条` });
|
||||||
@@ -125,9 +124,8 @@ const { mutate: getVimpLogList, isPending: isTableLoading } = useMutation({
|
|||||||
return res;
|
return res;
|
||||||
},
|
},
|
||||||
onSuccess: (res) => {
|
onSuccess: (res) => {
|
||||||
const { records, pages, size, total } = res;
|
const { records, size, total } = res;
|
||||||
tablePagination.pageSize = parseInt(size);
|
tablePagination.pageSize = parseInt(size);
|
||||||
tablePagination.pageCount = parseInt(pages);
|
|
||||||
tablePagination.itemCount = parseInt(total);
|
tablePagination.itemCount = parseInt(total);
|
||||||
tableData.value = records;
|
tableData.value = records;
|
||||||
},
|
},
|
||||||
@@ -140,7 +138,6 @@ const onClickReset = () => {
|
|||||||
resetSearchFields();
|
resetSearchFields();
|
||||||
tablePagination.page = 1;
|
tablePagination.page = 1;
|
||||||
tablePagination.pageSize = 10;
|
tablePagination.pageSize = 10;
|
||||||
tablePagination.pageCount = 1;
|
|
||||||
tablePagination.itemCount = 0;
|
tablePagination.itemCount = 0;
|
||||||
getVimpLogList();
|
getVimpLogList();
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user