Entering the input box will trigger the out-of-focus event, resulting in two requests

Problem Description:

Both operations of clicking Enter (@keyup.enter) and losing focus (@blur) in the input box can trigger the interface for modifying data. However, pressing Enter in the input box will trigger the out-of-focus event, resulting in two requests

problem solved:

 <input @keyup.enter="$event.target.blur()" @blur="handleBlur" />

Guess you like

Origin blog.csdn.net/weixin_42566993/article/details/128279667