Browse Source

修复分页bug

dev-xx
qb 9 months ago
parent
commit
a03e49b465
  1. 20
      src/views/warehouse/prewarehousing/PreStoragePackage.vue

20
src/views/warehouse/prewarehousing/PreStoragePackage.vue

@ -98,9 +98,9 @@
background
@size-change="sizeChange"
@current-change="currentChange"
:current-page="page.currentPage"
:current-page="page.current"
:page-sizes="[30, 50, 80, 120]"
:page-size="page.pageSize"
:page-size="page.size"
layout="total, sizes, prev, pager, next, jumper"
:total="page.total"
>
@ -207,8 +207,8 @@ const details = reactive<any>({
drawerShow: false,
/** 分页参数 */
page: {
currentPage: 1,
pageSize: 30,
current: 1,
size: 30,
total: 0,
},
/** 列表Dom节点 */
@ -262,7 +262,7 @@ const onLoad = async (params = {}) => {
};
const initOnLoad = (params = {}) => {
details.page.pageNum = 1;
details.page.current = 1;
details.page.total = 0;
onLoad(params);
};
@ -278,7 +278,7 @@ const searchChange = () => {
const searchReset = () => {
details.query = {};
details.stockupDate = [];
details.page.currentPage = 1;
details.page.current = 1;
handleClearTableQuery(details.columnList);
initOnLoad();
};
@ -326,14 +326,14 @@ const selectionChange = (list: any) => {
};
/** 每页数量改变执行的回调 */
const sizeChange = (pageSize: number) => {
details.page.pageSize = pageSize;
const sizeChange = (size: number) => {
details.page.size = size;
initOnLoad();
};
/** 页码改变执行的回调 */
const currentChange = pageNum => {
details.page.pageNum = pageNum;
const currentChange = current => {
details.page.current = current;
onLoad();
};

Loading…
Cancel
Save