Toggle navigation
Toggle navigation
This project
Loading...
Sign in
developOne
/
harmonyPool
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
fanmingyou3_wd
2024-01-09 17:35:01 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
f81c83fcb9a240236703d1dfbf4c8e422af1cdca
f81c83fc
1 parent
ccb3800b
顶导组件增加选中的底部页签
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
sight_harmony/wdComponent/src/main/ets/components/TopNavigationComponent.ets
sight_harmony/wdComponent/src/main/ets/components/TopNavigationComponent.ets
View file @
f81c83f
...
...
@@ -22,7 +22,7 @@ export struct TopNavigationComponent {
TabContent() {
PageComponent({ groupList: this.groupList })
}
.tabBar(this.
T
abBarBuilder(navItem, index))
.tabBar(this.
t
abBarBuilder(navItem, index))
}, (navItem: TopNavBean) => JSON.stringify(navItem));
}
.barHeight($r('app.float.top_tab_bar_height'))
...
...
@@ -35,7 +35,7 @@ export struct TopNavigationComponent {
}
@Builder
T
abBarBuilder(item: TopNavBean, index: number) {
t
abBarBuilder(item: TopNavBean, index: number) {
Column() {
Text(item.name)
.fontSize(this.curTabSelectedIndex === index ? $r('app.float.selected_text_size') : $r('app.float.normal_text_size'))
...
...
@@ -43,6 +43,12 @@ export struct TopNavigationComponent {
.fontColor(Color.Black)
.padding({ top: $r('app.float.top_tab_item_padding_top') })
.maxLines(this.MAX_LINE)
Divider()
.width(16)
.strokeWidth(2) // 分割线粗细度。
.padding({top:2})
.color(Color.Red)
.opacity(this.curTabSelectedIndex === index ? 1 : 0)
}
.hoverEffect(HoverEffect.Highlight)
.constraintSize({
...
...
Please
register
or
login
to post a comment