Pagination
# FxPagination
When displaying large datasets, use pagination to divide data into separate pages.
# Attributes
| Parameter | Description | Type | Options | Default |
|---|---|---|---|---|
| small | whether to use small pagination style | boolean | — | false |
| background | whether buttons have background color | boolean | — | false |
| page-size | number of items per page (supports .sync modifier) | number | — | 10 |
| total | total item count | number | — | — |
| page-count | total page count. Either total or page-count can display page numbers; use total property to support page-sizes changes | Number | — | — |
| pager-count | number of pagination buttons, will collapse when page count exceeds this value | number | odd number between 5 and 21 | 7 |
| current-page | current page number (supports .sync modifier) | number | — | 1 |
| layout | component layout, subcomponents separated by commas | String | sizes, prev, pager, next, jumper, ->, total, slot | 'prev, pager, next, jumper, ->, total' |
| page-sizes | options for items per page selector | number[] | — | [10, 20, 30, 40, 50, 100] |
| popper-class | custom class name for page size selector dropdown | string | — | — |
| prev-text | previous page text (replaces icon) | string | — | — |
| next-text | next page text (replaces icon) | string | — | — |
| disabled | whether pagination is disabled | boolean | — | false |
| hide-on-single-page | whether to hide when only one page exists | boolean | — | - |
# Events
| Event Name | Description | Parameters |
|---|---|---|
| size-change | triggers when page-size changes | new page size |
| current-change | triggers when current-page changes | new current page |
| prev-click | triggers when previous page button is clicked | new current page |
| next-click | triggers when next page button is clicked | new current page |
# Slot
| name | Description |
|---|---|
| — | custom content (requires 'slot' in layout) |
# Basic Usage
Few pages
More than 7 pages
Copy
# Maximum Page Buttons
Copy
# Background Color
Copy
# Small Pagination
Use compact pagination in space-limited scenarios.
Copy
# Additional Features
Add functional modules as needed.
Show total
Adjust page size
Jump to
Full features
Copy
# Hide When Single Page
Hide pagination when only one page exists via hide-on-single-page.
Copy