perf: 每页记录条数保持

This commit is contained in:
xiaojunnuo
2026-01-07 12:12:42 +08:00
parent 2d2890b34f
commit 14f99875fb
3 changed files with 108 additions and 100 deletions
+5 -5
View File
@@ -33,11 +33,11 @@
"@aws-sdk/s3-request-presigner": "^3.535.0",
"@certd/vue-js-cron-light": "^4.0.14",
"@ctrl/tinycolor": "^4.1.0",
"@fast-crud/editor-code": "^1.27.7",
"@fast-crud/fast-crud": "^1.27.7",
"@fast-crud/fast-extends": "^1.27.7",
"@fast-crud/ui-antdv4": "^1.27.7",
"@fast-crud/ui-interface": "^1.27.7",
"@fast-crud/editor-code": "^1.27.8",
"@fast-crud/fast-crud": "^1.27.8",
"@fast-crud/fast-extends": "^1.27.8",
"@fast-crud/ui-antdv4": "^1.27.8",
"@fast-crud/ui-interface": "^1.27.8",
"@iconify/tailwind": "^1.2.0",
"@iconify/vue": "^4.1.1",
"@manypkg/get-packages": "^2.2.2",
@@ -47,8 +47,9 @@ class ColumnSizeSaver {
LocalStorage.remove(saveKey);
}
}
const columnSizeSaver = new ColumnSizeSaver();
const columnSizeSaver = new ColumnSizeSaver("columnSize");
const tableSortSaver = new ColumnSizeSaver("tableSorter");
const tableSaver = new ColumnSizeSaver("table");
function install(app: App, options: any = {}) {
app.use(UiAntdv);
@@ -95,6 +96,13 @@ function install(app: App, options: any = {}) {
}
},
},
pagination: {
_onPageSizeChange(req: any) {
const { pageSize } = req;
tableSaver.save("pageSize", pageSize);
},
pageSize: tableSaver.get("pageSize") || 20,
},
table: {
scroll: {
x: 960,