简单就好0_o 2017-02-04 06:35 采纳率: 0%
浏览 4834

footable插件的分页问题

在做的页面结合了不少插件,其中就有footable表格。在使用时出现一些问题,希望大神们指教一下。
首先,设置了data-page-size="5",但是时灵时不灵,有时分页会出现,有时一下就全出来了。
另外,使用了angularjs,在表格数据变化后,使用$scope.$apply;更新了数据,但是数据更新了,页面的分页却错乱了:一页把所有数据都加载出来,下面的页脚依然是之前页面的页脚。
哪位大神了解或者遇到过相似情况,还求告知下,感激不尽》
表格代码

  <table id="table" class="table m-b-none" ui-jq="footable" data-filter="#filter" data-paging="true" data-page-size="5" >
       <thead>
         <tr>
             <th data-sort-ignore="true"><input type="checkbox" id="checkall" name="checkall" ng-click="checkall()"/></th>
             <th ng-hide="true">id</th>
             <th data-hide="">编号</th>
             <th data-hide="">spId</th>  
             <th data-hide="">标题</th>
             <th data-sort-ignore="true">操作</th> 
         </tr>
       </thead>
       <tbody>
         <tr ng-repeat="urllist in list">
            <td><input type="checkbox" id="{{urllist.id}}" name="checkone" /></td>
             <td ng-hide="true">{{urllist.id}}</td>
             <td>{{ $index + 1 }}</td>
             <td>{{urllist.spId}}</td>   
             <td>{{urllist.title}}</td>
        <td><!--编辑-->
               <a type="button" class="btn btn-xs btn-default m-r-sm" data-toggle="modal" data-target="#myModal" 
               ng-click="openeditor(urllist.id,urllist.spId,urllist.type,urllist.title,urllist.folder,urllist.httpPath,urllist.outerIp,urllist.innerIp)">
                   <i class="fa fa-pencil"></i>
               </a>
                            <!--删除-->
               <a type="button" class="btn btn-xs btn-default" ng-click="deleteurl(urllist.id)">
                   <i class="fa fa-trash"></i>
               </a>
            </td> 
         </tr>
       </tbody>
       <tfoot class="hide-if-no-paging">
         <tr>
             <td colspan="6" class="text-center">
                 <ul class="pagination" ></ul>
             </td>
         </tr>
       </tfoot>
     </table>
  • 写回答

7条回答 默认 最新

  • 分手为啥钱带走 2018-03-28 09:44
    关注

    success(function(data){
    $scope.stores = data;
    $timeout(function(){
    $('.table').trigger('footable_redraw');
    }, 100);
    });
    给后来者照个亮

    评论

报告相同问题?

悬赏问题

  • ¥15 安装svn网络有问题怎么办
  • ¥15 Python爬取指定微博话题下的内容,保存为txt
  • ¥15 vue2登录调用后端接口如何实现
  • ¥65 永磁型步进电机PID算法
  • ¥15 sqlite 附加(attach database)加密数据库时,返回26是什么原因呢?
  • ¥88 找成都本地经验丰富懂小程序开发的技术大咖
  • ¥15 如何处理复杂数据表格的除法运算
  • ¥15 如何用stc8h1k08的片子做485数据透传的功能?(关键词-串口)
  • ¥15 有兄弟姐妹会用word插图功能制作类似citespace的图片吗?
  • ¥15 latex怎么处理论文引理引用参考文献