fix paging links

This commit is contained in:
BuckarooBanzay 2021-02-25 13:56:42 +01:00
parent 71a29d7048
commit 81aba3cf97
3 changed files with 12 additions and 14 deletions

View File

@ -3,6 +3,7 @@ Vue.component("item-detail", {
props: ["item"],
created: function(){
let abms = [];
console.log("item-detail", this.item);
if (mtinfo.abm_nodenames[this.name]){
abms.push(mtinfo.abm_nodenames[this.name]);

View File

@ -50,19 +50,6 @@ Vue.component("item-list", {
</router-link>
</td>
</template>
<template v-slot:pager="{ pages }">
<td colspan="3">
<nav aria-label="Page navigation example">
<ul class="pagination">
<li v-bind:class="{ 'page-item': true, 'active': page.active }" v-for="page in pages">
<router-link :to="'/items?page=' + page.number" class="page-link">
{{ page.number }}
</router-link>
</li>
</ul>
</nav>
</td>
</template>
</paged-table>
</div>
`

View File

@ -38,7 +38,17 @@ Vue.component("paged-table", {
</tbody>
<tfoot>
<tr>
<slot v-bind:pages="pages" name="pager"></slot>
<td colspan="4">
<nav>
<ul class="pagination">
<li v-bind:class="{ 'page-item': true, 'active': page.active }" v-for="page in pages">
<router-link :to="(this.$route ? this.$route.path : '') + '?page=' + page.number" class="page-link">
{{ page.number }}
</router-link>
</li>
</ul>
</nav>
</td>
</tr>
</tfoot>
</table>