From 4e36e1a8a73f2559efc2e93427a2b28105c7c195 Mon Sep 17 00:00:00 2001 From: song-cc-rock Date: Fri, 17 Feb 2023 22:38:42 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):=20?= =?UTF-8?q?=E9=99=84=E4=BB=B61440=E5=88=86=E8=BE=A8=E7=8E=87=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- framework/sdk-parent/frontend/src/utils/index.js | 8 ++++---- .../business/case/components/case/CaseAttachmentItem.vue | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) 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 {