|
|
|
@ -694,14 +694,14 @@ export default class PurchaseWHSRM extends BasePage {
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
const regex = /^[a-zA-Z0-9.]+$/; // 仅允许英文、数字和小数点
|
|
|
|
|
const inputValue = this.tagsvalue; // 获取输入值
|
|
|
|
|
if (!regex.test(inputValue)) {
|
|
|
|
|
// 替换所有非法字符
|
|
|
|
|
this.tagsvalue = inputValue.replace(/[^a-zA-Z0-9.]/g, '');
|
|
|
|
|
} else {
|
|
|
|
|
this.tagsvalue = inputValue; // 输入合法,直接赋值
|
|
|
|
|
}
|
|
|
|
|
// const regex = /^[a-zA-Z0-9.]+$/; // 仅允许英文、数字和小数点
|
|
|
|
|
// const inputValue = this.tagsvalue; // 获取输入值
|
|
|
|
|
// if (!regex.test(inputValue)) {
|
|
|
|
|
// // 替换所有非法字符
|
|
|
|
|
// this.tagsvalue = inputValue.replace(/[^a-zA-Z0-9.]/g, '');
|
|
|
|
|
// } else {
|
|
|
|
|
// this.tagsvalue = inputValue; // 输入合法,直接赋值
|
|
|
|
|
// }
|
|
|
|
|
console.log(this.tagslist, 'sadasdww');
|
|
|
|
|
let a: any = {};
|
|
|
|
|
a.value = this.tagsvalue;
|
|
|
|
@ -2160,15 +2160,15 @@ export default class PurchaseWHSRM extends BasePage {
|
|
|
|
|
this.formdata.quality = event;
|
|
|
|
|
}
|
|
|
|
|
changeInputtags(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; // 输入合法,直接赋值
|
|
|
|
|
}
|
|
|
|
|
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) {
|
|
|
|
|