From ff11f2db857d7734f74be8cfb5667f2279eab845 Mon Sep 17 00:00:00 2001 From: sws <1141121512@qq.com> Date: Thu, 26 Dec 2024 18:05:53 +0800 Subject: [PATCH] =?UTF-8?q?1.diy=E6=BB=9A=E5=8A=A8=E7=9B=91=E5=90=AC?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/diy/diy.vue | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/components/diy/diy.vue b/components/diy/diy.vue index bb292ecd..4017a4c3 100644 --- a/components/diy/diy.vue +++ b/components/diy/diy.vue @@ -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);