Skip to content

Instantly share code, notes, and snippets.

@zhangkn
Created May 17, 2018 07:04
Show Gist options
  • Save zhangkn/1f29659219d6df4c3dfca42fcf1fabbd to your computer and use it in GitHub Desktop.
Save zhangkn/1f29659219d6df4c3dfca42fcf1fabbd to your computer and use it in GitHub Desktop.
handleTap2、handleTap4、handleTap3、handleTap1
>* 在捕获阶段中,事件到达节点的顺序与冒泡阶段恰好相反
<!--点击 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>
<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