yangchenggong1_wd

fix |> 20506 人民号频道,切换推荐和关注tab,选中tab标题不应上抬。

@@ -260,7 +260,7 @@ export struct TopNavigationComponentNew { @@ -260,7 +260,7 @@ export struct TopNavigationComponentNew {
260 buildTabBarItems(mourningCheckFn: (channelId: string) => boolean) { 260 buildTabBarItems(mourningCheckFn: (channelId: string) => boolean) {
261 ForEach(this.topNavList, (navItem: TopNavDTO, index: number) => { 261 ForEach(this.topNavList, (navItem: TopNavDTO, index: number) => {
262 ListItem() { 262 ListItem() {
263 - this.tabBarBuilder(navItem, index) 263 + this.tabBarBuilder(navItem, index,true)
264 } 264 }
265 .grayscale(mourningCheckFn(`${navItem.channelId}`) ? 1 : 0) 265 .grayscale(mourningCheckFn(`${navItem.channelId}`) ? 1 : 0)
266 }); 266 });
@@ -374,7 +374,7 @@ export struct TopNavigationComponentNew { @@ -374,7 +374,7 @@ export struct TopNavigationComponentNew {
374 * @param index 374 * @param index
375 */ 375 */
376 @Builder 376 @Builder
377 - tabBarBuilder(item: TopNavDTO, index: number) { 377 + tabBarBuilder(item: TopNavDTO, index: number,isRmh:boolean = false) {
378 Column() { 378 Column() {
379 379
380 if (item.iconUrl && item.iconCUrl) { 380 if (item.iconUrl && item.iconCUrl) {
@@ -398,11 +398,17 @@ export struct TopNavigationComponentNew { @@ -398,11 +398,17 @@ export struct TopNavigationComponentNew {
398 }) 398 })
399 .maxLines(this.MAX_LINE) 399 .maxLines(this.MAX_LINE)
400 .id(index.toString()) 400 .id(index.toString())
  401 + if(isRmh){
  402 + Image($r('app.media.icon_channel_active'))//.colorFilter(ColorUtils.getDrawingColorFilter(this.getBothColor("")))
  403 + .width(20)
  404 + .height(3)
  405 + .visibility(this.currentTopNavSelectedIndex === index?Visibility.Visible:Visibility.Hidden)
  406 + }else{
401 if (this.currentTopNavSelectedIndex === index) { 407 if (this.currentTopNavSelectedIndex === index) {
402 Image($r('app.media.icon_channel_active'))//.colorFilter(ColorUtils.getDrawingColorFilter(this.getBothColor(""))) 408 Image($r('app.media.icon_channel_active'))//.colorFilter(ColorUtils.getDrawingColorFilter(this.getBothColor("")))
403 .width(20) 409 .width(20)
404 .height(3) 410 .height(3)
405 - 411 + }
406 } 412 }
407 } 413 }
408 414