liujian1_wd

图文详情页面

... ... @@ -20,16 +20,28 @@ export struct TopNavigationComponent {
build() {
Column() {
RelativeContainer(){
Row(){
Image($r('app.media.icon_search'))
.width(18)
.height(18)
Stack({ alignContent: Alignment.Center }){
Image($r('app.media.background_search'))
.width('100%')
.height('100%')
.objectFit(ImageFit.Contain)
Row(){
Image($r('app.media.icon_search'))
.width(18)
.height(18)
Text('河南大雪')
.fontColor($r('app.color.color_B0B0B0'))
.fontSize($r('app.float.font_size_13'))
}
.alignItems(VerticalAlign.Center)
.justifyContent(FlexAlign.Center)
}
.alignItems(VerticalAlign.Center)
.justifyContent(FlexAlign.Center)
.height(30)
.width(123)
.backgroundColor($r('app.color.color_D8D8D8'))
.id('search')
.alignRules({ left: { anchor: "__container__", align: HorizontalAlign.Start },
center: { anchor: "__container__", align: VerticalAlign.Center } })
... ... @@ -50,19 +62,25 @@ export struct TopNavigationComponent {
.alignRules({ middle: { anchor: "__container__", align: HorizontalAlign.Center },
center: { anchor: "__container__", align: VerticalAlign.Center } })
Row(){
Image($r('app.media.icon_read_paper_home'))
.width(18)
.height(18)
Text('早晚报')
.fontColor($r('app.color.color_fff'))
.fontSize($r('app.float.font_size_13'))
Stack({ alignContent: Alignment.Center }){
Image($r('app.media.background_read_paper_home'))
.width('100%')
.height('100%')
.objectFit(ImageFit.Contain)
Row(){
Image($r('app.media.icon_read_paper_home'))
.width(18)
.height(18)
Text('早晚报')
.fontColor($r('app.color.color_B0B0B0'))
.fontSize($r('app.float.font_size_13'))
}
.alignItems(VerticalAlign.Center)
.justifyContent(FlexAlign.Center)
}
.alignItems(VerticalAlign.Center)
.justifyContent(FlexAlign.Center)
.height(30)
.width(124)
.backgroundColor($r('app.color.color_D8D8D8'))
.id('read')
.alignRules({ right: { anchor: "__container__", align: HorizontalAlign.End },
center: { anchor: "__container__", align: VerticalAlign.Center } })
... ...