2023-10-02 10:46:09 +00:00
|
|
|
import BaseStyle from 'primevue/base/style';
|
|
|
|
|
|
|
|
const classes = {
|
|
|
|
paginator: ({ instance, key }) => [
|
|
|
|
'p-paginator p-component',
|
|
|
|
{
|
|
|
|
'p-paginator-default': !instance.hasBreakpoints(),
|
|
|
|
[`p-paginator-${key}`]: instance.hasBreakpoints()
|
|
|
|
}
|
|
|
|
],
|
2024-04-26 08:07:08 +00:00
|
|
|
start: 'p-paginator-content-start',
|
|
|
|
end: 'p-paginator-content-end',
|
2023-10-02 10:46:09 +00:00
|
|
|
firstPageButton: ({ instance }) => [
|
2024-04-26 08:07:08 +00:00
|
|
|
'p-paginator-first',
|
2023-10-02 10:46:09 +00:00
|
|
|
{
|
|
|
|
'p-disabled': instance.$attrs.disabled
|
|
|
|
}
|
|
|
|
],
|
2024-04-26 08:07:08 +00:00
|
|
|
firstPageIcon: 'p-paginator-first-icon',
|
2023-10-02 10:46:09 +00:00
|
|
|
previousPageButton: ({ instance }) => [
|
2024-04-26 08:07:08 +00:00
|
|
|
'p-paginator-prev',
|
2023-10-02 10:46:09 +00:00
|
|
|
{
|
|
|
|
'p-disabled': instance.$attrs.disabled
|
|
|
|
}
|
|
|
|
],
|
2024-04-26 08:07:08 +00:00
|
|
|
previousPageIcon: 'p-paginator-prev-icon',
|
2023-10-02 10:46:09 +00:00
|
|
|
nextPageButton: ({ instance }) => [
|
2024-04-26 08:07:08 +00:00
|
|
|
'p-paginator-next',
|
2023-10-02 10:46:09 +00:00
|
|
|
{
|
|
|
|
'p-disabled': instance.$attrs.disabled
|
|
|
|
}
|
|
|
|
],
|
2024-04-26 08:07:08 +00:00
|
|
|
nextPageIcon: 'p-paginator-next-icon',
|
2023-10-02 10:46:09 +00:00
|
|
|
lastPageButton: ({ instance }) => [
|
2024-04-26 08:07:08 +00:00
|
|
|
'p-paginator-last',
|
2023-10-02 10:46:09 +00:00
|
|
|
{
|
|
|
|
'p-disabled': instance.$attrs.disabled
|
|
|
|
}
|
|
|
|
],
|
2024-04-26 08:07:08 +00:00
|
|
|
lastPageIcon: 'p-paginator-last-icon',
|
2023-10-02 10:46:09 +00:00
|
|
|
pages: 'p-paginator-pages',
|
|
|
|
pageButton: ({ props, pageLink }) => [
|
2024-04-26 08:07:08 +00:00
|
|
|
'p-paginator-page',
|
2023-10-02 10:46:09 +00:00
|
|
|
{
|
2024-04-26 08:07:08 +00:00
|
|
|
'p-paginator-page-active': pageLink - 1 === props.page
|
2023-10-02 10:46:09 +00:00
|
|
|
}
|
|
|
|
],
|
|
|
|
current: 'p-paginator-current',
|
2024-04-26 08:07:08 +00:00
|
|
|
rowPerPageDropdown: 'p-paginator-rpp-dropdown',
|
|
|
|
jumpToPageDropdown: 'p-paginator-jtp-dropdown',
|
|
|
|
jumpToPageInput: 'p-paginator-jtp-input'
|
2023-10-02 10:46:09 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
export default BaseStyle.extend({
|
|
|
|
name: 'paginator',
|
|
|
|
classes
|
|
|
|
});
|