#80 - Ajout des boutons début/fin sur la pagination

This commit is contained in:
Damien Broqua 2023-03-22 14:56:37 +01:00
parent 55a9656c42
commit 68004646f1

View file

@ -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">&laquo;</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">&raquo;</a>
</li>
</ul>
</nav>