fix(测试跟踪): 附件1440分辨率显示问题

This commit is contained in:
song-cc-rock 2023-02-17 22:38:42 +08:00 committed by jianxing
parent ac7428edc0
commit 4b153d57af
2 changed files with 8 additions and 8 deletions

View File

@ -296,18 +296,18 @@ export function handleCtrlSEvent(event, func) {
export function byteToSize(bytes) {
if (bytes === 0) {
return "0 B";
return "0B";
}
let k = 1024,
sizeUnits = ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"],
sizeUnits = ["B", "K", "M", "G", "T", "P", "E", "Z", "Y"],
i = Math.floor(Math.log(bytes) / Math.log(k));
return Math.round(bytes / Math.pow(1024, i)).toFixed(1) + " " + sizeUnits[i];
return Math.round(bytes / Math.pow(1024, i)).toFixed(1) + sizeUnits[i];
}
export function sizeToByte(size) {
let k = 1024,
sizeUnits = ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"];
sizeUnits = ["B", "K", "M", "G", "T", "P", "E", "Z", "Y"];
let i = 1;
for (i++; i < sizeUnits.length;) {
let unit = sizeUnits[i];

View File

@ -163,7 +163,7 @@ export default {
computed: {
uploadSize() {
if (this.fileItem.progress === 0) {
return '0 B'
return '0B'
}
if (this.fileItem.progress === 100) {
return this.fileItem.size;
@ -363,7 +363,7 @@ export default {
margin-top: px2rem(11.5);
margin-left: px2rem(12.67);
width: px2rem(37);
margin-right: px2rem(14.67);
margin-right: px2rem(8);
img {
width: 100%;
/* height: 100%; */
@ -405,7 +405,7 @@ export default {
}
.file-info-row {
display: flex;
font-size: 12px;
font-size: px2rem(12);
line-height: px2rem(20);
height: px2rem(20);
color: #8f959e;
@ -445,7 +445,7 @@ export default {
}
.opt-item {
margin-right: 20px;
margin-right: px2rem(14);
cursor: pointer;
}
.download {