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-06-05 16:26:42 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
ea23280c82f55e3df30d59bb04f45bac628c1bab
ea23280c
1 parent
fba16932
fix: 18034 健康频道-时间轴专题_时间节点间距有的偏大有的的偏小
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
17 deletions
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card9Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card9Component.ets
View file @
ea23280
...
...
@@ -108,7 +108,7 @@ export struct Card9Component {
// 时间线--后端返回三个,
Column() {
ForEach(this.contentDTO.slideShows, (item: slideShows, index: number) => {
this.timelineItem(item, index)
this.timelineItem(item, index
, index === this.contentDTO.slideShows.length - 1
)
})
}
...
...
@@ -149,25 +149,40 @@ export struct Card9Component {
}
@Builder
timelineItem(item: slideShows, index: number) {
timelineItem(item: slideShows, index: number
, isLastOne: boolean
) {
Column() {
Stack() {
if (index
< this.contentDTO.slideShows.length - 1
) {
if (index
=== 0
) {
Divider()
.vertical(true)
.color($r('app.color.color_EDEDED'))
.strokeWidth(1)
.margin({ top: index > 0 ? 0 : 16, left: 4 })
}
if (index > 0 && index == this.contentDTO.slideShows.length - 1) {
.margin({ top: 16, left: 4 })
.height(16)
} else {
Divider()
.vertical(true)
.color($r('app.color.color_EDEDED'))
.strokeWidth(1)
.margin({ top: 0, left: 4 })
.height(16)
.margin({ left: 4 })
if (!isLastOne) {
Divider()
.vertical(true)
.color($r('app.color.color_EDEDED'))
.strokeWidth(1)
.margin({ top: 16, left: 4 })
.height(16)
}
}
// Divider()
// .vertical(true)
// .color($r('app.color.color_EDEDED'))
// .strokeWidth(1)
// .margin({ top: index > 0 ? 0 : 32, left: 4 })
// .height(16)
Column() {
Row() {
// 标题
...
...
@@ -195,21 +210,14 @@ export struct Card9Component {
.maxLines(2)
.textOverflow({ overflow: TextOverflow.Ellipsis })
.alignSelf(ItemAlign.Center)
.margin({ left: 12 })
// .padding({bottom: 20})
// if (item.fullColumnImgUrls[0] && item.fullColumnImgUrls[0].url) {
// Image(this.loadImg? item.fullColumnImgUrls[0].url : '')
// .backgroundColor(0xf5f5f5)
// .width(90)
// .height(60)
// .borderRadius($r('app.float.image_border_radius'))
// }
.margin({ left: 4 })
.padding({ bottom: 20, left: 12 })
.border({ width: { left: isLastOne ? 0 : 1 }, color: 0xededed})
}
}
}
.alignContent(Alignment.TopStart)
}
.height(item.fullColumnImgUrls[0] && item.fullColumnImgUrls[0].url ? 100 : 50)
.alignItems(HorizontalAlign.Start)
}
}
\ No newline at end of file
...
...
Please
register
or
login
to post a comment