vue–enter enter to refresh the page problem
When the input is over, press the enter key, the page refreshes, do not want to refresh
When there is only one input box in the [form] , pressing the Enter key will cause the form to be submitted and the page will be refreshed
Adding on the form is provided on the Internet and
@submit.native.preventfound that it is prone to unpredictable problems.
adding an event on the input element to prevent the default form submit
onkeypress="if(event.keyCode == 13) return false;"