This repository has been archived by the owner on Aug 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathPageList.html
83 lines (79 loc) · 2.62 KB
/
PageList.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<style disabled>
header > *, footer > * {
margin: 1em auto;
text-align: center;
}
thead th {
white-space: nowrap;
text-align: center;
}
tbody {
counter-reset: index;
}
tbody td {
vertical-align: middle;
}
tbody td.index:before {
counter-increment: index;
content: counter( index );
}
</style>
<script src="PageList.js"></script>
<div class="form-inline">
<header class="row">
<label class="col-md-3 form-group">
显示
<select class="form-control" name="rows" value="${view.rows}">
<option>10</option>
<option>20</option>
<option>30</option>
</select>
行
</label>
<div class="col-md-9 form-group">
<slot name="toolbar"></slot>
<input type="search" class="form-control"
name="keyWord" placeholder="回车搜索" />
</div>
</header>
<slot><!-- Default Slot for ListView --></slot>
<footer class="row">
<span class="col-md-3 form-group">
共
<output class="form-control"><!-- ${view.total} --></output>
行
</span>
<label class="col-md-4 form-group">
跳转到
<input type="number" class="form-control"
name="page" value="${view.page}"
min="1" max="${view.pageSum}" />
页
</label>
<ul class="col-md-5 pagination" onclick="${view.pageChange}">
<li style="display: ${(view.page < 3) ? 'none' : ''}">
<span>1</span>
</li>
<li style="display: ${(view.pageSum < 7) || (view.page < 4) ? 'none' : ''}"
class="disabled">
<span>…</span>
</li>
<li style="display: ${(view.page < 2) ? 'none' : ''}">
<span><!--${view.page - 1}--></span>
</li>
<li class="active">
<span><!--${view.page}--></span>
</li>
<li style="display: ${(+view.page + 1 > view.pageSum) ? 'none' : ''}">
<span><!--${+view.page + 1}--></span>
</li>
<li style="display: ${(view.pageSum < 6) || (+view.page + 3 > view.pageSum) ? 'none' : ''}"
class="disabled">
<span>…</span>
</li>
<li style="display: ${(+view.page + 2 > view.pageSum) ? 'none' : ''}">
<span><!--${view.pageSum}--></span>
</li>
</ul>
</footer>
</div>