我想在用户按Enter键时停止运行checkingNric
.请帮帮忙.
onPress(e){
if(e.keyCode == 13){
this.checkingNric(e.preventDefault());
}
},
我想在用户按Enter键时停止运行checkingNric
.请帮帮忙.
onPress(e){
if(e.keyCode == 13){
this.checkingNric(e.preventDefault());
}
},
不知道我是不是理解得很好.
这将在第一次按Enter键后停止调用this.check ingNric().
在使用Vue时,将enterWasPressed:False变量添加到组件的data()中.
onPress(e){
if(e.keyCode == 13){
this.enterWasPressed = true;
}
if (! this.enterWasPressed) {
this.checkingNric(e.preventDefault());
}
},