king
2022-01-21 46f79b491173d284a4900d19e7aecf7509481438
src/components/header/loginform.jsx
@@ -1,6 +1,8 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { Form, Icon, Input, Checkbox } from 'antd'
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'
@@ -89,20 +91,20 @@
    return (
      <Form style={{margin: '0px 10px'}}>
        <Form.Item>
        <Form.Item style={{marginBottom: '0px', height: '60px'}}>
          {getFieldDecorator('username', {
            rules: [{ required: true, message: this.state.dict['login.username.empty'] }],
            initialValue: username,
          })(
            <Input
              prefix={<Icon type="user" style={{ color: 'rgba(0,0,0,.25)' }} />}
              prefix={<UserOutlined style={{ color: 'rgba(0,0,0,.25)' }}/>}
              placeholder={this.state.dict['login.username']}
              autoComplete="off"
              onPressEnter={(e) => {this.handleSubmit(e, 'password')}}
            />
          )}
        </Form.Item>
        <Form.Item style={{marginBottom: '15px'}}>
        <Form.Item style={{marginBottom: '0px', height: '55px'}}>
          {getFieldDecorator('password', {
            initialValue: password,
            rules: [
@@ -111,7 +113,7 @@
                message: this.state.dict['login.password.empty'],
              }
            ]
          })(<Input.Password onPressEnter={(e) => {this.handleSubmit(e, 'username')}} placeholder={this.state.dict['login.password']} prefix={<Icon type="lock" style={{ color: 'rgba(0,0,0,.25)' }} />} />)}
          })(<Input.Password onPressEnter={(e) => {this.handleSubmit(e, 'username')}} placeholder={this.state.dict['login.password']} prefix={<LockOutlined style={{ color: 'rgba(0,0,0,.25)' }} />} />)}
        </Form.Item>
        <Form.Item style={{marginBottom: '10px'}}>
          {getFieldDecorator('remember', {