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
张善主
2024-05-09 17:47:30 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
3b53cae4a120f52105509b1cb1e7f816682146a7
3b53cae4
1 parent
24b3ad6d
fix(频道切换):增加切换刷新接口控制
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 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 @
3b53cae
...
...
@@ -28,7 +28,7 @@ export struct PageComponent {
// 自动刷新通知
@Prop @Watch('onAutoRefresh') autoRefresh: number = 0
private listScroller: Scroller = new Scroller();
needload: boolean = true;
build() {
Column() {
if (this.pageModel.viewType == ViewType.LOADING) {
...
...
@@ -220,13 +220,17 @@ export struct PageComponent {
// 选中tab,才请求数据。拦截大量接口请求
if (this.navIndex === this.currentTopNavSelectedIndex) {
this.getData();
this.needload = false;
}
}
onChange() {
Logger.info(TAG, `onChangezz id: ${this.pageId} , ${this.channelId} , ${this.navIndex} , navIndex: ${this.currentTopNavSelectedIndex}`);
if (this.navIndex === this.currentTopNavSelectedIndex) {
this.getData();
if(this.needload){
this.getData();
}
this.needload = false;
}
}
...
...
Please
register
or
login
to post a comment