Showing
1 changed file
with
18 additions
and
10 deletions
| @@ -299,19 +299,27 @@ export struct TopNavigationComponentNew { | @@ -299,19 +299,27 @@ export struct TopNavigationComponentNew { | ||
| 299 | }) | 299 | }) |
| 300 | .grayscale(this.GrayManage.get().isMourning() ? 1 : 0) | 300 | .grayscale(this.GrayManage.get().isMourning() ? 1 : 0) |
| 301 | 301 | ||
| 302 | - List({ scroller: this.listScroller }) { | ||
| 303 | - ForEach(this.myChannelList, (navItem: TopNavDTO, index: number) => { | ||
| 304 | - ListItem() { | ||
| 305 | - this.tabBarBuilder(navItem, index) | ||
| 306 | - } | ||
| 307 | - .grayscale(this.GrayManage.get().isNewsMourning(`${navItem.channelId}`) ? 1 : 0) | 302 | + Stack({alignContent: Alignment.Start}){ |
| 303 | + List({ scroller: this.listScroller }) { | ||
| 304 | + ForEach(this.myChannelList, (navItem: TopNavDTO, index: number) => { | ||
| 305 | + ListItem() { | ||
| 306 | + this.tabBarBuilder(navItem, index) | ||
| 307 | + }.blendMode(BlendMode.SRC_IN, BlendApplyType.OFFSCREEN) | ||
| 308 | + .grayscale(this.GrayManage.get().isNewsMourning(`${navItem.channelId}`) ? 1 : 0) | ||
| 309 | + }) | ||
| 310 | + } | ||
| 311 | + .listDirection(Axis.Horizontal) | ||
| 312 | + .linearGradient({ | ||
| 313 | + angle: 90, | ||
| 314 | + colors: [[0x01000000, 0.0], [0xff000000, 0.05], [0xff000000, 0.95], [0x01000000, 1.0]] | ||
| 308 | }) | 315 | }) |
| 316 | + .blendMode(BlendMode.SRC_OVER, BlendApplyType.OFFSCREEN) | ||
| 317 | + .scrollBar(BarState.Off) | ||
| 318 | + .edgeEffect(EdgeEffect.None) | ||
| 319 | + .constraintSize({ maxWidth: '100%' }) | ||
| 320 | + .height($r('app.float.top_tab_bar_height')) | ||
| 309 | } | 321 | } |
| 310 | - .listDirection(Axis.Horizontal) | ||
| 311 | - .scrollBar(BarState.Off) | ||
| 312 | - .edgeEffect(EdgeEffect.None) | ||
| 313 | .padding({ left: 8, top: 0, right: 0 }) | 322 | .padding({ left: 8, top: 0, right: 0 }) |
| 314 | - .height($r('app.float.top_tab_bar_height')) | ||
| 315 | .id('tabList') | 323 | .id('tabList') |
| 316 | .alignRules({ | 324 | .alignRules({ |
| 317 | 'top': { 'anchor': 'topBar', 'align': VerticalAlign.Bottom }, | 325 | 'top': { 'anchor': 'topBar', 'align': VerticalAlign.Bottom }, |
-
Please register or login to post a comment