修复: 注释掉位数据转换中的位数乘以8的代码

This commit is contained in:
TsMask committed 2025-08-27 11:52:08 +08:00
1 parent ff9aca14b8
commit f58a0151fe
1 file changed
+1 -1
+1 -1
View File
@@ -178,7 +178,7 @@ export function parseSizeFromKbs(sizeByte: number, timeInterval: number): any {
export function parseSizeFromBits(bits: number | string): string {
bits = Number(bits) || 0;
if (bits <= 0) return '0 B';
bits = bits * 8;
// bits = bits * 8;
const units = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
const unitIndex = Math.floor(Math.log2(bits) / 10);
const value = bits / Math.pow(1000, unitIndex);