Commit 4aa4bda6 authored by lixy's avatar lixy

去除无用项

parent 6174f46d
...@@ -166,24 +166,18 @@ ...@@ -166,24 +166,18 @@
let top2 = document.querySelector('#history02').offsetTop; let top2 = document.querySelector('#history02').offsetTop;
let top3 = document.querySelector('#history03').offsetTop; let top3 = document.querySelector('#history03').offsetTop;
let top4 = document.querySelector('#history04').offsetTop; let top4 = document.querySelector('#history04').offsetTop;
console.log(top1+"--"+top2+"--"+top3+"--"+top4)
if(scrollTop<201){ if(scrollTop<201){
this.barFixed = false; this.barFixed = false;
this.tabIndex = 0; this.tabIndex = 0;
console.log(scrollTop)
} else if(scrollTop >= 201 && scrollTop < top2-301){ } else if(scrollTop >= 201 && scrollTop < top2-301){
this.tabIndex = 0; this.tabIndex = 0;
console.log(scrollTop)
} else if(scrollTop >= top2-301 && scrollTop < top3-301){ } else if(scrollTop >= top2-301 && scrollTop < top3-301){
this.tabIndex = 1; this.tabIndex = 1;
console.log(scrollTop)
} else if(scrollTop >= top3-301 && scrollTop < top4-301){ } else if(scrollTop >= top3-301 && scrollTop < top4-301){
this.tabIndex = 2; this.tabIndex = 2;
console.log(scrollTop)
} else if(scrollTop >= top4-301){ } else if(scrollTop >= top4-301){
this.tabIndex = 3; this.tabIndex = 3;
console.log(scrollTop)
} }
}, },
/** /**
...@@ -192,7 +186,6 @@ ...@@ -192,7 +186,6 @@
changeArea(id){ changeArea(id){
this.barFixed = true; this.barFixed = true;
let top = document.querySelector('#'+id).offsetTop; let top = document.querySelector('#'+id).offsetTop;
console.log(top);
if(id == "history01"){ if(id == "history01"){
this.tabIndex = 0; this.tabIndex = 0;
document.documentElement.scrollTop = top - 260; document.documentElement.scrollTop = top - 260;
......
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