文件/容量尺寸格式化
文件/容量尺寸格式化/** * 文件/容量尺寸格式化 * @param size number 容量数值 * @param type string 容量单位 * @param accuracy number 非必填 容量精度 */export const fileSizeFormat = (size, type, accuracy = 1) => { const type_list = ['B', 'KB', 'MB', 'GB', 'TB', 'PB']; // 数值不是数值
原创
2021-01-07 10:26:05 ·
93 阅读 ·
0 评论