From 5319000bd613ce9d2ac0a66f73ab403a84c5b8dd Mon Sep 17 00:00:00 2001 From: chenos Date: Thu, 8 Apr 2021 12:10:38 +0800 Subject: [PATCH] fix: improve login form styles --- packages/app/src/components/views/Login.tsx | 19 +++++------ .../app/src/components/views/LostPassword.tsx | 17 +++++----- .../app/src/components/views/Register.tsx | 33 +++++++++---------- .../src/components/views/ResetPassword.tsx | 19 +++++------ packages/app/src/components/views/style.less | 6 ++++ 5 files changed, 48 insertions(+), 46 deletions(-) diff --git a/packages/app/src/components/views/Login.tsx b/packages/app/src/components/views/Login.tsx index 5248fb264..576a4e6e3 100644 --- a/packages/app/src/components/views/Login.tsx +++ b/packages/app/src/components/views/Login.tsx @@ -84,7 +84,7 @@ export function Login(props: any) { placeholder: '密码', }, 'x-props': { - help: 忘记密码?, + help: 忘记密码?, }, }, ...(props.fields || {}), @@ -92,15 +92,14 @@ export function Login(props: any) { }} > - 登录 - + 登录 +
+ 注册账户 +
diff --git a/packages/app/src/components/views/LostPassword.tsx b/packages/app/src/components/views/LostPassword.tsx index 530b81a2f..91e81c86e 100644 --- a/packages/app/src/components/views/LostPassword.tsx +++ b/packages/app/src/components/views/LostPassword.tsx @@ -66,15 +66,14 @@ export function LostPassword(props: any) { }} > - 获取新密码 - + 获取新密码 +
+ 使用已有账号登录 +
diff --git a/packages/app/src/components/views/Register.tsx b/packages/app/src/components/views/Register.tsx index 989395e28..ad2f0f9fc 100644 --- a/packages/app/src/components/views/Register.tsx +++ b/packages/app/src/components/views/Register.tsx @@ -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) { }} > - 注册 - + 注册 +
+ 使用已有账号登录 +
diff --git a/packages/app/src/components/views/ResetPassword.tsx b/packages/app/src/components/views/ResetPassword.tsx index 0c7d5e75f..85d15c735 100644 --- a/packages/app/src/components/views/ResetPassword.tsx +++ b/packages/app/src/components/views/ResetPassword.tsx @@ -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) { }} > - 重置密码 - + 重置密码 +
+ 使用已有账号登录 +
diff --git a/packages/app/src/components/views/style.less b/packages/app/src/components/views/style.less index a36df8cf5..6cb38b546 100644 --- a/packages/app/src/components/views/style.less +++ b/packages/app/src/components/views/style.less @@ -92,6 +92,12 @@ body.collapsed { .users-form { .button-group { justify-content: flex-start; + .ant-row { + width: 100%; + } + .ant-col.inline { + width: 100%; + } } }