I'm not very familiar with Vue but I think you can omit:
@keydown.enter="doSearch"
The beauty of <form></form> + <button type="submit">Submit</button> is that you don't have to manually handle ENTER key on an input. Which is very convenient if you have multiple inputs :)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
A common pattern I use in Vue
It works not only on Desktop, but also on Mobile.
I also realized that not only
<form>
is important, but also<button type="submit">
.I'm not very familiar with Vue but I think you can omit:
The beauty of
<form></form>
+<button type="submit">Submit</button>
is that you don't have to manually handleENTER
key on an input. Which is very convenient if you have multiple inputs :)