Commit 21507aae authored by youjie's avatar youjie

no message

parent aff6b2f8
...@@ -659,20 +659,18 @@ export default { ...@@ -659,20 +659,18 @@ export default {
this.titlesList.forEach((x,index)=>{ this.titlesList.forEach((x,index)=>{
let pev let pev
let nex let nex
let fir // if(index!=0&&index<this.titlesList.length-1) pev = this.titlesList[index-1]
let las // if(index>0&&index<this.titlesList.length-1) nex = this.titlesList[index]
if(index>0) pev = this.titlesList[index-1] pev = this.titlesList[index-1]
if(index<this.titlesList.length-1) nex = this.titlesList[index+1] nex = this.titlesList[index+1]
if(index==this.titlesList.length-1) las = this.titlesList[index] if(this.old.scrollTop>x.top&&nex!=undefined&&this.old.scrollTop<nex.top){
if(index==0) fir = this.titlesList[index] this.current = nex.ID
if(pev!=undefined&&this.old.scrollTop>pev.top&&nex!=undefined&&this.old.scrollTop<nex.top){ }else if(this.old.scrollTop>x.top&&nex==undefined){
this.current = x.ID this.current = 4
} } else if(this.old.scrollTop<x.top&&pev!=undefined&&this.old.scrollTop>pev.top){
if(fir!=undefined&&this.old.scrollTop<fir.top){ this.current = pev.ID
this.current = x.ID }else if(this.old.scrollTop<x.top&&pev==undefined){
} this.current = 1
if(las!=undefined&&this.old.scrollTop>las.top){
this.current = x.ID
} }
}) })
this.$forceUpdate(); 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