diff --git a/pages.json b/pages.json
index 3fa90a7b651ce02bbf87a7b00b57da30e0783cb0..fdc2f99c7e0d2f26c6c7ee5945dac37ead5bdefd 100644
--- a/pages.json
+++ b/pages.json
@@ -1277,6 +1277,14 @@
"navigationBarTitleText" : "自定义虚拟长列表",
"enablePullDownRefresh" : false
}
+ },
+ {
+ "path" : "pages/component/swiper/swiper-list-view",
+ "style" :
+ {
+ "navigationBarTitleText" : "swiper嵌套list-view",
+ "enablePullDownRefresh" : false
+ }
}
// #endif
],
diff --git a/pages/component/swiper/swiper-list-view.test.js b/pages/component/swiper/swiper-list-view.test.js
new file mode 100644
index 0000000000000000000000000000000000000000..a8b1b998905229ac894198d10deff21d66040968
--- /dev/null
+++ b/pages/component/swiper/swiper-list-view.test.js
@@ -0,0 +1,26 @@
+describe('component-swiper-list-view', () => {
+ let page
+ beforeAll(async () => {
+ //打开swiper-list-view测试页
+ page = await program.reLaunch('/pages/component/swiper/swiper-list-view')
+ await page.waitFor('list-view')
+ })
+
+ it('check-sticky-header', async () => {
+ await page.setData({scrollTop: 300})
+ await page.waitFor(600)
+ await page.setData({currentVal: 1})
+ await page.waitFor(async () => {
+ return await page.data('swiperCurrentIndex') === 1;
+ });
+ await page.waitFor(200)
+ await page.setData({currentVal: 0})
+ await page.waitFor(async () => {
+ return await page.data('swiperCurrentIndex') === 0;
+ });
+ await page.waitFor(600)
+ const image = await program.screenshot({fullPage: true});
+ expect(image).toSaveImageSnapshot();
+ })
+
+})
diff --git a/pages/component/swiper/swiper-list-view.uvue b/pages/component/swiper/swiper-list-view.uvue
new file mode 100644
index 0000000000000000000000000000000000000000..8dc91715634bbcaf73b41c27636a9a8856507610
--- /dev/null
+++ b/pages/component/swiper/swiper-list-view.uvue
@@ -0,0 +1,69 @@
+
+
+
+ 左右滑动页面,体验swiper嵌套list-view效果。
+
+
+
+
+
+
+
+
+ item----------{{itemIndex}}
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/component/swiper/swiper.uvue b/pages/component/swiper/swiper.uvue
index 2e3200fbbc6b12a2c806115b983b09ca28598fc1..6c63c954ea2a13f7762bf09dc24e0d682f1ce80e 100644
--- a/pages/component/swiper/swiper.uvue
+++ b/pages/component/swiper/swiper.uvue
@@ -73,7 +73,14 @@
swiperChange 是否打印
-
+
+
+
+
+
+