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-08 13:50:27 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
4b10782d15693c906fdf3e248d28b1e246b24c21
4b10782d
1 parent
35f022b3
fix: 直播预约卡滚动到底跳转更多预约
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
18 deletions
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhSingleRow03.ets
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhSingleRow03.ets
View file @
4b10782
...
...
@@ -16,6 +16,7 @@ const TAG = 'Zh_Single_Row-03'
@Component
export struct ZhSingleRow03 {
@State compDTO: CompDTO = {} as CompDTO
@State isEndEdge: boolean = false;
scroller: Scroller = new Scroller()
format(timeNum: number) {
...
...
@@ -106,6 +107,19 @@ export struct ZhSingleRow03 {
}
.scrollable(ScrollDirection.Horizontal)
.scrollBar(BarState.Off)
.onScrollEdge((side: Edge) => {
if (side === Edge.End) {
this.isEndEdge = true;
}
})
.onScrollStop(() => {
if (this.isEndEdge) {
this.jumpToMore();
}
})
.onScroll((xOffset: number, yOffset: number) => {
this.isEndEdge = false;
})
}
.padding({
left: $r('app.float.card_comp_pagePadding_lf'),
...
...
@@ -143,17 +157,7 @@ export struct ZhSingleRow03 {
right: $r('app.float.card_comp_pagePadding_lf'),
})
.onClick(() => {
if (this.compDTO.linkUrl) {
let taskAction: Action = {
type: 'JUMP_H5_BY_WEB_VIEW',
params: {
url: this.compDTO.linkUrl
} as Params,
};
WDRouterRule.jumpWithAction(taskAction)
} else {
this.jumpToLiveMorePage()
}
this.jumpToMore();
})
}
.justifyContent(FlexAlign.SpaceBetween)
...
...
@@ -162,15 +166,23 @@ export struct ZhSingleRow03 {
}
private jumpToLiveMorePage() {
// let taskAction: Action = {
// type: 'JUMP_INNER_NEW_PAGE',
// params: {
// pageID: 'LIVE_MORE_PAGE'
// } as Params,
// };
// WDRouterRule.jumpWithAction(taskAction)
WDRouterRule.jumpWithPage(WDRouterPage.reserveMorePage)
}
private jumpToMore() {
if (this.compDTO.linkUrl) {
let taskAction: Action = {
type: 'JUMP_H5_BY_WEB_VIEW',
params: {
url: this.compDTO.linkUrl
} as Params,
};
WDRouterRule.jumpWithAction(taskAction)
} else {
this.jumpToLiveMorePage()
}
}
}
@Extend(Text)
...
...
Please
register
or
login
to post a comment