fix: improve login form styles

This commit is contained in:
chenos 2021-04-08 12:10:38 +08:00
parent 58e2ac3f5c
commit 5319000bd6
5 changed files with 48 additions and 46 deletions

View File

@ -84,7 +84,7 @@ export function Login(props: any) {
placeholder: '密码',
},
'x-props': {
help: <Link to={'/lostpassword'}></Link>,
help: <Link style={{float: 'right', marginBottom: 12}} to={'/lostpassword'}></Link>,
},
},
...(props.fields || {}),
@ -92,15 +92,14 @@ export function Login(props: any) {
}}
>
<FormButtonGroup>
<Submit size={'large'}></Submit>
<Button
size={'large'}
onClick={() => {
history.push('/register');
}}
>
</Button>
<Submit block size={'large'}></Submit>
<div style={{
marginTop: 12,
display: 'flex',
justifyContent: 'space-between',
}}>
<Link to={'/register'}></Link>
</div>
</FormButtonGroup>
</SchemaForm>
</div>

View File

@ -66,15 +66,14 @@ export function LostPassword(props: any) {
}}
>
<FormButtonGroup>
<Submit size={'large'}></Submit>
<Button
size={'large'}
onClick={() => {
history.push('/login');
}}
>
使
</Button>
<Submit block size={'large'}></Submit>
<div style={{
marginTop: 12,
display: 'flex',
justifyContent: 'space-between',
}}>
<Link to={'/login'}>使</Link>
</div>
</FormButtonGroup>
</SchemaForm>
</div>

View File

@ -98,14 +98,14 @@ export function Register(props: any) {
placeholder: '邮箱',
},
},
nickname: {
type: 'string',
title: '',
'x-component-props': {
size: 'large',
placeholder: '昵称',
},
},
// nickname: {
// type: 'string',
// title: '',
// 'x-component-props': {
// size: 'large',
// placeholder: '昵称',
// },
// },
password: {
type: 'password',
title: '',
@ -135,15 +135,14 @@ export function Register(props: any) {
}}
>
<FormButtonGroup align={'start'}>
<Submit size={'large'}></Submit>
<Button
size={'large'}
onClick={() => {
history.push('/login');
}}
>
使
</Button>
<Submit block size={'large'}></Submit>
<div style={{
marginTop: 12,
display: 'flex',
justifyContent: 'space-between',
}}>
<Link to={'/login'}>使</Link>
</div>
</FormButtonGroup>
</SchemaForm>
</div>

View File

@ -16,7 +16,7 @@ import {
import { QuestionCircleOutlined } from '@ant-design/icons';
import { Redirect, history, request, useModel, useHistory } from 'umi';
import api from '@/api-client';
import { useRequest } from 'umi';
import { useRequest, Link } from 'umi';
const { onFieldValueChange$ } = FormEffectHooks;
@ -149,15 +149,14 @@ export function ResetPassword(props: any) {
}}
>
<FormButtonGroup align={'start'}>
<Submit size={'large'}></Submit>
<Button
size={'large'}
onClick={() => {
history.push('/login');
}}
>
使
</Button>
<Submit block size={'large'}></Submit>
<div style={{
marginTop: 12,
display: 'flex',
justifyContent: 'space-between',
}}>
<Link to={'/login'}>使</Link>
</div>
</FormButtonGroup>
</SchemaForm>
</div>

View File

@ -92,6 +92,12 @@ body.collapsed {
.users-form {
.button-group {
justify-content: flex-start;
.ant-row {
width: 100%;
}
.ant-col.inline {
width: 100%;
}
}
}