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-04-07 15:21:30 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
89b4121366b1d75fe720912b07e5753aea359354
89b41213
2 parents
bed01305
f89ff44a
Merge branch 'main' of
http://192.168.1.42/developOne/harmonyPool
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
48 additions
and
21 deletions
sight_harmony/features/wdComponent/src/main/ets/components/page/CardView.ets
sight_harmony/features/wdComponent/src/main/ets/components/view/BannerComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/view/CompStyle_09.ets
sight_harmony/features/wdComponent/src/main/ets/components/view/CompStyle_10.ets
sight_harmony/features/wdComponent/src/main/ets/components/view/HeadPictureCardComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/CardView.ets
View file @
89b4121
...
...
@@ -25,7 +25,7 @@ export struct CarouselLayout01CardView {
.width(CommonConstants.FULL_PARENT)
.height(CommonConstants.FULL_PARENT)
.objectFit(ImageFit.Cover)
.borderRadius($r("app.float.border_radius_6"))
//
.borderRadius($r("app.float.border_radius_6"))
.alignRules({
top: { anchor: '__container__', align: VerticalAlign.Top },
left: { anchor: '__container__', align: HorizontalAlign.Start }
...
...
@@ -45,7 +45,7 @@ export struct CarouselLayout01CardView {
// .id('img_corner_top_Left')
// }
Text(this.item.
t
itle)
Text(this.item.
newsT
itle)
.width(CommonConstants.FULL_PARENT)
.height(39)
.padding({ left: 8, right: 69, bottom: 8 })
...
...
sight_harmony/features/wdComponent/src/main/ets/components/view/BannerComponent.ets
View file @
89b4121
...
...
@@ -49,6 +49,7 @@ export struct BannerComponent {
}
.margin({ left: $r('app.float.main_margin'), right: $r('app.float.main_margin') })
.padding({ bottom: 14 })
.borderRadius($r('app.float.image_border_radius'))
.displayCount(this.buildDisplayCount()) // 仅展示1个图片
.cachedCount(2)
.index(1) // The default index of Swiper.
...
...
sight_harmony/features/wdComponent/src/main/ets/components/view/CompStyle_09.ets
View file @
89b4121
...
...
@@ -22,9 +22,18 @@ export struct CompStyle_09 {
.margin({ bottom: 19 })
}
// 大图
Image(this.compDTO.operDataList[0].coverUrl)
.width('100%')
.borderRadius({topLeft: $r('app.float.image_border_radius'), topRight: $r('app.float.image_border_radius')})
Stack(){
Image(this.compDTO.operDataList[0].coverUrl)
.width('100%')
.borderRadius({topLeft: $r('app.float.image_border_radius'), topRight: $r('app.float.image_border_radius')})
Text('专题')
.fontSize($r('app.float.font_size_12'))
.padding({left: 8, right: 8, top: 3, bottom: 3})
.backgroundColor(Color.Red)
.fontColor(Color.White)
.borderRadius($r('app.float.button_border_radius'))
.margin({left: 5, bottom: 5})
}.alignContent(Alignment.BottomStart)
// 时间线--后端返回三个,
Column(){
ForEach(this.compDTO.operDataList[0].slideShows, (item:slideShows, index:number) => {
...
...
@@ -68,20 +77,27 @@ export struct CompStyle_09 {
Column(){
Stack() {
if(index < this.compDTO.operDataList[0].slideShows.length - 1) {
Line()
.width(1)
.startPoint([4, index > 0 ? 0 : 20])
.endPoint([4, 100])
.stroke($r('app.color.color_EDEDED'))
Divider()
.vertical(true)
.color($r('app.color.color_EDEDED'))
.strokeWidth(1)
.
strokeLineCap(LineCapStyle.Butt
)
.
margin({top: index > 0 ? 0 : 16, left: 4}
)
}
if(index > 0 && index == this.compDTO.operDataList[0].slideShows.length - 1) {
Divider()
.vertical(true)
.color($r('app.color.color_EDEDED'))
.strokeWidth(1)
.height(16)
.margin({left: 4})
}
Column(){
Row() {
// 标题
Image($r("app.media.point_icon"))
.width(9)
.height(
6
)
.height(
9
)
.margin({ right: 5 })
Text(DateTimeUtils.formatDate(item.publishTime, "MM月dd日 HH:mm"))
.fontSize($r('app.float.font_size_12'))
...
...
@@ -90,6 +106,7 @@ export struct CompStyle_09 {
}
.width(CommonConstants.FULL_WIDTH)
.height(32)
.alignItems(VerticalAlign.Center)
Row() {
Text(item.newsTitle)
.fontSize($r('app.float.font_size_17'))
...
...
@@ -109,8 +126,9 @@ export struct CompStyle_09 {
}
}
}
.alignContent(Alignment.Start)
.alignContent(Alignment.
Top
Start)
}
.height(item.fullColumnImgUrls[0] && item.fullColumnImgUrls[0].url ? 100 : 78)
.alignItems(HorizontalAlign.Start)
}
}
\ No newline at end of file
...
...
sight_harmony/features/wdComponent/src/main/ets/components/view/CompStyle_10.ets
View file @
89b4121
...
...
@@ -24,12 +24,21 @@ export struct CompStyle_10 {
.margin({ bottom: 19 })
}
// 大图
Image(this.compDTO.operDataList[0] && this.compDTO.operDataList[0].coverUrl)
.width('100%')
.borderRadius({topLeft: $r('app.float.image_border_radius'), topRight: $r('app.float.image_border_radius')})
.onClick((event: ClickEvent) => {
ProcessUtils.processPage(this.compDTO?.operDataList[0])
})
Stack(){
Image(this.compDTO.operDataList[0] && this.compDTO.operDataList[0].coverUrl)
.width('100%')
.borderRadius({topLeft: $r('app.float.image_border_radius'), topRight: $r('app.float.image_border_radius')})
.onClick((event: ClickEvent) => {
ProcessUtils.processPage(this.compDTO?.operDataList[0])
})
Text('专题')
.fontSize($r('app.float.font_size_12'))
.padding({left: 8, right: 8, top: 3, bottom: 3})
.backgroundColor(Color.Red)
.fontColor(Color.White)
.borderRadius($r('app.float.button_border_radius'))
.margin({left: 5, bottom: 5})
}.alignContent(Alignment.BottomStart)
// 专题列表--后端返回三个,
Column(){
ForEach(this.compDTO.operDataList[0].slideShows, (item:slideShows, index:number) => {
...
...
sight_harmony/features/wdComponent/src/main/ets/components/view/HeadPictureCardComponent.ets
View file @
89b4121
...
...
@@ -10,8 +10,8 @@ export struct HeadPictureCardComponent {
Stack() {
Image(this.compDTO.operDataList[0].coverUrl)
.width(CommonConstants.FULL_WIDTH)
.height(CommonConstants.FULL_HEIGHT)
.autoResize(true)
.borderRadius($r('app.float.image_border_radius'))
if (this.compDTO.operDataList[0].newsTitle) {
Row()
.width(CommonConstants.FULL_WIDTH)
...
...
@@ -38,7 +38,6 @@ export struct HeadPictureCardComponent {
}
.alignContent(Alignment.Bottom)
.width(CommonConstants.FULL_WIDTH)
.height(200)
.padding(
{ top: 16, bottom: 16, left: 14, right: 14 })
.onClick((event: ClickEvent) => {
...
...
Please
register
or
login
to post a comment