Fixed bug for #issue-13
This commit is contained in:
parent
6f47666205
commit
bc6d4e2d00
1 changed files with 2 additions and 7 deletions
|
@ -74,17 +74,12 @@
|
|||
<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="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))">
|
||||
<template v-if="p < 4 || p > (totalPages - 3) || (page - 3) <= p && page + 3 >= p">
|
||||
<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 >= 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>
|
||||
<a class="pagination-link is-disabled">…</a>
|
||||
</li>
|
||||
|
|
Loading…
Reference in a new issue