Compare commits
No commits in common. "6e7ca623094c88cec8f90e9866d16a43227a7941" and "248c6da30dc329dee8b7b6f4dea1baf30bdcec2c" have entirely different histories.
6e7ca62309
...
248c6da30d
1 changed files with 7 additions and 2 deletions
|
@ -77,12 +77,17 @@
|
|||
<a class="pagination-next" :class="{'is-disabled': !total || (page*limit) >= total}" @click="next">Suivant</a>
|
||||
<ul class="pagination-list">
|
||||
<template v-for="p in Array.from({length: totalPages}, (v, i) => (i+1))">
|
||||
<template v-if="p < 4 || p > (totalPages - 3) || (page - 3) <= p && page + 3 >= p">
|
||||
<template v-if="page >= 8 && p === 4">
|
||||
<li>
|
||||
<a class="pagination-link is-disabled">…</a>
|
||||
</li>
|
||||
</template>
|
||||
<template v-if="p <= 3 || p > (totalPages - 3) || (p >= (page - 3) && p <= (page + 3))">
|
||||
<li>
|
||||
<a class="pagination-link" :class="{'is-current': p === page}" @click="goTo(p)" aria-label="Aller à la page {{p}}">{{ p }}</a>
|
||||
</li>
|
||||
</template>
|
||||
<template v-if="(page - 3 - 1 === p && page - 4 > 3) || (page + 4 === p && page + 3 < totalPages - 3)">
|
||||
<template v-if="page >= 8 && p === totalPages - 4 && page <= totalPages - 7">
|
||||
<li>
|
||||
<a class="pagination-link is-disabled">…</a>
|
||||
</li>
|
||||
|
|
Loading…
Reference in a new issue