From 5c0fb405d031f88c1f18ede7cd3d6c7e42ff9c5b Mon Sep 17 00:00:00 2001 From: ssongliu <73214554+ssongliu@users.noreply.github.com> Date: Thu, 14 Sep 2023 10:54:17 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E8=AE=A1=E5=88=92?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E4=B8=8B=E8=BD=BD=E5=88=A4=E6=96=AD=20(#2284?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/utils/common/common.go | 2 +- frontend/src/views/cronjob/record/index.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/utils/common/common.go b/backend/utils/common/common.go index ea425dd88..a9f3edea2 100644 --- a/backend/utils/common/common.go +++ b/backend/utils/common/common.go @@ -148,7 +148,7 @@ func RemoveRepeatElement(a interface{}) (ret []interface{}) { func LoadSizeUnit(value float64) string { if value > 1073741824 { - return fmt.Sprintf("%.2fM", value/1073741824) + return fmt.Sprintf("%.2fG", value/1073741824) } if value > 1048576 { return fmt.Sprintf("%.2fM", value/1048576) diff --git a/frontend/src/views/cronjob/record/index.vue b/frontend/src/views/cronjob/record/index.vue index a4e965136..130000d8d 100644 --- a/frontend/src/views/cronjob/record/index.vue +++ b/frontend/src/views/cronjob/record/index.vue @@ -599,7 +599,7 @@ const onDownload = async (record: any, backupID: number) => { type = i18n.global.t('website.website'); break; } - if (currentRecord.value.file.indexOf(',') !== 0) { + if (currentRecord.value.file.indexOf(',') !== -1) { MsgInfo(i18n.global.t('cronjob.allOptionHelper', [type])); return; }