Skip to content

Commit d984095

Browse files
committed
chore: update
1 parent 535e997 commit d984095

File tree

9 files changed

+61
-65
lines changed

9 files changed

+61
-65
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

README.zh-CN.md

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<!--info-header-start--><h1>prevent event propagation <img src="https://img.shields.io/badge/-easy-7aad0c" alt="easy"/> <img src="https://img.shields.io/badge/-%23Event%20Handling-999" alt="#Event Handling"/></h1><blockquote><p>By 木荣 <a href="https://github.com/murongg" target="_blank">@murongg</a></p></blockquote><p><a href="https://sfc.vuejs.org/#eNqFjtEKgyAYRl/lw5vqpliXw2J7D2/CScRMJa2b6N2nuWSMoAtB/uPxPyt5GlMusyB3Qi2fBuNghZsNZKf6hhFnGWnZxFQ4XCvrwOXA3zc0yAs0LdZAgMC0FKXUfZ7FJ1kR0HZi19d2/WfTKualGOrEaGTnxD4B6GtY8Nhd3x0L8uJbj1Ne/3IfEWYYxSFU3jg+T3dapb1k+wCXbmrQ" target="_blank"><img src="https://img.shields.io/badge/-Take%20the%20Challenge-213547?logo=vue.js&logoColor=42b883" alt="Take the Challenge"/></a> &nbsp;&nbsp;&nbsp;<a href="./README.zh-CN.md" target="_blank"><img src="https://img.shields.io/badge/-%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87-gray" alt="简体中文"/></a> </p><!--info-header-end-->
2+
3+
4+
In this challenge,you should make the click event's propagation to be stopped,let's go 👇:
5+
6+
7+
```vue
8+
<script setup lang="ts">
9+
10+
const click1 = () => {
11+
console.log('click1')
12+
}
13+
14+
const click2 = () => {
15+
console.log('click2')
16+
}
17+
18+
</script>
19+
20+
<template>
21+
<div @click="click1()">
22+
<div @click="click2()">
23+
click me
24+
</div>
25+
</div>
26+
</template>
27+
```
28+
29+
30+
<!--info-footer-start--><br><a href="../../README.md" target="_blank"><img src="https://img.shields.io/badge/-Back-grey" alt="Back"/></a> <a href="https://github.com/webfansplz/vuejs-challenges/issues/new?labels=answer,en&template=0-answer.md&title=243%20-%20prevent%20event%20propagation" target="_blank"><img src="https://img.shields.io/badge/-Share%20your%20Solutions-teal" alt="Share your Solutions"/></a> <a href="https://github.com/webfansplz/vuejs-challenges/issues?q=label%3A243+label%3Aanswer" target="_blank"><img src="https://img.shields.io/badge/-Check%20out%20Solutions-de5a77?logo=awesome-lists&logoColor=white" alt="Check out Solutions"/></a> <!--info-footer-end-->
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<!--info-header-start--><h1>阻止事件冒泡 <img src="https://img.shields.io/badge/-%E7%AE%80%E5%8D%95-7aad0c" alt="简单"/> <img src="https://img.shields.io/badge/-%23Event%20Handling-999" alt="#Event Handling"/></h1><blockquote><p>By 木荣 <a href="https://github.com/murongg" target="_blank">@murongg</a></p></blockquote><p><a href="https://sfc.vuejs.org/#eNqFjtEKgyAYRl/lw5vqpliXw2J7D2/CScRMJa2b6N2nuWSMoAtB/uPxPyt5GlMusyB3Qi2fBuNghZsNZKf6hhFnGWnZxFQ4XCvrwOXA3zc0yAs0LdZAgMC0FKXUfZ7FJ1kR0HZi19d2/WfTKualGOrEaGTnxD4B6GtY8Nhd3x0L8uJbj1Ne/3IfEWYYxSFU3jg+T3dapb1k+wCXbmrQ" target="_blank"><img src="https://img.shields.io/badge/-%E6%8E%A5%E5%8F%97%E6%8C%91%E6%88%98-213547?logo=vue.js&logoColor=42b883" alt="接受挑战"/></a> &nbsp;&nbsp;&nbsp;<a href="./README.md" target="_blank"><img src="https://img.shields.io/badge/-English-gray" alt="English"/></a> </p><!--info-header-end-->
2+
3+
4+
在这个挑战中,你需要阻点击事件的冒泡,让我们开始吧。
5+
6+
```vue
7+
<script setup lang="ts">
8+
9+
const click1 = () => {
10+
console.log('click1')
11+
}
12+
13+
const click2 = () => {
14+
console.log('click2')
15+
}
16+
17+
</script>
18+
19+
<template>
20+
<div @click="click1()">
21+
<div @click="click2()">
22+
click me
23+
</div>
24+
</div>
25+
</template>
26+
```
27+
28+
29+
<!--info-footer-start--><br><a href="../../README.zh-CN.md" target="_blank"><img src="https://img.shields.io/badge/-%E8%BF%94%E5%9B%9E%E9%A6%96%E9%A1%B5-grey" alt="返回首页"/></a> <a href="https://github.com/webfansplz/vuejs-challenges/issues/new?labels=answer,zh-CN&template=1-answer.zh-CN.md&title=243%20-%20%E9%98%BB%E6%AD%A2%E4%BA%8B%E4%BB%B6%E5%86%92%E6%B3%A1" target="_blank"><img src="https://img.shields.io/badge/-%E5%88%86%E4%BA%AB%E4%BD%A0%E7%9A%84%E8%A7%A3%E7%AD%94-teal" alt="分享你的解答"/></a> <a href="https://github.com/webfansplz/vuejs-challenges/issues?q=label%3A243+label%3Aanswer" target="_blank"><img src="https://img.shields.io/badge/-%E6%9F%A5%E7%9C%8B%E8%A7%A3%E7%AD%94-de5a77?logo=awesome-lists&logoColor=white" alt="查看解答"/></a> <!--info-footer-end-->

questions/243-zu-zhi-shi-jian-mao-pao/README.md

Lines changed: 0 additions & 32 deletions
This file was deleted.

questions/243-zu-zhi-shi-jian-mao-pao/README.zh-CN.md

Lines changed: 0 additions & 31 deletions
This file was deleted.

0 commit comments

Comments
 (0)