王士厅
... ... @@ -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.title)
Text(this.item.newsTitle)
.width(CommonConstants.FULL_PARENT)
.height(39)
.padding({ left: 8, right: 69, bottom: 8 })
... ...
... ... @@ -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.
... ...
... ... @@ -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.TopStart)
}
.height(item.fullColumnImgUrls[0] && item.fullColumnImgUrls[0].url ? 100 : 78)
.alignItems(HorizontalAlign.Start)
}
}
\ No newline at end of file
... ...
... ... @@ -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) => {
... ...
... ... @@ -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) => {
... ...