提交 4294f937 编写于 作者: shutao-dc's avatar shutao-dc

update sticky-section.uvue

上级 3efb4a5f
<template> <template>
<page-head title="sticky-section"></page-head> <page-head title="sticky-section"></page-head>
<list-view id="list-view" ref="list-view" show-scrollbar=false class="page" :scroll-into-view="scrollIntoView" <list-view id="list-view" ref="list-view" show-scrollbar=false class="page" :scroll-into-view="scrollIntoView"
@scroll="onScroll" @scrollend="onScrollEnd" rebound="false"> @scroll="onScroll" @scrollend="onScrollEnd" rebound="false">
<!-- #ifdef APP --> <!-- #ifdef APP -->
...@@ -40,7 +40,8 @@ ...@@ -40,7 +40,8 @@
//用于自动化测试 //用于自动化测试
listViewScrollByY(y : number) { listViewScrollByY(y : number) {
const listview = this.$refs["list-view"] as UniElement const listview = this.$refs["list-view"] as UniElement
listview.scrollBy(0, y) // listview.scrollBy(0, y)
listview.scrollTop = y
}, },
gotoStickyHeader(id : string) { gotoStickyHeader(id : string) {
this.scrollIntoView = id this.scrollIntoView = id
...@@ -53,7 +54,7 @@ ...@@ -53,7 +54,7 @@
//滚动后重置scrollIntoView = "" //滚动后重置scrollIntoView = ""
if(this.scrollIntoView != "") { if(this.scrollIntoView != "") {
this.scrollIntoView = "" this.scrollIntoView = ""
} }
} }
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册