diff --git a/pages/component/scroll-view/scroll-view-refresher.uvue b/pages/component/scroll-view/scroll-view-refresher.uvue index ddd5611a5ece7e0105436ff84104f960410e7b4d..f3c5398dc6e13f7777a1becfbd681a4c2accef8f 100644 --- a/pages/component/scroll-view/scroll-view-refresher.uvue +++ b/pages/component/scroll-view/scroll-view-refresher.uvue @@ -43,7 +43,7 @@ }, methods: { - onRefresherrefresh(e : UniRefresherEvent)) { + onRefresherrefresh(e : UniRefresherEvent) { this.refresherrefresh = true console.log("onRefresherrefresh------下拉刷新触发") this.checkEventTest({ @@ -58,7 +58,7 @@ this.refresherTriggered = false }, 1500) }, - onRefresherabort(e : UniRefresherEvent)) { + onRefresherabort(e : UniRefresherEvent) { console.log("onRefresherabort------下拉刷新被中止") this.checkEventTest({ type:e.type, @@ -67,7 +67,7 @@ dy:e.detail.dy, } as RefresherEventTest,'refresherabort') }, - onRefresherrestore(e : UniRefresherEvent)) { + onRefresherrestore(e : UniRefresherEvent) { this.refresherrefresh = false console.log("onRefresherrestore------下拉刷新被复位") this.checkEventTest({ @@ -77,7 +77,7 @@ dy:e.detail.dy, } as RefresherEventTest,'refresherrestore') }, - onRefresherpulling(e : UniRefresherEvent)) { + onRefresherpulling(e : UniRefresherEvent) { console.log("onRefresherpulling------拉刷新控件被下拉-dy=" + e.detail.dy) this.checkEventTest({ type:e.type, diff --git a/pages/component/scroll-view/scroll-view.test.js b/pages/component/scroll-view/scroll-view.test.js index 996f85f2b0e8b7f1bcace50dfd1ae583670acf18..f2b82ea885cce69b1e4a046a1389a1cdba7e3a36 100644 --- a/pages/component/scroll-view/scroll-view.test.js +++ b/pages/component/scroll-view/scroll-view.test.js @@ -1,13 +1,5 @@ jest.setTimeout(30000); describe('component-native-scroll-view', () => { - const platformInfo = process.env.uniTestPlatformInfo.toLocaleLowerCase() - const isIos = platformInfo.startsWith('ios') - if (isIos) { - it('dummyTest', () => { - expect(1).toBe(1) - }) - return - } let page; beforeAll(async () => { page = await program.reLaunch('/pages/component/scroll-view/scroll-view'); @@ -40,7 +32,7 @@ describe('component-native-scroll-view', () => { expect(topScrollDetail.scrollHeight).toBeGreaterThan(0) expect(topScrollDetail.scrollWidth).toBeGreaterThan(0) expect(topScrollDetail.deltaX).toBe(0) - expect(topScrollDetail.deltaY).toBe(-100) + expect(topScrollDetail.deltaY).not.toBe(0) } expect(await page.data('isScrollTest')).toBe('scroll:Success') }) diff --git a/pages/component/scroll-view/scroll-view.uvue b/pages/component/scroll-view/scroll-view.uvue index 77df240f2c5f469c16647e3c5d60a8e2e2933378..66810f2195a942e9db1d9a84fa36434ed0c41c57 100644 --- a/pages/component/scroll-view/scroll-view.uvue +++ b/pages/component/scroll-view/scroll-view.uvue @@ -11,7 +11,7 @@ + @scrolltoupper="upper" @scrolltolower="lower" @scroll="scroll" @scrollend="end" :show-scrollbar="showScrollbar"> A B C