fix(ui): 统一表格筛选分页和用量明细,升级 ESLint
This commit is contained in:
@@ -20,7 +20,7 @@ export function latestTierURL(filters = {}, page = 1, snapshot = {}) {
|
||||
const params = new URLSearchParams({
|
||||
view: 'latest',
|
||||
p: String(page),
|
||||
page_size: '100',
|
||||
page_size: String(filters.pageSize ?? 100),
|
||||
});
|
||||
if (filters.query?.trim()) params.set('q', filters.query.trim());
|
||||
if (filters.type) params.set('source_type', filters.type);
|
||||
@@ -39,7 +39,9 @@ export async function fetchAllLatestTiers(fetchJSON, filters = {}) {
|
||||
let snapshot;
|
||||
let total;
|
||||
for (let page = 1; ; page++) {
|
||||
const result = await fetchJSON(latestTierURL(filters, page, snapshot));
|
||||
const result = await fetchJSON(
|
||||
latestTierURL({ ...filters, pageSize: 100 }, page, snapshot),
|
||||
);
|
||||
if (!snapshot) {
|
||||
snapshot = { as_of: result.as_of, revision: result.revision };
|
||||
total = result.total;
|
||||
|
||||
Reference in New Issue
Block a user