1.1.4 • Published 7 years ago

vue-paginators v1.1.4

Weekly downloads
-
License
MIT
Repository
github
Last release
7 years ago

vue-paginators

a pagination component for vue.js

Installation

Using npm

npm install vue-paginators --save 
# or
cnpm install vue-paginators --save

Usage

// In main.js
import Vue from 'vue'
import vuePaginators from "vue-paginators"
Vue.use(vuePaginators)
<pagination :totalPages="total" @jump="jumpTo"></pagination>
export default {
  data(){
    return {
      total: 14  // get this from ajax data
    }
  },
  methods: {
    jumpTo(curr){
      // do something when you click the pagination bar ...
    }
  }
}

Properties

属性类型可选值是否必需
showItemNumber5 (默认)
totalPagesNumber无 (默认)
firstString首页 (默认)
prevString上一页 (默认)
nextString下一页 (默认)
lastString末页 (默认)
pageStyleStringdefault (默认) boot (bootstrap风格)
skinString(任意css颜色值)#0E90D2 (默认)

Events

@jump

点击分页时触发句柄

<pagination :totalPages="total" :showItem="5" @jump="jumpTo"></pagination>
export default {
  data(){
    return {
      total: 14
    }
  },
  methods : {
    jumpTo(curr){
      // do something when you click the pagination bar ...
    }
  }
}

Logs

2018/9/2 1. 新增 pageStyle 属性, 可选为 boot 即bootstrap风格分页条 2. 新增 skin 属性,可自行设置分页条的颜色。默认为 #0E90D2

1.1.4

7 years ago

1.1.3

7 years ago

1.1.2

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago