格式化文件大小默认两位小数
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
74033b2d4f
commit
da136787dd
|
@ -93,7 +93,7 @@ export function deepClone(source, map = new WeakMap()) {
|
||||||
return target;
|
return target;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function formatSize(size, fixed = 0) {
|
export function formatSize(size, fixed = 2) {
|
||||||
if (isNaN(parseFloat(size))) return ''
|
if (isNaN(parseFloat(size))) return ''
|
||||||
let kbSize = size / 1024
|
let kbSize = size / 1024
|
||||||
if (kbSize <= 1024) {
|
if (kbSize <= 1024) {
|
||||||
|
|
Loading…
Reference in New Issue