[Vuejs]-Vue @click.stop still getting the child component

0👍

I did some workaround

<div>
    <div class="overlay" v-on:click.stop.prevent="onClickTemplateHandler"></div>
    <div>
      <h3 style="padding: 10px;text-align: center;">Header</h3>
    </div>
</div>


...

onClickTemplateHandler(e) {
    const innerHTML = e.target.nextElementSibling.innerHTML
    if (innerHTML) {
      this.value += innerHTML
    }
}

...

.overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0px;
    z-index: 2;
    top: 0px;
    cursor: pointer;
}

Leave a comment