Login.razor 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. @namespace EasyTemplate.Blazor.Web.Components.Pages.Account.Login
  2. @layout CoverLayout
  3. @page "/account/login"
  4. @attribute [ReuseTabsPage(Ignore = true)]
  5. <div class="main__b__0">
  6. <div class="login">
  7. <Form Model="@Model" OnFinish="()=> HandleSubmit()">
  8. <Tabs ActiveKey="@context.LoginType">
  9. <TabPane Key="1" Tab="账号登录">
  10. <FormItem>
  11. <AntDesign.Input Placeholder="账号: admin" Size="InputSize.Large" @bind-Value="@context.Account">
  12. <Prefix><Icon Type="user" /></Prefix>
  13. </AntDesign.Input>
  14. </FormItem>
  15. <FormItem>
  16. <AntDesign.Input Placeholder="密码: 123456" Size="InputSize.Large" @bind-Value="@context.Password" Type="InputType.Password">
  17. <Prefix><Icon Type="lock" /></Prefix>
  18. </AntDesign.Input>
  19. </FormItem>
  20. </TabPane>
  21. <TabPane Key="2" Tab="手机登录">
  22. <FormItem>
  23. <AntDesign.Input Placeholder="输入手机号" Size="InputSize.Large" @bind-Value="@context.Mobile">
  24. <Prefix><Icon Type="mobile" /></Prefix>
  25. </AntDesign.Input>
  26. </FormItem>
  27. <FormItem>
  28. <InputGroup Compact>
  29. <FormItem NoStyle>
  30. <AntDesign.Input Width="228" Placeholder="输入验证码" Size="InputSize.Large" @bind-Value="@context.VerifyCode" />
  31. </FormItem>
  32. <FormItem NoStyle>
  33. <Button Loading="Loading" Icon="@IconType.Outline.Send" Size="ButtonSize.Large" OnClick="SendSM">发送验证码</Button>
  34. </FormItem>
  35. </InputGroup>
  36. </FormItem>
  37. </TabPane>
  38. </Tabs>
  39. <div>
  40. <Checkbox Checked="@context.AutoLogin" @bind-Value="@context.AutoLogin">
  41. 自动登录
  42. </Checkbox>
  43. <a style="float: right;">
  44. 忘记密码
  45. </a>
  46. </div>
  47. <Button Type="ButtonType.Primary" Loading="LoginLoading" HtmlType="submit" Class="submit" Size=" ButtonSize.Large" Block>登录</Button>
  48. @* <div class="other">
  49. <a class="register" href="/account/register">没有账号?我要注册</a>
  50. </div> *@
  51. </Form>
  52. </div>
  53. </div>