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-06-04 09:41:04 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
e1a3711c62f9642ef2c29f2a871b62c2e3b6e675
e1a3711c
1 parent
8de87fc1
feat: 直播横划卡右滑展示更多逻辑
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
13 deletions
sight_harmony/features/wdComponent/src/main/ets/components/view/HorizontalStrokeCardThreeTwoRadioForMoreComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/view/HorizontalStrokeCardThreeTwoRadioForMoreComponent.ets
View file @
e1a3711
...
...
@@ -50,6 +50,16 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent {
toMore() {
if (this.moreWidth > this.initMoreWidth * 2) {
this.liveToMore();
}
}
liveToMore() {
if (!!this.compDTO.dataSourceType) {
if (this.compDTO.dataSourceType === 'OBJECT_POS') {
ProcessUtils.jumpChannelTab(this.compDTO.objectId, this.compDTO.pageId as string, this.compDTO.objectTitle)
return;
}
if (this.compDTO.linkUrl) {
let taskAction: Action = {
type: 'JUMP_H5_BY_WEB_VIEW',
...
...
@@ -61,9 +71,24 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent {
} else {
this.jumpToLiveMorePage()
}
} else {
if (this.compDTO?.objectType === '11') {
} else {
const contentDTO: ContentDTO = {
objectId: this.compDTO.objectId,
objectType: this.compDTO.objectType,
linkUrl: this.compDTO.linkUrl,
pageId: this.compDTO.pageId
} as ContentDTO
ProcessUtils.processPage(contentDTO)
}
}
}
showMore() {
return !!this.compDTO.dataSourceType || !(this.compDTO?.objectType === '0' || this.compDTO?.objectType === '')
}
build() {
Column() {
Row() {
...
...
@@ -87,19 +112,9 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent {
.width(14)
.height(14)
}
.visibility(this.
compDTO?.objectType === '0' || this.compDTO?.objectType === '' ? Visibility.None : Visibility.Visibl
e)
.visibility(this.
showMore() ? Visibility.Visible : Visibility.Non
e)
.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.liveToMore();
})
}.justifyContent(FlexAlign.SpaceBetween)
...
...
@@ -141,7 +156,7 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent {
})
}
if (this.compDTO.operDataList.length >= 2 &&
!(this.compDTO?.objectType === '0' || this.compDTO?.objectType === ''
)) {
if (this.compDTO.operDataList.length >= 2 &&
this.showMore(
)) {
Row() {
Ellipse()
.width(2* (this.moreWidth - this.initMoreWidth - 1))
...
...
Please
register
or
login
to post a comment