fix: improve login form styles
This commit is contained in:
		
							parent
							
								
									58e2ac3f5c
								
							
						
					
					
						commit
						5319000bd6
					
				@ -84,7 +84,7 @@ export function Login(props: any) {
 | 
				
			|||||||
                placeholder: '密码',
 | 
					                placeholder: '密码',
 | 
				
			||||||
              },
 | 
					              },
 | 
				
			||||||
              'x-props': {
 | 
					              'x-props': {
 | 
				
			||||||
                help: <Link to={'/lostpassword'}>忘记密码?</Link>,
 | 
					                help: <Link style={{float: 'right', marginBottom: 12}} to={'/lostpassword'}>忘记密码?</Link>,
 | 
				
			||||||
              },
 | 
					              },
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
            ...(props.fields || {}),
 | 
					            ...(props.fields || {}),
 | 
				
			||||||
@ -92,15 +92,14 @@ export function Login(props: any) {
 | 
				
			|||||||
        }}
 | 
					        }}
 | 
				
			||||||
      >
 | 
					      >
 | 
				
			||||||
        <FormButtonGroup>
 | 
					        <FormButtonGroup>
 | 
				
			||||||
          <Submit size={'large'}>登录</Submit>
 | 
					          <Submit block size={'large'}>登录</Submit>
 | 
				
			||||||
          <Button
 | 
					          <div style={{
 | 
				
			||||||
            size={'large'}
 | 
					            marginTop: 12,
 | 
				
			||||||
            onClick={() => {
 | 
					            display: 'flex',
 | 
				
			||||||
              history.push('/register');
 | 
					            justifyContent: 'space-between',
 | 
				
			||||||
            }}
 | 
					          }}>
 | 
				
			||||||
          >
 | 
					            <Link to={'/register'}>注册账户</Link>
 | 
				
			||||||
            注册账户
 | 
					          </div>
 | 
				
			||||||
          </Button>
 | 
					 | 
				
			||||||
        </FormButtonGroup>
 | 
					        </FormButtonGroup>
 | 
				
			||||||
      </SchemaForm>
 | 
					      </SchemaForm>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
 | 
				
			|||||||
@ -66,15 +66,14 @@ export function LostPassword(props: any) {
 | 
				
			|||||||
        }}
 | 
					        }}
 | 
				
			||||||
      >
 | 
					      >
 | 
				
			||||||
        <FormButtonGroup>
 | 
					        <FormButtonGroup>
 | 
				
			||||||
          <Submit size={'large'}>获取新密码</Submit>
 | 
					          <Submit block size={'large'}>获取新密码</Submit>
 | 
				
			||||||
          <Button
 | 
					          <div style={{
 | 
				
			||||||
            size={'large'}
 | 
					            marginTop: 12,
 | 
				
			||||||
            onClick={() => {
 | 
					            display: 'flex',
 | 
				
			||||||
              history.push('/login');
 | 
					            justifyContent: 'space-between',
 | 
				
			||||||
            }}
 | 
					          }}>
 | 
				
			||||||
          >
 | 
					            <Link to={'/login'}>使用已有账号登录</Link>
 | 
				
			||||||
            使用已有账号登录
 | 
					          </div>
 | 
				
			||||||
          </Button>
 | 
					 | 
				
			||||||
        </FormButtonGroup>
 | 
					        </FormButtonGroup>
 | 
				
			||||||
      </SchemaForm>
 | 
					      </SchemaForm>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
 | 
				
			|||||||
