@qilitt-mickey/vue3-temp-skill 1.1.42 → 1.1.44
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.
- package/SKILL.md +5 -2
- package/bin/cli.js +1 -1
- package/mapping/scenes/admin/content.json +110 -2
- package/mapping/scenes/admin/layout.json +59 -1
- package/package.json +1 -1
- package/parser/fixtures/changeset-neg1.json +2 -11
- package/parser/fixtures/changeset-registry-gap.json +29 -0
- package/parser/fixtures/changeset-v32-fields.json +63 -0
- package/parser/fixtures/fake-project/src/styles/app.scss +5 -0
- package/parser/fixtures/fake-project/src/views/list.vue +13 -0
- package/parser/fixtures/registry-bad.json +11 -0
- package/parser/fixtures/registry-sample.json +15 -0
- package/parser/fixtures/verify/actual.json +18 -0
- package/parser/fixtures/verify/oracle.json +21 -0
- package/parser/index.js +971 -13
- package/parser/regression.js +59 -6
- package/parser/validator.js +69 -0
- package/references/code-quality.md +21 -1
- package/references/design-apply.md +171 -7
package/SKILL.md
CHANGED
|
@@ -51,7 +51,7 @@ tags: [vue3, typescript, element-plus, pinia, vite, unocss, crud, demo, code-qua
|
|
|
51
51
|
| `files-and-editors` | 附件、预览、下载、富文本、二维码 | `file-management.md`、`download-export.md`、`rich-text.md`、`qrcode-barcode.md` |
|
|
52
52
|
| `realtime-and-mobile` | WebSocket、移动端、微信、验证码、动效 | 对应专项 reference |
|
|
53
53
|
| `data-compare` | 编辑页变更对比和汇总 | `data-compare.md` |
|
|
54
|
-
| `design-apply` | 设计变更集落地:语义 ID
|
|
54
|
+
| `design-apply` | 设计变更集落地:语义 ID 三级匹配、结构/形态/两层样式转换、锚点与结构施工、覆写提权、渲染态验收、合规闸门 | `design-apply.md`、`mapping/`、`parser/` |
|
|
55
55
|
|
|
56
56
|
## 工作流
|
|
57
57
|
|
|
@@ -76,7 +76,7 @@ tags: [vue3, typescript, element-plus, pinia, vite, unocss, crud, demo, code-qua
|
|
|
76
76
|
- Demo 可以最小化数据和接口,但目录、类型、命名和组件边界要能承接后续开发。
|
|
77
77
|
- 新依赖先检查目标项目;缺失时说明精确版本、原因和构建接线,确认后再安装。
|
|
78
78
|
- 只有目标项目确实存在排除项、占位插件或缺失接线时,才读取 `addon-enable.md` 恢复配置。
|
|
79
|
-
- **输入为设计文件时**:用户给出设计技能(project-ui-design)产出的 JSON 文件(无论叫"设计方案/设计文件/变更集")→ 不走常规闭环,改走 `design-apply.md`
|
|
79
|
+
- **输入为设计文件时**:用户给出设计技能(project-ui-design)产出的 JSON 文件(无论叫"设计方案/设计文件/变更集")→ 不走常规闭环,改走 `design-apply.md` 协议——先跑 `node parser/index.js audit` 复核锚点(挂载点/死通道),再按「结构先行(`structure_ops`)、样式两层转换、必要时覆写提权(`priority`)」落地,最后过变更集合规闸门。变更集新增三类声明维度:`apply_via`(落点通道)/ `layer`(`host` 宿主盒 / `inner` 内层文本盒)/ `structure_ops`(数据·结构驱动点位的结构操作);词典条目对应新增 `anchors` / `preconditions` / `priority`。
|
|
80
80
|
|
|
81
81
|
### 3b. 小白用户执行纪律(design-apply 场景)
|
|
82
82
|
|
|
@@ -92,6 +92,8 @@ tags: [vue3, typescript, element-plus, pinia, vite, unocss, crud, demo, code-qua
|
|
|
92
92
|
|
|
93
93
|
- 对照 `references/code-quality.md` 检查类型、组件复用、API、路由、权限、安全、异常反馈、响应式和可演进性。
|
|
94
94
|
- 在目标项目执行 `pnpm lint:fix`、`pnpm type-check`;改动构建配置时再执行 `pnpm build`。
|
|
95
|
+
- **设计文件落地时追加渲染态验收**:变更集含 `oracle`(或效果图带 `data-sid`)时,跑 `node parser/index.js verify`——抽取项目同名 `data-sid` 元素的 computed style,与效果图期望值逐点 diff;缺口按三类归因(选择器落空 / 权重被压 / 语境错位)修正,禁止用 `!important` 掩盖。
|
|
96
|
+
- **设计文件落地时核对登记表覆盖率**:变更集带登记表(`coverage.registry` 或 `--registry`)时,跑 `node parser/index.js match <cs.json> --registry <restore-registry.json>`——`C = A` 且无缺口才可交付;parser **当场以登记表为权威重算**,设计侧自报的 `coverage` 数字不参与。单独核验登记表对词典的通道就绪度用 `node parser/index.js registry <restore-registry.json>`(硬缺口 exit 1、通道缺口列出待补字段)。
|
|
95
97
|
- 最终说明:命中能力组、修改文件、功能验证、命令结果、未解决问题和下一步。
|
|
96
98
|
|
|
97
99
|
## 出厂中性 · 变更集驱动(design-apply 架构红线)
|
|
@@ -127,5 +129,6 @@ tags: [vue3, typescript, element-plus, pinia, vite, unocss, crud, demo, code-qua
|
|
|
127
129
|
- 功能:...
|
|
128
130
|
- `pnpm lint:fix`:通过 | 失败(原因)
|
|
129
131
|
- `pnpm type-check`:通过 | 失败(原因)
|
|
132
|
+
- 设计验收:无 oracle 时 N/A | 逐点 diff 结果(命中 N / 缺口 M,归因与修正)
|
|
130
133
|
- 缺口回流:无 | 仅限「设计侧未给值」的维度(列出维度名,注明已回流设计侧补齐)
|
|
131
134
|
```
|
package/bin/cli.js
CHANGED
|
@@ -263,7 +263,7 @@ function installSkills(targetKey, projectDir) {
|
|
|
263
263
|
}
|
|
264
264
|
|
|
265
265
|
// design-apply 能力组依赖:mapping/ 词典 + parser/ 解析器(变更集落地的运行时依赖)
|
|
266
|
-
// parser/fixtures/ 为作者侧回归夹具(A-
|
|
266
|
+
// parser/fixtures/ 为作者侧回归夹具(A-O 回归步骤的测试数据),不随技能分发,保留在仓库
|
|
267
267
|
for (const runtimeDir of ["mapping", "parser"]) {
|
|
268
268
|
const src = path.join(SKILL_DIR, runtimeDir);
|
|
269
269
|
if (fs.existsSync(src)) copyDir(src, path.join(dest, runtimeDir), ["fixtures"]);
|
|
@@ -80,6 +80,20 @@
|
|
|
80
80
|
"batch_delete_bg": "background-color",
|
|
81
81
|
"batch_disabled_opacity": "opacity"
|
|
82
82
|
},
|
|
83
|
+
"anchors": [
|
|
84
|
+
{ "kind": "class", "layer": "host", "target": ".vts-action-bar" },
|
|
85
|
+
{ "kind": "class", "layer": "inner", "target": ".vts-action-bar .el-button" },
|
|
86
|
+
{ "kind": "css_var", "target": "--action-bar-gap" },
|
|
87
|
+
{ "kind": "css_var", "target": "--action-bar-padding-y" }
|
|
88
|
+
],
|
|
89
|
+
"preconditions": [
|
|
90
|
+
"本条目选择器 .vts-action-bar 依赖页面给操作栏容器挂上该语义类;若页面用的是出厂 ReTableBar 且未挂该类,选择器在项目 DOM 里不存在,规则再准也落不下去(这是「操作栏规则写了却没生效」的根因,属挂载点缺失)。施工前须先按 structure_ops 给容器补类,或改用项目实际容器选择器并回写本条目。",
|
|
91
|
+
"gap / padding 的 CSS 变量必须在项目样式中存在消费者(var() 引用),只定义不消费 = 死通道。"
|
|
92
|
+
],
|
|
93
|
+
"priority": {
|
|
94
|
+
"strategy": "scope_qualified",
|
|
95
|
+
"reason": "容器语义类挂上后,作用域限定即可覆盖。"
|
|
96
|
+
},
|
|
83
97
|
"$note": "设计意图(list-page §4/§11.25-11.36):flex 两端对齐、pad 20px 20px 8px、左侧批量(未选中置灰 opacity 0.4 + not-allowed)、右侧工具三件套缺一不可。分工:本条目管容器布局与置灰;批量删除红色按钮本体走 component.button.danger。demo 噪音按钮去留属业务层,交付说明申报后由项目侧业务闭环移除"
|
|
84
98
|
},
|
|
85
99
|
"admin.content.table.operation_column": {
|
|
@@ -107,6 +121,18 @@
|
|
|
107
121
|
"more_arrow_size": "font-size",
|
|
108
122
|
"more_arrow_gap": "gap"
|
|
109
123
|
},
|
|
124
|
+
"anchors": [
|
|
125
|
+
{ "kind": "class", "layer": "host", "target": ".vts-table-area .el-table__cell:has(.re-table-operate)" },
|
|
126
|
+
{ "kind": "class", "layer": "inner", "target": ".vts-table-area .el-table__cell:has(.re-table-operate) > .cell" }
|
|
127
|
+
],
|
|
128
|
+
"preconditions": [
|
|
129
|
+
"按钮之间的间距由分割线元素的左右 margin 承载,不是按钮自身 gap:必须先存在分割线元素(ReTableOperate 默认不渲染 divider,需按 structure_ops 补槽位),divider_width / divider_height / divider_margin_x 才有落点——这是「操作列按钮间距没还原」的根因。",
|
|
130
|
+
"「纯文字无图标」是数据侧结论:图标来自业务页列定义的 operateButtons[].icon,只写 form=text_link 而不移除数据里的 icon = 未落地(改 CSS 不算)。"
|
|
131
|
+
],
|
|
132
|
+
"priority": {
|
|
133
|
+
"strategy": "scope_qualified",
|
|
134
|
+
"reason": "操作列无行内样式竞争,作用域限定即可覆盖。"
|
|
135
|
+
},
|
|
110
136
|
"$note": "设计意图(list-page §5/§26.14/§11.52-11.60):纯文字链接无图标、短分割线隔离(1px×14px、左右 margin 0 8px)、≥3 个折叠到更多(带 10px 下拉箭头、箭头↔文字 gap 2px)、列宽 160px + nowrap 禁止换行。⚠ **按钮之间的间距由分割线的 divider_margin_x 承载**(不是按钮自身 gap)——设计侧不声明该字段,项目侧无从还原图上间距,这是「操作列间距没还原」的根因。落地断言:form 即结构意图(design-apply 底线二豁免)——form=text_link 时必须删除业务页列定义 operateButtons 各项的 icon 字段,禁止只改 CSS 保留图标冒充落地;设计侧未声明 min_width/column_width 时 AI 施工必须回填出厂值 160px/nowrap 并在交付说明注明,禁止留空导致按钮换行"
|
|
111
137
|
},
|
|
112
138
|
"admin.content.table.header_cell": {
|
|
@@ -127,7 +153,52 @@
|
|
|
127
153
|
"border_bottom": "border-bottom",
|
|
128
154
|
"nowrap": "white-space"
|
|
129
155
|
},
|
|
130
|
-
"
|
|
156
|
+
"anchors": [
|
|
157
|
+
{ "kind": "class", "layer": "host", "target": ".vts-table-area .el-table__header th.el-table__cell" },
|
|
158
|
+
{ "kind": "class", "layer": "inner", "target": ".vts-table-area .el-table__header th.el-table__cell > .cell" },
|
|
159
|
+
{ "kind": "css_var", "target": "--el-table-header-bg-color" },
|
|
160
|
+
{ "kind": "css_var", "target": "--el-table-header-text-color" }
|
|
161
|
+
],
|
|
162
|
+
"preconditions": [
|
|
163
|
+
"Element Plus 表头是「宿主 th.el-table__cell + 内层 .cell 文本盒」两层结构;EP 出厂给内层 .cell 写了 white-space: normal,因此 nowrap / text-overflow 这类文本控制必须落在 inner 层,写在宿主 th 上会被内层覆盖(这是「表头竖排换行」的根因)。高度 / padding / 背景落在 host 层。",
|
|
164
|
+
"表头单元格可能被业务页用 :header-cell-style 注入行内样式,行内样式优先级高于一切类规则;使用本条目时须确认页面未在列上写死行内表头样式,若有则在页面侧移除、改由本条目承载。"
|
|
165
|
+
],
|
|
166
|
+
"priority": {
|
|
167
|
+
"strategy": "self_plus_important",
|
|
168
|
+
"reason": "页面可能用 :header-cell-style 注入行内样式,普通类规则无法取胜。"
|
|
169
|
+
},
|
|
170
|
+
"$note": "设计意图(list-page §11.39):高 48px、padding 16px、背景 #FAFAFA、字号 14px、字重 500、文字色 #000000E0、左对齐、底边框 1px solid #F0F0F0、nowrap、吸顶。⚠ 出厂只有「背景色 / 文字色」可经 --el-table-* 令牌表达;字重与对齐没有对应令牌——出厂仅设了 .el-table__header th 的 font-weight,对齐沿用浏览器 th 默认,两者都**不能靠换令牌得到**,必须由本条目字段显式承载,这是「表头样式不对」的根因。⚠ 文本换行控制必须落 inner 层(见 anchors),落宿主无效。作用域前缀 .vts-page-card 保证只命中业务卡片内表格。"
|
|
171
|
+
},
|
|
172
|
+
"admin.content.table.cell": {
|
|
173
|
+
"type": "element",
|
|
174
|
+
"selector": ".vts-table-area .el-table__body td.el-table__cell",
|
|
175
|
+
"file": "src/styles/element-plus.scss(Element Plus 行单元格结构类,无业务定制类)",
|
|
176
|
+
"style_scope": ".vts-page-card",
|
|
177
|
+
"css_vars": {},
|
|
178
|
+
"custom_style_map": {
|
|
179
|
+
"padding": "padding",
|
|
180
|
+
"padding_y": "padding-block",
|
|
181
|
+
"padding_x": "padding-inline",
|
|
182
|
+
"height": "height",
|
|
183
|
+
"font_size": "font-size",
|
|
184
|
+
"font_weight": "font-weight",
|
|
185
|
+
"text_color": "color",
|
|
186
|
+
"border_bottom": "border-bottom",
|
|
187
|
+
"vertical_align": "vertical-align"
|
|
188
|
+
},
|
|
189
|
+
"anchors": [
|
|
190
|
+
{ "kind": "class", "layer": "host", "target": ".vts-table-area .el-table__body td.el-table__cell" },
|
|
191
|
+
{ "kind": "class", "layer": "inner", "target": ".vts-table-area .el-table__body td.el-table__cell > .cell" }
|
|
192
|
+
],
|
|
193
|
+
"preconditions": [
|
|
194
|
+
"出厂 element-plus.scss 已给 .el-table .el-table__cell 设了 padding(var(--vts-space-xs) 0),本条目字段必须落 host 层才能覆盖它;写在 inner 层只改内层文本盒,观感上「改了没反应」。",
|
|
195
|
+
"行高由「单元格 padding + 内容行高」共同决定;声明行高档位时必须同时给出 padding 取值,只改其一会得到非预期行高。"
|
|
196
|
+
],
|
|
197
|
+
"priority": {
|
|
198
|
+
"strategy": "scope_qualified",
|
|
199
|
+
"reason": "出厂 padding 规则与本条目同属全局样式,作用域限定到 .vts-page-card 即可覆盖。"
|
|
200
|
+
},
|
|
201
|
+
"$note": "设计意图(list-page §11.43):padding 16px、字号 14px、字重 400、文字色 #000000E0、底边框 1px solid #F0F0F0、垂直居中。⚠ 数据单元格此前无承载点位(历史缺口:只覆盖了表头,单元格 padding 改不动),本条目即为补建的通道。不声明时项目侧保留出厂值,效果图要求的 16px 必须显式给出。"
|
|
131
202
|
},
|
|
132
203
|
"admin.content.table.cell_status": {
|
|
133
204
|
"type": "element",
|
|
@@ -149,7 +220,19 @@
|
|
|
149
220
|
"icon_size": "font-size",
|
|
150
221
|
"radius": "border-radius"
|
|
151
222
|
},
|
|
152
|
-
"
|
|
223
|
+
"anchors": [
|
|
224
|
+
{ "kind": "class", "layer": "host", "target": ".vts-table-area .el-table__cell .el-tag" },
|
|
225
|
+
{ "kind": "class", "layer": "inner", "target": ".vts-table-area .el-table__cell .el-tag .el-tag__content" }
|
|
226
|
+
],
|
|
227
|
+
"preconditions": [
|
|
228
|
+
"本条目只对「已渲染的 el-tag」生效:状态列必须在页面模板里真的渲染 el-tag(formatter 返回纯文本不会产生 el-tag)。因此 form 声明必须与 structure_ops 配对——只改样式、不改模板分支 = 声明无效(这是「列中状态样式不对」的根因)。",
|
|
229
|
+
"五态配色是「浅底 + 浅边框 + 语义色文字」三项组合,缺任一项即不是 filled 变体。"
|
|
230
|
+
],
|
|
231
|
+
"priority": {
|
|
232
|
+
"strategy": "scope_qualified",
|
|
233
|
+
"reason": "出厂该列多为纯文本或 el-tag 默认色,作用域限定即可覆盖。"
|
|
234
|
+
},
|
|
235
|
+
"$note": "设计意图(list-page §7 / §11.64-11.75):默认 **filled** 变体,五态取值 = success #F6FFED / 1px #D9F7BE / #52C41A / check-circle;processing 主色-1 / 主色-3 / 主色-5 / sync;warning #FFFBE6 / #FFE58F / #FAAD14 / exclamation-circle;error #FFF1F0 / #FFCCC2 / #FF4D4F / close-circle;default rgba(0,0,0,0.04) / #F0F0F0 / #000000A6 / clock-circle(图标 16px)。⚠ 出厂 demo 该列多为**纯文本或 el-tag 默认色**——变体与五态配色必须由变更集显式声明,否则停留在默认蓝/灰,这是「列中状态样式不对」的根因。⚠ 本条目**不是纯样式点位**:Tag 化本身是结构施工(见 preconditions 与 structure_ops),只声明 style 落不下去。通用 Tag 规范见 component.tag.status;≥3 个 Tag 列时按「四选二」逐列分配(list-page §8)。"
|
|
153
236
|
},
|
|
154
237
|
"admin.content.table.cell_amount": {
|
|
155
238
|
"type": "element",
|
|
@@ -161,6 +244,19 @@
|
|
|
161
244
|
"align": "text-align",
|
|
162
245
|
"font_variant_numeric": "font-variant-numeric"
|
|
163
246
|
},
|
|
247
|
+
"anchors": [
|
|
248
|
+
{ "kind": "class", "layer": "host", "target": ".vts-table-area .el-table__cell.col-price" },
|
|
249
|
+
{ "kind": "class", "layer": "inner", "target": ".vts-table-area .el-table__cell.col-price > .cell" },
|
|
250
|
+
{ "kind": "attr", "layer": "host", "target": "td.el-table__cell.is-right" }
|
|
251
|
+
],
|
|
252
|
+
"preconditions": [
|
|
253
|
+
"选择器依赖业务列绑定 class-name(col-price)或列 align=right(EP 渲染时给单元格加 is-right);两者都没绑时规则永不命中。因此本条目含**结构施工要求**(列定义补 class-name / align),不是纯样式条目——只写样式不绑类名 = 声明无效(这是「金额列没右对齐」的根因)。",
|
|
254
|
+
"右对齐需与表头对齐一致,否则表头与数据错位;表头对齐由 admin.content.table.header_cell 的 text_align 承载。"
|
|
255
|
+
],
|
|
256
|
+
"priority": {
|
|
257
|
+
"strategy": "scope_qualified",
|
|
258
|
+
"reason": "列级类名落位后,作用域限定即可覆盖 EP 默认的左对齐。"
|
|
259
|
+
},
|
|
164
260
|
"$note": "设计意图(§11.110 col-price):右对齐 + tabular-nums 等宽数字。落地手段:列定义加 class-name=col-price + align=right;「等宽数字」译为 font-variant-numeric: tabular-nums"
|
|
165
261
|
},
|
|
166
262
|
"admin.content.table.cell_thumb": {
|
|
@@ -175,6 +271,18 @@
|
|
|
175
271
|
"thumb_radius": "border-radius",
|
|
176
272
|
"column_width": "width"
|
|
177
273
|
},
|
|
274
|
+
"anchors": [
|
|
275
|
+
{ "kind": "class", "layer": "host", "target": ".vts-table-area .el-table__cell.col-thumb" },
|
|
276
|
+
{ "kind": "class", "layer": "inner", "target": ".vts-table-area .el-table__cell.col-thumb .el-image" }
|
|
277
|
+
],
|
|
278
|
+
"preconditions": [
|
|
279
|
+
"选择器依赖业务列绑定 class-name(col-thumb);未绑定时规则永不命中——本条目含**结构施工要求**(列定义补 class-name),不是纯样式条目。",
|
|
280
|
+
"缩略盒尺寸必须真正约束到图片元素;页面若在模板里用工具类直写尺寸(如 h-30 w-30),其优先级会压过本条目,须先移除页面级尺寸再靠本条目承载。"
|
|
281
|
+
],
|
|
282
|
+
"priority": {
|
|
283
|
+
"strategy": "self_plus_important",
|
|
284
|
+
"reason": "页面常以工具类直写图片尺寸,与设计层规则同层竞争,需显式提权。"
|
|
285
|
+
},
|
|
178
286
|
"$note": "设计意图(§11.108-11.109):列宽 72px 居中,缩略盒 40×40 圆角 6px。落地手段:列 className=col-thumb + el-image 40×40"
|
|
179
287
|
},
|
|
180
288
|
"admin.content.table.area": {
|
|
@@ -77,6 +77,20 @@
|
|
|
77
77
|
"active_indicator_thickness": "height",
|
|
78
78
|
"active_indicator_style": "border-radius"
|
|
79
79
|
},
|
|
80
|
+
"anchors": [
|
|
81
|
+
{ "kind": "class", "layer": "host", "target": ".sidebar-container .el-menu-item" },
|
|
82
|
+
{ "kind": "class", "layer": "inner", "target": ".sidebar-container .el-menu-item > .el-menu-item__content" },
|
|
83
|
+
{ "kind": "css_var", "target": "--vts-theme-menu-active-bg" },
|
|
84
|
+
{ "kind": "css_var", "target": "--vts-theme-menu-active-before" }
|
|
85
|
+
],
|
|
86
|
+
"preconditions": [
|
|
87
|
+
"出厂菜单项盒模型是「无横向 margin(margin: 4px 0)+ 胶囊用 inset 内缩」;指示条几何必须以这个宿主盒为基准计算偏移。照搬外部效果图上「依赖菜单项横向 margin」的负偏移量会落进容器外并被 overflow 裁掉(这是指示条「映射了却没效果」的根因:值搬了、让该值成立的宿主盒模型没搬)。",
|
|
88
|
+
"--vts-theme-menu-active-before 出厂为透明且全项目无消费者;声明 indicator_* 形态必须成对落地「关胶囊令牌 + 新建消费者」,只改色值不建消费者 = 未施工。"
|
|
89
|
+
],
|
|
90
|
+
"priority": {
|
|
91
|
+
"strategy": "deep_qualified",
|
|
92
|
+
"reason": "出厂 sidebar.scss 的胶囊规则用 !important,设计层需以同等或更高权重覆盖。"
|
|
93
|
+
},
|
|
80
94
|
"$note": "侧栏配色挂载点为 html[data-theme='xxx'](theme.scss 8 套预设);设计输出深色侧栏 → Theme=default + Version++(useTheme 规则),浅色 → Theme=light。⚠文本完整性红线:菜单项名称必须完整显示(el-menu 自带 ellipsis 折叠溢出菜单),禁止改 menu 文本截断/隐藏策略;item_height 加大时确认行高不挤压文字。宽度类改动(--sidebar-width)后必须目视验证长菜单名显示。⚠激活态出厂中性基线(禁止把某张图的结论写进源码):出厂形态 = pill 胶囊高亮;--vts-theme-menu-active-before 出厂默认 transparent 且**全项目无消费者**(死通道)。因此 form=indicator_* 时必须在本条目 style_scope 内成对落地两件事才算施工完成——① 覆写 --vts-theme-menu-active-bg: transparent 关胶囊;② 在设计层文件(不可写出厂 sidebar.scss)新建 ::after 消费者引用 var(--vts-theme-menu-active-before)。缺任一项 = 「映射了却没效果」。所有几何参数(方位/粗细/长度/圆角/内缩)取自变更集 style 字段,禁止写死 left:0 / 3px 等常量。"
|
|
81
95
|
},
|
|
82
96
|
"admin.layout.sidebar.collapse_trigger": {
|
|
@@ -146,6 +160,13 @@
|
|
|
146
160
|
"custom_style_map": {
|
|
147
161
|
"font_size": "font-size"
|
|
148
162
|
},
|
|
163
|
+
"anchors": [
|
|
164
|
+
{ "kind": "class", "layer": "host", "target": ".navbar .navbar-breadcrumb-wrap" }
|
|
165
|
+
],
|
|
166
|
+
"priority": {
|
|
167
|
+
"strategy": "deep_qualified",
|
|
168
|
+
"reason": "出厂组件自身 scoped 规则与设计层同权重,仅靠后置加载顺序不可靠;显隐收口与样式覆盖都必须显式提权(历史缺口:display:none 被同权重 scoped 规则反压,面包屑仍显示)。"
|
|
169
|
+
},
|
|
149
170
|
"$note": "分隔符为结构属性(breadcrumb separator 字符),不在样式映射范围"
|
|
150
171
|
},
|
|
151
172
|
"admin.layout.header.lang_switch": {
|
|
@@ -256,6 +277,15 @@
|
|
|
256
277
|
"greeting_font_weight": "font-weight",
|
|
257
278
|
"gap": "gap"
|
|
258
279
|
},
|
|
280
|
+
"anchors": [
|
|
281
|
+
{ "kind": "class", "layer": "host", "target": ".navbar .navbar-right .el-dropdown-link" },
|
|
282
|
+
{ "kind": "class", "layer": "inner", "target": ".navbar .navbar-right .el-dropdown-link img" },
|
|
283
|
+
{ "kind": "class", "layer": "inner", "target": ".navbar .navbar-right .el-dropdown-link p" }
|
|
284
|
+
],
|
|
285
|
+
"preconditions": [
|
|
286
|
+
"出厂 DOM 只有「头像 img + 用户名 p」,任何 greeting 组合都必须**先做结构增量**再谈样式;未新增节点时 greeting_* 样式字段无落点(这是「欢迎区没出现」的根因)。",
|
|
287
|
+
"组合形态由 form 决定,样式字段按 sub_selectors 前缀路由到对应部件选择器。"
|
|
288
|
+
],
|
|
259
289
|
"$note": "⚠出厂中性基线:出厂 DOM 只有「头像 img + 用户名 p」,**没有任何问候语节点**(词典曾误记 .header-welcome 已实现,属虚假前提)。因此 form 含 greeting 时必须走结构增量新增 DOM,且节点文案模板(时段问候语 + 用户名)由业务层提供,本点位只承载组合形态与样式——禁止把具体问候文案写进组件。反向同理:设计只要纯头像/纯用户名时以 form=avatar_only/name_only 声明,出厂多余节点同样按收口处理(隐藏不删)。"
|
|
260
290
|
},
|
|
261
291
|
"admin.layout.tabs": {
|
|
@@ -285,7 +315,20 @@
|
|
|
285
315
|
},
|
|
286
316
|
"custom_style_map": {
|
|
287
317
|
"bg": "background-color",
|
|
288
|
-
"border_bottom": "border-bottom"
|
|
318
|
+
"border_bottom": "border-bottom",
|
|
319
|
+
"padding_inline": "padding-inline",
|
|
320
|
+
"padding_block": "padding-block"
|
|
321
|
+
},
|
|
322
|
+
"anchors": [
|
|
323
|
+
{ "kind": "class", "layer": "host", "target": ".tags-view" },
|
|
324
|
+
{ "kind": "class", "layer": "inner", "target": ".tags-view .scroll-container" }
|
|
325
|
+
],
|
|
326
|
+
"preconditions": [
|
|
327
|
+
"容器内边距出厂由组件样式给出(非 0),设计要求「内边距归零、首页页签与折叠按钮左对齐」时必须显式声明 padding_inline,不声明即保留出厂值(这是「首页页签不贴左缘」的根因)。"
|
|
328
|
+
],
|
|
329
|
+
"priority": {
|
|
330
|
+
"strategy": "deep_qualified",
|
|
331
|
+
"reason": "容器内边距规则写在组件 scoped 内,与设计层同权重,需显式提权。"
|
|
289
332
|
},
|
|
290
333
|
"$note": "showModel 由 platform-config.json ShowModel 字段切换;smart/line 模板未实现,映射层按 chrome/card 两形态处理"
|
|
291
334
|
},
|
|
@@ -339,6 +382,14 @@
|
|
|
339
382
|
"close_opacity": "opacity",
|
|
340
383
|
"close_hover_color": "color"
|
|
341
384
|
},
|
|
385
|
+
"anchors": [
|
|
386
|
+
{ "kind": "class", "layer": "host", "target": ".tags-view .scroll-item .card-tab" },
|
|
387
|
+
{ "kind": "class", "layer": "inner", "target": ".tags-view .scroll-item .card-tab .el-icon-close" }
|
|
388
|
+
],
|
|
389
|
+
"priority": {
|
|
390
|
+
"strategy": "deep_qualified",
|
|
391
|
+
"reason": "关闭钮透明度等出厂规则写在组件 scoped 内且权重与设计层相当,仅靠后置加载顺序不可靠(历史缺口:声明 0.45 常显,被 scoped 的 opacity:0 反压、只在 hover 才显),必须显式提权。"
|
|
392
|
+
},
|
|
342
393
|
"$note": "card 形态专属令牌挂在父级 admin.layout.tabs 的 css_vars(整组切换);本条目为页签项级字段补充。chrome 形态梯形样式为模板结构样式,不走样式映射"
|
|
343
394
|
},
|
|
344
395
|
"admin.layout.tabs.item_active": {
|
|
@@ -380,6 +431,13 @@
|
|
|
380
431
|
"bg": "background-color",
|
|
381
432
|
"opacity": "opacity"
|
|
382
433
|
},
|
|
434
|
+
"anchors": [
|
|
435
|
+
{ "kind": "class", "layer": "host", "target": ".tags-view .chrome-tab .chrome-tab-divider" },
|
|
436
|
+
{ "kind": "class", "layer": "inner", "target": ".tags-view .scroll-item:not(:first-child)::before" }
|
|
437
|
+
],
|
|
438
|
+
"preconditions": [
|
|
439
|
+
"chrome 形态自带分割线元素;card / flat 形态没有该元素,须先由结构/样式层新建 —— 元素不存在时 width / height / bg 全部无落点(这是「页签分割线声明了却不见」的根因)。"
|
|
440
|
+
],
|
|
383
441
|
"$note": "落地口径:chrome 形态可直接覆写 .chrome-tab-divider 的 background-color / height(含激活态 opacity 还原);card / flat 形态须在设计层用 .tags-view .scroll-item:not(:first-child)::before 新建竖线并消费变更集 width/height/bg。禁止把某张图的分割线参数(如 1px×100% #F0F0F0)写进出厂源码——那是单张图的结论。"
|
|
384
442
|
},
|
|
385
443
|
"admin.layout.tabs.context_menu": {
|
package/package.json
CHANGED
|
@@ -1,17 +1,8 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$comment": "端到端验证夹具 · 负例 1:缺 schema
|
|
2
|
+
"$comment": "端到端验证夹具 · 负例 1:缺 schema。预期在第一步协议校验即被拒绝(exit 1)。",
|
|
3
3
|
"changeset_version": "1.0.0",
|
|
4
4
|
"scene": "admin",
|
|
5
5
|
"changes": [
|
|
6
|
-
{
|
|
7
|
-
"id": "admin.layout.sidebar.menu",
|
|
8
|
-
"position": "left 20px margin-left .sidebar",
|
|
9
|
-
"form": "card",
|
|
10
|
-
"style": { "menu_bg": "#1d223a" }
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
"id": "admin.content.sidebar.ElMenu",
|
|
14
|
-
"style": { "bg": "红色" }
|
|
15
|
-
}
|
|
6
|
+
{ "id": "admin.layout.tabs", "form": "card" }
|
|
16
7
|
]
|
|
17
8
|
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$comment": "回归夹具 · 登记表覆盖率欠声明负例。配 registry-sample.json 使用(--registry):夹具只声明 sample#1/sample#2 两条,sample#3(金额列)与 sample#4(状态列)虽有 oracle.sids 却未声明 → 预期 match exit 1,输出含「登记表覆盖率缺口」。",
|
|
3
|
+
"schema": "design.changeset/1.0",
|
|
4
|
+
"changeset_version": "1.0.0",
|
|
5
|
+
"mapping_version": "1.0.0",
|
|
6
|
+
"scene": "admin",
|
|
7
|
+
"changes": [
|
|
8
|
+
{
|
|
9
|
+
"id": "admin.content.table.header_cell",
|
|
10
|
+
"style": { "bg": "钴蓝-9", "padding": "16px" },
|
|
11
|
+
"layer": { "bg": "host", "padding": "host" }
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"id": "admin.content.table.cell",
|
|
15
|
+
"style": { "padding": "16px" },
|
|
16
|
+
"layer": { "padding": "host" }
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"oracle": {
|
|
20
|
+
"mockup": "运单管理-钴蓝.html",
|
|
21
|
+
"sids": [
|
|
22
|
+
"admin.content.table.header_cell",
|
|
23
|
+
"admin.content.table.cell",
|
|
24
|
+
"admin.content.table.cell_amount",
|
|
25
|
+
"admin.content.table.cell_status"
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
"notes": "本夹具只用于回归登记表覆盖率细闸,不是真实设计交付件。"
|
|
29
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$comment": "V3.2 三声明维度正例(apply_via / layer / structure_ops)+ coverage 覆盖率记账。预期:match exit 0;输出含「结构施工 structure_ops」「覆写优先级 priority」「inner 层」「覆盖率 coverage」且覆盖率校验通过(C = A、gaps 为空)。",
|
|
3
|
+
"schema": "design.changeset/1.0",
|
|
4
|
+
"changeset_version": "1.0.0",
|
|
5
|
+
"mapping_version": "1.0.0",
|
|
6
|
+
"scene": "admin",
|
|
7
|
+
"changes": [
|
|
8
|
+
{
|
|
9
|
+
"id": "admin.content.table.header_cell",
|
|
10
|
+
"style": {
|
|
11
|
+
"bg": "钴蓝-9",
|
|
12
|
+
"padding": "16px",
|
|
13
|
+
"text_align": "左对齐",
|
|
14
|
+
"nowrap": "不换行"
|
|
15
|
+
},
|
|
16
|
+
"layer": {
|
|
17
|
+
"bg": "host",
|
|
18
|
+
"padding": "host",
|
|
19
|
+
"text_align": "inner",
|
|
20
|
+
"nowrap": "inner"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"id": "admin.content.table.cell_status",
|
|
25
|
+
"form": "filled",
|
|
26
|
+
"structure_ops": [
|
|
27
|
+
{ "op": "render_branch", "node": "status_tag", "source": "row.status" }
|
|
28
|
+
],
|
|
29
|
+
"style": {
|
|
30
|
+
"bg": "成功色",
|
|
31
|
+
"text_color": "成功色",
|
|
32
|
+
"radius": "4px"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"id": "admin.content.table.cell_amount",
|
|
37
|
+
"apply_via": "admin.content.table.cell_amount",
|
|
38
|
+
"structure_ops": [
|
|
39
|
+
{ "op": "bind_source", "node": "amount_column", "source": "column_class_name" }
|
|
40
|
+
],
|
|
41
|
+
"style": {
|
|
42
|
+
"align": "右对齐",
|
|
43
|
+
"font_variant_numeric": "等宽数字"
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
],
|
|
47
|
+
"oracle": {
|
|
48
|
+
"mockup": "page-specs/styles/default/scenes/admin/mockups/list-page/运单管理-钴蓝.html",
|
|
49
|
+
"sids": [
|
|
50
|
+
"admin.content.table.header_cell",
|
|
51
|
+
"admin.content.table.cell_status",
|
|
52
|
+
"admin.content.table.cell_amount"
|
|
53
|
+
]
|
|
54
|
+
},
|
|
55
|
+
"coverage": {
|
|
56
|
+
"registry": "restore-registry.json",
|
|
57
|
+
"registrable": 62,
|
|
58
|
+
"applicable": 3,
|
|
59
|
+
"covered": 3,
|
|
60
|
+
"gaps": []
|
|
61
|
+
},
|
|
62
|
+
"notes": "本夹具只用于回归 V3.2 三个声明维度的解析与输出,不是真实设计交付件。"
|
|
63
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<!-- audit 夹具:模拟「已挂载」的构图钩子(结构挂载点存在) -->
|
|
3
|
+
<div class="vts-page-card">
|
|
4
|
+
<div class="vts-filter-area"></div>
|
|
5
|
+
<div class="vts-table-area">
|
|
6
|
+
<el-table :data="rows" />
|
|
7
|
+
</div>
|
|
8
|
+
</div>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script setup lang="ts">
|
|
12
|
+
const rows: unknown[] = [];
|
|
13
|
+
</script>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$comment": "回归夹具 · 登记表硬缺口负例。registry-sample.json 的姊妹负例:引用了一个词典不存在、又没标 pending 的点位 → 预期 registry 子命令 exit 1,输出含「硬缺口」。",
|
|
3
|
+
"schema": "design.restore-registry/1.0",
|
|
4
|
+
"design_scheme": "default",
|
|
5
|
+
"scene": "admin",
|
|
6
|
+
"counts": { "total": 2 },
|
|
7
|
+
"items": [
|
|
8
|
+
{ "rule": "bad#1", "group": "样例·表格区", "sid": "admin.content.table.header_cell", "dims": ["padding"], "channel": ["style"], "source": "both", "always": true },
|
|
9
|
+
{ "rule": "bad#2", "group": "样例·不存在的点位", "sid": "admin.layout.nonexistent_zone", "dims": ["bg"], "channel": ["style"], "source": "spec", "always": true }
|
|
10
|
+
]
|
|
11
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$comment": "回归夹具 · 登记表样例(不是真实交付件)。6 条登记项示范粒度与字段口径:4 条 always(恒存在,必登)、1 条 pending(点位待补词典)、1 条条件项。用于 M/N 两步:M 校验覆盖率重算能报出欠声明并 exit 1,N 校验通道核验能跑通。",
|
|
3
|
+
"schema": "design.restore-registry/1.0",
|
|
4
|
+
"design_scheme": "default",
|
|
5
|
+
"scene": "admin",
|
|
6
|
+
"counts": { "total": 6 },
|
|
7
|
+
"items": [
|
|
8
|
+
{ "rule": "sample#1", "group": "样例·表格区", "sid": "admin.content.table.header_cell", "dims": ["height", "padding"], "channel": ["style", "layer"], "source": "both", "always": true },
|
|
9
|
+
{ "rule": "sample#2", "group": "样例·表格区", "sid": "admin.content.table.cell", "dims": ["padding", "padding_y"], "channel": ["style", "layer"], "source": "both", "always": true },
|
|
10
|
+
{ "rule": "sample#3", "group": "样例·金额列", "sid": "admin.content.table.cell_amount", "dims": ["align"], "channel": ["style", "structure_ops"], "source": "spec", "always": true },
|
|
11
|
+
{ "rule": "sample#4", "group": "样例·状态列", "sid": "admin.content.table.cell_status", "dims": ["form", "bg"], "channel": ["form", "structure_ops"], "source": "spec", "always": true },
|
|
12
|
+
{ "rule": "sample#5", "group": "样例·选择列", "sid": "admin.content.table.selection_column", "dims": ["column_width"], "channel": ["style"], "source": "spec", "always": false, "pending": true },
|
|
13
|
+
{ "rule": "sample#6", "group": "样例·状态列", "sid": "component.tag.status", "dims": ["bg_color"], "channel": ["style"], "source": "spec", "always": false }
|
|
14
|
+
]
|
|
15
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$comment": "verify 夹具 · 项目实测(含 3 类故意缺口,用于回归):header_cell 字重被压 + 对齐语境错位;cell_amount 选择器落空;user_profile gap 语境错位。",
|
|
3
|
+
"sids": {
|
|
4
|
+
"admin.content.table.header_cell": {
|
|
5
|
+
"padding": "16px",
|
|
6
|
+
"font-weight": "400",
|
|
7
|
+
"text-align": "center",
|
|
8
|
+
"background-color": "#fafafa"
|
|
9
|
+
},
|
|
10
|
+
"admin.layout.tabs.item_active": {
|
|
11
|
+
"font-weight": "500",
|
|
12
|
+
"color": "#245bff"
|
|
13
|
+
},
|
|
14
|
+
"admin.layout.header.user_profile": {
|
|
15
|
+
"gap": "8px"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$comment": "verify 夹具 · 效果图期望(computed style 转储外形)。真实抽取由浏览器链路完成,本文件仅用于回归。",
|
|
3
|
+
"sids": {
|
|
4
|
+
"admin.content.table.header_cell": {
|
|
5
|
+
"padding": "16px",
|
|
6
|
+
"font-weight": "500",
|
|
7
|
+
"text-align": "left",
|
|
8
|
+
"background-color": "#FAFAFA"
|
|
9
|
+
},
|
|
10
|
+
"admin.content.table.cell_amount": {
|
|
11
|
+
"text-align": "right"
|
|
12
|
+
},
|
|
13
|
+
"admin.layout.tabs.item_active": {
|
|
14
|
+
"font-weight": "500",
|
|
15
|
+
"color": "#245BFF"
|
|
16
|
+
},
|
|
17
|
+
"admin.layout.header.user_profile": {
|
|
18
|
+
"gap": "12px"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|