I have a button, user can click the button more than one time if he want. But when the user click the button, he might accidentally click twice, in such cases second click should be blocked by the code.
If I further explain. They should be a small delay between two clicks.
How do I achieve this using vue js?
In Vue docs Event modifiers
I found .stop
<button @click.stop="myFunction">Increase</button>
Does this do the job what I want?
disabled
attribute to the button once the button is clicked. then remove thedisabled
attribute once the logic is done. – Histogen