fix paging links
This commit is contained in:
parent
71a29d7048
commit
81aba3cf97
@ -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]);
|
||||
|
@ -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>
|
||||
`
|
||||
|
@ -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>
|
||||
|
Loading…
x
Reference in New Issue
Block a user