<input v-on:input="submit" type="text" placeholder="" @keydown="handleInput" v-model.trim="info.inviteCode">
handleInput(e) {
if(/[^\d]/.test(this.info.inviteCode)){
console.log(123)
}
// e.target.value = e.target.value.replace(/[^\d]/g, "");
}
Why doesn"t my judgment work
console.log(/[^\d]/.test(e.target.value)
will appear to first enter the number is true and then enter the first letter will appear true the second letter will become false, but then enter the number will always console out the false.