初加载数据时 调用mescroll.scrollTo(1,0) ,具体原因不知道反正每次进页面后如果设置过
mescroll.scrollTo(0,0)时后面怎调用都不会再生效了,代码仅供参考。
tabsClick(index) {
console.log(index);
this.itemIndex = index
if (index) {
if (!this.dataList1.length) {
this.$refs.mescrollLoading.refreshList()
return
}
console.log(this.socrollTop1);
if(this.socrollTop1==0){
this.socrollTop1 = this.socrollTop1+1
}
this.mescroll.endSuccess(true)
this.mescroll.scrollTo(this.socrollTop1, 0)
} else {
if (!this.dataList2.length) {
this.$refs.mescrollLoading.refreshList()
return
}
if(this.socrollTop2==0){
this.socrollTop2 = this.socrollTop2+1
}
this.mescroll.endSuccess(true)
this.mescroll.scrollTo(this.socrollTop2, 0)
}
},