vue 页面分页
<!--:auto-scroll 刷新后是否返回页面顶部--> <!--:page-sizes 可选择分页页数--> <!--:total 数据的总条数--> <!--:page.sync 传入页面的页数--> <!--:limit.sync 每页展示的条数--> <!--@pagination 调用底部的方法--> <pagination :total="sum" :page.sync="form.curPage" :limit.sync="form.limit" :page-sizes="[10, 20, 30, 50]" :auto-scroll="true" @pagination="withdrawList" />
export default {
name: 'ExportExcel',
components: { Pagination },
data() {
return {
list: [],
sum: 0,
form: {
curPage: 1, // 页数
limit: 20, // 每页多少条
},
select: null
}
},
methods: {
withdrawList(count = 0) {
//const form = this.form
withdrawList(this.form).then(res => {
this.list = res.data.list
this.sum = res.data.sum
})
},
}
积少成多,
积沙成塔.