From afda4530ec4bb0e736675b0964dc8fd1bb894a95 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Mon, 1 Nov 2021 18:42:33 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=9F=BA=E7=A1=80=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E8=A1=A8=E5=8D=95=E9=AA=8C=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/lang/en.js | 2 ++ frontend/src/lang/tw.js | 2 ++ frontend/src/lang/zh.js | 2 +- frontend/src/views/system/SysParam/BasicSetting.vue | 10 +++++----- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/frontend/src/lang/en.js b/frontend/src/lang/en.js index 9ef01755b2..8682b36dcc 100644 --- a/frontend/src/lang/en.js +++ b/frontend/src/lang/en.js @@ -611,6 +611,8 @@ export default { msg_time_out: 'Message retention time(unit: day)', empty_front: 'If empty then default value is 10s', empty_msg: 'If empty then default value is 30 days', + front_error: 'Valid ranger [0 - 100]', + msg_error: 'Valid ranger [1 - 365]', SMTP_port: 'SMTP Port', SMTP_account: 'SMTP Account', SMTP_password: 'SMTP Password', diff --git a/frontend/src/lang/tw.js b/frontend/src/lang/tw.js index af2479d535..47cca6524e 100644 --- a/frontend/src/lang/tw.js +++ b/frontend/src/lang/tw.js @@ -613,6 +613,8 @@ export default { msg_time_out: '消息保留時間(單位:天)', empty_front: '為空則默認取值10秒', empty_msg: '為空則默認取值30天', + front_error: '請填寫0-100正整數', + msg_error: '請填寫1-365正整數', SMTP_port: 'SMTP端口', SMTP_account: 'SMTP賬戶', SMTP_password: 'SMTP密碼', diff --git a/frontend/src/lang/zh.js b/frontend/src/lang/zh.js index 4c2207422d..e0d5a42d6a 100644 --- a/frontend/src/lang/zh.js +++ b/frontend/src/lang/zh.js @@ -617,7 +617,7 @@ export default { empty_front: '为空则默认取10秒', empty_msg: '为空则默认取30天', front_error: '请填写0-100正整数', - msg_error: '请填写正整数', + msg_error: '请填写1-365正整数', SMTP_port: 'SMTP端口', SMTP_account: 'SMTP账户', SMTP_password: 'SMTP密码', diff --git a/frontend/src/views/system/SysParam/BasicSetting.vue b/frontend/src/views/system/SysParam/BasicSetting.vue index b71c23e7cc..f29e560d02 100644 --- a/frontend/src/views/system/SysParam/BasicSetting.vue +++ b/frontend/src/views/system/SysParam/BasicSetting.vue @@ -70,7 +70,7 @@ export default { ], msgTimeOut: [ { - pattern: '^[0-9]*$', + pattern: '^([1-9]|[1-9]\\d|365)$', message: this.$t('system_parameter_setting.msg_error'), trigger: 'blur' } @@ -101,10 +101,6 @@ export default { this.show = false }, save(formInline) { - this.showEdit = true - this.showCancel = false - this.showSave = false - this.show = true const param = [ { paramKey: 'basic.frontTimeOut', paramValue: this.formInline.frontTimeOut, type: 'text', sort: 1 }, { paramKey: 'basic.msgTimeOut', paramValue: this.formInline.msgTimeOut, type: 'text', sort: 2 } @@ -117,6 +113,10 @@ export default { const flag = response.success if (flag) { this.$success(this.$t('commons.save_success')) + this.showEdit = true + this.showCancel = false + this.showSave = false + this.show = true window.location.reload() } else { this.$message.error(this.$t('commons.save_failed'))