diff --git a/dolphinscheduler-ui/src/common/common.ts b/dolphinscheduler-ui/src/common/common.ts index ae644aeb01c938db8bfe41a228f6d7f5cc086df3..2f5ed4d7094847ee3ce105468a74c9778e4dba9e 100644 --- a/dolphinscheduler-ui/src/common/common.ts +++ b/dolphinscheduler-ui/src/common/common.ts @@ -46,8 +46,7 @@ export const bytesToSize = (bytes: number) => { const k = 1024 // or 1024 const sizes = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'] const i = Math.floor(Math.log(bytes) / Math.log(k)) - - return parseInt((bytes / Math.pow(k, i)).toPrecision(3)) + ' ' + sizes[i] + return parseFloat((bytes / Math.pow(k, i)).toPrecision(3)) + ' ' + sizes[i] } export const fileTypeArr = [