From 64293b25dbbb902d071b74cf9dbea8c936f2338e Mon Sep 17 00:00:00 2001 From: linju Date: Wed, 26 Jul 2023 16:58:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=20=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=E7=A4=BA=E4=BE=8Bscroll-fold-nav=E7=9A=84=E6=80=A7=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 把头部区域封装成一个组件,在滚动时,直接修改该组件的data里边的scrollTop,这样可以将每次滚动触发的变化范围限定到该组件内 --- .../scroll-fold-header.uvue | 82 +++++++++ .../scroll-fold-nav/scroll-fold-nav.uvue | 127 ++++---------- .../scroll-fold-nav2/scroll-fold-nav2.uvue | 156 +++++++++--------- 3 files changed, 192 insertions(+), 173 deletions(-) create mode 100644 pages/template/scroll-fold-nav/scroll-fold-header/scroll-fold-header.uvue diff --git a/pages/template/scroll-fold-nav/scroll-fold-header/scroll-fold-header.uvue b/pages/template/scroll-fold-nav/scroll-fold-header/scroll-fold-header.uvue new file mode 100644 index 00000000..561cacaf --- /dev/null +++ b/pages/template/scroll-fold-nav/scroll-fold-header/scroll-fold-header.uvue @@ -0,0 +1,82 @@ + + + + + diff --git a/pages/template/scroll-fold-nav/scroll-fold-nav.uvue b/pages/template/scroll-fold-nav/scroll-fold-nav.uvue index 5a5f2781..c9fb6f83 100644 --- a/pages/template/scroll-fold-nav/scroll-fold-nav.uvue +++ b/pages/template/scroll-fold-nav/scroll-fold-nav.uvue @@ -10,120 +10,55 @@ - - - - DCloud 为开发者而生 - - - - - - - - 请输入你要搜索的内容 - - 搜索 - - - + - \ No newline at end of file diff --git a/pages/template/scroll-fold-nav2/scroll-fold-nav2.uvue b/pages/template/scroll-fold-nav2/scroll-fold-nav2.uvue index da49d4ad..bfe270e0 100644 --- a/pages/template/scroll-fold-nav2/scroll-fold-nav2.uvue +++ b/pages/template/scroll-fold-nav2/scroll-fold-nav2.uvue @@ -11,106 +11,106 @@ - - - DCloud 为开发者而生 - - - - - - - - 请输入你要搜索的内容 - - 搜索 + + + DCloud 为开发者而生 + + + + + + + + 请输入你要搜索的内容 + + 搜索 - \ No newline at end of file -- GitLab