1
0
mirror of https://github.com/fumiama/paper-manager.git synced 2026-06-26 13:57:52 +08:00

optimize delfile in filelist & prepare for analyze

This commit is contained in:
源文雨
2023-03-15 20:44:19 +08:00
parent 8a63418dab
commit feca597c14
3 changed files with 23 additions and 11 deletions

View File

@@ -4,7 +4,7 @@ import { getFileListModel } from '/@/api/page/model/fileListModel'
const random = (min: number, max: number) => Math.floor(Math.random() * (max - min + 1) + min)
function refreshFilePercent(arr: any[], i: number) {
export function refreshFilePercent(arr: any[], i: number) {
return async () => {
const p = await getFilePercent(arr[i].id)
arr[i].percent = p.percent
@@ -47,6 +47,7 @@ async function refreshFileList() {
author: lst[i].author,
percent: lst[i].percent,
hassettimeout: false,
delloading: false,
})
__totalSize += lst[i].size
__totalQuestions += lst[i].questions