【发布时间】:2021-03-09 11:55:49
【问题描述】:
我在文本字段中输入输入值作为参数。但是每次我按下一个键时它的工作速度都很慢。我怎样才能加快速度。 html代码
<v-col cols="3">
<v-text-field
v-model="registerSearch">
</v-text-field>
</v-col>
脚本代码
watch: {
async registerSearch(value){
if(value){
if(this.registerSearch.length == 10 || this.registerSearch.length == 11){
this.customer.TaxNumber=this.registerSearch;
if(this.registerSearch.length == 11){
await this.$validator.reset();
}else{
this.searched=false;
}
else{
this.Search=[]
this.customer.Company=''
this.customer.FirstName=''
this.customer.LastName=''
this.searched = false;
this.disableControl=true;
await this.$validator.reset();
}
}
}
}
【问题讨论】:
标签: javascript vue.js vuetify.js