diff --git a/pages/template/scroll-fold-nav/scroll-fold-nav.uvue b/pages/template/scroll-fold-nav/scroll-fold-nav.uvue index cf0fff7d9da1eec5078d0249f7cc8f34efbc0c81..ad0c298272e0d38162f937d99ee75efff2586458 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();