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
xingzhaojie
2024-02-05 18:24:21 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
7cef672a200b890088c3be03c73d20a8609640d2
7cef672a
1 parent
2cb0962e
通用轮播卡 Zh_Carousel_Layout_01类型修改,标题取值修改
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
4 deletions
PeopleDaily_Harmony/wdComponent/src/main/ets/components/CompParser.ets
PeopleDaily_Harmony/wdComponent/src/main/ets/components/view/BannerComponent.ets
PeopleDaily_Harmony/wdConstant/src/main/ets/enum/CompStyle.ts
PeopleDaily_Harmony/wdComponent/src/main/ets/components/CompParser.ets
View file @
7cef672
...
...
@@ -32,7 +32,7 @@ export struct CompParser {
TitleAbbrComponent({ compDTO: compDTO })
} else if (compDTO.compStyle === '3') {
TitleAllComponent({ compDTO: compDTO })
} else if (compDTO.compStyle === CompStyle.Carousel_Layout_01) {
} else if (compDTO.compStyle === CompStyle.
Zh_
Carousel_Layout_01) {
BannerComponent({ compDTO: compDTO })
} else if (compDTO.compStyle === "2") {
BigPicCardComponent({ compDTO: compDTO })
...
...
PeopleDaily_Harmony/wdComponent/src/main/ets/components/view/BannerComponent.ets
View file @
7cef672
...
...
@@ -55,10 +55,21 @@ export struct BannerComponent {
Image(item.coverUrl)
.objectFit(ImageFit.Fill)
.borderRadius(5)
.onClick(()=>{
AlertDialog.show({
title: '🥟id : ' + item.objectId,
message: '标题:' + item.newsTitle,
confirm: {
value: "OK",
action: () => {
},
}
})
})
// 底部标题和时间
Column() {
Text(item.
description
)
Text(item.
newsTitle
)
.fontSize(18)
.margin({ bottom: 4 })
.fontColor(Color.White)
...
...
@@ -113,7 +124,7 @@ export struct BannerComponent {
// 底部标题和时间
Row() {
// 标题
Text(this.bannerContent.
description
.toString())
Text(this.bannerContent.
newsTitle
.toString())
.fontSize(18)
.fontColor(Color.White)
.fontWeight(600)
...
...
PeopleDaily_Harmony/wdConstant/src/main/ets/enum/CompStyle.ts
View file @
7cef672
...
...
@@ -3,7 +3,7 @@
*/
export
const
enum
CompStyle
{
Label_03
=
'Label-03'
,
// 标题卡:icon+文字
Carousel_Layout_01
=
'
Carousel_Layout-01'
,
// 通用轮播卡:视频、直播、活动、专题、榜单、外链
Zh_Carousel_Layout_01
=
'Zh_
Carousel_Layout-01'
,
// 通用轮播卡:视频、直播、活动、专题、榜单、外链
Carousel_Layout_02
=
'Carousel_Layout-02'
,
// 直播轮播卡:直播
Single_Row_01
=
'Single_Row-01'
,
// 三格方形小卡(排名):专题、活动
Single_Row_02
=
'Single_Row-02'
,
// 通用横划卡:视频、直播、专题
...
...
Please
register
or
login
to post a comment