PagePersonFunction.ets 1.16 KB
import MinePagePersonalFunctionsItem from '../../viewmodel/MinePagePersonalFunctionsItem'

@Component
export struct PagePersonFunction{
  @ObjectLink item: MinePagePersonalFunctionsItem
  @State noDivider:boolean = false

  build() {
    Row(){
      Column(){
        Stack({ alignContent: Alignment.TopEnd }){
          Image(this.item.imgSrc)
            .objectFit(ImageFit.Auto)
            .interpolation(ImageInterpolation.High)
          if (this.item.isShowRedPoint) {
            Button()
              .type(ButtonType.Circle)
              .width("12lpx")
              .height("12lpx")
              .backgroundColor($r('app.color.color_ED2800'))
          }
        }.width('46lpx')
        .height('46lpx')

        Text(`${this.item.msg}`)
          .margin({top:'8lpx'})
          .height('23lpx')
          .fontColor($r('app.color.color_222222'))
          .fontSize('23lpx')
      }
      .alignItems(HorizontalAlign.Center)
      .width('100%')
      Blank()
        .layoutWeight(1)
      if(!this.noDivider){
        Text().backgroundColor($r('app.color.color_222222'))
          .opacity(0.1)
          .width('2lpx')
          .height('29lpx')
      }
    }
  }

}