2
0

修复分页器失效

This commit is contained in:
lai
2024-12-26 19:48:03 +08:00
parent 3e2bc5ab9d
commit 0f94a5b80d
3 changed files with 11 additions and 6 deletions

View File

@@ -83,23 +83,26 @@ export function useTable(config: any) {
// size: 'f',
current: 1,
pageSize: 10,
defaultPageSize: 10,
responsive: true,
onChange: async (current: number, pageSize: number) => {
pagination.current = current;
pagination.pageSize = pageSize;
updateSearchParams({
pageNum: current,
pageSize
});
getData();
}
},
showTotal: (total: number) =>
$t('common.tablePaginationTotal', { total: total })
});
// this is for mobile, if the system does not support mobile, you can use `pagination` directly
const mobilePagination = computed(() => {
const p: TablePaginationConfig = {
...pagination,
simple: appStore.isMobile
simple: appStore.isMobile
};
return p;

View File

@@ -78,7 +78,8 @@ const local: any = {
month: 'Month',
year: 'Year',
core: 'Core',
}
},
tablePaginationTotal: 'Total {total} items',
},
// 组件
components: {

View File

@@ -78,7 +78,8 @@ const local:any = {
month: '月',
year: '年',
core: '核',
}
},
tablePaginationTotal: '总共 {total} 条',
},
// 组件
components: {