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
陈剑华
2024-09-04 11:21:16 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
2e67538f9421235102165f9efb37437bc7cfce04
2e67538f
1 parent
3b4be0c3
fix: 20118 【生产环境】进入热点-查看卡片,多了专题 标签和“2024年中非合作论坛峰会”,ios 不展示,只展示图片
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
40 deletions
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card5Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card5Component.ets
View file @
2e67538
...
...
@@ -66,7 +66,7 @@ export struct Card5Component {
)
.height(this.loadImg ? '' : 114)
.autoResize(true)
if (this.
contentDTO.titleShow == 1 || this.contentDTO.titleShow == null
) {
if (this.
titleShowPolicy == 1
) {
Row()
.borderRadius(
{
...
...
@@ -85,50 +85,52 @@ export struct Card5Component {
})
Row() {
Stack() {
if(this.contentDTO.objectType == '5'){
Notes({ objectType: this.contentDTO.objectType,objectLevel:this.contentDTO.objectLevel }).height(20).align(Alignment.Center)
} else {
if (this.contentDTO.seoTags) {
Notes({ newTags: this.contentDTO.seoTags }).height(20).align(Alignment.Center)
}
if (this.contentDTO.newTags) {
Notes({ newTags: this.contentDTO.newTags }).height(20).align(Alignment.Center)
}
if (this.contentDTO.top === 1) {
Notes({ newTags: '置顶' }).height(20).align(Alignment.Center)
if (this.titleShowPolicy == 1 && this.contentDTO.newsTitle) {
Stack() {
if(this.contentDTO.objectType == '5'){
Notes({ objectType: this.contentDTO.objectType,objectLevel:this.contentDTO.objectLevel }).height(20).align(Alignment.Center)
} else {
if (this.contentDTO.seoTags) {
Notes({ newTags: this.contentDTO.seoTags }).height(20).align(Alignment.Center)
}
if (this.contentDTO.newTags) {
Notes({ newTags: this.contentDTO.newTags }).height(20).align(Alignment.Center)
}
if (this.contentDTO.top === 1) {
Notes({ newTags: '置顶' }).height(20).align(Alignment.Center)
}
}
}
Text() {
Text() {
if (this.titleMarked) {
ForEach(this.textArr, (textItem: textItem) => {
if (textItem.isRed) {
Span(textItem.content)
.fontColor(0xED2800)
} else {
Span(textItem.content)
}
})
} else {
Span(this.contentDTO.newsTitle)
ForEach(this.textArr, (textItem: textItem) => {
if (textItem.isRed) {
Span(textItem.content)
.fontColor(0xED2800)
} else {
Span(textItem.content)
}
})
} else {
Span(this.contentDTO.newsTitle)
}
}
}
.width(CommonConstants.FULL_WIDTH)
.fontColor(Color.White)
.fontSize($r('app.float.font_size_18'))
.maxLines(2)
.align(Alignment.TopStart)
.textOverflow({ overflow: TextOverflow.Ellipsis }) // 超出的部分显示省略号。
.textIndent(
getNotesContentWidth(
this.contentDTO.seoTags || this.contentDTO.newTags,
this.contentDTO.objectType,
this.contentDTO.objectLevel,
this.contentDTO.top
.width(CommonConstants.FULL_WIDTH)
.fontColor(Color.White)
.fontSize($r('app.float.font_size_18'))
.maxLines(2)
.align(Alignment.TopStart)
.textOverflow({ overflow: TextOverflow.Ellipsis }) // 超出的部分显示省略号。
.textIndent(
getNotesContentWidth(
this.contentDTO.seoTags || this.contentDTO.newTags,
this.contentDTO.objectType,
this.contentDTO.objectLevel,
this.contentDTO.top
)
)
)
}.alignContent(Alignment.TopStart)
}.alignContent(Alignment.TopStart)
}
}
.justifyContent(FlexAlign.Start)
.margin({ left: 12, bottom: 10, right: 12 })
...
...
Please
register
or
login
to post a comment