Prechádzať zdrojové kódy

修复通用设置,关于我们在hicar模式下滚动高度的bug

onecold 1 rok pred
rodič
commit
4f6dbd8699

+ 6 - 2
entry/src/main/ets/pages/AboutPage.ets

@@ -216,13 +216,17 @@ export struct AboutPage{
               })
             })
         }
-        .height('100%')
         .width('100%')
 
       }
-      .height(px2vp(DisplayUtil.getHeight()-AppUtil.getStatusBarHeight()-AppUtil.getNavigationIndicatorHeight()))
+      .layoutWeight(1)
+      .transition(TransitionEffect.move(TransitionEdge.BOTTOM)
+        .animation({ duration: 380, curve: Curve.Ease,delay:50 }))
       .backgroundColor(this.isDarkMode?Color.Black:this.themeColor)
       .linearGradient(!this.isDarkMode ? {colors:[[this.themeColor, 0.0], [this.getGradientColor(this.themeColor, 40), 0.6]]} : undefined)
     }
+    .layoutWeight(1)
+    .width('100%')
+    .height('100%')
   }
 }    

+ 4 - 1
entry/src/main/ets/pages/NewIndex.ets

@@ -173,7 +173,10 @@ struct NewIndex {
   onPageShow() {
     console.log('getHiCarStatus isHiCarStatus:' + this.isHiCarStatus)
     if(this.isHiCarStatus||this.isBigScreen()){
-      this.isShowDrawer = true
+      this.getUIContext()?.animateTo({ duration: 555 }, () => {
+        this.isShowDrawer = true
+        this.offsetX = 0
+      })
       this.isShowTitleBar = false
     }
 

+ 2 - 2
entry/src/main/ets/pages/SettingPage.ets

@@ -1133,12 +1133,12 @@ export struct SettingPage {
         .justifyContent(FlexAlign.Start)
       }
       .scrollBar(BarState.Auto)
-      .height(px2vp(DisplayUtil.getHeight() - AppUtil.getStatusBarHeight() - AppUtil.getNavigationIndicatorHeight()))
+      // .height(px2vp(DisplayUtil.getHeight() - AppUtil.getStatusBarHeight() - AppUtil.getNavigationIndicatorHeight()))
       .width('100%')
       .margin({ bottom: 10 })
       .backgroundColor($r('app.color.settings_background'))
     }
-
+    .layoutWeight(1)
     .height('100%')
     .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM])
   }