npm.io
1.0.10 • Published 6 years ago

vue-mg-paginate

Licence
MIT
Version
1.0.10
Deps
1
Size
16 kB
Vulns
0
Weekly
0

vue-mg-paginate

vue-mg-paginate

npm npm

Installation

npm i vue-mg-paginate

Usage

app.js

import MgPaginate from 'vue-mg-paginate'
Vue.component('MgPaginate', MgPaginate)

Example:

<template>
  <section class="container">
    <mg-paginate :data="data" :count-per-page="countPerPage" @change="paginate_data=$event"></mg-paginate>
  </section>
</template>

<style lang="scss" scoped>
</style>

<script>
export default {
  data() {
    return {
      data: [],
      paginate_data: [],
      countPerPage: 10,
    }
  },
  mounted: function () {
    for(let i = 0; i < 101; i++) {
      this.data.push({
        id: i+1,
      })
    }
  },
  methods: {
    ///
  },
  components: {
    //
  },  
}
</script>

License

MIT