Created
May 17, 2018 07:04
-
-
Save zhangkn/1f29659219d6df4c3dfca42fcf1fabbd to your computer and use it in GitHub Desktop.
handleTap2、handleTap4、handleTap3、handleTap1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>* 在捕获阶段中,事件到达节点的顺序与冒泡阶段恰好相反 | |
<!--点击 inner view 会先后调用handleTap2、handleTap4、handleTap3、handleTap1--> | |
<view id="outer" bind:touchstart="handleTap1" capture-bind:touchstart="handleTap2"> | |
outer view | |
<view id="inner" bind:touchstart="handleTap3" capture-bind:touchstart="handleTap4"> | |
inner view | |
</view> | |
</view> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<view id="outer" bind:touchstart="handleTap1" capture-catch:touchstart="handleTap2"> | |
outer view | |
<view id="inner" bind:touchstart="handleTap3" capture-bind:touchstart="handleTap4"> | |
inner view | |
</view> | |
</view> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment