Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

vue-paging-plugin

sun_sky23MIT1.0.7

vue-paging-plugin

readme

state-btn

A Vue.js plugin

分页插件 demo

插件安装

npm install vue-paging-plugin --save

插件引入

  • main.js
import PagingPlugin from 'vue-paging-plugin';

Vue.use(PagingPlugin);

使用方法

  • App.vue
<paging-plug :pageView="fPageView" :lastPage="fLastPage" @selectPage="pageSelect"></paging-plug>
export default {
  name: 'App',
  data(){
    return{
      fLastPage:100,
      fPageView:8
    }
  }
}

API

参数 说明 类型
pageView 可视分页间隔 Number
lastPage 最大(最后)页码 Number

参数返回

参数 说明 类型
pid 当前选择页码 Number

参数用法

export default {
  name: 'App',
  methods:{
    pageSelect(pid){
      console.log("pid = " + pid)
    }
  }
}