[Vuejs]-Add click event

0👍

✅

What you are looking for is the self modifier.

If a parent node and child node are registered with same type of event then when that type event dispatches then handlers of parent and child are called.

Here is an example fiddle

Your code should look like:

<span class="this_mask" @click="thisMask">
  <div class="this__wrap">
    <div class="this__text">
      <button class="this__button" @click.self="thisButton"></button>
    </div>
  </div>
</span>

Code is untested so I’m not sure if you have to attach in your example to button or span

Leave a comment