deleteFun() {
let shuzi = /[0-9]/g;
let english = /[a-z]/ig;
let chinese = /[\u4e00-\u9fa5]/g;
let zifu = /[`~!@#$%^&*()_\-+=<>?:"{}|,.\/;'\\[\]·~!@#¥%……&*()——\-+={}|《》?:“”【】、;‘',。、]/im;
console.log('最后一位', this.vmodelValue.substr(-1));
let endStr = this.vmodelValue.substr(-1);
let res1 = endStr.match(shuzi);
let res2 = endStr.match(english);
let res3 = endStr.match(chinese);
let res4 = endStr.match(zifu);
if (res1 != null || res2 != null || res3 != null || res4 != null) {
this.vmodelValue = this.vmodelValue.substr(0, this.vmodelValue.length - 1);
} else {
this.vmodelValue = this.vmodelValue.substr(0, this.vmodelValue.length - 2);
}
}
说不定,明天成功的那个人,就是你!