@page "/LoginPages"

@using System.ComponentModel.DataAnnotations;
@using System.Text.Json;
@using System.ComponentModel

<div style="margin:100px">
    <Spin Spinning="isLoading">
        @if (model != null)
        {
            <Form OnFinish="OnLogin"
                  Model="@model"
                  LabelCol="new ColLayoutParam() {Span = 6 }">
                <FormItem Label="用户名">
                    <Input TValue="string" @bind-Value="context.Name"/>
                </FormItem>
                <FormItem Label="密码">
                    <Input TValue="string" @bind-Value="context.Password" type="password" />
                </FormItem>
                <FormItem WrapperColOffset="6">
                    <button type="@ButtonType.Primary" HtmlType="submit">登录</button>
                </FormItem>
            </Form>
        }
    </Spin>
</div>


