UIPullRefreshFlash模块demo示例
UIPullRefreshFlash 模块概述: ①对于 APICloud 平台上的普通模块,在相应接口调用前需要先require该模块,但由于本模块是基于引擎下拉刷新功能扩展的模块,所以本模块使用方法比较特殊。可以不必require模块,改为在?config.xml?文件内配置模块。 config.xml?文件配置示例如下: <preference name="customRefreshHeader" value="UIPullRefreshFlash"/> 复制代码 ? 在?config.xml?配置后,则本模块为全局对象,可以在任意可弹动的窗体(frame、window)中调用 api.setCustomRefreshHeaderInfo 接口设置该下拉刷新样式,以及开始、停止刷新加载状态(api.refreshHeaderLoading、api.refreshHeaderLoadDone)。 ? ②若想在不同的 window 或 frame 使用不同的下拉刷新模块,开发者可以在 window 或 frame 打开时传入参数 customRefreshHeader:‘下拉刷新模的块名‘,以指定该窗体的下拉刷新模块。 { api.openFrame({ ? ?? ?? ?? ?name: ‘UIPullRefreshFlash-con‘, ? ?? ?? ?? ?url: ‘./UIPullRefreshFlash-con.html‘, ? ?? ?? ?? ?customRefreshHeader: ‘UIPullRefreshFlash‘, ? ?? ?? ?? ?bounces: true, ? ?? ?? ?? ?rect: { ? ?? ?? ?? ?? ? x: offset.l, ? ?? ?? ?? ?? ? y: offset.t + offset.h, ? ?? ?? ?? ?? ? w: offset.w, ? ?? ?? ?? ?? ? h: bodyHeight - offset.h ? ?? ?? ?? ?} ? ?? ???}); } 复制代码 UIPullRefreshFlash模块有三个接口: setCustomRefreshHeaderInfo:配置下拉刷新样式; ? refreshHeaderLoading:手动开始下拉刷新的加载状态,注:下拉刷新状态亦可通过用户下拉到阈值自动触发; ? refreshHeaderLoadDone:手动停止下拉刷新的加载状态; ? 下面是模块运行效果图: (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |