npm

Check out our latest tech talk, "JavaScript Supply Chain Security" presented by VP of Security, Adam Baldwin.Watch it here »

v-pc-pagination

1.0.3 • Public • Published

vue-pagination

GitHub Github file size npm node.js

基于 Vue 的PC端分页组件

How to use

npm i -S v-pc-pagination

Global regisiter

import Vue from 'vue'
import VuePagination from 'v-pc-pagination'
Vue.use(VuePagination)

OR in component

import VuePagination from 'v-pc-pagination'
 
// in vue component
 
export default {
  components: { VuePagination },
  methods: {
      pageChange (page) {
        console.log(page);
      }
  }
}
<vue-pagination :total="total" @change="pageChange"></vue-pagination>

Props

name type desc default
total Number Total page number required
current Number Current page number 1
show Number Display Page number: odd number and >= 5 5

Event

name params desc
@change index The page index which user clicked

install

npm i v-pc-pagination

Downloadsweekly downloads

13

version

1.0.3

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability