wtbf-vue-page
v0.0.1
Published
vue page style component
Downloads
9
Readme
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>