fix: table list action

This commit is contained in:
jialin
2024-07-01 15:35:48 +08:00
parent 018c8cd208
commit 0f9123ee4f
21 changed files with 316 additions and 169 deletions
+2 -2
View File
@@ -20,9 +20,9 @@ export const handleBatchRequest = async (
};
export const convertFileSize = (sizeInBytes: number, prec?: number) => {
const precision = prec ?? 2;
const precision = prec ?? 1;
if (!sizeInBytes) {
return '0 B';
return '0';
}
if (sizeInBytes < 1024) {
return `${sizeInBytes.toFixed(precision)} B`;