|
|
|
@ -389,7 +389,7 @@
|
|
|
|
|
<div class="upload-name">
|
|
|
|
|
<div style="display: flex">
|
|
|
|
|
<div><u-input :border="true" disabled :value="tagslist.length + 1" :focus="isfocus" style="background-color: #eee; width: 80rpx; margin-right: 10rpx" @blur="changeInputtags($event)" /></div>
|
|
|
|
|
<div><u-input :border="true" :value="tagsvalue" :focus="isfocus" @input="validateInputtags($event)" style="overflow: hidden" @blur="changeInputtags($event)" /></div>
|
|
|
|
|
<div><u-input :border="true" :value="tagsvalue" :focus="isfocus" style="overflow: hidden" @blur="changeInputtags($event)" /></div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div>
|
|
|
|
@ -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) {
|
|
|
|
|