From e6df375d077fa0e2a93ef60e2e6c61da5bef56fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E8=89=AF?= <841369634@qq.com> Date: Thu, 13 Feb 2025 09:48:13 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/gui/src/view/pages/setting.vue | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/gui/src/view/pages/setting.vue b/packages/gui/src/view/pages/setting.vue index 8a88c17..8e05ba6 100644 --- a/packages/gui/src/view/pages/setting.vue +++ b/packages/gui/src/view/pages/setting.vue @@ -13,6 +13,7 @@ export default { reloadLoading: false, urlBackup: null, personalUrlBackup: null, + maxLogFileSizeStep: 1, // 单位不同,值不同:GB=1,MB=100 maxLogFileSizeUnit: [ { label: 'GB', @@ -315,9 +316,11 @@ export default { }, async onMaxLogFileSizeUnitChange (value) { if (value === 'MB') { - this.config.app.maxLogFileSize = (this.config.app.maxLogFileSize || 1) * 1024 + this.config.app.maxLogFileSize = Math.ceil((this.config.app.maxLogFileSize || 1024) * 1024) // 转为整数 + this.maxLogFileSizeStep = 100 } else { - this.config.app.maxLogFileSize = ((this.config.app.maxLogFileSize || 1024) / 1024).toFixed(2) - 0 + this.config.app.maxLogFileSize = ((this.config.app.maxLogFileSize || 1024) / 1024).toFixed(2) - 0 // 最多保留2位小数 + this.maxLogFileSizeStep = 1 } this.$refs.maxLogFileSize.focus() }, @@ -487,7 +490,7 @@ export default { - + {{ item.label }}