Vue Request Usepagination

Posted on  by admin
Pagination extension. See also:Pagination.

The following API is a superset of Public API.

If there are no special instructions, it is consistent with Public API. Current page number.

We listened to this value internally. When you modify the current directly, we will trigger the changeCurrent method. So you can use it with v-model. The number of items per page. We have monitored this value internally, and when you directly modify the pageSize, we will trigger the changePageSize method automatically.

So you can use it with v-model. The total number of data. The total number of pages, you must provide the correct total and pageSize, otherwise, you may get incorrect values. Type:(current: number) => void.

Modify the current page number.

Type:(pageSize: number) => void.

Modify the number of entries per page.

Type:(current: number, pageSize: number) => void.

Modify pageSize and current.
Type:() => void.

Clear all request status and request results (including data), and use defaultParams to trigger run(). In paging mode, Concurrent Request is not supported.

Both totalKey and totalPageKey are implemented using lodash.get, so the path of the object property is supported to get the value.

See also lodash documentopen in new window.

Some of the coolest features: