mirror of
https://github.com/eyebluecn/tank-front
synced 2024-04-21 12:31:55 +00:00
Finish the Login page.
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@ant-design/icons": "^4.2.1",
|
||||
"@testing-library/react": "^9.3.2",
|
||||
"@testing-library/user-event": "^7.1.2",
|
||||
"antd": "^4.3.1",
|
||||
|
||||
@@ -1,28 +1,12 @@
|
||||
|
||||
.user-login {
|
||||
|
||||
|
||||
padding-top: 150px;
|
||||
|
||||
.welcome {
|
||||
text-align: center;
|
||||
font-size: 18px;
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
padding-bottom: 40px;
|
||||
}
|
||||
|
||||
.login-form {
|
||||
|
||||
|
||||
.ant-input-prefix {
|
||||
.anticon {
|
||||
color: rgba(0, 0, 0, .25);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.login-form-button {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -5,6 +5,8 @@ import TankComponent from "../../common/component/TankComponent";
|
||||
import {Button, Col, Form, Input, message as MessageBox, Row} from 'antd';
|
||||
import User from "../../common/model/user/User";
|
||||
import Moon from "../../common/model/global/Moon";
|
||||
import {LockOutlined, UserOutlined} from '@ant-design/icons';
|
||||
|
||||
|
||||
interface IProps extends RouteComponentProps {
|
||||
|
||||
@@ -30,7 +32,6 @@ class RawLogin extends TankComponent<IProps, IState> {
|
||||
}
|
||||
|
||||
|
||||
|
||||
onFinish(values: any) {
|
||||
console.log('Success:', values);
|
||||
|
||||
@@ -57,14 +58,6 @@ class RawLogin extends TankComponent<IProps, IState> {
|
||||
|
||||
let that = this
|
||||
|
||||
const layout = {
|
||||
labelCol: {span: 8},
|
||||
wrapperCol: {span: 16},
|
||||
};
|
||||
const tailLayout = {
|
||||
wrapperCol: {offset: 8, span: 16},
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="user-login">
|
||||
|
||||
@@ -76,35 +69,32 @@ class RawLogin extends TankComponent<IProps, IState> {
|
||||
</div>
|
||||
|
||||
<Form
|
||||
{...layout}
|
||||
name="basic"
|
||||
initialValues={{remember: true}}
|
||||
onFinish={this.onFinish.bind(this)}
|
||||
onFinishFailed={this.onFinishFailed.bind(this)}
|
||||
>
|
||||
<Form.Item
|
||||
label="Username"
|
||||
name="username"
|
||||
rules={[{required: true, message: 'Please input your username!'}]}
|
||||
>
|
||||
<Input/>
|
||||
<Input size="large" placeholder="请输入用户名" prefix={<UserOutlined/>}/>
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item
|
||||
label="Password"
|
||||
name="password"
|
||||
rules={[{required: true, message: 'Please input your password!'}]}
|
||||
>
|
||||
<Input.Password/>
|
||||
<Input.Password size="large" placeholder="请输入密码" prefix={<LockOutlined/>}/>
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item {...tailLayout}>
|
||||
<Button type="primary" htmlType="submit">
|
||||
Submit
|
||||
<Form.Item>
|
||||
<Button type="primary" icon={<UserOutlined/>} block={true} htmlType="submit">
|
||||
登录
|
||||
</Button>
|
||||
</Form.Item>
|
||||
</Form>
|
||||
|
||||
</Form>
|
||||
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
Reference in New Issue
Block a user