This commit is contained in:
Your Name
2026-03-27 18:06:12 +08:00
parent 9160c36735
commit 099bc1dd22
645 changed files with 276473 additions and 957 deletions
+9 -4
View File
@@ -30,9 +30,12 @@ export function usePaging(options: Options) {
lists: [] as any[],
extend: {} as Record<string, any>
})
// 请求分页接口
const getLists = () => {
pager.loading = true
// 请求分页接口silent: true 时不改 loading(用于定时静默刷新,避免表格闪 loading)
const getLists = (opts?: { silent?: boolean }) => {
const silent = opts?.silent === true
if (!silent) {
pager.loading = true
}
return fetchFun({
page_no: pager.page,
page_size: pager.size,
@@ -49,7 +52,9 @@ export function usePaging(options: Options) {
return Promise.reject(err)
})
.finally(() => {
pager.loading = false
if (!silent) {
pager.loading = false
}
})
}
// 重置为第一页