mirror of
https://github.com/unanmed/HumanBreak.git
synced 2026-11-03 10:14:34 +08:00
feat: 新的加载系统
This commit is contained in:
1 parent
30a1fd9013
commit
80a67d5197
12 files changed
+715
-485
No files matched your search
@@ -386,3 +386,13 @@ export function getVitualKeyOnce(
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
export function formatSize(size: number) {
|
||||
return size < 1 << 10
|
||||
? `${size.toFixed(2)}B`
|
||||
: size < 1 << 20
|
||||
? `${(size / (1 << 10)).toFixed(2)}KB`
|
||||
: size < 1 << 30
|
||||
? `${(size / (1 << 20)).toFixed(2)}MB`
|
||||
: `${(size / (1 << 30)).toFixed(2)}GB`;
|
||||
}
|
||||
Reference in new issue
Block a user