LoginPages.razor 879 B

12345678910111213141516171819202122232425262728
  1. @page "/LoginPages"
  2. @using System.ComponentModel.DataAnnotations;
  3. @using System.Text.Json;
  4. @using System.ComponentModel
  5. <div style="margin:100px">
  6. <Spin Spinning="isLoading">
  7. @if (model != null)
  8. {
  9. <Form OnFinish="OnLogin"
  10. Model="@model"
  11. LabelCol="new ColLayoutParam() {Span = 6 }">
  12. <FormItem Label="用户名">
  13. <Input TValue="string" @bind-Value="context.Name"/>
  14. </FormItem>
  15. <FormItem Label="密码">
  16. <Input TValue="string" @bind-Value="context.Password" type="password" />
  17. </FormItem>
  18. <FormItem WrapperColOffset="6">
  19. <button type="@ButtonType.Primary" HtmlType="submit">登录</button>
  20. </FormItem>
  21. </Form>
  22. }
  23. </Spin>
  24. </div>