ChartItemCompereComponent.ets 1.21 KB
import { ContentDetailDTO } from 'wdBean/Index'

@Component
export struct ChartItemCompereComponent {
 // @Consume liveDetailsBean: LiveDetailsBean
  @Consume contentDetailData: ContentDetailDTO
  aboutToAppear(): void {
  }

  build() {
    ListItem() {
      Column() {
        Row() {
          Image($r('app.media.default_head'))
            .borderRadius(10)
            .width(20)
            .height(20)
            .margin({ right: 8 })

          Text('人民日报')
            .fontSize(14)
            .fontColor('#FFFFFFFF')
            .margin({ right: 8 })

          Text(' 主持人 ')
            .fontSize(11)
            .backgroundColor('#FFFFC63F')
            .fontColor('#FFFFFFFF')
            .padding({ top: 2, bottom: 2, left: 4, right: 4 })
            .borderRadius(4)
        }
        .margin({ bottom: 8 })
        .justifyContent(FlexAlign.Start)

        Text(this.contentDetailData.newIntroduction).lineHeight(22).fontColor('#FFFFFFFF').fontSize(14)
      }
      .backgroundColor('#4D000000')
      .borderRadius(3)
      .padding({
        top: 6,
        bottom: 6,
        left: 8,
        right: 8
      })
      .margin({ left: 16, bottom: 4 })
      .alignItems(HorizontalAlign.Start)
    }

  }
}