This repository has been archived on 2022-11-26. You can view files and clone it, but cannot push or open issues or pull requests.
IcyNet.eu/src/script/component/Pagination.vue

16 lines
543 B
Vue

<template lang="pug">
ul.pagination.mt-4
li.page-item(v-bind:class='{disabled: page == 1}')
a.page-link(href="#" v-on:click='$emit("page", page - 1)') Previous
li.page-item(v-for='n in pages' v-bind:class='{active: n == page}')
a.page-link(href="#" v-on:click='$emit("page", n)') {{ n }}
li.page-item(v-bind:class='{disabled: page == pages}')
a.page-link(v-on:click='$emit("page", page + 1)') Next
</template>
<script type="text/javascript">
export default {
props: ['page', 'pages']
}
</script>