LoginView.ets 846 B

12345678910111213141516171819202122232425262728293031323334
  1. import { SafeView, WindowHelper } from '@szyx/sdk_base'
  2. @Component
  3. @Preview
  4. export struct LoginView {
  5. @Consume('pageInfos') pageInfos: NavPathStack
  6. // 手机号
  7. @State phone: string | undefined = undefined
  8. // 密码
  9. @State pwd: string | undefined = undefined
  10. // 是否勾选协议
  11. @State checkAgreement: boolean = false
  12. // 是不是验证码登录
  13. @State isCode: boolean = true
  14. aboutToAppear(): void {
  15. WindowHelper.showStatusBar()
  16. }
  17. build() {
  18. SafeView({
  19. pageInfos: this.pageInfos ?? undefined
  20. }) {
  21. Text('登录')
  22. .id('HelloWorld')
  23. .fontSize(50)
  24. .fontWeight(FontWeight.Bold)
  25. .alignRules({
  26. center: { anchor: '__container__', align: VerticalAlign.Center },
  27. middle: { anchor: '__container__', align: HorizontalAlign.Center }
  28. })
  29. }
  30. }
  31. }