Showing
2 changed files
with
5 additions
and
4 deletions
| 1 | @Component | 1 | @Component |
| 2 | export struct PermissionDesComponent { | 2 | export struct PermissionDesComponent { |
| 3 | @State translateY: number = 0 | 3 | @State translateY: number = 0 |
| 4 | + @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0 | ||
| 4 | 5 | ||
| 5 | aboutToAppear(): void { | 6 | aboutToAppear(): void { |
| 6 | this.startDismiss() | 7 | this.startDismiss() |
| @@ -29,7 +30,7 @@ export struct PermissionDesComponent { | @@ -29,7 +30,7 @@ export struct PermissionDesComponent { | ||
| 29 | // .height(60) | 30 | // .height(60) |
| 30 | .backgroundColor('#FFFFFF') | 31 | .backgroundColor('#FFFFFF') |
| 31 | .border({ radius: 5 }) | 32 | .border({ radius: 5 }) |
| 32 | - .margin({ top: 12 }) | 33 | + .margin({ top: px2vp(this.topSafeHeight) }) |
| 33 | .padding(12) | 34 | .padding(12) |
| 34 | .zIndex(20) | 35 | .zIndex(20) |
| 35 | } | 36 | } |
| @@ -115,7 +115,7 @@ struct LoginPage { | @@ -115,7 +115,7 @@ struct LoginPage { | ||
| 115 | Image($r("app.media.login_logo")) | 115 | Image($r("app.media.login_logo")) |
| 116 | .width(120) | 116 | .width(120) |
| 117 | .height(66) | 117 | .height(66) |
| 118 | - .margin({ top: 78 }) | 118 | + .margin({ top: 78 + px2vp(this.topSafeHeight) }) |
| 119 | .align(Alignment.Center) | 119 | .align(Alignment.Center) |
| 120 | 120 | ||
| 121 | LoginInputComponent({ | 121 | LoginInputComponent({ |
| @@ -225,7 +225,7 @@ struct LoginPage { | @@ -225,7 +225,7 @@ struct LoginPage { | ||
| 225 | Image($r('app.media.login_closed')) | 225 | Image($r('app.media.login_closed')) |
| 226 | .width(24) | 226 | .width(24) |
| 227 | .height(24) | 227 | .height(24) |
| 228 | - .margin({ top: 10, right: 15 }) | 228 | + .margin({ top:px2vp(this.topSafeHeight), right: 15 }) |
| 229 | .alignRules({ | 229 | .alignRules({ |
| 230 | top: { anchor: "__container__", align: VerticalAlign.Top }, | 230 | top: { anchor: "__container__", align: VerticalAlign.Top }, |
| 231 | right: { anchor: "__container__", align: HorizontalAlign.End } | 231 | right: { anchor: "__container__", align: HorizontalAlign.End } |
| @@ -249,7 +249,7 @@ struct LoginPage { | @@ -249,7 +249,7 @@ struct LoginPage { | ||
| 249 | .backgroundColor(Color.White) | 249 | .backgroundColor(Color.White) |
| 250 | }.width("100%") | 250 | }.width("100%") |
| 251 | .height("100%") | 251 | .height("100%") |
| 252 | - .padding({top:px2vp(this.topSafeHeight),bottom:px2vp(this.bottomSafeHeight)}) | 252 | + // .padding({top:px2vp(this.topSafeHeight),bottom:px2vp(this.bottomSafeHeight)}) |
| 253 | 253 | ||
| 254 | } | 254 | } |
| 255 | 255 |
-
Please register or login to post a comment