| | |
| | | import { Form, Input, Checkbox } from 'antd' |
| | | import { UserOutlined, LockOutlined } from '@ant-design/icons' |
| | | |
| | | import zhCN from '@/locales/zh-CN/login.js' |
| | | import enUS from '@/locales/en-US/login.js' |
| | | import './index.scss' |
| | | |
| | | class HeaderLoginForm extends Component { |
| | |
| | | } |
| | | |
| | | state = { |
| | | dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, |
| | | remember: false, |
| | | username: '', |
| | | password: '', |
| | |
| | | </Form.Item> : null} |
| | | <Form.Item style={{marginBottom: '0px', height: '60px'}}> |
| | | {getFieldDecorator('username', { |
| | | rules: [{ required: true, message: this.state.dict['login.username.empty'] }], |
| | | rules: [{ required: true, message: '请输入用户名' }], |
| | | initialValue: username, |
| | | })( |
| | | <Input |
| | | prefix={<UserOutlined style={{ color: 'rgba(0,0,0,.25)' }}/>} |
| | | placeholder={this.state.dict['login.username']} |
| | | placeholder="用户名" |
| | | autoComplete="off" |
| | | onPressEnter={(e) => {this.handleSubmit(e, 'password')}} |
| | | /> |
| | |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: this.state.dict['login.password.empty'], |
| | | message: '请输入密码', |
| | | } |
| | | ] |
| | | })(<Input.Password onPressEnter={(e) => {this.handleSubmit(e, 'username')}} placeholder={this.state.dict['login.password']} prefix={<LockOutlined style={{ color: 'rgba(0,0,0,.25)' }} />} />)} |
| | | })(<Input.Password onPressEnter={(e) => {this.handleSubmit(e, 'username')}} placeholder="密码" prefix={<LockOutlined style={{ color: 'rgba(0,0,0,.25)' }} />} />)} |
| | | </Form.Item> |
| | | {window.GLOB.keepKey ? <Form.Item style={{marginBottom: '10px'}}> |
| | | {getFieldDecorator('remember', { |