fix:some bug
This commit is contained in:
1 parent
a247dd163d
commit
007291a2d9
10 files changed
+239
-87
No files matched your search
@@ -0,0 +1,10 @@
|
||||
// 存储单位转换
|
||||
export const getStorageUnit = (value: number) => {
|
||||
if (value >= 1024 * 1024 * 1024) {
|
||||
return Math.round(value / (1024 * 1024 * 1024)) + 'GB'
|
||||
} else if (value >= 1024 * 1024) {
|
||||
return Math.round(value / (1024 * 1024)) + 'MB'
|
||||
} else {
|
||||
return Math.round(value / 1024) + 'KB'
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user