App Framework框架之绑定事件(1)

简介:

App Framework是intel公司开发的一个web app框架

官网:http://app-framework-software.intel.com/af22

有如下事件:

tap                  Tap on the element

singleTap            Single tap on the elem (250ms delay after tap is triggered)

doubleTap            Double tap (quick) on the element

longTap              Long press on the element

swipe                The element was swiped (30px threshold)

swipeLeft            The element was swiped left

swipeRight           The element was swiped right

swipeUp              The element was swiped up

swipeDown            The element was swiped down

 

绑定事件

 

Js代码   收藏代码
  1. $("#element").bind("doubleTap",function(){});  
  2.   
  3. $('#label_toggle_passwd').bind("tap",function(){  
  4.     toggleCheckbox(document.getElementById('showpw'));  
  5. })  

 App Framework UI  基于ZeptoJS*触屏库提供了多种触屏事件  ,以下是你可以注册监听的事件列表

 

tap //类似于普通的 click

singleTap //点一次

doubleTap //连续点两次

longTap //长按

swipe //滑屏

swipeLeft //左滑屏

swipeRight //右滑屏

swipeUp //上滑屏

swipeDown //下滑屏

The swipe event is always triggered with the direction of the swipe. The tap event is always triggered when singleTap, doubleTap or longTap are dispatched.

 

Events

Below are the following events triggered in App Framework UI. 

1
$.ui.load - This event is fired once when
App Framework UI is loaded and ready to go.

These events are only triggered on the window object

1
2
3
hashchange - This event is fired when the a panel has been changed.
orientationchange - This event is fired when the page rotates.
afui:init - This event fires when then $.ui object has been initialized

These events are triggered on the document.

1
2
afui:ready - App Framework UI has launched and ready to be used
missingpanel - This event is fired when the panel was not found in the DOM

These events are triggered on a DOM node. They will bubble up.

1
2
3
4
5
6
7
unloadpanel  - This event is fired when a panel has been unloaded.
loadpanel  - This event is fired when a panel has been loaded.
tap  - This event is fired when tap event happened on a node.  It is similar to a click event.
doubleTap  - This event is firedd when a DOM node is double tapped.
singleTap  - This event is fired when a node is single tapped.  There is a delayed trigger for this event.
longTap  - This event is fired when a user holds down a tapped a node for over 750 milliseconds.
swipe - This event is fired when a user swipes a DOM node.

These events are triggered by a scroller object. These events are handled using $.trigger and $.bind. These events will not bubble.

1
2
3
4
5
6
7
8
9
10
11
12
refresh-release  - This event is fired when a scroller object pull to refresh has been released.
refresh-cancel - This event is fired when a refresh has been triggered, but a user scrolls then we cancel it.
refresh-trigger - This event is fired when a refresh request has happened on the scroller.
refresh-finish - This event is fired when a refresh has been processed and finished.
 
infinite-scroll - This event is fired  when a scroller has hit the end of the content and is requesting more info.
infinite-scroll-end - This event is fired when a scroller has stopped scrolling after triggering an infinit-scroll event.
 
scrollstart - This event is fired when a scroller object starts scrolling.
scrollend - This event is fired when a scroller stops scrolling.
 
