Skip to content

Commit

Permalink
修复文件大小算错了
Browse files Browse the repository at this point in the history
  • Loading branch information
Sillywa committed May 3, 2020
1 parent bcc4bab commit 0b03aa4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/views/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,9 @@ export default {
formatSize(size) {
let result;
// size为字节
if(size/1024/1024/2014 >=1) {
if(size/1024/1024/1024 >=1) {
// 可以转化为GB就转化为GB
result = (size/1024/1024/2014).toFixed(2) + "GB";
result = (size/1024/1024/1024).toFixed(2) + "GB";
} else if (size/1024/1024 >=1) {
// 可以转化为MB就转化为MB
result = (size/1024/1024).toFixed(2) + "MB";
Expand Down

0 comments on commit 0b03aa4

Please sign in to comment.