zhangbo1_wd

底导按钮UI微调

@@ -123,30 +123,16 @@ export struct BottomNavigationComponent { @@ -123,30 +123,16 @@ export struct BottomNavigationComponent {
123 123
124 @Builder 124 @Builder
125 tabBarBuilder(navItem: BottomNavDTO, index: number) { 125 tabBarBuilder(navItem: BottomNavDTO, index: number) {
126 - Stack({ alignContent: Alignment.Bottom }) {  
127 - // Image(this.getBottomIcon(navItem, this.currentNavIndex === index))  
128 - // .height(CommonConstants.FULL_PARENT)  
129 - // .padding({  
130 - // bottom: 15,  
131 - // left: 10,  
132 - // right: 10,  
133 - // top: 2  
134 - // })  
135 - // .aspectRatio(this.ASPECT_RATIO_1_1)  
136 - // .alt(this.getBottomLocalIcon(navItem, this.currentNavIndex === index)) 126 + Column() {
137 ImageKnifeComponent({ imageKnifeOption: this.getBottomImageKnifeOption(navItem, this.currentNavIndex === index) }) 127 ImageKnifeComponent({ imageKnifeOption: this.getBottomImageKnifeOption(navItem, this.currentNavIndex === index) })
138 - .padding({  
139 - bottom: 15,  
140 - left: 10,  
141 - right: 10,  
142 - top: 2  
143 - })  
144 - .width('100%')  
145 - .height('100%') 128 + .padding(1)
  129 + .margin({ top: 2 })
  130 + .width(32)
  131 + .height(32)
146 .enabled(false) 132 .enabled(false)
147 133
148 Text(navItem.name) 134 Text(navItem.name)
149 - .margin({ bottom: $r('app.float.bottom_navigation_margin_bottom') }) 135 + .margin({ top: 2 })
150 .fontWeight(this.currentNavIndex === index ? FontWeight.Bold : FontWeight.Normal) 136 .fontWeight(this.currentNavIndex === index ? FontWeight.Bold : FontWeight.Normal)
151 .textAlign(TextAlign.Center) 137 .textAlign(TextAlign.Center)
152 .fontSize($r('app.float.font_size_10'))// .fontColor(this.currentNavIndex === index ? Color.Red : Color.Gray) 138 .fontSize($r('app.float.font_size_10'))// .fontColor(this.currentNavIndex === index ? Color.Red : Color.Gray)