All Projects → matfish2 → Vue Pagination 2

matfish2 / Vue Pagination 2

Licence: mit
Vue.js 2 pagination component

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Vue Pagination 2

React Paginating
Simple, lightweight, flexible pagination ReactJS component ⏮⏪1️⃣2️⃣3️⃣⏩⏭
Stars: ✭ 89 (-38.19%)
Mutual labels:  pagination
Seven
Eleventy template using Bootstrap, Sass, Webpack, Vue.js powered search, includes lots of other features
Stars: ✭ 114 (-20.83%)
Mutual labels:  pagination
List.js
The perfect library for adding search, sort, filters and flexibility to tables, lists and various HTML elements. Built to be invisible and work on existing HTML.
Stars: ✭ 10,650 (+7295.83%)
Mutual labels:  pagination
Api Restful Con Laravel Guia Definitiva
Repositorio para el código base del curso "API RESTful con Laravel - Guía Definitiva"
Stars: ✭ 95 (-34.03%)
Mutual labels:  pagination
Vue Table Dynamic
🎉 A dynamic table with sorting, filtering, editing, pagination, multiple select, etc.
Stars: ✭ 106 (-26.39%)
Mutual labels:  pagination
Hibiscus.js
Native Angular directives for Bootstrap4
Stars: ✭ 115 (-20.14%)
Mutual labels:  pagination
Pagination
Pagination for javascript and nodejs
Stars: ✭ 84 (-41.67%)
Mutual labels:  pagination
Popularmovies
🎥 Movie discovery app showcasing Android best practices with Google's recommended architecture: MVVM + Repository + Offline support + Android Architecture Components + Paging library & Retrofit2.
Stars: ✭ 142 (-1.39%)
Mutual labels:  pagination
Reactables
GigaTables is a ReactJS plug-in to help web-developers process table-data in applications and CMS, CRM, ERP or similar systems.
Stars: ✭ 112 (-22.22%)
Mutual labels:  pagination
Ember Impagination
An Ember Addon that puts the fun back in asynchronous, paginated datasets
Stars: ✭ 123 (-14.58%)
Mutual labels:  pagination
Bpage
Based on bootstrap style, static page jump can also be asynchronous page processing pagination plugin
Stars: ✭ 96 (-33.33%)
Mutual labels:  pagination
Infinite scroll pagination
Flutter package to help you lazily load and display pages of items as the user scrolls down your screen.
Stars: ✭ 102 (-29.17%)
Mutual labels:  pagination
Jsonapi.rb
Lightweight, simple and maintained JSON:API support for your next Ruby HTTP API.
Stars: ✭ 116 (-19.44%)
Mutual labels:  pagination
Zebra pagination
A generic, Twitter Bootstrap compatible, pagination library for automatically generating navigation links
Stars: ✭ 92 (-36.11%)
Mutual labels:  pagination
Bootstrap Table
An extended table to integration with some of the most widely used CSS frameworks. (Supports Bootstrap, Semantic UI, Bulma, Material Design, Foundation, Vue.js)
Stars: ✭ 11,068 (+7586.11%)
Mutual labels:  pagination
Pager Api
Easy API pagination for Rails
Stars: ✭ 86 (-40.28%)
Mutual labels:  pagination
Csdwheels
一套基于原生JavaScript开发的插件,无依赖、体积小
Stars: ✭ 114 (-20.83%)
Mutual labels:  pagination
Rummage phoenix
Full Phoenix Support for Rummage. It can be used for searching, sorting and paginating collections in phoenix.
Stars: ✭ 144 (+0%)
Mutual labels:  pagination
Gorm Paginator
gorm pagination extension
Stars: ✭ 136 (-5.56%)
Mutual labels:  pagination
Blazorcrud
Demo application built with the Blazor client-side hosting model (WebAssembly) and .NET Core REST APIs secured by a JWT service.
Stars: ✭ 121 (-15.97%)
Mutual labels:  pagination

Vue Pagination 2

Using Vue 3? Check out the new component


Click here to see it in action.

Simple, generic and non-intrusive pagination component for Vue.js version 2.

Dependencies

  • Vue.js (>=2.0.0 && <3.0.0). Required.
  • CSS: Bootstrap 3 or Bootstrap 4 or Bulma.

Installation

NPM

npm install vue-pagination-2

import the script:

import Pagination from 'vue-pagination-2';

Script tag

Grab the minified version under dist/vue-pagination-2.min.js. It will export a global Pagination variable.

Usage

Register the component globally or locally:

Vue.component('pagination', Pagination);

OR

...
components: {
  Pagination
}
...

HTML/JS:

{
    data() {
       return {
           page: 1
       }    
    }
}
<pagination v-model="page" :records="500" @paginate="myCallback"/>

props:

  • records number required number of records

  • per-page number optional records per page. Default: 25

  • v-model number required Reference to the current page. Can be updated via the UI or programmatically

  • options object optional:

    • chunk number max pages per chunk. Default: 10
    • chunksNavigation string Which method to use when navigating outside chunks boundries. Default: fixed. Options are:
      • scroll - the range of pages presented will incrementally change when navigating to a page outside the chunk (e.g 1-10 will become 2-11 once the user presses the next arrow to move to page 11).
      • fixed - navigation will occur between fixed chunks (e.g 1-10, 11-20, 21-30 etc.). Double arrows will be added to allow navigation to the beginning of the previous or next chunk.
    • theme string CSS theme used for styling. Supported: bootstrap3, bootstrap4,bulma. Default: bootstrap3.
    • format boolean Format numbers using a separating comma. Default: true
    • edgeNavigation Show links to first and last pages. Default: false
    • template Pass your own custom template
    • texts object optional
      • count total records text. It can consist of up to 3 parts, divided by |.

        • First part: used when there are multiple pages
        • Second part: used when there is only one page
        • Third part: used when there is only one record.

        Default: Showing {from} to {to} of {count} records|{count} records|One record

      • first First page text. Default: First

      • last last page text. Default: Last

    Note: if you want to display the page number rather than the records range, use {page} and {pages} as a placeholders. E.g: Showing page {page} out of {pages}

Custom Event

The model you bound to the component will be automatically updated. In addition, when a page is selected a custom paginate event will be dispatched. Listen to it on the component and run your callback

Programmatic Manipulation

The simplest way to programmatically manipulate the page is to directly update your bound model.

In addition to that you can call the following methods using a ref on you component:

  • setPage(page)
  • next()
  • prev()
  • nextChunk()
  • prevChunk()

All methods return true if the page is legal and was thus set, or false otherwise.

Computed Properties

  • totalPages
  • totalChunks
  • currentChunk

Custom Template

You can easily build your own template by copying src/Pagination.vue to your project as a starting point and modifying the contents to your needs. Then notify the component of your custom template by passing it to the template option.

import MyPagination from './MyPagination'
...
{
    options: {
        template: MyPagination    
    }   
}
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].