yuzhilin

tab 样式优化

@@ -263,10 +263,10 @@ export struct TopNavigationComponent { @@ -263,10 +263,10 @@ export struct TopNavigationComponent {
263 if (this.currentTopNavSelectedIndex == 0) { 263 if (this.currentTopNavSelectedIndex == 0) {
264 return item.name === '视频' ? Color.White : '#e5e0e0' 264 return item.name === '视频' ? Color.White : '#e5e0e0'
265 } else { 265 } else {
266 - return this.currentTopNavSelectedIndex === index ? Color.Black : Color.Gray 266 + return this.currentTopNavSelectedIndex === index ? Color.Black : "#999999"
267 } 267 }
268 } else { 268 } else {
269 - return this.currentTopNavSelectedIndex === index ? Color.Black : Color.Gray 269 + return this.currentTopNavSelectedIndex === index ? Color.Black : "#999999"
270 } 270 }
271 } 271 }
272 272
@@ -274,30 +274,28 @@ export struct TopNavigationComponent { @@ -274,30 +274,28 @@ export struct TopNavigationComponent {
274 tabBarBuilder(item: TopNavDTO, index: number) { 274 tabBarBuilder(item: TopNavDTO, index: number) {
275 Column() { 275 Column() {
276 Text(item.name) 276 Text(item.name)
277 - .fontSize(this.currentTopNavSelectedIndex === index ? $r('app.float.selected_text_size') : $r('app.float.normal_text_size')) 277 + .fontSize($r('app.float.selected_text_size'))
278 .fontWeight(this.currentTopNavSelectedIndex === index ? FontWeight.Bold : FontWeight.Normal) 278 .fontWeight(this.currentTopNavSelectedIndex === index ? FontWeight.Bold : FontWeight.Normal)
279 .fontColor(this.getFontColor(item, index)) 279 .fontColor(this.getFontColor(item, index))
280 - .padding({ top: $r('app.float.top_tab_item_padding_top') }) 280 + .padding({ top: $r('app.float.top_tab_item_padding_top') , bottom: $r('app.float.top_tab_item_padding_bottom')})
281 .maxLines(this.MAX_LINE) 281 .maxLines(this.MAX_LINE)
282 if (this.currentTopNavSelectedIndex === index) { 282 if (this.currentTopNavSelectedIndex === index) {
283 Row() 283 Row()
284 .width(20) 284 .width(20)
285 .height(3) 285 .height(3)
286 .backgroundImage($r('app.media.icon_channel_active'), ImageRepeat.NoRepeat) 286 .backgroundImage($r('app.media.icon_channel_active'), ImageRepeat.NoRepeat)
  287 + .backgroundImageSize(ImageSize.Contain)
287 } 288 }
288 -  
289 } 289 }
290 .hoverEffect(HoverEffect.Highlight) 290 .hoverEffect(HoverEffect.Highlight)
291 .constraintSize({ 291 .constraintSize({
292 minWidth: $r('app.float.top_tab_item_min_width'), 292 minWidth: $r('app.float.top_tab_item_min_width'),
293 maxWidth: $r('app.float.top_tab_item_max_width') 293 maxWidth: $r('app.float.top_tab_item_max_width')
294 }) 294 })
295 - // .margin({ right: 36 })  
296 .backgroundColor(Color.Transparent) 295 .backgroundColor(Color.Transparent)
297 .padding({ 296 .padding({
298 left: $r('app.float.top_tab_item_padding_horizontal'), 297 left: $r('app.float.top_tab_item_padding_horizontal'),
299 right: $r('app.float.top_tab_item_padding_horizontal'), 298 right: $r('app.float.top_tab_item_padding_horizontal'),
300 - bottom: $r('app.float.top_tab_item_padding_bottom')  
301 }) 299 })
302 .id(`col_tabBar${index}`) 300 .id(`col_tabBar${index}`)
303 .margin({ right: this.myChannelList.length === index + 1 ? 36 : 0 }) 301 .margin({ right: this.myChannelList.length === index + 1 ? 36 : 0 })
@@ -34,7 +34,7 @@ @@ -34,7 +34,7 @@
34 }, 34 },
35 { 35 {
36 "name": "selected_text_size", 36 "name": "selected_text_size",
37 - "value": "18fp" 37 + "value": "17vp"
38 }, 38 },
39 { 39 {
40 "name": "font_size_18", 40 "name": "font_size_18",
@@ -178,11 +178,11 @@ @@ -178,11 +178,11 @@
178 }, 178 },
179 { 179 {
180 "name": "top_tab_item_padding_bottom", 180 "name": "top_tab_item_padding_bottom",
181 - "value": "5vp" 181 + "value": "2vp"
182 }, 182 },
183 { 183 {
184 "name": "top_tab_item_padding_top", 184 "name": "top_tab_item_padding_top",
185 - "value": "2vp" 185 + "value": "5vp"
186 }, 186 },
187 { 187 {
188 "name": "top_bar_height", 188 "name": "top_bar_height",