mirror of
https://github.com/certd/certd.git
synced 2026-04-23 11:37:23 +08:00
perf: 每页记录条数保持
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user