From 24a25dcbd1d3df9c541b92c977477c2f66486e8c Mon Sep 17 00:00:00 2001 From: joey-home Date: Thu, 3 Sep 2026 22:13:11 +0800 Subject: [PATCH] =?UTF-8?q?feat(web):=20=E8=BE=93=E5=85=A5=E6=8E=A7?= =?UTF-8?q?=E4=BB=B6=E4=B8=8E=E6=8C=89=E9=92=AE=E6=94=BE=E5=A4=A7=E3=80=81?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E5=8D=A1=E7=89=87=E6=94=B6=E7=AA=84=E5=8A=A0?= =?UTF-8?q?=E9=98=B4=E5=BD=B1=E3=80=81=E8=AE=BE=E7=BD=AE=E9=A1=B5=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=8F=96=E6=B6=88=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 主题 components:Input/Select/InputNumber/DatePicker/Button 文本 16px、高度 40px(小号按钮 32px);表格/菜单等正文保持 14px - 设置卡片 max-width 720→560px,四周柔和阴影 - 修改密码页保存按钮右侧、修改资料页重置按钮右侧增加取消按钮, 点击回首页 --- apps/web/src/App.css | 5 +++-- apps/web/src/App.tsx | 10 +++++++++- apps/web/src/pages/settings/PasswordSettingsPage.tsx | 1 + apps/web/src/pages/settings/ProfileSettingsPage.tsx | 3 +++ 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/apps/web/src/App.css b/apps/web/src/App.css index 7cfce44..9eb9d45 100644 --- a/apps/web/src/App.css +++ b/apps/web/src/App.css @@ -9,10 +9,11 @@ .settings-card { width: 100%; - max-width: 720px; + max-width: 560px; background: #fff; border-radius: 8px; - box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.08); + /* 四周柔和阴影,与内容区背景拉开层次 */ + box-shadow: 0 0 24px 0 rgba(17, 24, 39, 0.12); } .settings-card-title { diff --git a/apps/web/src/App.tsx b/apps/web/src/App.tsx index 1f0615f..e57759d 100644 --- a/apps/web/src/App.tsx +++ b/apps/web/src/App.tsx @@ -13,11 +13,19 @@ function App() { token: { colorPrimary: '#8b5cf6', borderRadius: 8, - // 全局默认字号 14px;输入类控件默认高度在 32px 基础上同步加高一点 + // 全局正文字号 14px;输入类控件与按钮经 components 单独放大 fontSize: 14, controlHeight: 34, controlHeightSM: 26, }, + components: { + // 文本框与按钮:文本 16px、高度同步加高;表格/菜单等正文不受影响 + Input: { fontSize: 16, controlHeight: 40 }, + Select: { fontSize: 16, controlHeight: 40 }, + InputNumber: { fontSize: 16, controlHeight: 40 }, + DatePicker: { fontSize: 16, controlHeight: 40 }, + Button: { fontSize: 16, controlHeight: 40, controlHeightSM: 32 }, + }, }} > diff --git a/apps/web/src/pages/settings/PasswordSettingsPage.tsx b/apps/web/src/pages/settings/PasswordSettingsPage.tsx index 136eab2..8c519bd 100644 --- a/apps/web/src/pages/settings/PasswordSettingsPage.tsx +++ b/apps/web/src/pages/settings/PasswordSettingsPage.tsx @@ -116,6 +116,7 @@ const PasswordSettingsPage = () => { + diff --git a/apps/web/src/pages/settings/ProfileSettingsPage.tsx b/apps/web/src/pages/settings/ProfileSettingsPage.tsx index 2692f4c..196ffc5 100644 --- a/apps/web/src/pages/settings/ProfileSettingsPage.tsx +++ b/apps/web/src/pages/settings/ProfileSettingsPage.tsx @@ -1,4 +1,5 @@ import { useMemo, useState } from 'react'; +import { useNavigate } from 'react-router-dom'; import { App as AntdApp, Avatar, Button, Form, Input } from 'antd'; import axios from 'axios'; import { authApi } from '@/services/auth'; @@ -15,6 +16,7 @@ interface ProfileFormValues { */ const ProfileSettingsPage = () => { const { message } = AntdApp.useApp(); + const navigate = useNavigate(); const { session, applyProfileUpdate } = useSession(); const [form] = Form.useForm(); const [saving, setSaving] = useState(false); @@ -100,6 +102,7 @@ const ProfileSettingsPage = () => { 保存修改 +