Showing
1 changed file
with
10 additions
and
4 deletions
| @@ -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 (this.currentTopNavSelectedIndex === index) { | 401 | + if(isRmh){ |
| 402 | Image($r('app.media.icon_channel_active'))//.colorFilter(ColorUtils.getDrawingColorFilter(this.getBothColor(""))) | 402 | Image($r('app.media.icon_channel_active'))//.colorFilter(ColorUtils.getDrawingColorFilter(this.getBothColor(""))) |
| 403 | .width(20) | 403 | .width(20) |
| 404 | .height(3) | 404 | .height(3) |
| 405 | - | 405 | + .visibility(this.currentTopNavSelectedIndex === index?Visibility.Visible:Visibility.Hidden) |
| 406 | + }else{ | ||
| 407 | + if (this.currentTopNavSelectedIndex === index) { | ||
| 408 | + Image($r('app.media.icon_channel_active'))//.colorFilter(ColorUtils.getDrawingColorFilter(this.getBothColor(""))) | ||
| 409 | + .width(20) | ||
| 410 | + .height(3) | ||
| 411 | + } | ||
| 406 | } | 412 | } |
| 407 | } | 413 | } |
| 408 | 414 |
-
Please register or login to post a comment