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
shishuangxi
2024-02-01 22:27:59 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
15cdb1151442d9b3fd57384bfcd3a90197f75c68
15cdb115
1 parent
8a053933
无图标题类型字段更改
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
6 deletions
PeopleDaily_Harmony/wdComponent/src/main/ets/components/CompParser.ets
PeopleDaily_Harmony/wdComponent/src/main/ets/components/view/TitleAbbrComponent.ets
PeopleDaily_Harmony/wdComponent/src/main/ets/components/view/TitleAllComponent.ets
PeopleDaily_Harmony/wdComponent/src/main/ets/components/CompParser.ets
View file @
15cdb11
...
...
@@ -29,9 +29,9 @@ export struct CompParser {
componentBuilder(compDTO: CompDTO, compIndex: number) {
if (compDTO.compStyle === CompStyle.Label_03) {
LabelComponent({ compDTO: compDTO })
} else if (compDTO.compStyle ===
CompStyle.Title_Abbr_01
) {
} else if (compDTO.compStyle ===
'11'
) {
TitleAbbrComponent({ compDTO: compDTO })
} else if (compDTO.compStyle ===
CompStyle.Title_All_01
) {
} else if (compDTO.compStyle ===
'3'
) {
TitleAllComponent({ compDTO: compDTO })
} else if (compDTO.compStyle === CompStyle.Carousel_Layout_01) {
BannerComponent({ compDTO: compDTO })
...
...
PeopleDaily_Harmony/wdComponent/src/main/ets/components/view/TitleAbbrComponent.ets
View file @
15cdb11
//缩略标题
import { CommonConstants } from 'wdConstant'
import { CompDTO } from '../../repository/bean/CompDTO'
import { DateTimeUtils } from 'wdKit'
@Component
export struct TitleAbbrComponent {
...
...
@@ -8,7 +9,7 @@ export struct TitleAbbrComponent {
build() {
Column() {
Text(this.compDTO.operDataList[0].
t
itle)
Text(this.compDTO.operDataList[0].
newsT
itle)
.fontSize($r("app.float.font_size_16"))
.fontColor($r("app.color.color_222222"))
.maxLines(3)
...
...
@@ -26,7 +27,7 @@ export struct TitleAbbrComponent {
.width(16)
.height(16)
Text(
"46分钟前"
)
Text(
DateTimeUtils.formatDate(Number.parseFloat(this.compDTO.operDataList[0].publishTime))
)
.fontSize($r("app.float.font_size_12"))
.fontColor($r("app.color.color_B0B0B0"))
...
...
PeopleDaily_Harmony/wdComponent/src/main/ets/components/view/TitleAllComponent.ets
View file @
15cdb11
//全标题 "compStyle":"3",
import { CommonConstants } from 'wdConstant'
import { CompDTO } from '../../repository/bean/CompDTO'
import { DateTimeUtils } from 'wdKit/src/main/ets/utils/DateTimeUtils'
import { Logger } from 'wdKit/src/main/ets/utils/Logger'
@Component
export struct TitleAllComponent {
...
...
@@ -8,7 +10,7 @@ export struct TitleAllComponent {
build() {
Column() {
Text(this.compDTO.operDataList[0].
t
itle)
Text(this.compDTO.operDataList[0].
newsT
itle)
.fontSize($r("app.float.font_size_16"))
.fontColor($r("app.color.color_222222"))
.width(CommonConstants.FULL_WIDTH)
...
...
@@ -24,7 +26,7 @@ export struct TitleAllComponent {
.width(16)
.height(16)
Text(
"46分钟前"
)
Text(
DateTimeUtils.formatDate(Number.parseFloat(this.compDTO.operDataList[0].publishTime))
)
.fontSize($r("app.float.font_size_12"))
.fontColor($r("app.color.color_B0B0B0"))
...
...
@@ -42,4 +44,7 @@ export struct TitleAllComponent {
.backgroundColor($r("app.color.white"))
.margin({ bottom: 8 })
}
aboutToAppear(){
// Logger.info("ssx",JSON.stringify(this.compDTO.operDataList[0]))
}
}
\ No newline at end of file
...
...
Please
register
or
login
to post a comment