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-02 16:18:10 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
82677241b1dbe5442b8ffe33ace1469e7c4f05f1
82677241
1 parent
4540a224
优化无图卡样式展示逻辑
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
1 deletions
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/view/TitleAbbrComponent.ets
View file @
8267724
...
...
@@ -6,6 +6,14 @@ import { DateTimeUtils } from 'wdKit'
@Component
export struct TitleAbbrComponent {
@State compDTO: CompDTO = {} as CompDTO
@State @Watch('isPoint') source:boolean=false;//来源是否为空 publishTime 字段是否为空
@State isPo:number=Visibility.Visible;
isPoint(){
if(this.source){
this.isPo=Visibility.None
}
}
build() {
Column() {
...
...
@@ -15,21 +23,26 @@ export struct TitleAbbrComponent {
.maxLines(3)
.textOverflow({ overflow: TextOverflow.Ellipsis })
.width(CommonConstants.FULL_WIDTH)
.fontWeight(400)
Row() {
Text(this.compDTO.operDataList[0].corner)
.fontSize($r("app.float.font_size_12"))
.fontColor($r("app.color.color_ED2800"))
.fontWeight(400)
Text(this.compDTO.operDataList[0].source)
.fontSize($r("app.float.font_size_12"))
.fontColor($r("app.color.color_B0B0B0"))
.margin({ left: 6 })
.fontWeight(400)
Image($r("app.media.point"))
.width(16)
.height(16)
.visibility(this.isPo)
Text(DateTimeUtils.formatDate(Number.parseFloat(this.compDTO.operDataList[0].publishTime)))
.fontSize($r("app.float.font_size_12"))
.fontColor($r("app.color.color_B0B0B0"))
.fontWeight(400)
}.width(CommonConstants.FULL_WIDTH)
.justifyContent(FlexAlign.Start)
...
...
@@ -45,4 +58,13 @@ export struct TitleAbbrComponent {
.backgroundColor($r("app.color.white"))
.margin({ bottom: 8 })
}
aboutToAppear(){
if(this.compDTO.operDataList[0].source==""){
this.source=true;
}
if(this.compDTO.operDataList[0].publishTime==""){
this.source=true;
}
}
}
\ No newline at end of file
...
...
PeopleDaily_Harmony/wdComponent/src/main/ets/components/view/TitleAllComponent.ets
View file @
8267724
...
...
@@ -7,6 +7,14 @@ import { Logger } from 'wdKit/src/main/ets/utils/Logger'
@Component
export struct TitleAllComponent {
@State compDTO: CompDTO = {} as CompDTO
@State @Watch('isPoint') source:boolean=false;//来源是否为空 publishTime 字段是否为空
@State isPo:number=Visibility.Visible;
isPoint(){
if(this.source){
this.isPo=Visibility.None
}
}
build() {
Column() {
...
...
@@ -14,21 +22,26 @@ export struct TitleAllComponent {
.fontSize($r("app.float.font_size_17"))
.fontColor($r("app.color.color_222222"))
.width(CommonConstants.FULL_WIDTH)
.fontWeight(400)
Row() {
Text(this.compDTO.operDataList[0].corner)
.fontSize($r("app.float.font_size_12"))
.fontColor($r("app.color.color_ED2800"))
.fontWeight(400)
Text(this.compDTO.operDataList[0].source)
.fontSize($r("app.float.font_size_12"))
.fontColor($r("app.color.color_B0B0B0"))
.margin({ left: 6 })
.fontWeight(400)
Image($r("app.media.point"))
.width(16)
.height(16)
.visibility(this.isPo)
Text(DateTimeUtils.formatDate(Number.parseFloat(this.compDTO.operDataList[0].publishTime)))
.fontSize($r("app.float.font_size_12"))
.fontColor($r("app.color.color_B0B0B0"))
.fontWeight(400)
}.width(CommonConstants.FULL_WIDTH)
.justifyContent(FlexAlign.Start)
...
...
@@ -44,7 +57,15 @@ export struct TitleAllComponent {
.backgroundColor($r("app.color.white"))
.margin({ bottom: 8 })
}
aboutToAppear(){
aboutToAppear() {
// Logger.info("ssx",JSON.stringify(this.compDTO.operDataList[0]))
if (this.compDTO.operDataList[0].source == "") {
this.source = true;
}
if (this.compDTO.operDataList[0].publishTime == "") {
this.source = true;
}
}
}
\ No newline at end of file
...
...
Please
register
or
login
to post a comment