From 2e8b869700f8da446f05d4e23a8c8b074b4a8473 Mon Sep 17 00:00:00 2001 From: 23357 <842520863@qq.com> Date: Tue, 28 Nov 2023 11:14:13 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8D=E5=9B=BA=E4=BB=B6?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=8F=B7=E6=AD=A3=E5=88=99=E9=94=99=E8=AF=AF?= =?UTF-8?q?=EF=BC=8C=E6=96=B0=E5=A2=9E=E8=AE=BE=E5=A4=87=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E5=9B=BA=E4=BB=B6=E7=89=88=E6=9C=AC=E6=98=BE=E7=A4=BA=E5=AD=97?= =?UTF-8?q?=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/iot/ota/index.vue | 4 ++-- src/views/personal/device/profile/info.vue | 6 +++++- src/views/profile/DeviceDetailsView/info.vue | 6 +++++- src/views/tenant/device/profile/info.vue | 8 ++++++-- 4 files changed, 18 insertions(+), 6 deletions(-) diff --git a/src/views/iot/ota/index.vue b/src/views/iot/ota/index.vue index f3a4c9aa..ceb700a8 100644 --- a/src/views/iot/ota/index.vue +++ b/src/views/iot/ota/index.vue @@ -449,11 +449,11 @@ export default { }, methods: { chenking_otaVersion(rule, value, callback){ - const regex = /^(\d{1,3}\.){3}\d{1,3}$/; + const regex = /^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/; if (!this.form.otaVersion) { callback(new Error('版本不能为空')) } else if(!regex.test(this.form.otaVersion)) { - callback(new Error('版本格式不正确: x.x.x.x (如: 0~999.0~999.0~999.0~999)')) + callback(new Error('版本格式不正确: x.x.x.x (如: 0~255.0~255.0~255.0~255)')) } else { callback(); } diff --git a/src/views/personal/device/profile/info.vue b/src/views/personal/device/profile/info.vue index dc6199bd..6ca34365 100644 --- a/src/views/personal/device/profile/info.vue +++ b/src/views/personal/device/profile/info.vue @@ -120,7 +120,11 @@