fix(ui): 统一认证页输入框 36px 与视觉样式

This commit is contained in:
zhanjunhao
2026-11-18 17:27:33 +08:00
parent a57aae3043
commit dbdfed378e
14 changed files with 472 additions and 465 deletions
+5 -7
View File
@@ -46,6 +46,7 @@ import { StatusContext } from '../../context/Status';
import GlassCard from '../../components/auth/GlassCard';
import AuthCardHeader from '../../components/auth/AuthCardHeader';
import AuthLoginTabs from '../../components/auth/AuthLoginTabs';
import AuthDivider from '../../components/auth/AuthDivider';
import AuthBackground from '../../components/common/AuthBackground';
const LAST_ORG_KEY = 'org_login_last';
@@ -626,11 +627,7 @@ const OrgLogin = () => {
{selfRegisterEnabled && (
<>
<div className='mt-1 flex items-center gap-3 text-xs text-gray-400'>
<span className='h-px flex-1 bg-gray-200 dark:bg-white/10' />
<span>{t('还没有企业?')}</span>
<span className='h-px flex-1 bg-gray-200 dark:bg-white/10' />
</div>
<AuthDivider>{t('还没有企业?')}</AuthDivider>
<Button
theme='borderless'
size='default'
@@ -647,6 +644,7 @@ const OrgLogin = () => {
{step === 2 && (
<Form
className='auth-login-form'
onSubmit={doLogin}
initValues={{ login_name: prefilledLoginName }}
>
@@ -719,12 +717,12 @@ const OrgLogin = () => {
)}
{step === 3 && (
<Form onSubmit={doChangePassword}>
<Form className='auth-login-form' onSubmit={doChangePassword}>
<Banner
type='warning'
closeIcon={null}
description={t('首次登录需修改初始密码后方可使用。')}
className='mb-3'
className='auth-login-banner'
/>
<Form.Input
field='new_password'
+8 -33
View File
@@ -29,6 +29,7 @@ import OrgCredentialResult from '../../components/auth/OrgCredentialResult';
import GlassCard from '../../components/auth/GlassCard';
import AuthCardHeader from '../../components/auth/AuthCardHeader';
import AuthLoginTabs from '../../components/auth/AuthLoginTabs';
import AuthDivider from '../../components/auth/AuthDivider';
import AuthBackground from '../../components/common/AuthBackground';
import {
LOGIN_NAME_PATTERN,
@@ -171,14 +172,9 @@ const OrgRegister = () => {
type='info'
closeIcon={null}
description={t('当前未开放企业自助注册,请联系平台管理员开通企业。')}
className='mb-4'
className='auth-login-banner'
/>
<Button
theme='solid'
size='large'
block
onClick={() => navigate('/org/login')}
>
<Button theme='solid' block onClick={() => navigate('/org/login')}>
{t('返回企业登录')}
</Button>
</GlassCard>
@@ -209,30 +205,19 @@ const OrgRegister = () => {
/>
) : (
<>
<style>{`
.org-register-form .ant-form-item {
margin-bottom: 14px !important;
padding: 0 !important;
}
.org-register-form .ant-form-item-label {
margin-bottom: 6px !important;
}
`}</style>
<Form
className='org-register-form auth-glass-form'
className='auth-login-form'
getFormApi={(api) => (formApi.current = api)}
onValueChange={(v) => setValues(v)}
>
<Form.Input
field='name'
size='large'
label={t('企业名称')}
placeholder={t('请输入企业名称(登录时可用于搜索定位)')}
rules={[{ required: true, message: t('请输入企业名称') }]}
/>
<Form.Input
field='owner_login_name'
size='large'
label={t('管理员登录名')}
placeholder={t('请设置管理员登录名,如 zhang.san')}
extraText={t(
@@ -254,19 +239,16 @@ const OrgRegister = () => {
/>
<Form.Input
field='owner_display_name'
size='large'
label={t('管理员显示名')}
placeholder={t('选填')}
/>
<Form.Input
field='contact_name'
size='large'
label={t('联系人')}
placeholder={t('选填')}
/>
<Form.Input
field='contact_email'
size='large'
label={t('联系邮箱')}
placeholder={t('用于接收通知')}
rules={
@@ -292,7 +274,6 @@ const OrgRegister = () => {
{emailVerifyEnabled && (
<Form.Input
field='verify_code'
size='large'
label={t('邮箱验证码')}
placeholder={t('请输入验证码')}
rules={[{ required: true, message: t('请输入验证码') }]}
@@ -300,17 +281,16 @@ const OrgRegister = () => {
)}
<Form.Input
field='contact_phone'
size='large'
label={t('联系电话')}
placeholder={t('选填')}
/>
</Form>
<div className='mt-5'>
<div className='auth-login-actions'>
<Button
theme='solid'
size='large'
block
className='auth-login-submit'
loading={submitting}
onClick={handleSubmit}
>
@@ -318,14 +298,9 @@ const OrgRegister = () => {
</Button>
</div>
<div className='mt-4 flex items-center gap-3 text-xs text-gray-400'>
<span className='h-px flex-1 bg-gray-200 dark:bg-white/10' />
<span>{t('已有企业?')}</span>
<span className='h-px flex-1 bg-gray-200 dark:bg-white/10' />
</div>
<AuthDivider>{t('已有企业?')}</AuthDivider>
<Button
theme='borderless'
size='large'
block
className='!text-brand'
onClick={() => navigate('/org/login')}
@@ -340,7 +315,7 @@ const OrgRegister = () => {
return (
<div
className='relative overflow-hidden flex items-center justify-center py-12 px-4 sm:px-6 lg:px-8'
className='auth-login-page relative overflow-hidden flex items-center justify-center py-12 px-4 sm:px-6 lg:px-8'
// 抵扣 PageLayout 跑马灯占位高度,保证占位+容器恰为一屏,避免幽灵滚动
style={{ minHeight: 'calc(100vh - var(--content-top-offset, 0px))' }}
>