更新对接
This commit is contained in:
@@ -463,7 +463,7 @@ export function accSub(arg1, arg2) {
|
||||
}
|
||||
/** * 文件大小 字节转换单位 * @param size * @returns {string|*} */
|
||||
export const filterSize = (size) => {
|
||||
if (!size) return '0kb';
|
||||
if (!size || size < 0) return '0kb';
|
||||
if (size < pow1024(1)) return size + ' B';
|
||||
if (size < pow1024(2)) return (size / pow1024(1)).toFixed(2) + ' KB';
|
||||
if (size < pow1024(3)) return (size / pow1024(2)).toFixed(2) + ' MB';
|
||||
|
||||
Reference in New Issue
Block a user