#80 - Ajout des boutons début/fin sur la pagination
This commit is contained in:
parent
55a9656c42
commit
68004646f1
1 changed files with 6 additions and 0 deletions
|
@ -72,6 +72,9 @@
|
|||
</div>
|
||||
<nav class="pagination" role="navigation" aria-label="Pagination">
|
||||
<ul class="pagination-list">
|
||||
<li v-if="page > 1">
|
||||
<a class="pagination-link" @click="goTo(1)" aria-label="Aller à la première page">«</a>
|
||||
</li>
|
||||
<template v-for="p in Array.from({length: totalPages}, (v, i) => (i+1))">
|
||||
<template v-if="p < 2 || p > (totalPages - 1) || (Number(page) - 1) <= p && Number(page) + 1 >= p">
|
||||
<li>
|
||||
|
@ -84,6 +87,9 @@
|
|||
</li>
|
||||
</template>
|
||||
</template>
|
||||
<li v-if="page < totalPages">
|
||||
<a class="pagination-link" @click="goTo(totalPages)" aria-label="Aller à la derière page">»</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
|
|
Loading…
Reference in a new issue