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