1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- @page "/"
- @layout Layouts.LoginLayout
- <div class="login-NavLogin">
- <div style="padding:30px">
- <Card Bordered="true" Title=@("用户登录") Style="width:400px" Hoverable="true">
- <Body>
- <Form Model="@model" OnFinish="OnLogin">
- <FormItem>
- <Space Direction="DirectionVHType.Vertical" Style="width:100%">
- <SpaceItem>
- <AntDesign.Input Placeholder="请输入用户名" Size="@InputSize.Large" @bind-Value="context.Name">
- <Prefix><Icon Type="user"></Icon></Prefix>
- </AntDesign.Input>
- <br/>
- </SpaceItem>
- <SpaceItem>
- <AntDesign.Input Placeholder="请输入密码" Size="@InputSize.Large" @bind-Value="context.Password" type="password">
- <Prefix><Icon Type="lock"></Icon></Prefix>
- </AntDesign.Input>
- </SpaceItem>
- </Space>
- </FormItem>
- <Space Direction="DirectionVHType.Vertical" Style="width:100%">
- <SpaceItem>
- <Spin Spinning="isLoading">
- <Button Type="primary" HtmlType="submit" Class="submit" Size="large" Block>登 录</Button>
- </Spin>
- </SpaceItem>
- <SpaceItem>
- <div class="other">
- <a style="float: right;">
- 忘记密码
- </a>
- </div>
- </SpaceItem>
- </Space>
- </Form>
- </Body>
- </Card>
- </div>
- </div>
- <style>
- .login-NavLogin {
- position: absolute;
- left: 50%;
- top: 40%;
- transform: translate(-50%, -50%);
- }
- body {
- background-image: url(images/bg1.jpg);
- background-attachment: fixed;
- background-repeat: no-repeat;
- background-size: cover;
- background-position: center;
- }
- </style>
|