请选择 进入手机版 | 继续访问电脑版
帖子
帖子
用户
博客
课程
123下一页
返回列表 发新帖
显示全部楼层
177
帖子
0
勋章
1万+
Y币

UIPullRefreshMotive模块(界面布局-下拉刷新)demo示例

[复制链接]
发表于 2018-3-10 17:29:26
  1. <!DOCTYPE html>
  2. <html>
  3.         <head>
  4.                 <meta charset="utf-8">
  5.                 <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
  6.                 <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
  7.                 <title>title</title>
  8.                 <link rel="stylesheet" type="text/css" href="../css/api.css" />
  9.                 <style>
  10.                         body {
  11.                         }
  12.                         html, body {
  13.                                 height: 100%
  14.                         }
  15.                         body {
  16.                                 background-color: #fff;
  17.                                 margin: 0;
  18.                         }
  19.                         #wrap {
  20.                                 height: 100%;
  21.                                 position: relative;
  22.                         }
  23.                         #header {
  24.                                 padding-top: 20px;
  25.                                 background-color: #5082c2;
  26.                                 height: 44px;
  27.                                 position: relative;
  28.                         }
  29.                         #header h1 {
  30.                                 font-size: 20px;
  31.                                 height: 44px;
  32.                                 line-height: 44px;
  33.                                 margin: 0em;
  34.                                 color: #fff;
  35.                                 margin-left: 100px;
  36.                                 margin-right: 100px;
  37.                                 text-align: center;
  38.                         }
  39.                         #main {
  40.                                 display: -webkit-box;
  41.                                 -webkit-box-orient: vertical;
  42.                                 -webkit-box-pack: center;
  43.                         }
  44.                         a.button {
  45.                                 display: -webkit-box;
  46.                                 -webkit-box-orient: vertical;
  47.                                 -webkit-box-pack: center;
  48.                                 -webkit-box-align: center;
  49.                                 height: 32px;
  50.                                 margin: 8px;
  51.                                 background-color: rgba(240, 240, 240, 1.0);
  52.                                 border-color: rgba(220, 220, 220, 1.0);
  53.                                 border-width: 2px;
  54.                                 border-style: solid;
  55.                         }
  56.                         a.active {
  57.                                 background-color: rgba(240, 240, 240, 0.7);
  58.                         }
  59.                 </style>
  60.         </head>
  61.         <body>
  62.                 <a class="button" tapmode="active" onclick="fnRefreshHeaderLoading()">手动开始下拉刷新的加载状态</a>
  63.                 <a class="button" tapmode="active" onclick="fnrefreshHeaderLoadDone()">手动停止下拉刷新的加载状态</a>
  64.         </body>
  65.         <script type="text/javascript" src="../script/api.js"></script>
  66.         <script type="text/javascript">
  67.                 apiready = function() {
  68.                         api.setCustomRefreshHeaderInfo({
  69.                                 bgColor : '#eee',
  70.                                 images : ['widget://image/dropdown_anim_00.png', 'widget://image/dropdown_anim_01.png', 'widget://image/dropdown_anim_02.png', 'widget://image/dropdown_anim_03.png', 'widget://image/dropdown_anim_04.png', 'widget://image/dropdown_anim_05.png', 'widget://image/dropdown_anim_06.png','widget://image/dropdown_anim_07.png','widget://image/dropdown_anim_08.png','widget://image/dropdown_anim_09.png','widget://image/dropdown_anim_10.png'],
  71.                                 tips : {
  72.                                         pull : '下拉刷新',
  73.                                         threshold : '松开立即刷新',
  74.                                         load : '正在刷新'
  75.                                 }
  76.                         }, function() {
  77.                                 //下拉刷新被触发,自动进入加载状态,使用 api.refreshHeaderLoadDone() 手动结束加载中状态
  78.                                 //下拉刷新被触发,使用 api.refreshHeaderLoadDone() 结束加载中状态
  79.                                 alert('开始加载刷新数据,摇一摇停止加载状态');
  80.                                 api.addEventListener({
  81.                                         name : 'shake'
  82.                                 }, function(ret, err) {
  83.                                         api.refreshHeaderLoadDone()
  84.                                 });
  85.                         });
  86.                 };
  87.                 function fnRefreshHeaderLoading() {
  88.                         api.refreshHeaderLoading();
  89.                 }

  90.                 function fnrefreshHeaderLoadDone() {
  91.                         api.refreshHeaderLoadDone();
  92.                 }
  93.         </script>
  94. </html>
复制代码
UIPullRefreshMotive模块demo分享

本帖子中包含更多资源,您需要 登录 才可以下载或查看,没有帐号?立即注册

X
34
帖子
5
勋章
2994
Y币
又没预览
10
帖子
0
勋章
392
Y币
没图没真相啊。。。人工智能时代 大家截个图就那么忙,那么难吗???
3
帖子
0
勋章
121
Y币
无图无真相啊
84
帖子
2
勋章
1486
Y币
有图有真相
71
帖子
0
勋章
1440
Y币
有图有真相
0
帖子
0
勋章
15
Y币
有图有真相
33
帖子
2
勋章
5055
Y币

抢沙发。回帖拿金币,支持支持
15
帖子
0
勋章
444
Y币
感谢分享感谢分享
15
帖子
0
勋章
58
Y币

没图没真相啊。。。人工智能时代 大家截个图就那么忙,那么难吗???
123下一页
您需要登录后才可以回帖 登录

本版积分规则