From be5feb77c7d068a944baf00e851db7b236c6e6f8 Mon Sep 17 00:00:00 2001 From: guoshuang Date: Fri, 6 Dec 2024 16:06:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=8F=98=E8=BE=93=E5=85=A5=E8=B5=B7?= =?UTF-8?q?=E8=B7=B3=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/login/login/index.vue | 2 +- src/pages/quality/Materialinspection/index.vue | 13 +++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/pages/login/login/index.vue b/src/pages/login/login/index.vue index 37ec69f..bb879f1 100644 --- a/src/pages/login/login/index.vue +++ b/src/pages/login/login/index.vue @@ -142,7 +142,7 @@ export default class LoginPage extends BasePage { // console.log('Version////', this.Version); } ///********版本号修改区域********** - version = '0.0.153'; //正式版本号 + version = '0.0.154'; //正式版本号 //version = '0.0.14'; //测试版本号 //***************标志修改区域:是否是测试标志: false 正式版本; true 测试版本**************** //isTest = true; diff --git a/src/pages/quality/Materialinspection/index.vue b/src/pages/quality/Materialinspection/index.vue index 19d5e8d..80ad548 100644 --- a/src/pages/quality/Materialinspection/index.vue +++ b/src/pages/quality/Materialinspection/index.vue @@ -389,7 +389,7 @@
-
+
@@ -708,6 +708,7 @@ export default class PurchaseWHSRM extends BasePage { a.valueindex = this.tagslist.length + 1; a.label = a.valueindex + ':' + a.value; this.tagslist.push(a); + this.tagsvalue = 0; // this.isfocus = false; // this.$nextTick(() => { // this.isfocus = true; @@ -2159,7 +2160,15 @@ export default class PurchaseWHSRM extends BasePage { this.formdata.quality = event; } changeInputtags(event) { - this.tagsvalue = event; + // this.tagsvalue = event; + const regex = /^[a-zA-Z0-9.]+$/; // 仅允许英文、数字和小数点 + const inputValue = event; // 获取输入值 + if (!regex.test(inputValue)) { + // 替换所有非法字符 + this.tagsvalue = inputValue.replace(/[^a-zA-Z0-9.]/g, ''); + } else { + this.tagsvalue = inputValue; // 输入合法,直接赋值 + } } //正则匹配 validateInputtags(event) {