From 3bb18cf99c3918883a64fbe941d407df7a32ea04 Mon Sep 17 00:00:00 2001 From: Anne_LXM Date: Wed, 12 Jun 2024 21:06:13 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4scroll-view=E4=BA=8B=E4=BB=B6?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/component/scroll-view/scroll-view.uvue | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/pages/component/scroll-view/scroll-view.uvue b/pages/component/scroll-view/scroll-view.uvue index 184be4a0..1dfa5946 100644 --- a/pages/component/scroll-view/scroll-view.uvue +++ b/pages/component/scroll-view/scroll-view.uvue @@ -26,7 +26,7 @@ 横向滚动 - + A B C @@ -77,18 +77,21 @@ } }, methods: { - upper: function (e : ScrollToUpperEvent) { + upper: function (e : UniScrollToUpperEvent) { console.log('滚动到顶部/左边',e) this.toUpperTest = e }, - lower: function (e : ScrollToLowerEvent) { + lower: function (e : UniScrollToLowerEvent) { console.log('滚动到底部/右边',e) this.toLowerTest = e }, - scroll: function (e : ScrollEvent) { + scroll: function (e : UniScrollEvent) { this.scrollTest = e this.oldScrollTop = e.detail.scrollTop }, + end: function (e : UniScrollEvent){ + console.log('滚动结束时触发',e) + }, goTop: function () { // 解决view层不同步的问题 this.scrollTop = this.oldScrollTop -- GitLab