|
|
@ -644,7 +644,7 @@ function fileSizeFormat(size, initUnit = 'B') { |
|
|
|
const i = units.indexOf(initUnit); |
|
|
|
const i = units.indexOf(initUnit); |
|
|
|
if (size > 1024 && i < units.length - 1) { |
|
|
|
if (size > 1024 && i < units.length - 1) { |
|
|
|
return fileSizeFormat(size / 1024, units[i + 1]); |
|
|
|
return fileSizeFormat(size / 1024, units[i + 1]); |
|
|
|
} else if (size < 1 && i > -1) { |
|
|
|
} else if (size < 1 && i > 0) { |
|
|
|
return fileSizeFormat(size * 1024, units[i - 1]); |
|
|
|
return fileSizeFormat(size * 1024, units[i - 1]); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
return Math.round(size * 100) / 100 + initUnit; |
|
|
|
return Math.round(size * 100) / 100 + initUnit; |
|
|
|