Skip to content

prevent event propagation easy #Event Handling

By 木荣 @murongg

Take the Challenge    简体中文

In this challenge,you should make the click event's propagation to be stopped,let's go 👇:

<script setup lang="ts">

const click1 = () => {
  console.log('click1')
}

const click2 = () => {
  console.log('click2')
}

</script>

<template>
  <div @click="click1()">
   <div @click="click2()">
     click me
   </div>
  </div>
</template>

Share your Solutions Check out Solutions