| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>Hello MUI</title>
- <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
- <meta name="apple-mobile-web-app-capable" content="yes">
- <meta name="apple-mobile-web-app-status-bar-style" content="black">
- <link rel="stylesheet" href="css/mui.min.css">
- <style type="text/css">
- .mui-table-view-chevron .mui-table-view-cell{
- padding-right: 15px;
- }
- .title_color{
- color: #00a1cb;
- }
- .mui-table-cell h4{
- font-weight: normal;
- }
- .size-16{
- font-size: 16px;
- }
- .fr{
- float: right;
-
- }
- h5{
- line-height: 20px;
- }
- .mui-table-view .mui-media-object{
- border-radius: 50%;
- }
- </style>
- </head>
- <body>
- <!--下拉刷新容器-->
- <div id="pullrefresh" class="mui-content mui-scroll-wrapper">
- <div class="mui-scroll">
- <!--数据列表-->
- <ul class="mui-table-view mui-table-view-chevron">
- </ul>
- </div>
- </div>
- <script src="js/mui.min.js"></script>
- <script>
- mui.init({
- pullRefresh: {
- container: '#pullrefresh',
- up: {
- callback: pullupRefresh
- }
- }
- });
-
- var count = 0;
- /**
- // * 上拉加载具体业务实现
- // */
- function pullupRefresh() {
- setTimeout(function() {
- mui('#pullrefresh').pullRefresh().endPullupToRefresh((++count > 2)); //参数为true代表没有更多数据了。
- var table = document.body.querySelector('.mui-table-view');
- var cells = document.body.querySelectorAll('.mui-table-view-cell');
- for (var i = cells.length, len = i + 20; i < len; i++) {
- var li = document.createElement('li');
- li.className = 'mui-table-view-cell mui-media';
- li.innerHTML =
-
- '<img class="mui-media-object mui-pull-left" src="images/shuijiao.jpg">'+
- '<div class="mui-media-body">'+
- '<span class="title_color">蓝胖子'+(i + 1)+'</span> 处理了工单 '+
- '<span class="mui-h5 mui-text-right fr "></span>'+
- '<h5 class="">'+
- '标准版呼叫中心标准版呼叫中心标准版呼叫中心标准版呼叫中心标准版呼叫中心标准版呼叫中心'+
- '</h5>'+
- '<p class="mui-ellipsis"><span class="mui-h5 mui-text-right fr ">我是个图标</span></p>'+
- '</div>'
- ;
- table.appendChild(li);
- }
- }, 1500);
- }
- if (mui.os.plus) {
- mui.plusReady(function() {
- setTimeout(function() {
- mui('#pullrefresh').pullRefresh().pullupLoading();
- }, 1000);
- });
- } else {
- mui.ready(function() {
- mui('#pullrefresh').pullRefresh().pullupLoading();
- });
- }
- </script>
- </body>
- </html>
|