1.0.1 • Published 6 years ago

vue-page-simple v1.0.1

Weekly downloads
3
License
MIT
Repository
-
Last release
6 years ago

vuepage

vue-page-simple 轻型vue分页组件

Build Setup

# download package
npm install vue-page-simple

# global  reference;
/*main.js*/
import vuePage from 'vue-page-simple'
Vue.use(vuePage)						

# example
/*target.vue*/

//<template>
<Page :visiblepage="visiblepage" :page="pageNum" :pagesize="pageSize" @btnclick="btnclick" :datanum="count"></Page>

//<script>
data() {
	return {
		pageNum: 1,      //请求页码,默认第一页
		visiblepage: 4,  //可显示的页数
		count: 0,		//数据总条数
		pageSize: 5,	 //每页条数
	}
}

methods:{
	btnclick(index) {
		this.pageNum = index;
		//xxx为请求数据方法,请求参数中请携带pageNum和pageSize
		this.xxx();
	}
}

For detailed explanation on how things work, consult the [docs for vue-loader](http://vuejs.github.io/vue-loader).
1.0.1

6 years ago

1.0.0

6 years ago