wtbf-vue-page

0.0.1 • Public • Published

wtbf-vue-page

This is yet another vue page component.

Install

Use npm to download code:

npm install wtbf-vue-page -S

then import it into your project, add below code into your main.js:

import Page from 'wtbf-vue-page'

Vue.use(Page)

Usage

<template>
<div class="demo">
  <div>
    <page :pageCount="pageCount"  :currentPage="currentPage" v-on:change="pagingChanged"></page>
  </div>
</div>
</template>


<script>
export default {
  data() {
    return {
      pageCount: 10,
      currentPage: 1
    }
  },
  methods: {
    pagingChanged(page) {
      page = page < 1 ? 1 : page
      this.currentPage = page
      this.reloadList()
    },
    reloadList() {
      console.log("data init")
    }
  },
}
</script>

Readme

Keywords

none

Package Sidebar

Install

npm i wtbf-vue-page

Weekly Downloads

0

Version

0.0.1

License

none

Last publish

Collaborators

  • wtbf