docs: align dialog label-top spacing rules with Fresh Mint

Document 4px gap, weight 400, form-grid margin reset, and stock-check exception.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
zlwuandCursor committed 2026-10-10 13:49:28 +08:00
1 parent de132a7c04
commit da63c228f5
2 files changed
+19 -3

No files matched your search

@@ -45,6 +45,22 @@ Web 管理端弹窗 SHALL 遵循规范:表单 `label-position="top"`;遮罩
- **WHEN** 使用 Element Plus `el-dialog` 承载表单
- **THEN** 表单标签位置与遮罩样式 SHALL 符合 `docs/web-admin-ui-spec-fresh-mint.md` 中 `el-dialog` 小节
### Requirement: 弹窗 label-top 间距与字重
`web-admin` 中 `label-position="top"` 的弹窗表单 label SHALL:与输入控件间距 **4px**(`padding-bottom: 4px`)、字重 **400**、`height: auto`(SHALL NOT 沿用左右布局 label 的 36px 行高)。使用 `.form-grid` / `.form-grid-2`~`.form-grid-5` 时,栅格内 `el-form-item` SHALL `margin-bottom: 0`,纵向间距交给 grid `gap`。权威实现:`el-ui.scss`(label-top)、`app.scss`(栅格与 `dialog-form-layout` 兜底)。
**例外**:物资/试剂/耗材/质检物料等盘点、库存出入弹窗中的紧凑 **11px** label 可保留局部样式。
#### Scenario: 标准 CRUD 弹窗 label
- **WHEN** 打开采用 `label-position="top"` 的新增/编辑弹窗
- **THEN** label 与输入框间距 SHALL 为约 4px,字重 SHALL 为常规(400),且 SHALL NOT 呈现左侧 label 的 36px 行高空白
#### Scenario: 栅格表单行距
- **WHEN** 弹窗表单字段置于 `.form-grid` 或 `.form-grid-2`~`.form-grid-5` 内
- **THEN** 各 `el-form-item` SHALL NOT 再叠加默认 `margin-bottom`(约 18px),行距 SHALL 由栅格 `gap` 决定
### Requirement: 小程序媒体与触控
小程序列表缩略图、轮播与详情图 SHALL 遵循 `docs/miniprogram-ui-spec-sanqiang.md` §7.0 的宽高比与 `mode` 约定;可点击控件 SHALL 满足最小触控区域(规范中的 44×44 等要求)。