mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-10 11:26:43 +08:00
课程列表页的控制问题
This commit is contained in:
@@ -462,8 +462,8 @@ export default {
|
||||
this.searchData();
|
||||
},
|
||||
handleScroll() {
|
||||
let innerHeight = document.querySelector("#couser-list-content")
|
||||
.clientHeight;
|
||||
|
||||
let innerHeight = document.querySelector("#couser-list-content").clientHeight;
|
||||
let outerHeight = document.documentElement.clientHeight;
|
||||
let scrollTop = document.documentElement.scrollTop;
|
||||
let outerWidth = document.querySelector(".xcontent2-minor").clientWidth;
|
||||
@@ -472,12 +472,17 @@ export default {
|
||||
this.loadMore();
|
||||
}
|
||||
}
|
||||
if (scrollTop > 830) {
|
||||
document.querySelector("#fixd-box").style.cssText =
|
||||
"position: fixed;top: -914px;width:"+outerWidth+"px";
|
||||
} else {
|
||||
document.querySelector("#fixd-box").style.cssText = "position: static";
|
||||
}
|
||||
//console.log(this.course.pageIndex,'this.course.pageIndex');
|
||||
//加此判断,是为了没有数据时的闪动问题
|
||||
//if(this.course.pageIndex >1){
|
||||
if (scrollTop > 830) {
|
||||
document.querySelector("#fixd-box").style.cssText =
|
||||
"position: fixed;top: -914px;width:"+outerWidth+"px";
|
||||
} else {
|
||||
document.querySelector("#fixd-box").style.cssText = "position: static";
|
||||
}
|
||||
//}
|
||||
|
||||
},
|
||||
toNeedCourse() {
|
||||
// 需要先切换标签
|
||||
|
||||
Reference in New Issue
Block a user