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
wanglei
2024-02-01 22:52:24 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
e63957bed15ff4b101112dc3b5739d7ba56e4fc1
e63957be
2 parents
1b42c106
15cdb115
Merge branch 'main' of
http://192.168.1.42/developOne/harmonyPool
into main
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 @
e63957b
...
...
@@ -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 @
e63957b
//缩略标题
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 @
e63957b
//全标题 "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