VuetablePaginationMixin
This mixin provides sliding style pagination functionality where the current page (when not at the first or last position) is always in the middle of pagination list.
Properties
css
type:
Objectdefault:
{ wrapperClass: 'ui right floated pagination menu', activeClass: 'active large', disabledClass: 'disabled', pageClass: 'item', linkClass: 'icon item', paginationClass: 'ui bottom attached segment grid', paginationInfoClass: 'left floated left aligned six wide column', dropdownClass: 'ui search dropdown', icons: { first: 'angle double left icon', prev: 'left chevron icon', next: 'right chevron icon', last: 'angle double right icon', } }usage:
The
cssproperty holds most of the CSS classes that VuetablePagination uses in its template.
on-each-side
type:
Numberdefault:
2usage:
The value of this property specifies the slide size on each side of the center.
first-page
type:
Numberdefault:
1usage:
First page number. Set this prop to 0 for zero based pagination.
Computed
totalPage
return:
Numberusage:
The total number of available pages. This value is taken from the
last_pagefield of pagination information.
lastPage
return:
Numberusage:
The last page number.
isOnFirstPage
return:
Booleanusage:
Returns
trueif the current page number is the first page; otherwise, returnsfalse.
isOnLastPage
return:
Booleanusage:
Returns
trueif the current page number is the last page; otherwise, returnsfalse.
notEnoughPages
return:
Booleanusage:
Determine if the total number of pages is enough to be displayed without sliding.
windowSize
return:
Numberusage:
The size of the sliding window calculating from
on-each-side* 2 + 1.
windowStart
return:
Numberusage:
Return the first page number to be shown on the leftmost.
Data
tablePagination
type:
Objectdefault:
nullThe pagination information received from Vuetable.
Methods
isCurrentPage
params:
- page:
Number
- page:
usage:
Determine if the given page number is the current page.
setPaginationData
params:
- tablePagination:
Object-- pagination information
- tablePagination:
usage:
Setting the
tablePaginationdata to be used when rendering pagination component.
resetData
params: none
usage:
This method will set
tablePaginationto null.
Events
vuetable-pagination:change-page
type:emit
payload:
- page:
Number | String
- page:
usage::
This event was fired when the user clicks on any pagination item requesting data for that given page number.