Vue element login pop-up window problem

bind the enter event in the input box of the username and password when logging in
when the login user clicks the enter error pop-up window prompt, and when you click enter again, the enter event is called again. How to enter only close the pop-up window when there is a pop-up window, and call the enter event normally when there is no pop-up window

Dec.02,2021

generally choose the scarlet letter prompt directly below the input error instead of the pop-up window


add a judgment to your carriage return event

if(show){
    //close window..
}else{
    
}

sets a variable. When an error is reported, the pop-up window is set to 1, and if the pop-up window clicks OK, it is reset to 0. Then enter event determines that this value is not 1 before submitting

.
Menu