Skip to content

shangxinbo/vue-pagination

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vue-pagination

A pagination components for vue

NOTE: This component is just for vue 2+. Please check your Vue version first.

Demo

This project is a runtime demo. You can get the demo by these command:

git clone https://github.com/shangxinbo/vue-pagination.git yourPath
cd yourPath
npm install 
npm run dev  // serve with hot reload at http://localhost:8080 to see the demo 

If you want to build production with minification. you can do this:

npm run build

Use

It's a single-file component for Vue.You should use it with webpack,babel and vue-loader to run.So I assume that you have node v4+ and npm v3+

npm install --save shangxinbo/vue-pagination

then in your component,you can use it by this:

import pages from 'vue-pagination'
export default {
    
    components:{
        pages
    }
    
}

Docs

Props

  • total

    type: Number

    desc: required is true, the max number of pages

    e.g. : 123

  • current

    type: Number

    desc: required is true, the current page

    e.g.:23

Events

  • jump(num)

    triggler: clicke the page button or prev/next button

    num : return the num going to

Releases

No releases published

Packages

No packages published