yuzhilin

首页头部样式优化

@@ -170,9 +170,9 @@ export struct TopNavigationComponent { @@ -170,9 +170,9 @@ export struct TopNavigationComponent {
170 }.width('100%') 170 }.width('100%')
171 .justifyContent(FlexAlign.SpaceBetween) 171 .justifyContent(FlexAlign.SpaceBetween)
172 } 172 }
173 - .height('73lpx')  
174 .width('100%') 173 .width('100%')
175 - .justifyContent(FlexAlign.End) 174 + .height(40)
  175 + .padding({top:10})
176 .backgroundColor($r('app.color.white')) 176 .backgroundColor($r('app.color.white'))
177 .visibility(this._currentNavIndex == 0 ? Visibility.Visible : Visibility.None) 177 .visibility(this._currentNavIndex == 0 ? Visibility.Visible : Visibility.None)
178 178
@@ -29,20 +29,16 @@ export struct FirstTabTopSearchComponent{ @@ -29,20 +29,16 @@ export struct FirstTabTopSearchComponent{
29 build(){ 29 build(){
30 Row(){ 30 Row(){
31 Image($r('app.media.icon_search')) 31 Image($r('app.media.icon_search'))
32 - .objectFit(ImageFit.Cover)  
33 - .height('23lpx')  
34 - .width('23lpx')  
35 - .margin({right:'13lpx'})  
36 - .interpolation(ImageInterpolation.Medium) 32 + .width(18)
  33 + .height(18)
37 34
38 if(this.searchTextData!=null && this.searchTextData.length>0){ 35 if(this.searchTextData!=null && this.searchTextData.length>0){
39 Swiper(this.swiperController) { 36 Swiper(this.swiperController) {
40 ForEach(this.searchTextData, (item: string, index: number ) => { 37 ForEach(this.searchTextData, (item: string, index: number ) => {
41 Text(item) 38 Text(item)
42 - .fontWeight('400lpx')  
43 - .fontSize('25lpx')  
44 - .fontColor($r('app.color.color_666666'))  
45 - .lineHeight('35lpx') 39 + .fontWeight(400)
  40 + .fontColor($r('app.color.color_B0B0B0'))
  41 + .fontSize($r('app.float.font_size_13'))
46 .textAlign(TextAlign.Start) 42 .textAlign(TextAlign.Start)
47 .maxLines(1) 43 .maxLines(1)
48 .textOverflow({ overflow: TextOverflow.Clip}) 44 .textOverflow({ overflow: TextOverflow.Clip})
@@ -53,13 +49,13 @@ export struct FirstTabTopSearchComponent{ @@ -53,13 +49,13 @@ export struct FirstTabTopSearchComponent{
53 .interval(3000) 49 .interval(3000)
54 .indicator(false) 50 .indicator(false)
55 .vertical(true) 51 .vertical(true)
  52 + .height(30)
56 } 53 }
57 - }.width('257lpx')  
58 - .height('61lpx')  
59 - .padding({left:'31lpx'}) 54 + }.height(30)
  55 + .width(124)
  56 + .padding({left:15})
60 .backgroundImage($r('app.media.background_search')) 57 .backgroundImage($r('app.media.background_search'))
61 .backgroundImageSize(ImageSize.Cover) 58 .backgroundImageSize(ImageSize.Cover)
62 - .alignItems(VerticalAlign.Center)  
63 } 59 }
64 60
65 } 61 }