yangchenggong1_wd

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

... ... @@ -260,7 +260,7 @@ export struct TopNavigationComponentNew {
buildTabBarItems(mourningCheckFn: (channelId: string) => boolean) {
ForEach(this.topNavList, (navItem: TopNavDTO, index: number) => {
ListItem() {
this.tabBarBuilder(navItem, index)
this.tabBarBuilder(navItem, index,true)
}
.grayscale(mourningCheckFn(`${navItem.channelId}`) ? 1 : 0)
});
... ... @@ -374,7 +374,7 @@ export struct TopNavigationComponentNew {
* @param index
*/
@Builder
tabBarBuilder(item: TopNavDTO, index: number) {
tabBarBuilder(item: TopNavDTO, index: number,isRmh:boolean = false) {
Column() {
if (item.iconUrl && item.iconCUrl) {
... ... @@ -398,11 +398,17 @@ export struct TopNavigationComponentNew {
})
.maxLines(this.MAX_LINE)
.id(index.toString())
if (this.currentTopNavSelectedIndex === index) {
if(isRmh){
Image($r('app.media.icon_channel_active'))//.colorFilter(ColorUtils.getDrawingColorFilter(this.getBothColor("")))
.width(20)
.height(3)
.visibility(this.currentTopNavSelectedIndex === index?Visibility.Visible:Visibility.Hidden)
}else{
if (this.currentTopNavSelectedIndex === index) {
Image($r('app.media.icon_channel_active'))//.colorFilter(ColorUtils.getDrawingColorFilter(this.getBothColor("")))
.width(20)
.height(3)
}
}
}
... ...