LoginPages.razor 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. @page "/"
  2. @layout Layouts.LoginLayout
  3. <div class="login-NavLogin">
  4. <div style="padding:30px">
  5. <Card Bordered="true" Title=@("用户登录") Style="width:400px" Hoverable="true">
  6. <Body>
  7. <Form Model="@model" OnFinish="OnLogin">
  8. <FormItem>
  9. <Space Direction="DirectionVHType.Vertical" Style="width:100%">
  10. <SpaceItem>
  11. <AntDesign.Input Placeholder="请输入用户名" Size="@InputSize.Large" @bind-Value="context.Name">
  12. <Prefix><Icon Type="user"></Icon></Prefix>
  13. </AntDesign.Input>
  14. <br/>
  15. </SpaceItem>
  16. <SpaceItem>
  17. <AntDesign.Input Placeholder="请输入密码" Size="@InputSize.Large" @bind-Value="context.Password" type="password">
  18. <Prefix><Icon Type="lock"></Icon></Prefix>
  19. </AntDesign.Input>
  20. </SpaceItem>
  21. </Space>
  22. </FormItem>
  23. <Space Direction="DirectionVHType.Vertical" Style="width:100%">
  24. <SpaceItem>
  25. <Spin Spinning="isLoading">
  26. <Button Type="primary" HtmlType="submit" Class="submit" Size="large" Block>登&nbsp;录</Button>
  27. </Spin>
  28. </SpaceItem>
  29. <SpaceItem>
  30. <div class="other">
  31. <a style="float: right;">
  32. 忘记密码
  33. </a>
  34. </div>
  35. </SpaceItem>
  36. </Space>
  37. </Form>
  38. </Body>
  39. </Card>
  40. </div>
  41. </div>
  42. <style>
  43. .login-NavLogin {
  44. position: absolute;
  45. left: 50%;
  46. top: 40%;
  47. transform: translate(-50%, -50%);
  48. }
  49. body {
  50. background-image: url(images/bg1.jpg);
  51. background-attachment: fixed;
  52. background-repeat: no-repeat;
  53. background-size: cover;
  54. background-position: center;
  55. }
  56. </style>