Using this markup
<div @click='handleClickOnDiv'>
{{ message }}
<i class='fa fa-plus' @click='handleClickOnI'></i>
</div>
When I click on div
- it calls handleClickOnDiv
, but when I click on i
- it calls both handlers.
How to deal with it?
Try Event-Modifiers with @click
, you can do following:
<div @click='handleClickOnDiv'>
{{ message }}
<i class='fa fa-plus' @click.stop='handleClickOnI'></i>
</div>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With