@qilitt-mickey/vue3-temp-skill 1.1.13 → 1.1.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,32 +1,136 @@
1
1
  ---
2
2
  skill: design-handoff
3
- description: 设计产出物 → 业务项目样式落地。从会话/附件取交接块与令牌 CSS,按覆盖清单写入模版样式与配置。
3
+ description: 设计产出物 → 业务项目样式落地。优先认 design-handoff/v1 JSON;兼容旧交接块与令牌 CSS。
4
4
  scope: project
5
- tags: [handoff, design-tokens, upstream, artifacts]
5
+ tags: [handoff, design-tokens, upstream, artifacts, json]
6
6
  ---
7
7
 
8
8
  # 设计产出 → 模板落地
9
9
 
10
+ ## 双轨(必读)
11
+
12
+ | 场景 | 行为 |
13
+ |------|------|
14
+ | **未调用设计 / 无 handoff** | 保持模版出厂令牌与 `platform-config`(主色 `#409EFF`、壳 64/208/40、margin 8、`ShowModel: chrome` 等)。**禁止**为「看起来像设计」而改出厂 |
15
+ | **有 design-handoff/v1 或用户要求按设计落地** | 以**设计规范**为准全量回填 `design-tokens` + 配置;设计 JSON/规范未给出的字段**保留出厂**;代码层须已消费 `var(--token)`,改令牌即全局生效 |
16
+
17
+ 跨编辑器一致:本协议 + 模版 `design-tokens.scss` 注释 + `handoff-output.md` 字段名对齐;禁止只改文档不改令牌、或只改裸 px 不改令牌。
18
+
10
19
  ## 触发
11
20
 
12
21
  出现以下任一情况时执行本协议(与业务开发的先后跟用户需求:可先定风格再写业务,也可在已有业务上全量重构样式):
13
22
 
14
- - 会话有「前端落地交接」块 / `【主题色系】` / `:root` 令牌 CSS
23
+ - 会话 / 附件 / 仓库中有 **`design-handoff/v1` JSON**(优先)
24
+ - 会话有「前端落地交接」块 / `【主题色系】` / `:root` 令牌 CSS(兼容)
15
25
  - 用户要求按设计稿 / 规范适配或重构整站风格
16
26
  - 用户附带色板、规范或 HTML 原型
17
27
 
18
- ## 收集产出(会话 / 附件)
28
+ 动手改文件前先输出**规范识别回执**(见下文)。
29
+
30
+ ## 收集产出(优先级)
19
31
 
20
32
  | 优先 | 形态 | 用途 |
21
33
  |------|------|------|
