From c752f9c889fe72a1c64a6ae0e372ec5de44493fe Mon Sep 17 00:00:00 2001 From: taojinlong Date: Wed, 28 Sep 2022 17:50:35 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=A0=A1=E9=AA=8C=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E6=BA=90=E6=97=B6=E9=97=B4=E9=97=B4=E9=9A=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/system/SysParam/BasicSetting.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/frontend/src/views/system/SysParam/BasicSetting.vue b/frontend/src/views/system/SysParam/BasicSetting.vue index da530395c5..4e0f1852d7 100644 --- a/frontend/src/views/system/SysParam/BasicSetting.vue +++ b/frontend/src/views/system/SysParam/BasicSetting.vue @@ -343,14 +343,16 @@ export default { }, onSimpleCronChange() { if (this.formInline.dsCheckIntervalType === 'minute') { - if (this.formInline.dsCheckInterval < 1 || this.formInline.dsCheckInterval > 59) { + const pattern = '^([1-9]|[1-5][0-9])$' + if (!new RegExp(pattern).test(this.formInline.dsCheckInterval)) { this.$message({ message: this.$t('cron.minute_limit'), type: 'warning', showClose: true }) this.formInline.dsCheckInterval = 1 } return } if (this.formInline.dsCheckIntervalType === 'hour') { - if (this.formInline.dsCheckInterval < 1 || this.formInline.dsCheckInterval > 23) { + const pattern = '^([1-9]|[1-2][0-3])$' + if (!new RegExp(pattern).test(this.formInline.dsCheckInterval)) { this.$message({ message: this.$t('cron.hour_limit'), type: 'warning', showClose: true }) this.formInline.dsCheckInterval = 1 }