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