File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed
Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change 22 <div >
33 <nav aria-label =" Page navigation example" >
44 <ul class =" pagination" >
5- <!-- < li class="page-item">
6- <a class="page-link" href="# " aria-label="Previous">
5+ <li class =" page-item" @click.prevent = " pageHandler(page-1) " >
6+ <a class =" page-link" href =" " aria-label =" Previous" >
77 <span aria-hidden =" true" >« ; </span >
8- <span class="sr-only">Previous</span>
98 </a >
10- </li> -->
9+ </li >
1110 <template v-if =" ! isEmpty " >
1211 <li class =" page-item" v-if =" showLeftDot" @click.prevent =" pageHandler(1)" >
1312 <a class =" page-link" href =" " > 1 </a >
2726 </template >
2827 <template v-else >
2928 <li class =" page-item disabled" >
30- <a class =" page-link" href =" # " >...</a >
29+ <a class =" page-link" href =" " >...</a >
3130 </li >
3231 </template >
33- <!-- < li class="page-item">
34- <a class="page-link" href="# " aria-label="Next">
32+ <li class =" page-item" @click.prevent = " pageHandler(page+1) " >
33+ <a class =" page-link" href =" " aria-label =" Next" >
3534 <span aria-hidden =" true" >» ; </span >
36- <span class="sr-only">Next</span>
3735 </a >
38- </li> -->
36+ </li >
3937 </ul >
4038 </nav >
4139 </div >
7573 },
7674 methods: {
7775 pageHandler (index ) {
78- this .$emit (' update:page' , index);
76+ if (index >= 1 && index <= this .totalPages ) {
77+ this .$emit (' update:page' , index);
78+ }
7979 }
8080
8181 },
You can’t perform that action at this time.
0 commit comments