10
10
<li class =" page-item" :class =" classLastPage" >
11
11
<a href =" #" @click.prevent =" nextPage" >{{translation.next}}</a >
12
12
</li >
13
+ <li class =" page-item" >
14
+ <select class =" tiny-form-select" v-model =" limit" >
15
+ <option
16
+ v-for =" (limit, index) in limits"
17
+ :value =" limit"
18
+ :key =" index" >{{limit}}/{{translation.title}}</option >
19
+ </select >
20
+ </li >
13
21
</ul >
14
22
</div >
15
23
</template >
@@ -37,7 +45,9 @@ export default {
37
45
},
38
46
data () {
39
47
return {
40
- currentPage: 1
48
+ currentPage: 1 ,
49
+ limit: 10 ,
50
+ limits: [10 , 15 , 20 , 50 , 100 ]
41
51
}
42
52
},
43
53
created () {
@@ -48,7 +58,7 @@ export default {
48
58
return Language .translations [this .lang ]
49
59
},
50
60
totalPages () {
51
- return Math .ceil (this .total / 10 )
61
+ return Math .ceil (this .total / this . limit )
52
62
},
53
63
titlePage () {
54
64
return ` ${ this .translation .title } ${ this .currentPage } `
@@ -150,5 +160,30 @@ export default {
150
160
opacity : .5 ;
151
161
}
152
162
}
163
+
164
+ .tiny-form-select {
165
+ -webkit-appearance : none ;
166
+ -moz-appearance : none ;
167
+ appearance : none ;
168
+ text-transform : lowercase ;
169
+ border : .05rem solid #caced7 ;
170
+ border-radius : .1rem ;
171
+ font-size : .8rem ;
172
+ height : 1.8rem ;
173
+ line-height : 1rem ;
174
+ outline : none ;
175
+ padding : .35rem .4rem ;
176
+ vertical-align : middle ;
177
+ width : 100% ;
178
+ & :focus {
179
+ border-color : #5755d9 ;
180
+ box-shadow : 0 0 0 0.1rem rgba (87 , 85 , 217 , .2 )
181
+ }
182
+ }
183
+
184
+ .tiny-form-select :not ([multiple ]):not ([size ]) {
185
+ background : #fff url (' data:image/svg+xml;charset=utf8,%3Csvg%20xmlns="http://www.w3.org/2000/svg"…path%20fill="%23667189"%20d="M2%200L0%202h4zm0%205L0%203h4z"/%3E%3C/svg%3E' ) no-repeat right .35rem center / .4rem .5rem ;
186
+ padding-right : 1.2rem ;
187
+ }
153
188
}
154
189
</style >
0 commit comments