@Entry
@Component
struct  index1{
  @State message: string = "harmony开发  支付宝首页"
  build() {
Stack({
   alignContent: Alignment.Bottom
}){
  //主题展示区 整体使用stack布局 +底部tab
  //头部加主题页面 (主题页面可以滚动)
Stack({alignContent: Alignment.Top}){
  //头部
Row(){
Text('我是搜索区域').fontColor(Color.White)
}
.width('100%')
  .height(60)
  .backgroundColor('#5b73de')
  .zIndex(10)

Scroll(){
  Column(){
  Text('w ').height(200)
    Text('w ').height(200)
    Text('w ').height(200)
    Text('w ').height(200)
    Text('w ').height(200)
    Text('w ').height(200)


  }
  .width('100%')
  //将数据或者主键完整展示
  .padding({top:60,bottom:60})
}
//}主题页面
}
.height('100%')
.width('100%')



  Row(){
    Column(){
      Image($r('app.media.zfb_tab_home'))
        .width(35)
    }
    .layoutWeight(1)
    Column(){
      Image($r('app.media.zfb_tab_money'))
        .width(28).margin({bottom:2})
      Text('理财')
    }
    .layoutWeight(1)
    Column(){
      Image($r('app.media.zfb_tab_life'))
        .width(28).margin({bottom:2})
      Text('生活')
    }
    .layoutWeight(1)

    Column(){
      Image($r('app.media.zfb_tab_chat'))
        .width(28).margin({bottom:2})
      Text('消息')
    }
    .layoutWeight(1)
    Column(){
      Image($r('app.media.zfb_tab_me'))
        .width(28).margin({bottom:2})
      Text('我的')
    }
    .layoutWeight(1)

  }
  .width('100%')
  .height(60)
  .backgroundColor(Color.White)

}
.width('100%')
.height('100%')
.backgroundColor(Color.Pink)


  }
}
Logo

讨论HarmonyOS开发技术,专注于API与组件、DevEco Studio、测试、元服务和应用上架分发等。

更多推荐