Commit 21507aae authored by youjie's avatar youjie

no message

parent aff6b2f8
......@@ -659,20 +659,18 @@ export default {
this.titlesList.forEach((x,index)=>{
let pev
let nex
let fir
let las
if(index>0) pev = this.titlesList[index-1]
if(index<this.titlesList.length-1) nex = this.titlesList[index+1]
if(index==this.titlesList.length-1) las = this.titlesList[index]
if(index==0) fir = this.titlesList[index]
if(pev!=undefined&&this.old.scrollTop>pev.top&&nex!=undefined&&this.old.scrollTop<nex.top){
this.current = x.ID
}
if(fir!=undefined&&this.old.scrollTop<fir.top){
this.current = x.ID
}
if(las!=undefined&&this.old.scrollTop>las.top){
this.current = x.ID
// if(index!=0&&index<this.titlesList.length-1) pev = this.titlesList[index-1]
// if(index>0&&index<this.titlesList.length-1) nex = this.titlesList[index]
pev = this.titlesList[index-1]
nex = this.titlesList[index+1]
if(this.old.scrollTop>x.top&&nex!=undefined&&this.old.scrollTop<nex.top){
this.current = nex.ID
}else if(this.old.scrollTop>x.top&&nex==undefined){
this.current = 4
} else if(this.old.scrollTop<x.top&&pev!=undefined&&this.old.scrollTop>pev.top){
this.current = pev.ID
}else if(this.old.scrollTop<x.top&&pev==undefined){
this.current = 1
}
})
this.$forceUpdate();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment