Skip to content

Pagination

If you have too much data to display in one page, use pagination.

Basic usage

Basic usage of pagination, total attribute is required.

  • 1
  • 2
  • 3
  • 4
  • 5
  • 1
  • 2
  • 3
  • 4
  • 5

Ellipsis pager

When the page number is larger, the pagination style with more page numbers will be used.

  • 1
  • 2
  • 3
  • 4
  • 5
  • 20

PageSize options

By setting show-page-size, the number of items per page selector is displayed.

  • 1
  • 2
  • 3
  • 4
  • 5
  • 20
10 /page

Page jumper

By setting show-jumper, the page number jump input box is displayed.

  • 1
  • 2
  • 3
  • 4
  • 5
Go to

Total

Display the total number of data by setting the show-total property.

Total 200
  • 1
  • 2
  • 3
  • 4
  • 5
  • 20

Show all

Show all configuration.

Total 50
  • 1
  • 2
  • 3
  • 4
  • 5
10 /page
Go to

Button

Open the button mode by setting the button property.

  • 1
  • 2
  • 3
  • 4
  • 5
10 /page
Go to

Simple

Open the simple mode by setting the simple property.

/20

Custom page item

The content of the paging button can be customized through the slot

  • 1
  • 2
  • 3
  • 4
  • 5
  • ~
  • 20

Pagination size

The pagination is divided into four sizes: mini, small, medium, and large.

Total 50
  • 1
  • 2
  • 3
  • 4
  • 5
10 /page
Go to
Total 50
  • 1
  • 2
  • 3
  • 4
  • 5
10 /page
Go to

Pagination API

Pagination Attributes

NameDescriptionTypeDefault
totalTotal number of dataNumber-
current / v-modelCurrent page numberNumber-
default-currentThe default number of pages (uncontrolled state)Number1
page-size / v-modelNumber of data items displayed per pageNumber-
default-page-sizeThe number of data items displayed per page by default (uncontrolled state)Number10
disabledWhether to disableBooleanfalse
hide-on-single-pageWhether to hide pagination when single pageBooleanfalse
simpleWhether it is simple modeBooleanfalse
buttonWhether it is button styleBooleanfalse
show-totalWhether to display the total number of dataBooleanfalse
show-moreWhether to show more buttonsBooleanfalse
show-jumperWhether to show jumpBooleanfalse
show-page-sizeWhether to display the data number selectorBooleanfalse
page-size-optionsSelection list of data number selectorArray[10, 20, 30, 40, 50]
page-size-propsProps of data number selectorObject-
sizeThe size of the page selectorStringmedium
page-item-styleThe style of the paging buttonObject-
active-page-item-styleThe style of the current paging buttonObject-
base-sizeCalculate and display the number of omitted bases. Display the omitted number as baseSize + 2 * bufferSizeNumber6
buffer-sizeWhen the ellipsis is displayed, the number of page numbers displayed on the left and right of the current page numberNumber2
auto-adjustWhether to adjust the page number when changing the number of dataBooleantrue

Pagination Events

NameDescriptionType
changeTriggered when page number changesFunction
page-size-changeTriggered when the number of data items changesFunction

Pagination Slots

NameDescriptionParams
totalTotaltotal: number
page-item-ellipsisPage item (ellipsis)-
page-item-stepPage item (step)type: String
page-itemPage itempage: number