debian-mirror-gitlab/app/assets/javascripts/vue_shared/components/pagination_links.vue

39 lines
778 B
Vue
Raw Normal View History

2018-12-05 23:21:45 +05:30
<script>
2019-02-15 15:39:39 +05:30
import { GlPagination } from '@gitlab/ui';
2018-12-05 23:21:45 +05:30
import { s__ } from '../../locale';
export default {
2018-12-13 13:39:08 +05:30
components: {
GlPagination,
},
2018-12-05 23:21:45 +05:30
props: {
change: {
type: Function,
required: true,
},
pageInfo: {
type: Object,
required: true,
},
},
firstText: s__('Pagination|« First'),
prevText: s__('Pagination|Prev'),
nextText: s__('Pagination|Next'),
lastText: s__('Pagination|Last »'),
};
</script>
<template>
<gl-pagination
v-bind="$attrs"
:change="change"
:page="pageInfo.page"
:per-page="pageInfo.perPage"
:total-items="pageInfo.total"
:first-text="$options.firstText"
:prev-text="$options.prevText"
:next-text="$options.nextText"
:last-text="$options.lastText"
/>
</template>