@ -98,14 +98,14 @@ export function Register(props: any) {
 | 
				
			|||||||
                placeholder: '邮箱',
 | 
					                placeholder: '邮箱',
 | 
				
			||||||
              },
 | 
					              },
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
            nickname: {
 | 
					            // nickname: {
 | 
				
			||||||
              type: 'string',
 | 
					            //   type: 'string',
 | 
				
			||||||
              title: '',
 | 
					            //   title: '',
 | 
				
			||||||
              'x-component-props': {
 | 
					            //   'x-component-props': {
 | 
				
			||||||
                size: 'large',
 | 
					            //     size: 'large',
 | 
				
			||||||
                placeholder: '昵称',
 | 
					            //     placeholder: '昵称',
 | 
				
			||||||
              },
 | 
					            //   },
 | 
				
			||||||
            },
 | 
					            // },
 | 
				
			||||||
            password: {
 | 
					            password: {
 | 
				
			||||||
              type: 'password',
 | 
					              type: 'password',
 | 
				
			||||||
              title: '',
 | 
					              title: '',
 | 
				
			||||||
@ -135,15 +135,14 @@ export function Register(props: any) {
 | 
				
			|||||||
        }}
 | 
					        }}
 | 
				
			||||||
      >
 | 
					      >
 | 
				
			||||||
        <FormButtonGroup align={'start'}>
 | 
					        <FormButtonGroup align={'start'}>
 | 
				
			||||||
          <Submit size={'large'}>注册</Submit>
 | 
					          <Submit block size={'large'}>注册</Submit>
 | 
				
			||||||
          <Button
 | 
					          <div style={{
 | 
				
			||||||
            size={'large'}
 | 
					            marginTop: 12,
 | 
				
			||||||
            onClick={() => {
 | 
					            display: 'flex',
 | 
				
			||||||
              history.push('/login');
 | 
					            justifyContent: 'space-between',
 | 
				
			||||||
            }}
 | 
					          }}>
 | 
				
			||||||
          >
 | 
					            <Link to={'/login'}>使用已有账号登录</Link>
 | 
				
			||||||
            使用已有账号登录
 | 
					          </div>
 | 
				
			||||||
          </Button>
 | 
					 | 
				
			||||||
        </FormButtonGroup>
 | 
					        </FormButtonGroup>
 | 
				
			||||||
      </SchemaForm>
 | 
					      </SchemaForm>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
 | 
				
			|||||||
@ -16,7 +16,7 @@ import {
 | 
				
			|||||||
import { QuestionCircleOutlined } from '@ant-design/icons';
 | 
					import { QuestionCircleOutlined } from '@ant-design/icons';
 | 
				
			||||||
import { Redirect, history, request, useModel, useHistory } from 'umi';
 | 
					import { Redirect, history, request, useModel, useHistory } from 'umi';
 | 
				
			||||||
import api from '@/api-client';
 | 
					import api from '@/api-client';
 | 
				
			||||||
import { useRequest } from 'umi';
 | 
					import { useRequest, Link } from 'umi';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const { onFieldValueChange$ } = FormEffectHooks;
 | 
					const { onFieldValueChange$ } = FormEffectHooks;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -149,15 +149,14 @@ export function ResetPassword(props: any) {
 | 
				
			|||||||
        }}
 | 
					        }}
 | 
				
			||||||
      >
 | 
					      >
 | 
				
			||||||
        <FormButtonGroup align={'start'}>
 | 
					        <FormButtonGroup align={'start'}>
 | 
				
			||||||
          <Submit size={'large'}>重置密码</Submit>
 | 
					          <Submit block size={'large'}>重置密码</Submit>
 | 
				
			||||||
          <Button
 | 
					          <div style={{
 | 
				
			||||||
            size={'large'}
 | 
					            marginTop: 12,
 | 
				
			||||||
            onClick={() => {
 | 
					            display: 'flex',
 | 
				
			||||||
              history.push('/login');
 | 
					            justifyContent: 'space-between',
 | 
				
			||||||
            }}
 | 
					          }}>
 | 
				
			||||||
          >
 | 
					            <Link to={'/login'}>使用已有账号登录</Link>
 | 
				
			||||||
            使用已有账号登录
 | 
					          </div>
 | 
				
			||||||
          </Button>
 | 
					 | 
				
			||||||
        </FormButtonGroup>
 | 
					        </FormButtonGroup>
 | 
				
			||||||
      </SchemaForm>
 | 
					      </SchemaForm>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
 | 
				
			|||||||
@ -92,6 +92,12 @@ body.collapsed {
 | 
				
			|||||||
.users-form {
 | 
					.users-form {
 | 
				
			||||||
  .button-group {
 | 
					  .button-group {
 | 
				
			||||||
    justify-content: flex-start;
 | 
					    justify-content: flex-start;
 | 
				
			||||||
 | 
					    .ant-row {
 | 
				
			||||||
 | 
					      width: 100%;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    .ant-col.inline {
 | 
				
			||||||
 | 
					      width: 100%;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user