ChartItemComponent.ets 956 Bytes
import { LiveRoomItemBean } from 'wdBean/Index'

@Component
export struct ChatItemComponent {
  item: LiveRoomItemBean = {} as LiveRoomItemBean

  aboutToAppear(): void {
  }

  build() {
    Row() {
      Text() {
        // if (this.item.senderUserName) {
        //   Span(' 主持人 ')
        //     .fontSize(11)
        //     .lineHeight(20)
        //     .textBackgroundStyle({ color: '#808562', radius: 2 })
        //   Span(' ')
        // }
        Span(this.item.senderUserName + ': ')
          .fontColor('#FFFFC63F')
          .padding({ right: 118 })
        //

        Span(this.item.text)
      }
      .fontSize(14)
      .fontColor('#FFFFFFFF')
      .lineHeight(22)
      .textShadow({ offsetX: 1, offsetY: 1, color: '#4D000000', radius: 1 })

    }
    .backgroundColor('#4D000000')
    .borderRadius(3)
    .padding({
      top: 6,
      bottom: 6,
      left: 8,
      right: 8
    })
    .margin({ left: 16, bottom: 4 })
  }
}