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
douaojie
2024-05-10 14:23:25 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
cf7c1154fed0fe517ba5ab0a0064972b86c7e509
cf7c1154
1 parent
0847c959
fix: 添加标签
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
17 deletions
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card5Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card6Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card5Component.ets
View file @
cf7c115
import { ContentDTO } from 'wdBean';
import { CommonConstants } from 'wdConstant';
import { ProcessUtils } from 'wdRouter';
import { Notes } from './notes';
const TAG: string = 'Card5Component';
...
...
@@ -29,29 +30,31 @@ export struct Card5Component {
.autoResize(true)
.borderRadius($r('app.float.image_border_radius'))
if ((this.titleShowPolicy === 1 || this.contentDTO.titleShow === 1) && this.contentDTO.newsTitle) {
Row()
.width(CommonConstants.FULL_WIDTH)
.height(59)
.linearGradient({
colors: [
['rgba(0, 0, 0, 0.0)', 0.0], ['rgba(0, 0, 0, 0.3)', 1.0]
]
})
// Row()
// .width(CommonConstants.FULL_WIDTH)
// .height(59)
// .linearGradient({
// colors: [
// ['rgba(0, 0, 0, 0.0)', 0.0], ['rgba(0, 0, 0, 0.3)', 1.0]
// ]
// })
Row() {
if (this.titleShowPolicy === 1) {
Stack() {
if (this.contentDTO.objectType == '5') {
Notes({ objectType: this.contentDTO.objectType })
}
Text(this.contentDTO.newsTitle)
.width(CommonConstants.FULL_WIDTH)
.height(CommonConstants.FULL_HEIGHT)
.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)
}
.align(Alignment.TopStart)
.textIndent(this.contentDTO.objectType == '5' ? 40 : 0)
}.alignContent(Alignment.TopStart)
}
.justifyContent(FlexAlign.Start)
.height(40)
//
.height(40)
.margin({ left: 12, bottom: 10, right: 12 })
}
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card6Component.ets
View file @
cf7c115
...
...
@@ -39,8 +39,10 @@ export struct Card6Component {
.maxLines(3)
.alignSelf(ItemAlign.Start)
.textOverflow({ overflow: TextOverflow.Ellipsis })// 超出的部分显示省略号。
.textIndent(this.contentDTO.newTags.length < 5 && this.contentDTO.newTags.length > 2 ? 60 :
this.contentDTO.newTags.length != 0 && this.contentDTO.newTags.length < 3 ? 30 : 0)
.textIndent(
this.contentDTO.newTags.length < 5 && this.contentDTO.newTags.length > 2 ?
60 : this.contentDTO.newTags.length != 0 && this.contentDTO.newTags.length < 3 ?
30 : 0)
}.alignContent(Alignment.TopStart)
}.height("80%")
...
...
Please
register
or
login
to post a comment