Skip to content

zhangmin521/vue_pagination

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vue_pagination

A Vue.js project 支持上一页、下一页、单击页码(包括首页、尾页)和输入页码查询 Support previous page, next page, click page number (including home page, end page) and input page number query

Demo

Demo page

Installation

npm

$ npm install vue-pagenavs --save

Requirements

import pagination from 'vue-pagenavs'
Vue.use(pagination);

<template>
	<div id="app">
		<pagination :params="params" @changePage="changePage"></pagination>
	</div>
</template>

页码参数:当前页、每页条数和总共条数(用于计算总页数),默认不可更改每页条数,如果传递pageSizes则显示并可以更改 Parameters: current page, number of pages per page and total number of pages (for calculating total number of pages) 配置参数:是否显示每页条数的选择框、自定义选择框数组 Configuration parameters: whether to display the selection box for each page number and the custom selection box array 传递函数 changePage

data () {
    return {
        params:{
            currentPage:1,
            perSize:10,
            totalSize:107,
            pageSizes : [10, 20, 30, 50, 100, 200]
        }
    }
},
methods:{
    changePage(params){
      this.params = params;
    }
}

Build Setup

# install dependencies
npm install

# serve with hot reload at localhost:8080
npm run dev

# build for production with minification
npm run build

兼容性

ie9+

License

The MIT License

For detailed explanation on how things work, consult the docs for vue-loader.

About

vue分页插件

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published