From eec5ee7dd8aa262cc9d2b146c20eb7170cd39e93 Mon Sep 17 00:00:00 2001 From: yanyilin Date: Mon, 18 Mar 2024 17:49:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dios=E5=B9=B3=E5=8F=B0?= =?UTF-8?q?=E6=8C=81=E7=BB=AD=E4=B8=8B=E6=8B=89=E6=97=B6=E5=AE=BD=E5=BA=A6?= =?UTF-8?q?=E4=B8=8D=E6=AD=A3=E7=A1=AE=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/template/scroll-fold-nav/scroll-fold-nav.uvue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/template/scroll-fold-nav/scroll-fold-nav.uvue b/pages/template/scroll-fold-nav/scroll-fold-nav.uvue index cf0fff7d..ad0c2982 100644 --- a/pages/template/scroll-fold-nav/scroll-fold-nav.uvue +++ b/pages/template/scroll-fold-nav/scroll-fold-nav.uvue @@ -65,10 +65,10 @@ }, methods: { onScroll(e : ScrollEvent) { - let offset = e.detail.scrollTop>SEARCHBARHEIGHT?SEARCHBARHEIGHT:e.detail.scrollTop; + let offset = e.detail.scrollTop>SEARCHBARHEIGHT?SEARCHBARHEIGHT:e.detail.scrollTop;//(e.detail.scrollTop<0?0:e.detail.scrollTop) this.naviElement?.style?.setProperty('height', (this.nviBarHeight -offset)+'px'); - this.searchElement?.style?.setProperty('left', BACKWIDTH*offset/SEARCHBARHEIGHT+'px'); this.titleElement?.style?.setProperty('opacity', (1-offset/SEARCHBARHEIGHT)); + this.searchElement?.style?.setProperty('left', ((offset<0)?0:BACKWIDTH*offset/SEARCHBARHEIGHT)+'px'); }, back() { uni.navigateBack(); -- GitLab