diff --git a/pages.json b/pages.json
index 45f51461cb7b9f4e76b1230eee642924d19e6c81..2525fb7013b718e8273cc49b8dcb7b5079ee8b6a 100644
--- a/pages.json
+++ b/pages.json
@@ -1059,6 +1059,14 @@
{
"navigationBarTitleText" : "打开schema示例"
}
+ },
+ {
+ "path" : "pages/component/sticky-section/sticky-section",
+ "style" :
+ {
+ "navigationBarTitleText" : "sticky-section",
+ "enablePullDownRefresh" : false
+ }
}
],
diff --git a/pages/component/sticky-header/sticky-header.test.js b/pages/component/sticky-header/sticky-header.test.js
index 3e1cbac97dafd98111da39ebbddaf7c64140f314..2bd2af471d45e6dc366924a10f4bf4c1a0620104 100644
--- a/pages/component/sticky-header/sticky-header.test.js
+++ b/pages/component/sticky-header/sticky-header.test.js
@@ -2,13 +2,12 @@ describe('component-native-sticky-header', () => {
let page
beforeAll(async () => {
page = await program.reLaunch('/pages/component/sticky-header/sticky-header')
- await page.waitFor(200)
+ await page.waitFor('sticky-header')
})
//检测吸顶效果
it('check_sticky_header', async () => {
await page.callMethod('confirm_scroll_top_input', 600)
- await page.waitFor(400)
const image = await program.screenshot();
expect(image).toMatchImageSnapshot();
})
diff --git a/pages/component/sticky-section/sticky-section.test.js b/pages/component/sticky-section/sticky-section.test.js
new file mode 100644
index 0000000000000000000000000000000000000000..692525de2ef4f3f2d405cca74da10fd18dfa21b8
--- /dev/null
+++ b/pages/component/sticky-section/sticky-section.test.js
@@ -0,0 +1,14 @@
+describe('component-native-sticky-section', () => {
+ let page
+ beforeAll(async () => {
+ page = await program.reLaunch('/pages/component/sticky-section/sticky-section')
+ await page.waitFor('sticky-section')
+ })
+
+ //检测吸顶上推效果
+ it('check_sticky_section', async () => {
+ await page.callMethod('listViewScrollByY', 1000)
+ const image = await program.screenshot();
+ expect(image).toMatchImageSnapshot();
+ })
+})
diff --git a/pages/component/sticky-section/sticky-section.uvue b/pages/component/sticky-section/sticky-section.uvue
new file mode 100644
index 0000000000000000000000000000000000000000..6495a6276eeb5324e690ea890817f47e7cbca4f2
--- /dev/null
+++ b/pages/component/sticky-section/sticky-section.uvue
@@ -0,0 +1,48 @@
+
+
+
+
+
+
+
+ {{sectionText}}--item--content----{{i}}
+
+
+
+
+
+
+
+
diff --git a/pages/tabBar/component.uvue b/pages/tabBar/component.uvue
index ae6ef62842368750ca164ae46f696da7c8f2dcfd..c31f51c6038f7f7ad650d7b2f56b9e7d5a199fef 100644
--- a/pages/tabBar/component.uvue
+++ b/pages/tabBar/component.uvue
@@ -98,6 +98,9 @@ export default {
},
{
name: 'sticky-header',
+ },
+ {
+ name: 'sticky-section',
}
] as Page[],
},