swipeLeft/swipeRight/swipeDown/swipeUp - These events are fired in response to a swipe event.  They indicate the direction of the swipe.
相关文章
|
19天前
|
Java 测试技术 持续交付
【入门思路】基于Python+Unittest+Appium+Excel+BeautifulReport的App/移动端UI自动化测试框架搭建思路
本文重点讲解如何搭建App自动化测试框架的思路,而非完整源码。主要内容包括实现目的、框架设计、环境依赖和框架的主要组成部分。适用于初学者,旨在帮助其快速掌握App自动化测试的基本技能。文中详细介绍了从需求分析到技术栈选择,再到具体模块的封装与实现,包括登录、截图、日志、测试报告和邮件服务等。同时提供了运行效果的展示,便于理解和实践。
63 4
【入门思路】基于Python+Unittest+Appium+Excel+BeautifulReport的App/移动端UI自动化测试框架搭建思路
|
3月前
|
开发框架 JavaScript 前端开发
uni-app x 跨平台开发框架
uni-app x 是一个强大的跨平台开发框架 uni-app x 是一个庞大的工程,它包括uts语言、uvue渲染引擎、uni的组件和API、以及扩展机制。
89 1
|
6月前
|
开发框架 移动开发 JavaScript
SpringCloud微服务实战——搭建企业级开发框架(四十七):【移动开发】整合uni-app搭建移动端快速开发框架-添加Axios并实现登录功能
在uni-app中,使用axios实现网络请求和登录功能涉及以下几个关键步骤: 1. **安装axios和axios-auth-refresh**: 在项目的`package.json`中添加axios和axios-auth-refresh依赖,可以通过HBuilderX的终端窗口运行`yarn add axios axios-auth-refresh`命令来安装。 2. **配置自定义常量**: 创建`project.config.js`文件,配置全局常量,如API基础URL、TenantId、APP_CLIENT_ID和APP_CLIENT_SECRET等。
227 60
|
4月前
|
Python Windows 内存技术
【Azure 应用服务】Azure App Service (Windows) 使用Flask框架部署Python应用,如何在代码中访问静态文件呢?如何设置文件路径?是相对路径还是绝对路径呢?
【Azure 应用服务】Azure App Service (Windows) 使用Flask框架部署Python应用,如何在代码中访问静态文件呢?如何设置文件路径?是相对路径还是绝对路径呢?
|
6月前
|
开发框架 小程序 前端开发
uni-app前端应用开发框架
uni-app对做移动端开发的来说应该无人不知、无人不晓了吧?!从名字就能看出来这个框架要干啥,unify app——没错,就是统一前端应用开发,不管你是小程序、app、还是H5、公众号,用这个框架都能做。uni-app让开发者编写一套代码,就可以编译为安卓app、ios app、微信小程序、抖音小程序、支付宝小程序等十几个平台,而且马上支持纯血鸿蒙了,这简直是个人、开发工作室、小型开发公司的福音,开发一些常规的app、小程序,用这个框架足够了。
71 7
|
6月前
|
安全 测试技术 网络安全
APP攻防-资产收集篇&反证书检验&XP框架&反代理VPN&数据转发&反模拟器
APP攻防-资产收集篇&反证书检验&XP框架&反代理VPN&数据转发&反模拟器
|
6月前
|
安全 JavaScript 前端开发
kotlin开发安卓app,JetPack Compose框架,给webview新增一个按钮,点击刷新网页
在Kotlin中开发Android应用,使用Jetpack Compose框架时,可以通过添加一个按钮到TopAppBar来实现WebView页面的刷新功能。按钮位于右上角,点击后调用`webViewState?.reload()`来刷新网页内容。以下是代码摘要:
|
6月前
|
缓存 Android开发 Kotlin
【安卓app开发】kotlin Jetpack Compose框架 | 先用OKhttp下载远程音频文件再使用ExoPlayer播放
使用 Kotlin 的 Jetpack Compose 开发安卓应用时,可以结合 OkHttp 下载远程音频文件和 ExoPlayer 进行播放。在 `build.gradle` 添加相关依赖后,示例代码展示了如何下载音频并用 ExoPlayer 播放。代码包括添加依赖、下载文件、播放文件及简单的 Compose UI。注意,示例未包含完整错误处理和资源释放,实际应用需补充这些内容。
|
7月前
|
开发框架 移动开发 JavaScript
SpringCloud微服务实战——搭建企业级开发框架(四十六):【移动开发】整合uni-app搭建移动端快速开发框架-环境搭建
正如优秀的软件设计一样,uni-app把一些移动端常用的功能做成了独立的服务或者插件,我们在使用的时候只需要选择使用即可。但是在使用这些服务或者插件时一定要区分其提供的各种服务和插件的使用场景,例如其提供的【uni-starter快速开发项目模版】几乎集成了移动端所需的所有基础功能,使用非常方便,但是其许可协议只允许对接其uniCloud的JS开发服务端,不允许对接自己的php、java等其他后台系统。
311 61
|
7月前
|
前端开发 JavaScript 搜索推荐
react-app框架——使用monaco editor实现online编辑html代码编辑器
react-app框架——使用monaco editor实现online编辑html代码编辑器
297 3

热门文章

最新文章

下一篇
无影云桌面