diff --git a/framework/sdk-parent/frontend/src/utils/index.js b/framework/sdk-parent/frontend/src/utils/index.js index 71db1b948e..3b278d4350 100644 --- a/framework/sdk-parent/frontend/src/utils/index.js +++ b/framework/sdk-parent/frontend/src/utils/index.js @@ -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]; diff --git a/test-track/frontend/src/business/case/components/case/CaseAttachmentItem.vue b/test-track/frontend/src/business/case/components/case/CaseAttachmentItem.vue index eed31103ff..10f23a67d6 100644 --- a/test-track/frontend/src/business/case/components/case/CaseAttachmentItem.vue +++ b/test-track/frontend/src/business/case/components/case/CaseAttachmentItem.vue @@ -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 {