2020-11-24 15:15:51 +05:30
|
|
|
<script>
|
|
|
|
import { mapActions, mapState } from 'vuex';
|
|
|
|
import { historyPushState, buildUrlWithCurrentLocation } from '~/lib/utils/common_utils';
|
2021-03-11 19:13:27 +05:30
|
|
|
import TablePagination from '~/vue_shared/components/pagination/table_pagination.vue';
|
2020-11-24 15:15:51 +05:30
|
|
|
|
|
|
|
export default {
|
|
|
|
name: 'ReleasesPaginationRest',
|
|
|
|
components: { TablePagination },
|
|
|
|
computed: {
|
2021-04-29 21:17:54 +05:30
|
|
|
...mapState('index', ['restPageInfo']),
|
2020-11-24 15:15:51 +05:30
|
|
|
},
|
|
|
|
methods: {
|
2021-04-29 21:17:54 +05:30
|
|
|
...mapActions('index', ['fetchReleases']),
|
2020-11-24 15:15:51 +05:30
|
|
|
onChangePage(page) {
|
|
|
|
historyPushState(buildUrlWithCurrentLocation(`?page=${page}`));
|
2021-01-03 14:25:43 +05:30
|
|
|
this.fetchReleases({ page });
|
2020-11-24 15:15:51 +05:30
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
2021-01-03 14:25:43 +05:30
|
|
|
<table-pagination :change="onChangePage" :page-info="restPageInfo" />
|
2020-11-24 15:15:51 +05:30
|
|
|
</template>
|