Pagination

Pagination

Sample Code

copy
	{
	  "defaultTitle": "Mini Program AntUI component library",
	  "usingComponents": {
	    "pagination": "mini-antui/es/pagination/index"
	  }
	}
copy
	<view>
	  <view class="demo-title">Basic usage</view>
	  <pagination total="{{20}}" current="{{1}}"/>
	  <view class="demo-title">Arrow button</view>
	  <pagination mode="icon" total="{{20}}" current="{{10}}"/>
	  <view class="demo-title">Simple mode</view>
	  <pagination simple total="{{20}}" current="{{1}}"/>
	  <view class="demo-title">Button disabled</view>
	  <pagination total="{{20}}" current="{{1}}" disabled/>
	  <view class="demo-title">Custom button text</view>
	  <pagination arrow prevText="Previous" nextText="Next" total="{{20}}" current="{{1}}"/>
	</view>
copy
	Page({})

Attributes

Property

DescriptionTypeDefault
modeButton form options: text, icon.Stringtext
totalTotal number of pages.Number0
currentCurrent page number.Number0
simpleHide value or not.Booleanfalse
disabled Disabled status.Booleanfalse
prevTextText for page-up button.StringPrevious page
nextTextText for page-down button.StringNext page
btnClassPagination button style, for text type buttons only.String-
onChangePagination callback function.(index: Number) => void-

Note:

prevText and nextText take effect only when mode is text.