22
- | 1 | 前端落地交接块 | `data-theme` / 侧栏 / DarkMode / 主色 |
23
- | 2 | 令牌 CSS(`--brand-*` / `--primary-*` 等) | 写入 `design-tokens.scss` |
24
- | 3 | 几何/间距数值 | 覆盖桥接令牌;缺则保留模版默认 |
25
- | 4 | HTML/CSS 原型 | 微调 `element-plus.scss` |
26
- | 5 | 项目已有 `design-tokens.scss` | 读现状 |
34
+ | **1** | **`design-handoff/v1` JSON** | 结构化写入 tokens / 几何 / `ShowModel`(**首选**) |
35
+ | 2 | 前端落地交接块 | `data-theme` / 侧栏 / DarkMode / 主色 |
36
+ | 3 | 令牌 CSS(`--brand-*` / `--primary-*` 等) | 写入 `design-tokens.scss` |
37
+ | 4 | 几何/间距数值 | 覆盖桥接令牌;缺则保留模版默认 |
38
+ | 5 | HTML/CSS 原型 | 微调 `element-plus.scss` |
39
+ | 6 | 项目已有 `design-tokens.scss` | 读现状 |
40
+
41
+ 定位 JSON:
42
+
43
+ 1. 会话中的 ` ```json ` 且含 `"$schema": "design-handoff/v1"`
44
+ 2. 仓库 `design/design-handoff.json`(或用户指定路径)
45
+ 3. 附件同名文件
46
+
47
+ 有 JSON 时:**以 JSON 为准**;交接块 / 零散 CSS 仅补 JSON 未覆盖字段。
48
+ 无 JSON 时:回退优先 2~5(旧协议),并在回执中注明「建议补齐 design-handoff/v1」。
49
+
50
+ 缺主色阶 →「待确认」;有 `brandPrimary` 则可先落主色与壳桥接,不臆造 `primaryScale`。
51
+
52
+ ---
53
+
54
+ ## JSON → 模版映射(`design-handoff/v1`)
55
+
56
+ 设计侧 schema 见上游 `handoff-output.md`(字段名以下表为准)。
57
+
58
+ ### `meta` / `shell` → 配置
59
+
60
+ | JSON 字段 | 落点 | 写入 |
61
+ |-----------|------|------|
62
+ | `tokens.brandPrimary` | `platform-config.json` → `EpThemeColor` | HEX;并 bump `Version` |
63
+ | `shell.darkMode` | `platform-config.json` → `DarkMode` | boolean |
64
+ | `shell.sidebar` | `platform-config.json` → `Theme` + 侧栏令牌 | `dark-gradient` → 深色侧栏主题(如 `default`)+ 写入 `--sidebar-*`;`light` → 浅色侧栏,勿套深色渐变 |
65
+ | `shell.dataTheme` | `html[data-theme]` / 配置 | 有则用;无则按 sidebar/contentMode 推断,写回执 |
66
+ | `shell.contentMode` | 内容区默认亮暗 | 与 DarkMode / 用户确认对齐 |
67
+ | `shell.showModel` | `platform-config.json` → **`ShowModel`** | 设计落地时**必须** `"card"` |
68
+ | `shell.contentMargin` | `--layout-content-padding`(及桥接 `--vts-margin`) | 数字 px,如 `24`(模版出厂常为 **8**;**有 handoff 才覆盖**) |
69
+
70
+ 落地 `card` 时同步:`ShowModel: "card"` + `$storage.configure.showModel`(或 bump `Version` 清缓存)+ 按下表写 `--vts-tag-card-*`。
71
+
72
+ ### `geometry` → 令牌
73
+
74
+ | JSON 字段 | CSS 变量(`design-tokens.scss` / 桥接) |
75
+ |-----------|----------------------------------------|
76
+ | `headerHeight`(JSON geometry) | `--header-height` / `--layout-header-height` |
77
+ | `tabsHeight` | `--tabs-height`(壳层多标签栏;**不是** `--tabs-item-height`) |
78
+ | `siderWidth` | `--sidebar-width` / `--layout-sider-width` |
79
+ | `siderCollapsedWidth` | `--sidebar-collapsed-width` / `--layout-sider-collapsed-width` |
80
+ | `contentPadding` / `shell.contentMargin` | `--layout-content-padding` → `--vts-margin`(不一致时以 `contentMargin` 为准并回执) |
81
+ | `tagCardHeight` | `--vts-tag-card-height` |
82
+ | `tagCardRadius` | `--vts-tag-card-radius` |
83
+ | `tagCardGap` | `--vts-tag-card-gap` |
27
84
 
28
- 定位:扫会话交接块、`## 设计令牌`、`:root {`、附件中的 `--primary-` / 主色表。
29
- 缺项 →「待确认」;有主色则先落主色与壳桥接,不臆造色阶。
85
+ 可选(设计组件规范提及或 handoff.notes 给出时写入):
86
+
87
+ | 语义 | CSS 变量 | 出厂参考 |
88
+ |------|----------|----------|
89
+ | EP 内容 Tabs 项高 | `--tabs-item-height` | 46 |
90
+ | 弹窗头/底高 | `--dialog-header-height` / `--dialog-footer-height` | 38 |
91
+ | 弹窗 body 内边距 | `--dialog-body-padding` | 15 |
92
+ | 弹窗圆角 | `--dialog-border-radius` | 10(设计落地可改 `--radius-lg`) |
93
+ | 按钮水平 padding | `--button-padding-x` | 15 |
94
+ | Switch | `--switch-min-width` / `--switch-height` / `--switch-border-radius` | 36 / 20 / 10 |
95
+ | 页脚高 | `--layout-footer-height` | 48 |
96
+
97
+ 改几何后:**不要**让业务页重写 `100vh`;定高列表走 `%` / flex(`vts-page-card`)。
98
+
99
+ **硬要求**:落地前 grep `src/layout`、`ReDialog`、`element-plus.scss` 壳层几何,确认消费的是 `var(--…)`;若仍有不可覆盖裸 px,**先改代码再写令牌**。
100
+
101
+ ### `tokens` → `design-tokens.scss`
102
+
103
+ | JSON 字段 | CSS 变量 |
104
+ |-----------|----------|
105
+ | `brandPrimary` | `--brand-primary`;`--primary-5` / `--primary-color`;`--el-color-primary` 桥接保持 `var(--brand-primary)` |
106
+ | `brandHover` | `--brand-hover` |
107
+ | `brandActive` | `--brand-active` |
108
+ | `primaryScale[0..9]` | `--primary-0` … `--primary-9`;并设 `--primary-hover` = scale[6],`--primary-active` = scale[7],`--primary-bg` = scale[0](或设计指定),`--primary-bg-hover` = scale[1] |
109
+ | `success` | `--success-color` |
110
+ | `warning` | `--warning-color` |
111
+ | `error` | `--error-color` 与 **`--error-6`**(同值) |
112
+ | `errorBg` | `--error-bg`(有则写) |
113
+ | `layoutBg` | `--layout-bg` |
114
+ | `componentBg` | `--component-bg` |
115
+
116
+ 校验:`primaryScale.length === 10` 且 `primaryScale[5] === brandPrimary`;否则回执「待确认」并先写 brand,不瞎补色阶。
117
+
118
+ ### `componentSize` → 控件高度
119
+
120
+ | JSON | 令牌 |
121
+ |------|------|
122
+ | `sm` | `--control-height-sm` / `--component-size-sm` / `--el-component-size-small` |
123
+ | `base` | `--control-height` / `--component-size-base` / `--el-component-size` |
124
+ | `lg` | `--control-height-lg` / `--component-size-lg` / `--el-component-size-large` |
125
+
126
+ 细则见 `design-system` 7.5.8。缺档 → 落到 default(base),回执注明。
127
+
128
+ ### 卡片页签关闭色(设计约束)
129
+
130
+ - 关闭 hover:圆形底 `--layout-bg`(=`tokens.layoutBg`)+ 图标 `--error-6` / `tokens.error`(`#F5222D`)
131
+ - **禁止**用 Element Plus 默认 danger `#F56C6C` 冒充错误色
132
+
133
+ ---
30
134
 
31
135
  ## 覆盖清单
32
136
 
@@ -34,13 +138,24 @@ tags: [handoff, design-tokens, upstream, artifacts]
34
138
  |---|------|------|
35
139
  | A | `src/styles/design-tokens.scss` | 令牌 CSS;深色侧栏时追加 `--sidebar-*` |
36
140
  | B | `theme.scss` 当前 `html[data-theme]` | `--vts-theme-*` → `--sidebar-*` |
37
- | C | `public/platform-config.json` | `EpThemeColor` / `Theme` / `DarkMode`;`Version` 自增 |
38
- | D | `index.scss` | `design-tokens` 的 `@use` 最前 |
39
- | E | `dark.scss` / 语义色 | 跟 `--primary-*` |
141
+ | C | `public/platform-config.json` | `EpThemeColor` / `Theme` / `DarkMode` / **`ShowModel`**;`Version` 自增 |
142
+ | D | `index.scss` | `design-tokens` 的 `@use` 最前;按需 `--vts-margin` / `--vts-tag-card-*` |
143
+ | E | `dark.scss` / 语义色 | 跟 `--primary-*` / `--error-*` |
40
144
  | F | 冲突清单 | `design-system` 第四节 |
41
145
  | G | 规范识别回执 | 动手改文件前输出 |
146
+ | H | (可选)`design/design-handoff.json` | 若用户要求落盘,写入校验后的 JSON 副本 |
42
147
 
43
- 侧栏派生(交接为深色渐变时):
148
+ ### 页签风格(ShowModel)
149
+
150
+ 模版支持三种:`smart`(灵动)/ `chrome`(谷歌)/ `card`(卡片·设计规范)。
151
+
152
+ | 场景 | `ShowModel` |
153
+ |------|-------------|
154
+ | 模版出厂、未落地设计 | 保持项目现有值(常见 `chrome` / `smart`),**勿强行改** |
155
+ | 设计规范 / handoff 落地 | **必须**切到 `card`(对齐设计 TDesign 卡片页签) |
156
+ | 用户在设置面板手动切换 | 以用户选择为准 |
157
+
158
+ 侧栏派生(`shell.sidebar === "dark-gradient"` 时):
44
159
 
