2023-05-30 13:39:08 +00:00
|
|
|
<script>
|
|
|
|
import BaseComponent from 'primevue/basecomponent';
|
2023-10-02 10:46:09 +00:00
|
|
|
import PaginatorStyle from 'primevue/paginator/style';
|
2023-05-30 13:39:08 +00:00
|
|
|
|
|
|
|
export default {
|
|
|
|
name: 'BasePaginator',
|
|
|
|
extends: BaseComponent,
|
|
|
|
props: {
|
|
|
|
totalRecords: {
|
|
|
|
type: Number,
|
|
|
|
default: 0
|
|
|
|
},
|
|
|
|
rows: {
|
|
|
|
type: Number,
|
|
|
|
default: 0
|
|
|
|
},
|
|
|
|
first: {
|
|
|
|
type: Number,
|
|
|
|
default: 0
|
|
|
|
},
|
|
|
|
pageLinkSize: {
|
|
|
|
type: Number,
|
|
|
|
default: 5
|
|
|
|
},
|
|
|
|
rowsPerPageOptions: {
|
|
|
|
type: Array,
|
|
|
|
default: null
|
|
|
|
},
|
|
|
|
template: {
|
|
|
|
type: [Object, String],
|
|
|
|
default: 'FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink RowsPerPageDropdown'
|
|
|
|
},
|
|
|
|
currentPageReportTemplate: {
|
|
|
|
type: null,
|
|
|
|
default: '({currentPage} of {totalPages})'
|
|
|
|
},
|
|
|
|
alwaysShow: {
|
|
|
|
type: Boolean,
|
|
|
|
default: true
|
|
|
|
}
|
|
|
|
},
|
2023-10-02 10:46:09 +00:00
|
|
|
style: PaginatorStyle,
|
2023-05-30 13:39:08 +00:00
|
|
|
provide() {
|
|
|
|
return {
|
2024-04-25 01:26:06 +00:00
|
|
|
$pcPaginator: this,
|
2023-05-30 13:39:08 +00:00
|
|
|
$parentInstance: this
|
|
|
|
};
|
|
|
|
}
|
|
|
|
};
|
|
|
|
</script>
|