From 19f1daf7db5a051f5d75517964f7accd0f5b1ddf Mon Sep 17 00:00:00 2001 From: liufumingren Date: Sat, 17 Oct 2026 08:55:32 +0800 Subject: [PATCH] =?UTF-8?q?=E5=89=8D=E7=AB=AF=EF=BC=9A=E6=8E=A5=E5=85=A5?= =?UTF-8?q?=E6=97=A7=E9=A1=B5=E9=9D=A2=E7=9A=84=E6=A0=B7=E5=BC=8F=E4=BD=93?= =?UTF-8?q?=E7=B3=BB=EF=BC=88=E7=99=BB=E5=BD=95=E9=9D=A2=E6=9D=BF=20/=20?= =?UTF-8?q?=E6=8A=98=E8=A7=92=E5=88=87=E6=8D=A2=20/=20=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E5=A1=AB=E5=85=85=E9=AB=98=E5=BA=A6=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 从后端模板迁过来的样式现在真正用上了,并修掉两处不一致: - 登录页:.panel-switch + .pane-account / .pane-wechat + 右上角 .corner-toggle 三角形切换; 字段改成无 label 的 .field-plain + 悬浮 .tip;验证码用 .input-row 与按钮同行。 - 找回 / 重置密码页:同样换成 .field-plain 紧凑字段。 - 列表页(设备管理 / 扫码记录):AppLayout 支持 fill → 内容区加 .content-fill, 表格包进 .table-wrap → 卡片撑满剩余高度、表头吸顶、只有表格内部滚动、分页贴底。 - 卡片间距交给 .card + .card;测试页结果区改用全局 .json-box 与 .sub-title。 - ⚠️ 修 bug:「注册」标签下注册面板不显示 —— 登录与注册共用 .pane-account, 但 CSS 只写了 .is-login .pane-account / .is-register .pane-register(后者没有对应元素); 同时给 .is-register 补上 padding-top,避免折角三角形压住第一个输入框。 - 顺带去掉不再需要的内联 margin。 验证:vue-tsc + vite build 通过;浏览器实测三个面板都能切换(注册面板 5 个字段可见、 三角形不压输入框),两个列表页 content-fill 生效、整页不滚动、表格内部滚动且表头 sticky。 --- README.md | 26 +++ backend/README.md | 2 +- frontend/src/components/AppLayout.vue | 8 +- frontend/src/styles/main.css | 184 +++++++++++++++++- frontend/src/views/DevicesView.vue | 4 +- frontend/src/views/ForgotView.vue | 33 +++- frontend/src/views/HomeView.vue | 2 +- frontend/src/views/LoginView.vue | 225 +++++++++++++++-------- frontend/src/views/RecordsView.vue | 4 +- frontend/src/views/ResetView.vue | 31 ++-- frontend/src/views/TestView.vue | 22 +-- frontend/src/views/WechatConfirmView.vue | 18 +- 12 files changed, 437 insertions(+), 122 deletions(-) diff --git a/README.md b/README.md index f533bc8..bd25126 100644 --- a/README.md +++ b/README.md @@ -49,6 +49,32 @@ packService/ 后端接口细节见 [`backend/README.md`](backend/README.md),扩展用法见 [`extension/README.md`](extension/README.md)。 +## 前端页面风格约定(`frontend/`) + +页面的样式规则集中在 `frontend/src/styles/main.css`,各页只写自己的局部样式。**新增页面请照下面这套来**(都是前端迁移时逐条定下来的): + +- **登录 / 注册 / 找回密码 / 重置密码 / 扫码确认**这类「裸页」:居中卡片(`.bare-page` + `.bare-card`,宽 360px)。 + - ⚠️ 外层**不要用 `align-items: center`**:卡片比视口高时顶部会被裁掉且滚不上去 —— 用 `.bare-card { margin: auto }` 让它在容器里自己居中,`overflow-y: auto` 兜底; +- **表单字段不用 `