All Projects → thinkjs → think-pagination

thinkjs / think-pagination

Licence: MIT License
Pagination for ThinkJS 3 & 2

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to think-pagination

react-hot-pagination
A React component to render your pagination navigation
Stars: ✭ 28 (+115.38%)
Mutual labels:  pagination
lightning-data-table
Lightning components for building a data-table with search, column sorting, pagination for Salesforce
Stars: ✭ 15 (+15.38%)
Mutual labels:  pagination
Pageable
An easy way to Pagination or Infinite scrolling for TableView/CollectionView
Stars: ✭ 44 (+238.46%)
Mutual labels:  pagination
Blazor.Pagination
A reusable pagination component for Blazor.
Stars: ✭ 27 (+107.69%)
Mutual labels:  pagination
django-simple-pagination
django pagination as you want it to be
Stars: ✭ 41 (+215.38%)
Mutual labels:  pagination
easy-css-layout
Easy css layout
Stars: ✭ 117 (+800%)
Mutual labels:  pagination
cakephp-api-pagination
📑 CakePHP 4 plugin that injects pagination information into API responses.
Stars: ✭ 39 (+200%)
Mutual labels:  pagination
pagi
A better WordPress pagination.
Stars: ✭ 30 (+130.77%)
Mutual labels:  pagination
f3-pagination
A pagebrowser and some pagination utilities for the PHP Fat-Free Framework
Stars: ✭ 15 (+15.38%)
Mutual labels:  pagination
flop
Filtering, ordering and pagination for Ecto
Stars: ✭ 56 (+330.77%)
Mutual labels:  pagination
Pagination-Utils
A collection of methods to make message pagination with JDA easier.
Stars: ✭ 20 (+53.85%)
Mutual labels:  pagination
spring-thymeleaf-pagination
Spring Boot application which demonstrates implementation of pagination in Java web application with Thymeleaf template engine
Stars: ✭ 73 (+461.54%)
Mutual labels:  pagination
docsify-pagination
↔️ Pagination for docsify
Stars: ✭ 80 (+515.38%)
Mutual labels:  pagination
v-page
A simple pagination bar, including length Menu, i18n support, based on Vue2.x
Stars: ✭ 85 (+553.85%)
Mutual labels:  pagination
think-model
Default model for ThinkJS 3.x
Stars: ✭ 16 (+23.08%)
Mutual labels:  thinkjs
dynamodb-paginator
Paginate DynamoDB results easily
Stars: ✭ 18 (+38.46%)
Mutual labels:  pagination
TableBundle
Symfony Bundle for easy pagination and filtering
Stars: ✭ 24 (+84.62%)
Mutual labels:  pagination
pagination
No description or website provided.
Stars: ✭ 14 (+7.69%)
Mutual labels:  pagination
loopback-paginator
No description or website provided.
Stars: ✭ 13 (+0%)
Mutual labels:  pagination
Exopite-Multifilter-Multi-Sorter-WordPress-Plugin
Display and/or sort/filter any page or post types by multiple taxonomies or terms (like post by categories and/or tags) with AJAX. Exopite multifilter, multi-sortable, multi selectable, multi filterable sortable Wordpress Plugin.
Stars: ✭ 18 (+38.46%)
Mutual labels:  pagination

think-pagination

pagination for ThinkJS 3, if you want to use in ThinkJS 2.x, please view README_v2

install

npm install think-pagination

how to use

controller

const pagination = require('think-pagination');

module.exports = class extends think.Controller {
  async indexAction() {
    const data = await this.model('user').page(this.get('page')).countSelect();
    const html = pagination(data, this.ctx, {});
    this.assign('pagination', html);
  }
}

view

ejs

{%-pagination%}

nunjucks

{{pagination | safe}}

API

pagination(pagerData, ctx, options)

  • pagerData get from by model.countSelect
  • ctx ctx object
  • options options

options:

{
  desc: false, //show description
  pageNum: 2, 
  url: '', //page url, when not set, it will auto generated
  class: '', //pagenation extra class
  text: {
    next: 'Next',
    prev: 'Prev',
    total: 'count: __COUNT__ , pages: __PAGE__'
  }
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].