From 4d2c365e1ad592d6c9bc4908db617fbe5bbdb449 Mon Sep 17 00:00:00 2001 From: shutao Date: Wed, 20 Mar 2024 12:32:44 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9Enested-scroll-body=E3=80=81ne?= =?UTF-8?q?sted-scroll-header=E7=BB=84=E4=BB=B6=E7=A4=BA=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages.json | 12 + .../nested-scroll-body.test.js | 16 + .../nested-scroll-body.uvue | 113 +++ .../nested-scroll-header.test.js | 15 + .../nested-scroll-header.uvue | 82 +++ pages/tabBar/component.uvue | 652 +++++++++--------- 6 files changed, 567 insertions(+), 323 deletions(-) create mode 100644 pages/component/nested-scroll-body/nested-scroll-body.test.js create mode 100644 pages/component/nested-scroll-body/nested-scroll-body.uvue create mode 100644 pages/component/nested-scroll-header/nested-scroll-header.test.js create mode 100644 pages/component/nested-scroll-header/nested-scroll-header.uvue diff --git a/pages.json b/pages.json index 6e5fc890..c0b661ea 100644 --- a/pages.json +++ b/pages.json @@ -1206,6 +1206,18 @@ "enablePullDownRefresh": false } }, + { + "path": "pages/component/nested-scroll-header/nested-scroll-header", + "style": { + "navigationBarTitleText": "nested-scroll-header" + } + }, + { + "path": "pages/component/nested-scroll-body/nested-scroll-body", + "style": { + "navigationBarTitleText": "nested-scroll-body" + } + }, // #endif // #ifdef APP || WEB { diff --git a/pages/component/nested-scroll-body/nested-scroll-body.test.js b/pages/component/nested-scroll-body/nested-scroll-body.test.js new file mode 100644 index 00000000..9463eaf8 --- /dev/null +++ b/pages/component/nested-scroll-body/nested-scroll-body.test.js @@ -0,0 +1,16 @@ +describe('component-native-nested-scroll-body', () => { + let page + beforeAll(async () => { + //打开lnested-scroll-body测试页 + page = await program.reLaunch('/pages/component/nested-scroll-body/nested-scroll-body') + await page.waitFor(600) + }) + + //检测横向scroll_into_view属性赋值 + it('check_scroll_into_view_left', async () => { + await page.callMethod('testBodyScrollBy', 400) + await page.waitFor(300) + const image = await program.screenshot(); + expect(image).toMatchImageSnapshot(); + }) +}) diff --git a/pages/component/nested-scroll-body/nested-scroll-body.uvue b/pages/component/nested-scroll-body/nested-scroll-body.uvue new file mode 100644 index 00000000..3e484020 --- /dev/null +++ b/pages/component/nested-scroll-body/nested-scroll-body.uvue @@ -0,0 +1,113 @@ + + + + + diff --git a/pages/component/nested-scroll-header/nested-scroll-header.test.js b/pages/component/nested-scroll-header/nested-scroll-header.test.js new file mode 100644 index 00000000..864d44b8 --- /dev/null +++ b/pages/component/nested-scroll-header/nested-scroll-header.test.js @@ -0,0 +1,15 @@ +describe('component-native-nested-scroll-header', () => { + let page + beforeAll(async () => { + //打开lnested-scroll-header测试页 + page = await program.reLaunch('/pages/component/nested-scroll-header/nested-scroll-header') + await page.waitFor(600) + }) + + + it('check_nested-scroll-header', async () => { + const image = await program.screenshot(); + expect(image).toMatchImageSnapshot(); + }) +}) + diff --git a/pages/component/nested-scroll-header/nested-scroll-header.uvue b/pages/component/nested-scroll-header/nested-scroll-header.uvue new file mode 100644 index 00000000..e0d3b7df --- /dev/null +++ b/pages/component/nested-scroll-header/nested-scroll-header.uvue @@ -0,0 +1,82 @@ + + + + + diff --git a/pages/tabBar/component.uvue b/pages/tabBar/component.uvue index d1f35590..8557ab8c 100644 --- a/pages/tabBar/component.uvue +++ b/pages/tabBar/component.uvue @@ -1,324 +1,330 @@ - - - - - -- GitLab