45
160
  ```scss
46
161
  --sidebar-bg: linear-gradient(180deg, color-mix(in srgb, var(--primary-8) 88%, var(--primary-7)) 0%, var(--primary-9) 52%, color-mix(in srgb, var(--primary-9) 90%, #000) 100%);
@@ -57,27 +172,49 @@ tags: [handoff, design-tokens, upstream, artifacts]
57
172
 
58
173
  `theme.scss`:`--vts-theme-menu-bg: var(--sidebar-bg);` 等 → `layout-theme`。
59
174
 
175
+ ---
176
+
177
+ ## 规范识别回执(动手前必出)
178
+
179
+ ```markdown
180
+ ## 规范识别回执
181
+ - 来源形态:design-handoff/v1 JSON | 交接块 | 令牌 CSS | 混合
182
+ - 主题:{themeName} / {themeId} / 主色 {brandPrimary}
183
+ - ShowModel:card(将写入)| 保持现有
184
+ - 几何:header {n} / tabs {n} / margin {n}
185
+ - 主色阶:完整 10 级 | 仅 brand(待确认色阶)
186
+ - 侧栏:dark-gradient | light
187
+ - 将改文件:design-tokens.scss / platform-config.json / index.scss / …
188
+ ```
189
+
190
+ ---
191
+
60
192
  ## 顺序
61
193
 
62
- 1. 收集产出 1~4
194
+ 1. 收集产出(JSON 优先)
63
195
  2. 规范识别回执
64
- 3. A→E
65
- 4. F
66
- 5. 验证侧栏/主色
67
- 6. 若同轮还有业务需求 → 再写/改 views(仅样式任务则到此结束)
196
+ 3. A→E(按映射表写)
197
+ 4. F 冲突核对
198
+ 5. 验证侧栏 / 主色 / 卡片页签 / 内容边距
199
+ 6. 提醒清 `localStorage`(改了 `EpThemeColor` / `ShowModel` / `Version` 时)
200
+ 7. 若同轮还有业务需求 → 再写/改 views(仅样式任务则到此结束)
68
201
 
69
- ## 交接块字段
202
+ ---
203
+
204
+ ## 兼容:旧交接块字段
205
+
206
+ 无 JSON 时仍可认(可整块粘贴到会话):
70
207
 
71
- ```markdown
72
- ## 前端落地交接
73
208
  - 设计来源:上游产出
74
- - 主题色系:<主题中文名>
75
- - data-theme:<模版 html[data-theme] 值>
76
- - 侧栏:<深色渐变|浅色>
77
- - 内容区默认:<亮色|暗黑>
78
- - 主色:<#HEX>
209
+ - 主题色系:`<主题中文名>`
210
+ - data-theme:`<模版 html[data-theme] 值>`
211
+ - 侧栏:深色渐变 | 浅色
212
+ - 内容区默认:亮色 | 暗黑
213
+ - 主色:`#HEX`
214
+ - ShowModel:`card`(设计落地时)| `smart` | `chrome`(未落地设计时保留模版默认)
215
+
216
+ 设计令牌 CSS 须含主色阶,并**建议含组件尺寸三档**:
79
217
 
80
- ## 设计令牌(CSS)
81
218
  ```css
82
219
  :root {
83
220
  --brand-primary: #...;
@@ -85,8 +222,89 @@ tags: [handoff, design-tokens, upstream, artifacts]
85
222
  --brand-active: #...;
86
223
  --primary-0: #...;
87
224
  /* --primary-1 … --primary-9 */
225
+ --component-size-sm: 24px;
226
+ --component-size-base: 32px;
227
+ --component-size-lg: 40px;
88
228
  }
89
229
  ```
