File tree Expand file tree Collapse file tree 1 file changed +52
-2
lines changed Expand file tree Collapse file tree 1 file changed +52
-2
lines changed Original file line number Diff line number Diff line change 27
27
:class =" getNavigationButtonClasses(1)"
28
28
@click =" goToFirstPage"
29
29
>
30
- First
30
+ <slot name =" first-icon" >
31
+ <svg
32
+ stroke =" currentColor"
33
+ fill =" none"
34
+ stroke-width =" 0"
35
+ viewBox =" 0 0 20 20"
36
+ aria-hidden =" true"
37
+ class =" h-5 w-5"
38
+ height =" 1em"
39
+ width =" 1em"
40
+ xmlns =" http://www.w3.org/2000/svg"
41
+ >
42
+ <path
43
+ stroke =" currentColor"
44
+ stroke-linecap =" round"
45
+ stroke-linejoin =" round"
46
+ stroke-width =" 2"
47
+ d =" m17 14-4-4 4-4m-6 8-4-4 4-4"
48
+ />
49
+ </svg >
50
+ </slot >
51
+ <template v-if =" showLabels " >
52
+ {{ firstLabel }}
53
+ </template >
31
54
</button >
32
55
</slot >
33
56
127
150
:class =" getNavigationButtonClasses(computedTotalPages)"
128
151
@click =" goToLastPage"
129
152
>
130
- Last
153
+ <template v-if =" showLabels " >
154
+ {{ lastLabel }}
155
+ </template >
156
+ <slot name =" last-icon" >
157
+ <svg
158
+ stroke =" currentColor"
159
+ fill =" none"
160
+ stroke-width =" 0"
161
+ viewBox =" 0 0 20 20"
162
+ aria-hidden =" true"
163
+ class =" h-5 w-5"
164
+ height =" 1em"
165
+ width =" 1em"
166
+ xmlns =" http://www.w3.org/2000/svg"
167
+ >
168
+ <path
169
+ stroke =" currentColor"
170
+ stroke-linecap =" round"
171
+ stroke-linejoin =" round"
172
+ stroke-width =" 2"
173
+ d =" m7 14 4-4-4-4m6 8 4-4-4-4"
174
+ />
175
+ </svg >
176
+ </slot >
131
177
</button >
132
178
</slot >
133
179
@@ -156,6 +202,8 @@ interface IPaginationProps {
156
202
sliceLength? : number
157
203
previousLabel? : string
158
204
nextLabel? : string
205
+ firstLabel? : string
206
+ lastLabel? : string
159
207
enableFirstAndLastButtons? : boolean
160
208
showLabels? : boolean
161
209
large? : boolean
@@ -171,6 +219,8 @@ const props = withDefaults(defineProps<IPaginationProps>(), {
171
219
sliceLength: 2 ,
172
220
previousLabel: ' Prev' ,
173
221
nextLabel: ' Next' ,
222
+ firstLabel: ' First' ,
223
+ lastLabel: ' Last' ,
174
224
enableFirstAndLastButtons: false ,
175
225
showLabels: true ,
176
226
large: false ,
You can’t perform that action at this time.
0 commit comments