分页
This commit is contained in:
@@ -104,7 +104,7 @@
|
||||
contentnomore: '没有更多'
|
||||
},
|
||||
totalCount: 0,
|
||||
pageNum: 0,
|
||||
pageNum: 1,
|
||||
pageSize: 10
|
||||
};
|
||||
},
|
||||
@@ -118,10 +118,9 @@
|
||||
},
|
||||
/** 初始化查询 */
|
||||
async _coolIOQuery () {
|
||||
let res = await coolIOQuery(this.val2)
|
||||
// this.dataList = [...res.data]
|
||||
this.totalCount = res.total
|
||||
if (res.total > 0) {
|
||||
let res = await coolIOQuery(this.val2, this.pageNum + '', this.pageSize + '')
|
||||
this.totalCount = res.size
|
||||
if (res.size > 0) {
|
||||
const dataMap = res.data
|
||||
this.dataList = this.reload ? dataMap : this.dataList.concat(dataMap)
|
||||
this.reload = false
|
||||
|
||||
Reference in New Issue
Block a user