完成列表界面的滚动加载数据的功能
This commit is contained in:
parent
b0e5a62406
commit
1f4b8d0e5c
@ -106,10 +106,16 @@ export default {
|
||||
this.findEqInfo.totalPage = data.data.totalPage
|
||||
console.log("currPage", this.findEqInfo.currPage)
|
||||
console.log("totalPage", this.findEqInfo.totalPage)
|
||||
if(this.findEqInfo.currPage == this.findEqInfo.totalPage){
|
||||
this.$refs.infiniteLoading.$emit('$InfiniteLoading:complete')
|
||||
}else{
|
||||
this.$refs.infiniteLoading.$emit('$InfiniteLoading:loaded')
|
||||
}
|
||||
} else {
|
||||
this.findEqInfo.list = []
|
||||
this.findEqInfo.currPage = 1
|
||||
this.findEqInfo.totalPage = 1
|
||||
this.$refs.infiniteLoading.$emit('$InfiniteLoading:complete')
|
||||
}
|
||||
this.dataListLoading = false;
|
||||
//this.$refs.InfiniteLoading.$emit("$infiniteLoading:loaded");
|
||||
@ -141,10 +147,7 @@ export default {
|
||||
this.findEqInfo.totalPage = 1
|
||||
$state.complete()// 全部加载完成
|
||||
}
|
||||
//$state.complete() // 全部加载完成
|
||||
})
|
||||
}else{
|
||||
//$state.loaded()//本次加载完成
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user