invoiceninja/resources/js/src/components/util/VuetablePaginationBootstrap.vue
David Bomba 43342fb98b
Datatables using Vue (#2568)
* Vue DataTables

* Vue Datatables - Pagination

* Sort Vue Tables

* Working on Vue Datatables

* Apply filter to vue table

* Search implementation for vue datatables

* Clean up
2018-12-24 08:45:55 +08:00

33 lines
934 B
Vue

<template>
<ul class="pagination">
<li :class="{'disabled': isOnFirstPage}">
<a href="" @click.prevent="loadPage('prev')">
<span>&laquo;</span>
</a>
</li>
<template v-if="notEnoughPages">
<li v-for="n in totalPage" :class="{'active': isCurrentPage(n)}">
<a @click.prevent="loadPage(n)" v-html="n"></a>
</li>
</template>
<template v-else>
<li v-for="n in windowSize" :class="{'active': isCurrentPage(windowStart+n-1)}">
<a @click.prevent="loadPage(windowStart+n-1)" v-html="windowStart+n-1"></a>
</li>
</template>
<li :class="{'disabled': isOnLastPage}">
<a href="" @click.prevent="loadPage('next')">
<span>&raquo;</span>
</a>
</li>
</ul>
</template>
<script>
import VuetablePaginationMixin from 'vuetable-2/src/components/VuetablePaginationMixin'
export default {
mixins: [VuetablePaginationMixin]
}
</script>