Skip to content

Commit 0379f2d

Browse files
authored
Merge pull request miaoyaoyao#5 from yfor/master
样式适配amazeui
2 parents 69bd423 + da6ec9f commit 0379f2d

File tree

1 file changed

+18
-16
lines changed

1 file changed

+18
-16
lines changed

src/pagination/tm.pagination.js

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,24 @@
55
angular.module('tm.pagination', []).directive('tmPagination',[function(){
66
return {
77
restrict: 'EA',
8-
template: '<div class="page-list">' +
9-
'<ul class="pagination" ng-show="conf.totalItems > 0">' +
10-
'<li ng-class="{disabled: conf.currentPage == 1}" ng-click="prevPage()"><span>&laquo;</span></li>' +
11-
'<li ng-repeat="item in pageList track by $index" ng-class="{active: item == conf.currentPage, separate: item == \'...\'}" ' +
12-
'ng-click="changeCurrentPage(item)">' +
13-
'<span>{{ item }}</span>' +
14-
'</li>' +
15-
'<li ng-class="{disabled: conf.currentPage == conf.numberOfPages}" ng-click="nextPage()"><span>&raquo;</span></li>' +
16-
'</ul>' +
17-
'<div class="page-total" ng-show="conf.totalItems > 0">' +
18-
'每页<select ng-model="conf.itemsPerPage" ng-options="option for option in conf.perPageOptions " ng-change="changeItemsPerPage()"></select>' +
19-
'/共<strong>{{ conf.totalItems }}</strong>条 ' +
20-
'跳转至<input type="text" ng-model="jumpPageNum" ng-keyup="jumpPageKeyUp($event)"/>' +
21-
'</div>' +
22-
'<div class="no-items" ng-show="conf.totalItems <= 0">暂无数据</div>' +
23-
'</div>',
8+
template: '<div class="page-list">' +
9+
'<ul data-am-widget="pagination" class="am-pagination am-pagination-default" ng-show="conf.totalItems > 0">' +
10+
'<li ng-class="{disabled: conf.currentPage == 1}" ng-click="prevPage()"><span>上一页</span></li>' +
11+
'<li ng-repeat="item in pageList track by $index" ng-class="{\'am-active\': item == conf.currentPage, separate: item == \'...\'}" ' +
12+
'ng-click="changeCurrentPage(item)">' +
13+
'<span>{{ item }}</span>' +
14+
'</li>' +
15+
'<li ng-class="{disabled: conf.currentPage == conf.numberOfPages}" ng-click="nextPage()"><span>下一页</span></li>' +
16+
'</ul>' +
17+
/**
18+
'<div class="page-total" ng-show="conf.totalItems > 0">' +
19+
'每页<select ng-model="conf.itemsPerPage" ng-options="option for option in conf.perPageOptions " ng-change="changeItemsPerPage()"></select>' +
20+
'/共<strong>{{ conf.totalItems }}</strong>条 ' +
21+
'跳转至<input type="text" ng-model="jumpPageNum" ng-keyup="jumpPageKeyUp($event)"/>' +
22+
'</div>' +
23+
**/
24+
'<div class="no-items" ng-show="conf.totalItems <= 0">暂无数据</div>' +
25+
'</div>',
2426
replace: true,
2527
scope: {
2628
conf: '='

0 commit comments

Comments
 (0)