1.diy滚动监听优化

master
sws 2024-12-26 18:05:53 +08:00
parent 8420bc65ff
commit ff11f2db85
1 changed files with 8 additions and 4 deletions

View File

@ -568,11 +568,15 @@
//
on_scroll_event(e) {
const scroll_num = e.detail.scrollTop;
if (scroll_num / (this.sticky_top + 33) <= 1) {
//
this.head_scroll_top = scroll_num;
if (scroll_num == 0) {
this.head_scroll_top = 0;
} else {
this.head_scroll_top = this.sticky_top + 100;
if (scroll_num / (this.sticky_top + 33) <= 1) {
//
this.head_scroll_top = scroll_num;
} else {
this.head_scroll_top = this.sticky_top + 100;
}
}
this.scroll_timer_compute(scroll_num);