html结构
<Page :total="drawLogTotal" :current="drawLogListQuery.page"
show-total show-sizer :page-size="drawLogListQuery.limit" @on-change="drawLogPageChange"
@on-page-size-change="handleSizeChange"></Page>
data定义
drawLogListQuery: {
page: 1,
limit: 10
},
drawLogTotal:0,
methods里面方法
drawLogPageChange(page){
this.drawLogListQuery.page =page
this.drawLogListFn(this.packageMaterialId) //列表
},
handleSizeChange (limit) {
this.drawLogListQuery.limit=limit
this.drawLogListFn(this.packageMaterialId)//列表
},
//列表
drawLogListFn(id){
this.detailLoading = true
this.drawLogdVisible = true
let params={
limit:this.drawLogListQuery.limit,
page:this.drawLogListQuery.page,
packageMaterialId:id
}
packageMaterialTakeRecordPage(params).then(res => {
this.drawLogList = res.data.rows
this.drawLogTotal = res.data.total
})
},