Skip to content
This repository has been archived by the owner on Jun 6, 2019. It is now read-only.

通用事件 #33

Open
DoranYun opened this issue Jun 28, 2016 · 3 comments
Open

通用事件 #33

DoranYun opened this issue Jun 28, 2016 · 3 comments

Comments

@DoranYun
Copy link

DoranYun commented Jun 28, 2016

本文档已迁移至 https://weex-project.io/cn/references/common-event.html , 此处不再维护,谢谢。

通用事件

Click 事件

如果某个组件绑定了 click 事件,那么该事件会在用户点击时触发。

注解: input组件 和 switch组件目前并不支持 click 事件,请使用 changeinput 事件代替。

事件对象

  • type: click
  • target: 触发事件的目标组件;
  • timestamp: 事件触发的时间戳。

Appear 事件

如果一个 appear 事件被绑定到某个滚动区内的组件上,当组件可见时该事件触发。

事件对象

  • type: appear
  • target: 触发事件的目标组件;
  • timestamp: 事件触发的时间戳;
  • direction: 屏幕滚动时的滚动方向,updown

Disappear 事件

如果一个 disappear 事件被绑定到某个滚动区内的组件上,该事件将在组件滚动出视口,并从你的视线中消失时触发。

事件对象

  • type: disappear
  • target: 触发事件的目标组件;
  • timestamp: 事件触发的时间戳;
  • direction: 屏幕滚动时的滚动方向,updown
@yuanzx
Copy link

yuanzx commented Nov 7, 2016

Appear 事件 没有left/pre right/next值么?

@DoranYun
Copy link
Author

DoranYun commented Dec 9, 2016

@yuanzx
appear 事件对象的 direction 属性描述了触发事件时的屏幕滚动方向,值为 updown

具体信息查看文档: http://alibaba.github.io/weex/cn/doc/references/common-event.html#appear-事件

@DoranYun
Copy link
Author

本文档已迁移至 https://weex-project.io/cn/references/common-event.html , 此处不再维护,谢谢。

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants