2018-09-10 15:36:09 -04:00
|
|
|
<script>
|
2018-11-16 14:29:11 -05:00
|
|
|
import { GlPagination } from '@gitlab/ui';
|
2019-06-14 09:59:00 -04:00
|
|
|
import {
|
|
|
|
PREV,
|
|
|
|
NEXT,
|
|
|
|
LABEL_FIRST_PAGE,
|
|
|
|
LABEL_PREV_PAGE,
|
|
|
|
LABEL_NEXT_PAGE,
|
|
|
|
LABEL_LAST_PAGE,
|
|
|
|
} from '~/vue_shared/components/pagination/constants';
|
2018-09-10 15:36:09 -04:00
|
|
|
|
|
|
|
export default {
|
2018-10-30 17:30:31 -04:00
|
|
|
components: {
|
|
|
|
GlPagination,
|
|
|
|
},
|
2018-09-10 15:36:09 -04:00
|
|
|
props: {
|
|
|
|
change: {
|
|
|
|
type: Function,
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
pageInfo: {
|
|
|
|
type: Object,
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
},
|
2019-06-14 09:59:00 -04:00
|
|
|
prevText: PREV,
|
|
|
|
nextText: NEXT,
|
|
|
|
labelFirstPage: LABEL_FIRST_PAGE,
|
|
|
|
labelPrevPage: LABEL_PREV_PAGE,
|
|
|
|
labelNextPage: LABEL_NEXT_PAGE,
|
|
|
|
labelLastPage: LABEL_LAST_PAGE,
|
2018-09-10 15:36:09 -04:00
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
|
|
|
<gl-pagination
|
|
|
|
v-bind="$attrs"
|
2019-06-14 09:59:00 -04:00
|
|
|
:value="pageInfo.page"
|
2018-09-10 15:36:09 -04:00
|
|
|
:per-page="pageInfo.perPage"
|
|
|
|
:total-items="pageInfo.total"
|
|
|
|
:prev-text="$options.prevText"
|
|
|
|
:next-text="$options.nextText"
|
2019-06-14 09:59:00 -04:00
|
|
|
:label-first-page="$options.labelFirstPage"
|
|
|
|
:label-prev-page="$options.labelPrevPage"
|
|
|
|
:label-next-page="$options.labelNextPage"
|
|
|
|
:label-last-page="$options.labelLastPage"
|
|
|
|
@input="change"
|
2018-09-10 15:36:09 -04:00
|
|
|
/>
|
|
|
|
</template>
|