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
caohuahui
2024-02-05 16:37:12 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
df4bab246d2205c2762169545e98dc707288352e
df4bab24
1 parent
fb7917da
头图卡添加数据
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
PeopleDaily_Harmony/wdComponent/src/main/ets/components/view/HeadPictureCardComponent.ets
PeopleDaily_Harmony/wdComponent/src/main/ets/components/view/HeadPictureCardComponent.ets
View file @
df4bab2
import { CommonConstants } from 'wdConstant';
import thermal from '@ohos.thermal';
import { CompDTO } from '../../repository/bean/CompDTO';
import { ContentDTO } from '../../repository/bean/ContentDTO';
import { CompUtils } from '../../utils/CompUtils';
@Component
...
...
@@ -9,28 +10,31 @@ export struct HeadPictureCardComponent {
build() {
Stack() {
Image(this.compDTO.
backgroundImg
Url)
Image(this.compDTO.
operDataList[0].cover
Url)
.width(CommonConstants.FULL_WIDTH)
.height(CommonConstants.FULL_HEIGHT)
if (this.compDTO.extraData.length > 0) {
if (this.compDTO.operDataList[0].description != null) {
Row()
.width(CommonConstants.FULL_WIDTH)
.height(59)
.backgroundColor(Color.Red)
.linearGradient({
colors:[
['rgba(0, 0, 0, 0.0)', 0.0], ['rgba(0, 0, 0, 0.3)', 1.0]
]
})
Row() {
Text(
CompUtils.getLabelTitle(this.compDTO.extraData)
)
Text(
this.compDTO.operDataList[0].description
)
.width(CommonConstants.FULL_WIDTH)
.height(CommonConstants.FULL_HEIGHT)
.fontColor(Color.White)
.fontSize($r('app.float.normal_text_size'))
.fontWeight(FontWeight.Bold)
.maxLines(2)
.align(Alignment.Bottom)
}
.height(
25
)
.height(
40
)
.margin({left: 12, bottom: 10, right: 12})
}
}
...
...
Please
register
or
login
to post a comment