Toggle navigation
Toggle navigation
This project
Loading...
Sign in
developOne
/
harmonyPool
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
zhangbo1_wd
2024-04-25 18:23:44 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
fa5f8a4c9044d15185c58b0dd0505788885c7934
fa5f8a4c
1 parent
d54548f9
首页自动刷新,新增滚动到顶部
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletions
sight_harmony/features/wdComponent/src/main/ets/components/page/PageComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/PageComponent.ets
View file @
fa5f8a4
...
...
@@ -27,6 +27,7 @@ export struct PageComponent {
@Link @Watch('onChange') currentTopNavSelectedIndex: number
// 自动刷新通知
@Prop @Watch('onAutoRefresh') autoRefresh: number = 0
private listScroller: Scroller = new Scroller();
build() {
Column() {
...
...
@@ -61,7 +62,7 @@ export struct PageComponent {
ListLayout() {
RelativeContainer() {
List() {
List(
{ scroller: this.listScroller }
) {
// 下拉刷新
ListItem() {
RefreshLayout({
...
...
@@ -235,6 +236,7 @@ export struct PageComponent {
}
// 当前页面,自动刷新数据
Logger.debug(TAG, 'page onAutoRefresh ' + this.autoRefresh)
this.listScroller.scrollToIndex(0)
autoRefresh(this.pageModel, this.pageAdvModel)
}
...
...
Please
register
or
login
to post a comment