90
- ```
230
+
231
+ | 档位 | 像素 | EP / 通用 API | 模版令牌 |
232
+ |------|------|---------------|----------|
233
+ | small | 24px | `size="small"` | `--control-height-sm` / `--el-component-size-small` |
234
+ | default | 32px | 不写 size | `--control-height` / `--el-component-size`【全站默认】 |
235
+ | large | 40px | `size="large"` | `--control-height-lg` / `--el-component-size-large` |
91
236
 
92
237
  仅有交接块无令牌 CSS:写 `--brand-primary` + `EpThemeColor`,待确认注明缺色阶。
238
+
239
+ ---
240
+
241
+ ## 设计落地 · 全量令牌核对表(强制)
242
+
243
+ > **出厂默认保留**;仅在有设计 handoff /「按设计规范适配」时执行。设计未给出的项勾「保留出厂」。漏项 = 硬失败风险。
244
+
245
+ ### A. 壳层与页签
246
+
247
+ | 设计语义 | 写入令牌 | 缺省 |
248
+ |----------|----------|------|
249
+ | 顶栏高 | `--header-height` / `--layout-header-height` | 出厂 64 |
250
+ | 多标签栏高 | `--tabs-height` | 40 |
251
+ | 侧栏宽 / 收起 | `--sidebar-width` / `--sidebar-collapsed-width` | 208 / 64 |
252
+ | 内容区内边距 | `--layout-content-padding` → `--vts-margin` | 出厂 8;设计常 24 |
253
+ | 页脚高 | `--layout-footer-height` | 48 |
254
+ | 页签风格 | `ShowModel: card` + `--vts-tag-card-*` | 未落地勿改 |
255
+ | 卡片页签关闭色 | `--error-color` / `--error-6`、`--vts-tag-card-close-*` | `#F5222D` |
256
+
257
+ ### B. 色板与文字
258
+
259
+ | 设计语义 | 写入令牌 | 缺省 |
260
+ |----------|----------|------|
261
+ | 主色 / hover / active | `--brand-*` + `EpThemeColor` | 出厂 `#409EFF` |
262
+ | 主色 10 阶 | `--primary-0`…`--primary-9`、`--primary-5` | 无阶则待确认,至少 `--primary-5=brand` |
263
+ | 成功/警告/错误 | `--success-color` / `--warning-color` / `--error-color` | 设计功能色 |
264
+ | 中性文字/边框/底 | `--text-*` / `--border-*` / `--layout-bg` / `--component-bg` | 出厂 |
265
+ | 弹窗渐变顶色 | `--primary-bg`、`--ds-dialog-bg` | 随 brand 浅混 |
266
+
267
+ ### C. 控件与反馈几何
268
+
269
+ | 设计语义 | 写入令牌 | 缺省 |
270
+ |----------|----------|------|
271
+ | 控件三档 | `--control-height*` / `--component-size-*` / `--el-component-size*` | 24/32/40 |
272
+ | 按钮水平 padding | `--button-padding-x` | 15 |
273
+ | 圆角 | `--radius-sm/base/lg` | 4/6/8 |
274
+ | Card 内边距 | `--card-padding` / `--vts-card-padding` | 24 |
275
+ | Switch | `--switch-min-width/height/border-radius` | 出厂 36/20/10;设计若写 44×22 则覆盖 |
276
+ | Tag | `--tag-height` / `--tag-line-height` | 22/20 |
277
+ | EP 内容 Tabs 项高 | `--tabs-item-height` | 46(≠ 壳层 tabs) |
278
+ | 菜单项高 | `--el-menu-item-height` | 40 |
279
+
280
+ ### D. 弹窗(出厂可保留;设计 Modal 规范出现则必须回填)
281
+
282
+ | 设计语义(component-spec Modal 等) | 写入令牌 | 出厂(未设计时) |
283
+ |----------|----------|------------------|
284
+ | 弹窗圆角(设计常 8) | `--dialog-border-radius` | 10 |
285
+ | 头/底高度或 padding | `--dialog-header-height` / `--dialog-footer-height` / padding 令牌 | 38 / 38 |
286
+ | 内容区内边距 | `--dialog-body-padding` | 15 |
287
+ | MessageBox 更紧凑 padding | `--message-box-*-padding` | 8×16 |
288
+
289
+ 回填后确认 `ReDialog` / MessageBox 已 `var(--…)` 消费(改令牌即变,无需改业务页)。
290
+
291
+ ### E. 落地后自检
292
+
293
+ - [ ] `platform-config`:`EpThemeColor` / `ShowModel` / `Theme` / `DarkMode` / `Version++`
294
+ - [ ] 侧栏深色渐变时 `--sidebar-*` + `theme.scss` 桥接
295
+ - [ ] grep 壳层与 ReDialog:无不可覆盖裸 px
296
+ - [ ] 列表页仍无 `100vh` 减顶栏;margin 变化后 flex 链正常
297
+ - [ ] 回执列出「已覆盖 / 保留出厂」字段清单
298
+
299
+ ---
300
+
301
+ ## 硬失败(code-quality 可引用)
302
+
303
+ | 条件 | 处理 |
304
+ |------|------|
305
+ | 用户要求按设计落地,但未切 `ShowModel: card` | 硬失败:补写配置 |
306
+ | JSON 有 `primaryScale` 但未写入 `--primary-0..9` | 硬失败 |
307
+ | 用 `#F56C6C` 或未映射的 EP danger 代替 `tokens.error` | 硬失败:改为 `#F5222D` / `--error-color` |
308
+ | 改了 `--layout-content-padding` / `--vts-margin` 后列表仍用 `100vh` 减顶栏定高 | 硬失败:迁 flex/`vts-page-card` |
309
+ | 设计落地后壳层/弹窗写死 px、改令牌不生效 | 硬失败:消费点改为 `var(--…)` 再回填 |
310
+ | 设计落地核对表(壳/色/控件/弹窗)有漏项且未标「保留出厂」 | 硬失败:补回填或回执注明 |
@@ -9,11 +9,20 @@ tags: [design-system, design-tokens, antd, semi, arco, vuetify, findesign, eleme
9
9
 
10
10
  识别规范后,在业务项目完成:令牌层(数据)+ 模版样式改写(执行)+ 硬编码冲突清理。之后业务只引令牌,禁止裸值。组件层仍是 Element Plus(不换组件,只换令牌数据)。
11
11
 
12
+ ### 双轨原则(出厂默认 vs 设计落地)
13
+
14
+ | 轨 | 含义 | Agent 行为 |
15
+ |----|------|------------|
16
+ | **出厂** | `design-tokens.scss` / `platform-config.json` 已有默认(如壳 64/208/40、主色 `#409EFF`、`ShowModel: chrome`、`--layout-content-padding: 8`) | **勿擅自改掉**以「贴设计」;系统未调用设计技能时保持出厂 |
17
+ | **设计落地** | 会话/仓库存在 `design-handoff/v1` 或用户要求按设计规范适配 | **必须**按设计规范与 JSON **全量回填**令牌;设计未提及的字段保留出厂;壳层/ReDialog/EP 几何须已是 `var(--token)`,改令牌即生效 |
18
+
19
+ 视觉关键尺寸(顶栏/侧栏/页签/内容边距/控件高/弹窗/卡片页签等)在模版中**一律为 CSS 变量**;文档里的 64/208 等是默认值说明,不是允许写死在组件里的常量。
20
+
12
21
  | 文件 | 职责 |
13
22
  |------|------|
14
23
  | `design-tokens.scss`(**唯一新增**) | 纯 `:root` 数据:主色/字体/圆角/高度 + 桥接 + `--el-*`;禁止选择器 |
15
24
  | `element-plus.scss` | EP 几何/视觉唯一出口;全部 `var()` |
16
- | `reset.scss` / `index.scss` | 基础与壳变量 |
25
+ | `reset.scss` / `index.scss` | 基础与壳变量桥接 |
17
26
  | `theme.scss` / `sidebar.scss` | 侧栏/导航 |
18
27
 
19
28
  禁止另建独立「重写层」文件。
@@ -75,14 +84,14 @@ tags: [design-system, design-tokens, antd, semi, arco, vuetify, findesign, eleme
75
84
 
76
85
  ### Step 0 上游设计产出落地(优先于 Step 1)
77
86
 
78
- **触发**:会话存在设计交接块 / `【主题色系】` / 令牌 CSS(`:root` + `--primary-*` 等)产出。
87
+ **触发**:会话 / 仓库存在 **`design-handoff/v1` JSON**,或设计交接块 / `【主题色系】` / 令牌 CSS(`:root` + `--primary-*`)。
79
88
 
80
89
  **动作**:
81
90
 
82
91
  1. 读 `references/design-handoff.md`。
83
- 2. 从会话/附件收集交接块与令牌 CSS,按 handoff 覆盖清单落地。
92
+ 2. **优先**收集 `design-handoff/v1` JSON;无 JSON 再收集交接块与令牌 CSS。按 handoff 映射表与**全量令牌核对表(A~E)**落地,设计未给出的项回执标明「保留出厂」。
84
93
  3. 比对项目 `design-tokens.scss` / `platform-config.json` 与产出主色;不一致则先落地。
85
- 4. 识别回执:`规范来源` = 上游产出 / 交接块;`目标规范` = `custom:<上游主题名>`。
94
+ 4. 识别回执:`规范来源` = design-handoff/v1 | 交接块 | 混合;`目标规范` = `custom:<上游主题名>`。
86
95
  5. 模版仍为出厂 `Theme: light` + `#409EFF` 且本轮要改依赖主题的页面时,同轮先完成样式覆盖清单。
87
96
 
88
97
  ### Step 1 探查现状(含命名锁定与模版版本判定)
@@ -136,17 +145,23 @@ tags: [design-system, design-tokens, antd, semi, arco, vuetify, findesign, eleme
136
145
  --control-height-sm: 24px;
137
146
  --control-height: 32px;
138
147
  --control-height-lg: 40px;
148
+ /* 设计规范别名(--component-size-* ↔ EP size API,见 7.5.8) */
149
+ --component-size-sm: var(--control-height-sm);
150
+ --component-size-base: var(--control-height);
151
+ --component-size-lg: var(--control-height-lg);
139
152
  --control-padding-x: 12px;
140
153
  --card-padding: 24px;
141
154
  --layout-bg: #f5f5f5;
142
155
  --sidebar-width: 208px;
143
- --header-height: 56px;
156
+ --header-height: 64px; /* 模版出厂与设计壳层一致;antd Pro 文档若写 56,以当前设计 handoff / 设计技能为准覆盖 */
157
+ --tabs-height: 40px;
158
+ --layout-content-padding: 8px; /* 出厂;设计落地常 24 → 同步 --vts-margin */
144
159
  /* ===== 用户可自定义 ===== */
145
160
 
146
161
  /* —— 规范语义别名(--vts-* 业务语义层,映射规范令牌) —— */
147
162
  --vts-color-success: #52c41a;
148
163
  --vts-color-warning: #faad14;
149
- --vts-color-danger: #ff4d4f;
164
+ --vts-color-danger: #f5222d; /* 与 --error-color / 设计 #F5222D 一致;勿用 #ff4d4f 或 EP #F56C6C */
150
165
  --vts-color-info: #1677ff;
151
166
  --vts-bg-color-page: var(--layout-bg);
152
167
  --vts-border-color-cool: #d9d9d9;
@@ -171,7 +186,7 @@ tags: [design-system, design-tokens, antd, semi, arco, vuetify, findesign, eleme
171
186
  --vts-scrollbar-thumb-hover: var(--el-text-color-secondary);
172
187
  --vts-autofill-bg: var(--el-bg-color);
173
188
  --vts-autofill-text: var(--el-text-color-primary);
174
- --ds-dialog-bg: linear-gradient(to bottom, var(--primary-bg), var(--component-bg)); /* 弹窗/MessageBox 背景;index.scss 桥接 --vts-dialog-bg */
189
+ --ds-dialog-bg: linear-gradient(to bottom, var(--primary-bg), var(--component-bg)); /* 主题色轻渐变;index 桥接 --vts-dialog-bg;fallback 可为 overlay 但令牌本身必须是渐变 */
175
190
 
176
191
  /* —— Element Plus 变量映射(必配,含主色兜底) —— */
177
192
  --el-color-primary: var(--brand-primary); /* 兜底:JS 运行时 setEpThemeColor 生效前的首屏主色 */
@@ -229,7 +244,7 @@ tags: [design-system, design-tokens, antd, semi, arco, vuetify, findesign, eleme
229
244
  /* —— 按钮 —— */
230
245
  .el-button {
231
246
  height: var(--control-height);
232
- padding: 0 15px;
247
+ padding: 0 var(--button-padding-x, 15px);
233
248
  font-size: var(--font-size-base);
234
249
  font-weight: var(--font-weight-regular);
235
250
  border-radius: var(--radius-base);
@@ -315,21 +330,21 @@ tags: [design-system, design-tokens, antd, semi, arco, vuetify, findesign, eleme
315
330
  }
316
331
 
317
332
  /* —— 弹窗 / 抽屉 / 消息盒 —— */
318
- .el-dialog, .el-message-box { padding: 0; font-size: var(--font-size-base); border-radius: var(--radius-lg); }
319
- .el-dialog__header, .el-message-box__header { padding: var(--dialog-header-padding); margin-right: 0; }
333
+ .el-dialog, .el-message-box { padding: 0; font-size: var(--font-size-base); border-radius: var(--dialog-border-radius, var(--radius-lg)); }
334
+ /* ReDialog 消费头/底高度与 body 内边距令牌;MessageBox 用更紧凑的 message-box-* */
335
+ .el-message-box__header { padding: var(--message-box-header-padding); margin-right: 0; }
320
336
  .el-dialog__title, .el-message-box__title { font-size: var(--font-size-lg); font-weight: var(--font-weight-semibold); }
321
- .el-dialog__body { padding: var(--dialog-body-padding); font-size: var(--font-size-base); line-height: var(--line-height); }
322
337
  .el-message-box__content { padding: var(--message-box-content-padding); font-size: var(--font-size-base); line-height: var(--line-height); }
323
- .el-dialog__footer, .el-message-box__btns { padding: var(--dialog-footer-padding); }
324
- .el-drawer__header { padding: var(--dialog-header-padding); margin-bottom: 0; font-size: var(--font-size-lg); }
325
- .el-drawer__body { padding: var(--dialog-footer-padding); }
338
+ .el-message-box__btns { padding: var(--message-box-footer-padding); }
339
+ .el-drawer__header { padding: var(--spacing-md) var(--spacing-lg); margin-bottom: 0; font-size: var(--font-size-lg); }
340
+ .el-drawer__body { padding: var(--spacing-md) var(--spacing-lg); }
326
341
 
327
342
  /* —— 下拉 / 弹出选项 —— */
328
343
  .el-dropdown-menu__item { padding: 0 var(--vts-space-md, 16px); font-size: var(--font-size-base); line-height: var(--control-height); }
329
344
  .el-select-dropdown__item { height: var(--control-height); padding: 0 var(--control-padding-x); font-size: var(--font-size-base); line-height: var(--control-height); }
330
345
 
331
346
  /* —— 导航:页签 / 菜单 / 面包屑 —— */
332
- .el-tabs__item { font-size: var(--font-size-base); height: 46px; padding: 0 var(--vts-space-md, 16px); }
347
+ .el-tabs__item { font-size: var(--font-size-base); height: var(--tabs-item-height, 46px); padding: 0 var(--vts-space-md, 16px); }
333
348
  .el-menu-item, .el-sub-menu__title {
334
349
  height: var(--el-menu-item-height, 40px);
335
350
  line-height: var(--el-menu-item-height, 40px);
@@ -361,7 +376,7 @@ tags: [design-system, design-tokens, antd, semi, arco, vuetify, findesign, eleme
361
376
 
362
377
  ### Step 5 模版硬编码冲突处理(按模版版本二选一,逐条回填)
363
378
 
364
- - **4.A(新模版,已变量化)**:模版样式均为 `var(--x, 默认值)` 形式,Step 2 的「模版桥接令牌」段已自动接管。**逐条确认**桥接令牌齐全即可,`--vts-dialog-bg` 已变量化为 `var(--ds-dialog-bg, 原值)`,确认桥接段含 `--ds-dialog-bg: var(--el-bg-color-overlay)` 即完成接管。
379
+ - **4.A(新模版,已变量化)**:模版样式均为 `var(--x, 默认值)` 形式,Step 2 的「模版桥接令牌」段已自动接管。**逐条确认**桥接令牌齐全即可:`--ds-dialog-bg` 必须为 **`linear-gradient(var(--primary-bg), var(--component-bg))`**(主题色轻渐变);`index.scss` 中 `--vts-dialog-bg: var(--ds-dialog-bg, var(--el-bg-color-overlay))` 的 overlay **仅作 fallback**,不得把令牌本身改成纯 overlay。
365
380
  - **4.B(旧模版)**:按第四节冲突清单**逐条手工处理**。
366
381
 
367
382
  **无论走哪条路**,处理完必须:
@@ -390,7 +405,7 @@ tags: [design-system, design-tokens, antd, semi, arco, vuetify, findesign, eleme
390
405
  | `sidebar.scss` | 侧栏执行 | 背景用 `background: var(--vts-theme-menu-bg)`(支持渐变);激活块 `--vts-theme-menu-active-bg`;边框 `--vts-sidebar-border-color` |
391
406
  | `dark.scss` | 暗黑侧栏 | **禁止** `sidebar-container { background-color: var(--el-bg-color) }` 压盖渐变;改用 `background: var(--vts-theme-menu-bg)` |
392
407
  | `platform-config.json` | 顶栏/主题 | `EpThemeColor` = 规范 primary-5;深色侧栏时 `Theme: default`(或对应 data-theme) |
393
- | `layout/components/lay-tag` | 页签栏高度 | 走 `--vts-tabs-height`(桥接 `--tabs-height`) |
408
+ | `layout/components/lay-tag` | 页签栏高度 / 风格 | 高度走 `--vts-tabs-height`;设计落地时 `ShowModel: card`,视觉令牌 `--vts-tag-card-*` |
394
409
  | `layout/components/lay-navbar` 等 | 顶栏内容区 | 行高/高度跟随 `--vts-bar-height`,禁止残留 `h-38` 等旧模版裸值 |
395
410
 
396
411
  4. 暗黑模式:在 `dark.scss` 内为新增令牌补暗色覆盖(`--vts-table-header-bg`、`--vts-message-bg`、`--vts-dialog-bg` 等),遵守 `layout-theme` 第三节规则。
@@ -447,7 +462,7 @@ height: \d+px、padding: \d+px、font-size: \d+px、行内 style="...颜色 hex"
447
462
  | 3 | `reset.scss` | `label { font-weight: 700 }` | AntD/Semi 表单标签为常规字重 | 已变量化 `var(--ds-form-label-weight, 700)` | 改为 `var(--ds-form-label-weight)` |
448
463
  | 4 | `reset.scss` | placeholder 色 `#9ca3af` | 不符合规范占位色阶 | 已变量化 `var(--ds-placeholder-color, ...)` | 改为 `var(--ds-placeholder-color)` |
449
464
  | 5 | `element-plus.scss` | `.el-form-item__label { font-weight: 700 !important }` | 同 #3 | 已变量化 | 改为 `var(--ds-form-label-weight) !important` |
450
- | 6 | `element-plus.scss` | `.el-card__body { padding: 5px !important }` | AntD 卡片内边距 24px | 已变量化 `var(--vts-card-padding, 5px)` | 改为 `var(--vts-card-padding) !important` |
465
+ | 6 | `element-plus.scss` | `.el-card__body` 旧裸 `5px` | AntD / 令牌卡片内边距 24px | 已 `var(--vts-card-padding, var(--card-padding, 24px))` | 禁止再把 fallback 写成 5px |
451
466
  | 7 | `element-plus.scss` | `.el-collapse-item__header` 字号 16px / bold / `#34394d` | 折叠面板脱离规范 | 已变量化 | 颜色/字重/字号走 `--vts-collapse-header-*` |
452
467
  | 8 | `element-plus.scss` | `.el-table__header th` 色 `#8c8f90` + 底 `#f2f9fc` | 表头不跟随规范 | 已变量化 `--vts-table-header-*` | 改 `--vts-table-header-text/bg` |
453
468
  | 9 | `element-plus.scss` | `.row-added/#e6f4ff`、`.row-modified/#fff7e6`、`.row-deleted/#f5f5f5` | 行变更色脱离规范且无暗色适配 | 已变量化 `--vts-row-*-bg` | 改 `--vts-row-*-bg` 令牌 |
@@ -455,7 +470,7 @@ height: \d+px、padding: \d+px、font-size: \d+px、行内 style="...颜色 hex"
455
470
  | 11 | `index.scss` / `dark.scss` | 旧默认 `--vts-dialog-bg: linear-gradient(#e5f3fe, #fefefe)`(写死蓝) | 弹窗背景应**跟随主题主色** | 已变量化:`--ds-dialog-bg: linear-gradient(var(--primary-bg), var(--component-bg))`;上游有 `--primary-bg` 则直接映射 | 旧项目改 `design-tokens` 的 `--ds-dialog-bg`,勿再写死 hex 渐变 |
456
471
  | 12 | `theme.scss` | 8 套侧栏 `--vts-theme-*` 出厂单色 | 上游设计产出落地时需桥接 `--sidebar-*` | 模版保持出厂单色 | 按 `design-handoff.md` 动态写入 |
457
472
  | 13 | `useApp.ts` | `epThemeColor` 缺省 `#409EFF` | EP 出厂蓝 ≠ 规范主色 | 不改代码 | 改 `platform-config.json` 的 `EpThemeColor`(Step 6) |
458
- | 14 | `index.scss` | `--vts-bar-height: 38px`、`--vts-margin: 8px` | 与规范导航高度(AntD Pro 56px)不一致 | 令牌可覆盖 | 令牌层覆盖并回归验证列表页 `calc(100vh - ...)`;默认保持不变标注差异 |
473
+ | 14 | `index.scss` | `--vts-margin` / `--layout-content-padding` 出厂 8px | 设计 handoff 常覆盖为 24 等 | 令牌可覆盖 | 定高列表走 `%`/flex(`vts-page-card`);禁止业务页 `100vh` 减顶栏定高 |
459
474
  | 15 | `button.scss` | `.btn/.golang/.php` 演示按钮(122×44 等) | 仅演示用,影响小 | 不处理 | 业务禁止使用这些类名 |
460
475
 
461
476
  ---
@@ -469,7 +484,7 @@ height: \d+px、padding: \d+px、font-size: \d+px、行内 style="...颜色 hex"
469
484
  | `--brand-primary` | `#1677ff` | `#0077fa` | `#165dff` | `#1867c0` | `#e2231a` |
470
485
  | `--brand-hover` | `#4096ff` | `#1c7bff` | `#4080ff` | `#2196f3` | `#ff5148` |
471
486
  | `--brand-active` | `#0958d9` | `#0054c8` | `#0e42d2` | `#0d47a1` | `#c91623` |
472
- | success / warning / danger | `#52c41a` / `#faad14` / `#ff4d4f` | `#00b42a` / `#ff8d1a` / `#fb2323` | `#00b42a` / `#ff7d00` / `#f53f3f` | `#4caf50` / `#fb8c00` / `#f44336` | `#029e74` / `#f7ba2a` / `#e2231a` |
487
+ | success / warning / danger | `#52c41a` / `#faad14` / `#f5222d` | `#00b42a` / `#ff8d1a` / `#fb2323` | `#00b42a` / `#ff7d00` / `#f53f3f` | `#4caf50` / `#fb8c00` / `#f44336` | `#029e74` / `#f7ba2a` / `#e2231a` |
473
488
  | `--font-family` | `-apple-system..., 'PingFang SC','Microsoft YaHei'` | `'Inter', -apple-system..., 'PingFang SC'` | `-apple-system..., 'PingFang SC'` | `Roboto, 'PingFang SC', sans-serif` | `-apple-system..., 'PingFang SC'` |
474
489
  | 字号 sm/base/lg/xl | 12 / 14 / 16 / 20 | 12 / 14 / 16 / 20 | 12 / 14 / 16 / 20 | 12 / 14 / 16 / 20 | 12 / 14 / 16 / 20 |
475
490
  | `--line-height` | 1.5715 | 1.5 | 1.5715 | 1.5 | 1.5715 |
@@ -504,9 +519,12 @@ height: \d+px、padding: \d+px、font-size: \d+px、行内 style="...颜色 hex"
504
519
 
505
520
  ### 7.1 产出物识别
506
521
 
507
- 1. 会话中的设计交接块 / 令牌表 / HTML 原型
508
- 2. 用户提供的含 `:root { --... }` 的文件或规范文档
509
- 3. 特征:`--brand-*` / `--primary` / `colorPrimary` / design token 表
522
+ 1. **`design-handoff/v1` JSON**(会话 / `design/design-handoff.json`)——**首选**
523
+ 2. 会话中的设计交接块 / 令牌表 / HTML 原型
524
+ 3. 用户提供的含 `:root { --... }` 的文件或规范文档
525
+ 4. 特征:`$schema: design-handoff/v1` / `--brand-*` / `--primary` / `colorPrimary` / design token 表
526
+
527
+ 有 JSON 时字段映射见 `design-handoff.md`「JSON → 模版映射」。
510
528
 
511
529
  ### 7.2 令牌归一化(上游命名 ≠ 本模块标准名)
512
530
 
@@ -518,7 +536,9 @@ height: \d+px、padding: \d+px、font-size: \d+px、行内 style="...颜色 hex"
518
536
  | `--brand-hover` / `--brand-active` | `--primary-hover` / `colorPrimaryHover` / 主色-悬浮 |
519
537
  | `--font-size-base` | `--font-size` / `fontSizeBase` / 基础字号 |
520
538
  | `--radius-base` | `--border-radius` / `borderRadius` / 圆角 |
521
- | `--control-height` | `--component-size` / `controlHeight` / 控件高度 |
539
+ | `--control-height` | `--component-size-base` / `--component-size` / `controlHeight` / 控件高度 / **default 档** |
540
+ | `--control-height-sm` | `--component-size-sm` / 控件高度 small / **size=small** |
541
+ | `--control-height-lg` | `--component-size-lg` / 控件高度 large / **size=large** |
522
542
  | `--card-padding` | `--padding-lg` / `cardPadding` / 卡片内边距 |
523
543
  | `--layout-bg` | `--bg-page` / `colorBgLayout` / 页面背景 |
524
544
 
@@ -558,7 +578,8 @@ height: \d+px、padding: \d+px、font-size: \d+px、行内 style="...颜色 hex"
558
578
  | 模版标准令牌(`design-tokens.scss`) | 执行层消费位置(grep 确认仍用 `var()`,勿裸 px) |
559
579
  |---|---|
560
580
  | `--ds-dialog-bg` / `--primary-bg` | `design-tokens.scss` → `index.scss` `--vts-dialog-bg` → `.el-dialog` / `.el-message-box` background |
561
- | `--dialog-header-padding` / `--dialog-body-padding` / `--message-box-content-padding` / `--dialog-footer-padding` | `element-plus.scss` 弹窗/MessageBox 各区块 padding |
581
+ | `--dialog-header-height` / `--dialog-footer-height` / `--dialog-body-padding` / `--dialog-border-radius` | `ReDialog`(`.el-dialog`) |
582
+ | `--message-box-*-padding` | `element-plus.scss` MessageBox |
562
583
  | `--header-padding-x` | `index.scss` → `--vts-header-padding-x`;`lay-navbar` `padding-inline` |
563
584
  | `--header-height` | `index.scss` → `--vts-bar-height`;`lay-navbar`;`SidebarLogo`;`ReHeaderPage`;`sidebar.scss` `.horizontal-header` |
564
585
  | `--tabs-height` | `index.scss` → `--vts-tabs-height`;`layout/components/lay-tag/index.vue` |
@@ -606,8 +627,8 @@ height: \d+px、padding: \d+px、font-size: \d+px、行内 style="...颜色 hex"
606
627
  2. `index.scss`:桥接 `--vts-bar-height` / `--vts-tabs-height` / `--vts-layout-header-offset*` 仍指向源令牌
607
628
  3. `SidebarLogo.vue`、`lay-navbar`:高度/行高仍 `var(--vts-bar-height)` 或等价引用
608
629
  4. `sidebar.scss`:`calc(100% - var(--header-height) - var(--sidebar-collapse-bar-height))`,禁止写死 px 组合
609
- 5. `lay-content/index.vue`:`padding-top` 用 `--vts-layout-header-offset*`,禁止写死旧顶栏组合;**禁止**与 `$storage.configure.headerHeight` 双向联动
610
- 6. `lay-header`:布局/标签页变化须 `nextTick` 重测,且仅在高度变化时写回 `$storage.configure.headerHeight`
630
+ 5. `lay-content/index.vue`:`padding-top` 用 `--vts-layout-header-offset*`;禁止写死顶栏组合;禁止 JS 测顶栏高度
631
+ 6. `lay-header`:渲染 navbar / tag;顶栏高度由 CSS 令牌控制
611
632
  7. DevTools:顶栏 computed = **当前** `--header-height`;菜单项 = **当前** `--el-menu-item-height`(两者须不同)
612
633
  8. 定高列表页:`--card-padding` / `--vts-card-padding` 变更后,抽查一页查询列表——内容区无外层滚动条、分页完整、`tableHeight` 随 padding 变化
613
634
 
@@ -617,7 +638,7 @@ height: \d+px、padding: \d+px、font-size: \d+px、行内 style="...颜色 hex"
617
638
 
618
639
  #### 7.5.5 查询区尺寸(core-kernel 黄金样板)
619
640
 
620
- 列表页查询区 **`el-form` 不写 size**(default 中号,32px),查询/工具栏按钮随表单继承;**禁止**查询区单独写 `size="small"` 导致输入框与按钮档位不一致。
641
+ 列表页查询区 **`el-form` 不写 size**(default 中号 = `--control-height` / 设计 `--component-size-base`,默认 32px),查询/工具栏按钮随表单继承;**禁止**查询区单独写 `size="small"` 导致输入框与按钮变成 24px 档。
621
642
 
622
643
  #### 7.5.6 适配完成验证(Step 8 补充)
623
644
 
@@ -625,12 +646,33 @@ height: \d+px、padding: \d+px、font-size: \d+px、行内 style="...颜色 hex"
625
646
  - [ ] 主内容区 `padding-top` = 当前 `--layout-header-offset`(或桥接 `--vts-layout-header-offset`)
626
647
  - [ ] 顶栏 / 页签 / 侧栏 / 菜单项 computed 尺寸 = 当前对应令牌值
627
648
  - [ ] 执行层 grep 无壳层裸 px 残留(EP 菜单根上的具体 px 须与 `--el-menu-item-height` 一致)
628
- - [ ] 查询区 input 与 button 高度一致(small 档)
649
+ - [ ] 查询区 input 与 button 高度一致,且均为 **default 档**(computed ≈ `--control-height`,不是 `--control-height-sm`)
650
+ - [ ] 三档令牌已写入:`--control-height-sm` / `--control-height` / `--control-height-lg`,并桥接 `--el-component-size*`
651
+ - [ ] `el-config-provider` **未**全局强制 `size="small"`(除非用户明确要求紧凑主题)
629
652
 
630
653
  #### 7.5.7 侧栏整主题适配(上游产出 · 强制)
631
654
 
632
655
  有上游设计产出且要求深色导航时,禁止只改 `--el-color-primary`。按 `design-handoff.md` 读取主色板并写入 `design-tokens` / `theme.scss` 桥接 / `platform-config.json`;`data-theme` 以交接块为准。
633
656
 
657
+ #### 7.5.8 组件尺寸 size API 落地(设计规范 → Element Plus)
658
+
659
+ > 设计侧令牌多为 `--component-size-sm|base|lg`;模版标准名为 `--control-height*`。落地时按下表归一化,并保证 **未指定 size 的 EP 控件** 使用 default 档高度(见 `element-plus.scss` 对 `.el-button` / `.el-input__wrapper` 的重写)。
660
+
661
+ | 设计语义 | 设计令牌 | 模版令牌 | EP CSS 变量 | EP 组件 API | 像素默认 |
662
+ |----------|----------|----------|-------------|-------------|---------|
663
+ | small | `--component-size-sm` | `--control-height-sm` | `--el-component-size-small` | `size="small"` | 24px |
664
+ | **default** | `--component-size-base` | `--control-height` | `--el-component-size` | **不写 size** / `default` | **32px** |
665
+ | large | `--component-size-lg` | `--control-height-lg` | `--el-component-size-large` | `size="large"` | 40px |
666
+
667
+ **缺档规则**(与设计规范「一点九」一致):
668
+
669
+ 1. 上游给出完整三档 → 三档都写入 `design-tokens.scss`「用户可自定义」,并确认 `--el-component-size*` 桥接仍指向 `--control-height*`。
670
+ 2. 上游**只给一个高度**(如「控件 32」)→ 写入 `--control-height`(default);`--control-height-sm` / `--control-height-lg` 保留模版默认或按比例派生;回执注明「缺档 → 落到 default」。
671
+ 3. **必须重设 default(未指定 size)**:`element-plus.scss` 中无 `--small`/`--large` 修饰的按钮/输入类选择器须引用 `var(--control-height)`,禁止依赖 EP 出厂像素且与令牌脱节。
672
+ 4. **禁止**把设计 base(32) 映射成全局 `size="small"`;`App.vue` 的 `el-config-provider` 默认不传 `size`(或显式不设),避免全站变 24px。
673
+ 5. 表格行内操作、紧凑工具条可用 `size="small"`;查询区/标准表单/弹窗表单用 default;登录主操作可用 `large`。
674
+ 6. VXETable / 表格密度的 `size` 与表单控件档位是两套体系,改表单令牌时不要误改表格密度全局配置(除非用户要求)。
675
+
634
676
  ---
635
677
 
636
678
  ## 八、反例(短)
@@ -647,4 +689,6 @@ height: \d+px、padding: \d+px、font-size: \d+px、行内 style="...颜色 hex"
647
689
  | 业务页裸写控件高度 | 只引令牌 |
648
690
  | 只写令牌不改壳层执行层 | 执行 7.5 |
649
691
  | EP 菜单变量自引用 | 写与 `--el-menu-item-height` 一致的具体值 |
692
+ | 设计 32px 却全局/查询区用 `size="small"` | default 档不写 size;small 仅紧凑场景 |
693
+ | 只落 `--control-height` 不落 sm/lg、也不桥接 `--el-component-size*` | 三档令牌 + EP 变量 + `element-plus.scss` 默认选择器 |
650
694
  | Skill 文档写死顶栏/侧栏默认 px | 读模版 `design-tokens.scss` 或上游产出 |