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-05-28 10:45:42 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
a88aff1bb1ff1ec3e14db3a6e3acb09e8578791f
a88aff1b
1 parent
bf6aca2f
feat: 标签高度和右图高度
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
26 additions
and
41 deletions
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card10Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card11Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card2Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card3Component.ets
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/Card9Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card10Component.ets
View file @
a88aff1
...
...
@@ -77,15 +77,8 @@ export struct Card10Component {
InfomationCardClick.track(this.compDTO, this.contentDTO, this.pageId, this.pageName)
ProcessUtils.processPage(this.contentDTO)
})
if(this.contentDTO.objectType == '5'){
Notes({ objectType: this.contentDTO.objectType }).align(Alignment.Center).margin({ left: 5, bottom: 5 })
} else {
if (this.contentDTO.seoTags) {
Notes({ newTags: this.contentDTO.seoTags }).align(Alignment.Center)
}
if (this.contentDTO.newTags) {
Notes({ newTags: this.contentDTO.newTags }).align(Alignment.Center)
}
if (this.contentDTO.objectType == '5') {
Notes({ objectType: 5 }).margin({ left: 5, bottom: 5 })
}
}.alignContent(Alignment.BottomStart)
...
...
@@ -135,15 +128,8 @@ export struct Card10Component {
Row() {
Column() {
Stack() {
if(this.contentDTO.objectType == '5'){
Notes({ objectType: this.contentDTO.objectType }).align(Alignment.Center)
} else {
if (this.contentDTO.seoTags) {
Notes({ newTags: this.contentDTO.seoTags }).align(Alignment.Center)
}
if (this.contentDTO.newTags) {
Notes({ newTags: this.contentDTO.newTags }).align(Alignment.Center)
}
if (item.objectType == '5') {
Notes({ objectType: 5 })
}
Text(item.newsTitle)
.fontSize($r('app.float.font_size_17'))
...
...
@@ -151,12 +137,10 @@ export struct Card10Component {
.fontColor($r('app.color.color_222222'))
.maxLines(2)
.textOverflow({ overflow: TextOverflow.Ellipsis })
.textIndent((this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) > 2 &&
(this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) < 5 ? 58 :
((this.contentDTO.newTags?.length > 0 || this.contentDTO.seoTags?.length > 0) || this.contentDTO.objectType == '5') ? 35 :
0 )
.textIndent(item.objectType == '5' ? 38 : 0)
}.alignContent(Alignment.TopStart)
Blank()
//bottom 评论等信息
CardSourceInfo(
{
...
...
@@ -166,6 +150,7 @@ export struct Card10Component {
)
}
.layoutWeight(1)
.height(78)
.alignItems(HorizontalAlign.Start)
// 右侧图片
...
...
@@ -183,6 +168,7 @@ export struct Card10Component {
})
}
.alignContent(Alignment.BottomEnd)
.height(78)
}
}
.padding({ top: 10, bottom: 10 })
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card11Component.ets
View file @
a88aff1
...
...
@@ -39,13 +39,13 @@ export struct Card11Component {
Column() {
Stack() {
if(this.contentDTO.objectType == '5'){
Notes({ objectType: this.contentDTO.objectType }).align(Alignment.Center)
Notes({ objectType: this.contentDTO.objectType }).
height(20).
align(Alignment.Center)
} else {
if (this.contentDTO.seoTags) {
Notes({ newTags: this.contentDTO.seoTags }).align(Alignment.Center)
Notes({ newTags: this.contentDTO.seoTags }).
height(20).
align(Alignment.Center)
}
if (this.contentDTO.newTags) {
Notes({ newTags: this.contentDTO.newTags }).align(Alignment.Center)
Notes({ newTags: this.contentDTO.newTags }).
height(20).
align(Alignment.Center)
}
}
Text() {
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card2Component.ets
View file @
a88aff1
...
...
@@ -61,13 +61,13 @@ export struct Card2Component {
// }
// }
if(this.contentDTO.objectType == '5'){
Notes({ objectType: this.contentDTO.objectType }).align(Alignment.Center)
Notes({ objectType: this.contentDTO.objectType }).
height(20).
align(Alignment.Center)
} else {
if (this.contentDTO.seoTags) {
Notes({ newTags: this.contentDTO.seoTags }).align(Alignment.Center)
Notes({ newTags: this.contentDTO.seoTags }).
height(20).
align(Alignment.Center)
}
if (this.contentDTO.newTags) {
Notes({ newTags: this.contentDTO.newTags }).align(Alignment.Center)
Notes({ newTags: this.contentDTO.newTags }).
height(20).
align(Alignment.Center)
}
}
//新闻标题
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card3Component.ets
View file @
a88aff1
...
...
@@ -42,13 +42,13 @@ export struct Card3Component {
// Notes({ objectType: this.contentDTO.objectType }).height(27).align(Alignment.Center)
// }
if(this.contentDTO.objectType == '5'){
Notes({ objectType: this.contentDTO.objectType }).align(Alignment.Center)
Notes({ objectType: this.contentDTO.objectType }).
height(20).
align(Alignment.Center)
} else {
if (this.contentDTO.seoTags) {
Notes({ newTags: this.contentDTO.seoTags }).align(Alignment.Center)
Notes({ newTags: this.contentDTO.seoTags }).
height(20).
align(Alignment.Center)
}
if (this.contentDTO.newTags) {
Notes({ newTags: this.contentDTO.newTags }).align(Alignment.Center)
Notes({ newTags: this.contentDTO.newTags }).
height(20).
align(Alignment.Center)
}
}
Text() {
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card5Component.ets
View file @
a88aff1
...
...
@@ -58,13 +58,13 @@ export struct Card5Component {
Row() {
Stack() {
if(this.contentDTO.objectType == '5'){
Notes({ objectType: this.contentDTO.objectType }).align(Alignment.Center)
Notes({ objectType: this.contentDTO.objectType }).
height(20).
align(Alignment.Center)
} else {
if (this.contentDTO.seoTags) {
Notes({ newTags: this.contentDTO.seoTags }).align(Alignment.Center)
Notes({ newTags: this.contentDTO.seoTags }).
height(20).
align(Alignment.Center)
}
if (this.contentDTO.newTags) {
Notes({ newTags: this.contentDTO.newTags }).align(Alignment.Center)
Notes({ newTags: this.contentDTO.newTags }).
height(20).
align(Alignment.Center)
}
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card6Component.ets
View file @
a88aff1
...
...
@@ -53,17 +53,16 @@ export struct Card6Component {
// }
Stack() {
if(this.contentDTO.objectType == '5'){
Notes({ objectType: this.contentDTO.objectType }).align(Alignment.Center)
Notes({ objectType: this.contentDTO.objectType }).
height(28).
align(Alignment.Center)
} else {
if (this.contentDTO.seoTags) {
Notes({ newTags: this.contentDTO.seoTags }).align(Alignment.Center)
Notes({ newTags: this.contentDTO.seoTags }).
height(28).
align(Alignment.Center)
}
if (this.contentDTO.newTags) {
Notes({ newTags: this.contentDTO.newTags }).align(Alignment.Center)
Notes({ newTags: this.contentDTO.newTags }).
height(28).
align(Alignment.Center)
}
}
Text() {
if (this.titleMarked) {
ForEach(this.textArr, (textItem: textItem) => {
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card9Component.ets
View file @
a88aff1
...
...
@@ -89,14 +89,14 @@ export struct Card9Component {
topRight: $r('app.float.image_border_radius')
})
if(this.contentDTO.objectType == '5'){
Notes({ objectType: this.contentDTO.objectType }).align(Alignment.Center)
Notes({ objectType: this.contentDTO.objectType }).
height(20).
align(Alignment.Center)
.margin({ left: 5, bottom: 5 })
} else {
if (this.contentDTO.seoTags) {
Notes({ newTags: this.contentDTO.seoTags }).align(Alignment.Center)
Notes({ newTags: this.contentDTO.seoTags }).
height(20).
align(Alignment.Center)
}
if (this.contentDTO.newTags) {
Notes({ newTags: this.contentDTO.newTags }).align(Alignment.Center)
Notes({ newTags: this.contentDTO.newTags }).
height(20).
align(Alignment.Center)
}
}
...
...
Please
register
or
login
to post a comment