Просмотр исходного кода

修复关于我们横屏无法滚动

onecold 1 год назад
Родитель
Сommit
0020bdfe1a
1 измененных файлов с 6 добавлено и 4 удалено
  1. 6 4
      entry/src/main/ets/pages/AboutPage.ets

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

@@ -1,7 +1,7 @@
 import TitleBar from '../view/TitleBar'
 import { router } from '@kit.ArkUI'
 import { CommonConstants } from '../common/constants/CommonConstants'
-import { AppUtil, ToastUtil } from '@pura/harmony-utils'
+import { AppUtil, DisplayUtil, ToastUtil } from '@pura/harmony-utils'
 import { Utility } from '../common/util/Utility'
 import { ConfigurationConstant } from '@kit.AbilityKit'
 import { BreakpointTypeEnum } from '../common/util/BreakpointSystem'
@@ -63,10 +63,11 @@ export struct AboutPage{
       .height(this.currentBreakpoint !== BreakpointTypeEnum.SM?0:px2vp(AppUtil.getStatusBarHeight()))
       .backgroundColor($r('app.color.title_bar_bg'))
       .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP])
-
       TitleBar({model:$titleBarModel})
       Scroll(){
+
         Column(){
+
           Image($r('app.media.icon'))
             .width(150)
             .height(150)
@@ -134,10 +135,11 @@ export struct AboutPage{
               })
             })
         }
-        .height('95%')
+        .height('100%')
         .width('100%')
+
       }
-      .height('100%')
+      .height(px2vp(DisplayUtil.getHeight()-AppUtil.getStatusBarHeight()-AppUtil.getNavigationIndicatorHeight()))
       .backgroundColor(this.isDarkMode ? '#1A1A1A' : undefined)
       .linearGradient(!this.isDarkMode ? {colors:[['#FF4081', 0.0], ['#FF8C00', 0.6]]} : undefined)
     }