在做的页面结合了不少插件,其中就有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>