@qilitt-mickey/vue3-temp-skill 1.1.44 → 1.1.45
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/mapping/component/button.json +8 -3
- package/mapping/component/card.json +31 -0
- package/mapping/component/input.json +4 -1
- package/mapping/component/pagination.json +34 -0
- package/mapping/component/tag.json +2 -1
- package/mapping/scenes/admin/content.json +34 -6
- package/mapping/scenes/admin/layout.json +15 -5
- package/package.json +1 -1
- package/parser/fixtures/changeset-v32-fields.json +2 -2
- package/parser/index.js +22 -22
- package/parser/regression.js +2 -2
- package/parser/validator.js +4 -4
- package/references/cobalt-admin-restore.changeset.json +468 -0
- package/references/design-apply.md +12 -12
|
@@ -25,7 +25,9 @@
|
|
|
25
25
|
"custom_style_map": {
|
|
26
26
|
"font_weight": "font-weight",
|
|
27
27
|
"padding_x": "padding-inline",
|
|
28
|
-
"shadow": "box-shadow"
|
|
28
|
+
"shadow": "box-shadow",
|
|
29
|
+
"height": "height",
|
|
30
|
+
"radius": "border-radius"
|
|
29
31
|
},
|
|
30
32
|
"$note": "EP 实证:.el-button--primary 类 = 给通用变量 --el-button-* 赋 --el-color-primary 系列值,无 --el-button-primary-* 独立变量。AI 施工必须以 .el-button--primary 限定选择器作用域(禁止裸写 :root);设计侧调主题主色优先动 --el-color-primary,按钮自动跟随。未列变量(hover-border/outline 等)按同规则推导"
|
|
31
33
|
},
|
|
@@ -44,7 +46,9 @@
|
|
|
44
46
|
},
|
|
45
47
|
"custom_style_map": {
|
|
46
48
|
"font_weight": "font-weight",
|
|
47
|
-
"padding_x": "padding-inline"
|
|
49
|
+
"padding_x": "padding-inline",
|
|
50
|
+
"height": "height",
|
|
51
|
+
"radius": "border-radius"
|
|
48
52
|
},
|
|
49
53
|
"$note": "default 按钮直接消费通用变量本体,无 variant 类覆写;primary/danger 与本条目共用通用变量,靠 variant 类作用域隔离"
|
|
50
54
|
},
|
|
@@ -67,7 +71,8 @@
|
|
|
67
71
|
"custom_style_map": {
|
|
68
72
|
"font_weight": "font-weight",
|
|
69
73
|
"padding_x": "padding-inline",
|
|
70
|
-
"radius": "border-radius"
|
|
74
|
+
"radius": "border-radius",
|
|
75
|
+
"height": "height"
|
|
71
76
|
},
|
|
72
77
|
"$note": "承接批量删除等危险操作按钮(admin.content.table.operation_bar 引用)。EP 实证:.el-button--danger 类 = 给通用变量 --el-button-* 赋 --el-color-danger 系列值,无 --el-button-danger-* 独立变量。AI 施工必须以 .el-button--danger 限定选择器作用域(禁止裸写 :root);调红的深浅优先动 --el-color-danger"
|
|
73
78
|
},
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$comment": "全局原子层 · 卡片容器组件映射(admin 列表页 .vts-page-card 壳层卡片;registry list-page §11.24 登记的 always 子项 bg_color/radius/border_color/padding_x/padding_y/box_shadow)。样式规则经 src/styles/design-shell.scss 落在 .vts-page-card(设计层文件,非出厂源码)。字段名严格对齐 restore-registry 的 dim(parser 逐项校验)。版本恒 1.0.0(由 SKILL.md 体系版本统一管理)。",
|
|
3
|
+
"meta": {
|
|
4
|
+
"layer": "basic",
|
|
5
|
+
"domain": "component_card",
|
|
6
|
+
"version": "1.0.0",
|
|
7
|
+
"scene": "global",
|
|
8
|
+
"tech_stack": "vue3 + element-plus + vue3-web-temp"
|
|
9
|
+
},
|
|
10
|
+
"mappings": {
|
|
11
|
+
"component.card.base": {
|
|
12
|
+
"type": "global_component",
|
|
13
|
+
"component": "VtsPageCard(.vts-page-card 壳层卡片容器)",
|
|
14
|
+
"style_scope": ".vts-page-card",
|
|
15
|
+
"css_vars": {},
|
|
16
|
+
"custom_style_map": {
|
|
17
|
+
"bg_color": "background-color",
|
|
18
|
+
"radius": "border-radius",
|
|
19
|
+
"border_color": "border-color",
|
|
20
|
+
"padding_x": "padding-inline",
|
|
21
|
+
"padding_y": "padding-block",
|
|
22
|
+
"box_shadow": "box-shadow"
|
|
23
|
+
},
|
|
24
|
+
"priority": {
|
|
25
|
+
"strategy": "scope_qualified",
|
|
26
|
+
"reason": "设计层文件以 .vts-page-card 作用域限定即可覆盖出厂卡片默认样式。"
|
|
27
|
+
},
|
|
28
|
+
"$note": "列表页主卡片容器(crud-pages L1 样板 .vts-page-card)。registry §11.24 六项均为 always,变更集必须声明;bg_color/radius/border_color/box_shadow 为视觉,padding_x/padding_y 为卡片内边距(卡片本身内边距归零时由页面内容点位自行内缩)。字段名严格对齐 restore-registry 的 dim,禁止改用 border_radius/shadow/padding 等旧词(那是「声明了落不下去」的头号成因)。"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$comment": "全局原子层 · 分页组件映射(EP el-pagination / RePagination 根节点即 el-pagination)。registry list-page §11.83-11.94 登记的 always 子项 height/radius/hover_color/icon_size/gap/text_color/active_bg/active_color/border_color。样式规则经 src/styles/design-shell.scss 落在 .vts-page-card .el-pagination(设计层文件,非出厂源码)。字段名严格对齐 restore-registry 的 dim(parser 逐项校验;registry 11.88 原为 button_hover_color,已对齐为 hover_color 以匹配 host admin.content.pagination 与变更集)。版本恒 1.0.0(由 SKILL.md 体系版本统一管理)。",
|
|
3
|
+
"meta": {
|
|
4
|
+
"layer": "basic",
|
|
5
|
+
"domain": "component_pagination",
|
|
6
|
+
"version": "1.0.0",
|
|
7
|
+
"scene": "global",
|
|
8
|
+
"tech_stack": "vue3 + element-plus"
|
|
9
|
+
},
|
|
10
|
+
"mappings": {
|
|
11
|
+
"component.pagination.base": {
|
|
12
|
+
"type": "global_component",
|
|
13
|
+
"component": "ElPagination(RePagination 根节点即 el-pagination)",
|
|
14
|
+
"style_scope": ".vts-page-card .el-pagination",
|
|
15
|
+
"css_vars": {},
|
|
16
|
+
"custom_style_map": {
|
|
17
|
+
"height": "height",
|
|
18
|
+
"radius": "border-radius",
|
|
19
|
+
"hover_color": "color",
|
|
20
|
+
"icon_size": "font-size",
|
|
21
|
+
"gap": "gap",
|
|
22
|
+
"active_bg": "background-color",
|
|
23
|
+
"active_color": "color",
|
|
24
|
+
"border_color": "border-color",
|
|
25
|
+
"text_color": "color"
|
|
26
|
+
},
|
|
27
|
+
"priority": {
|
|
28
|
+
"strategy": "scope_qualified",
|
|
29
|
+
"reason": "作用域限定到 .vts-page-card .el-pagination 即可覆盖 EP 出厂分页样式。"
|
|
30
|
+
},
|
|
31
|
+
"$note": "registry §11.83-11.94 多项均为 always,变更集必须声明;hover_color 为分页整体悬停/激活文字色(对齐 host 的 hover_color 字段名);active_bg/active_color 为当前页按钮底色与文字色;border_color 为分页器边框;text_color/gap/icon_size 为整体文字、间距与翻页图标尺寸。字段名严格对齐 restore-registry 的 dim。"
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -28,7 +28,8 @@
|
|
|
28
28
|
"height": "height",
|
|
29
29
|
"radius": "border-radius",
|
|
30
30
|
"font_size": "font-size",
|
|
31
|
-
"padding_x": "padding"
|
|
31
|
+
"padding_x": "padding",
|
|
32
|
+
"icon_size": "font-size"
|
|
32
33
|
},
|
|
33
34
|
"$note": "状态语义色走 EP 功能色变量:success=--el-color-success / processing=--el-color-primary / warning=--el-color-warning / error=--el-color-danger。列级声明机制:component.tag.status 是 :root 全局默认,逐列差异必须声明为内容点位(admin.content.table.cell_tag.<列语义> 走 pending/L3,或写入该列 notes),禁止对全局 ID 声明多份互相覆盖的 form"
|
|
34
35
|
},
|
|
@@ -43,7 +43,11 @@
|
|
|
43
43
|
"desc_color": "--page-desc-color",
|
|
44
44
|
"actions_gap": "--page-header-actions-gap"
|
|
45
45
|
},
|
|
46
|
-
"custom_style_map": {
|
|
46
|
+
"custom_style_map": {
|
|
47
|
+
"padding_y": "padding-block",
|
|
48
|
+
"padding_x": "padding-inline",
|
|
49
|
+
"text_color": "color"
|
|
50
|
+
}
|
|
47
51
|
},
|
|
48
52
|
"admin.content.filter_area": {
|
|
49
53
|
"type": "element",
|
|
@@ -58,7 +62,14 @@
|
|
|
58
62
|
"bg": "--filter-area-bg",
|
|
59
63
|
"border_bottom": "--filter-area-border-bottom"
|
|
60
64
|
},
|
|
61
|
-
"custom_style_map": {
|
|
65
|
+
"custom_style_map": {
|
|
66
|
+
"gap": "gap",
|
|
67
|
+
"text_color": "color",
|
|
68
|
+
"font_size": "font-size",
|
|
69
|
+
"text_align": "text-align",
|
|
70
|
+
"icon_size": "font-size",
|
|
71
|
+
"border_color": "border-color"
|
|
72
|
+
}
|
|
62
73
|
},
|
|
63
74
|
"admin.content.table.operation_bar": {
|
|
64
75
|
"type": "element",
|
|
@@ -119,7 +130,13 @@
|
|
|
119
130
|
"divider_height": "height",
|
|
120
131
|
"divider_margin_x": "margin-inline",
|
|
121
132
|
"more_arrow_size": "font-size",
|
|
122
|
-
"more_arrow_gap": "gap"
|
|
133
|
+
"more_arrow_gap": "gap",
|
|
134
|
+
"vertical_align": "vertical-align",
|
|
135
|
+
"font_size": "font-size",
|
|
136
|
+
"gap": "gap",
|
|
137
|
+
"bg": "background-color",
|
|
138
|
+
"box_shadow": "box-shadow",
|
|
139
|
+
"radius": "border-radius"
|
|
123
140
|
},
|
|
124
141
|
"anchors": [
|
|
125
142
|
{ "kind": "class", "layer": "host", "target": ".vts-table-area .el-table__cell:has(.re-table-operate)" },
|
|
@@ -151,7 +168,9 @@
|
|
|
151
168
|
"font_size": "font-size",
|
|
152
169
|
"text_align": "text-align",
|
|
153
170
|
"border_bottom": "border-bottom",
|
|
154
|
-
"nowrap": "white-space"
|
|
171
|
+
"nowrap": "white-space",
|
|
172
|
+
"gap": "gap",
|
|
173
|
+
"icon_size": "font-size"
|
|
155
174
|
},
|
|
156
175
|
"anchors": [
|
|
157
176
|
{ "kind": "class", "layer": "host", "target": ".vts-table-area .el-table__header th.el-table__cell" },
|
|
@@ -297,7 +316,9 @@
|
|
|
297
316
|
"header_text": "--el-table-header-text-color",
|
|
298
317
|
"row_hover_bg": "--el-table-row-hover-bg-color"
|
|
299
318
|
},
|
|
300
|
-
"custom_style_map": {
|
|
319
|
+
"custom_style_map": {
|
|
320
|
+
"bg_color": "background-color"
|
|
321
|
+
}
|
|
301
322
|
},
|
|
302
323
|
"admin.content.pagination": {
|
|
303
324
|
"type": "component",
|
|
@@ -311,7 +332,14 @@
|
|
|
311
332
|
"active_bg": "--pagination-active-bg",
|
|
312
333
|
"active_color": "--pagination-active-color"
|
|
313
334
|
},
|
|
314
|
-
"custom_style_map": {
|
|
335
|
+
"custom_style_map": {
|
|
336
|
+
"margin_bottom": "margin-bottom",
|
|
337
|
+
"padding_y": "padding-block",
|
|
338
|
+
"gap": "gap",
|
|
339
|
+
"text_color": "color",
|
|
340
|
+
"font_size": "font-size",
|
|
341
|
+
"border_color": "border-color"
|
|
342
|
+
}
|
|
315
343
|
},
|
|
316
344
|
"admin.content.empty_state": {
|
|
317
345
|
"type": "element",
|
|
@@ -75,7 +75,11 @@
|
|
|
75
75
|
"custom_style_map": {
|
|
76
76
|
"active_indicator_width": "width",
|
|
77
77
|
"active_indicator_thickness": "height",
|
|
78
|
-
"active_indicator_style": "border-radius"
|
|
78
|
+
"active_indicator_style": "border-radius",
|
|
79
|
+
"padding_y": "padding-block",
|
|
80
|
+
"font_size": "font-size",
|
|
81
|
+
"font_weight": "font-weight",
|
|
82
|
+
"text_color": "color"
|
|
79
83
|
},
|
|
80
84
|
"anchors": [
|
|
81
85
|
{ "kind": "class", "layer": "host", "target": ".sidebar-container .el-menu-item" },
|
|
@@ -132,7 +136,9 @@
|
|
|
132
136
|
},
|
|
133
137
|
"custom_style_map": {
|
|
134
138
|
"bg": "background-color",
|
|
135
|
-
"box_shadow": "box-shadow"
|
|
139
|
+
"box_shadow": "box-shadow",
|
|
140
|
+
"gap": "gap",
|
|
141
|
+
"border_color": "border-color"
|
|
136
142
|
}
|
|
137
143
|
},
|
|
138
144
|
"admin.layout.header.logo_area": {
|
|
@@ -190,7 +196,8 @@
|
|
|
190
196
|
"custom_style_map": {
|
|
191
197
|
"icon_size": "font-size",
|
|
192
198
|
"gap": "gap",
|
|
193
|
-
"text_font_size": "font-size"
|
|
199
|
+
"text_font_size": "font-size",
|
|
200
|
+
"text_color": "color"
|
|
194
201
|
},
|
|
195
202
|
"$note": "inline_switch 并排切换形态:下拉项平铺为触发器旁切换组,按 v-if 保形切换增量插入,不删原代码"
|
|
196
203
|
},
|
|
@@ -227,7 +234,8 @@
|
|
|
227
234
|
"hover_bg": "--el-fill-color-light"
|
|
228
235
|
},
|
|
229
236
|
"custom_style_map": {
|
|
230
|
-
"icon_size": "font-size"
|
|
237
|
+
"icon_size": "font-size",
|
|
238
|
+
"width": "width"
|
|
231
239
|
}
|
|
232
240
|
},
|
|
233
241
|
"admin.layout.header.setting_button": {
|
|
@@ -241,7 +249,9 @@
|
|
|
241
249
|
},
|
|
242
250
|
"custom_style_map": {
|
|
243
251
|
"icon_size": "font-size",
|
|
244
|
-
"width": "width"
|
|
252
|
+
"width": "width",
|
|
253
|
+
"hover_bg": "background-color",
|
|
254
|
+
"text_color": "color"
|
|
245
255
|
},
|
|
246
256
|
"$note": "存在性收口默认对象:效果图未出现该按钮时,变更集以 visible:false 声明 → 落地为设计层文件内 .navbar .set-icon { display:none }(禁止删出厂代码行、禁止直接改 lay-navbar/index.vue 表达「这张图不要按钮」)。反向:设计需要该按钮时不声明即可(出厂已常显)。同一 DOM(含 v-tippy 提示)通用,图标/尺寸经本条目 style 字段动态覆盖。"
|
|
247
257
|
},
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$comment": "
|
|
2
|
+
"$comment": " 三声明维度正例(apply_via / layer / structure_ops)+ coverage 覆盖率记账。预期:match exit 0;输出含「结构施工 structure_ops」「覆写优先级 priority」「inner 层」「覆盖率 coverage」且覆盖率校验通过(C = A、gaps 为空)。",
|
|
3
3
|
"schema": "design.changeset/1.0",
|
|
4
4
|
"changeset_version": "1.0.0",
|
|
5
5
|
"mapping_version": "1.0.0",
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"covered": 3,
|
|
60
60
|
"gaps": []
|
|
61
61
|
},
|
|
62
|
-
"notes": "本夹具只用于回归
|
|
62
|
+
"notes": "本夹具只用于回归 三个声明维度的解析与输出,不是真实设计交付件。"
|
|
63
63
|
}
|
package/parser/index.js
CHANGED
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
* node parser/index.js match --batch <dir> # 项目级批量匹配目录下全部变更集
|
|
19
19
|
* node parser/index.js list [--scene admin] [--verbose] # 列出全部语义 ID(--verbose 含字段与形态)
|
|
20
20
|
* node parser/index.js query <semantic.id> # 查询单个 ID 映射详情
|
|
21
|
-
* node parser/index.js audit --project <dir> [<cs…>] # 挂载点存在性 +
|
|
22
|
-
* node parser/index.js verify --oracle <o> --actual <a> # 渲染态逐点验收:computed style 期望 vs 实测 diff
|
|
23
|
-
* node parser/index.js registry <registry.json> # 登记表通道核验:登记项 sid / dims
|
|
21
|
+
* node parser/index.js audit --project <dir> [<cs…>] # 挂载点存在性 + 死通道静态审计()
|
|
22
|
+
* node parser/index.js verify --oracle <o> --actual <a> # 渲染态逐点验收:computed style 期望 vs 实测 diff()
|
|
23
|
+
* node parser/index.js registry <registry.json> # 登记表通道核验:登记项 sid / dims 是否在词典有落点()
|
|
24
24
|
* node parser/watch.js # 开发态监听 mapping/ 自动重编译(§3.4.3)
|
|
25
25
|
*/
|
|
26
26
|
|
|
@@ -41,20 +41,20 @@ const QUALITATIVE_RE = /^(中等|加粗|常规|细|粗|小圆角|全圆角|直
|
|
|
41
41
|
const NUMERIC_VALUE_RE = /^\d+(\.\d+)?(px|rem|em|%|vh|vw|pt)$/i;
|
|
42
42
|
/** 复合样式字面量:含空格的多段值(如 1px solid #F0F0F0)按已消歧处理(hex 已被禁词校验限定位置) */
|
|
43
43
|
const COMPOSITE_VALUE_RE = /\s/;
|
|
44
|
-
/**
|
|
44
|
+
/** 落点层级枚举(与词典 validator 的 LAYER_ENUM 一致) */
|
|
45
45
|
const LAYER_VALUES = ["host", "inner"];
|
|
46
46
|
/** 语义 ID 严格格式(apply_via 锚点名须符合) */
|
|
47
47
|
const ID_RE_STRICT = /^[a-z][a-z0-9_]*(\.[a-z][a-z0-9_]*){1,3}$/;
|
|
48
48
|
|
|
49
|
-
/**
|
|
49
|
+
/** audit:审计时跳过的目录(依赖 / 产物 / 缓存) */
|
|
50
50
|
const AUDIT_SKIP_DIRS = new Set(["node_modules", ".git", "dist", "build", ".output", ".vite", ".nuxt", "coverage", "public"]);
|
|
51
|
-
/**
|
|
51
|
+
/** audit:「模板 / 脚本」扩展名:命中 = 结构挂载 */
|
|
52
52
|
const STRUCT_EXT = new Set([".vue", ".html", ".htm", ".ts", ".tsx", ".js", ".jsx", ".mjs", ".cjs"]);
|
|
53
|
-
/**
|
|
53
|
+
/** audit:「样式」扩展名:只命中样式 = 仅样式定义、无结构挂载 */
|
|
54
54
|
const STYLE_EXT = new Set([".scss", ".sass", ".css", ".less", ".styl"]);
|
|
55
|
-
/**
|
|
55
|
+
/** audit:设计层文件特征(只命中设计层 = 无实际挂载) */
|
|
56
56
|
const DESIGN_LAYER_RE = /design-shell|design-layer|design\.scss/i;
|
|
57
|
-
/**
|
|
57
|
+
/** audit:组件库运行时渲染的裸类名(无 el- 前缀,但不由业务源码挂载) */
|
|
58
58
|
const BUILTIN_BARE_CLASSES = new Set(["cell", "cell-group", "row", "header", "body", "caret-wrapper", "sort-caret", "ascending", "descending", "expanded-cell", "el-tooltip", "text", "value", "label"]);
|
|
59
59
|
|
|
60
60
|
main();
|
|
@@ -103,9 +103,9 @@ function printHelp() {
|
|
|
103
103
|
node parser/index.js match --batch <dir> 项目级批量匹配:目录下全部变更集 + 跨文件汇总
|
|
104
104
|
node parser/index.js audit --project <dir> [<cs.json…>] 挂载点存在性 + 死通道静态审计(需目标项目源码)
|
|
105
105
|
node parser/index.js verify --oracle <o.json> --actual <a.json> [--sids a,b]
|
|
106
|
-
渲染态逐点验收:computed style 期望 vs 实测 diff
|
|
106
|
+
渲染态逐点验收:computed style 期望 vs 实测 diff()
|
|
107
107
|
node parser/index.js registry <registry.json> [--verbose]
|
|
108
|
-
登记表通道核验:登记项 sid 是否在词典、dims
|
|
108
|
+
登记表通道核验:登记项 sid 是否在词典、dims 是否有落点()
|
|
109
109
|
node parser/index.js list [--scene admin] [--verbose] 列出全部语义 ID(--verbose 含字段与形态,供下发词汇约束)
|
|
110
110
|
node parser/index.js query <semantic.id> 查询单个 ID 的映射详情
|
|
111
111
|
node parser/watch.js 开发态监听 mapping/ 变更自动重编译
|
|
@@ -331,7 +331,7 @@ function matchOne(file, dataset, batchSummary, opts = {}) {
|
|
|
331
331
|
}
|
|
332
332
|
}
|
|
333
333
|
|
|
334
|
-
// oracle
|
|
334
|
+
// oracle 验收基线(:设计侧给的效果图 + 待比对点位;项目侧落地后跑 verify 逐点 diff)
|
|
335
335
|
checkOracle(changeset, plan, valueDict);
|
|
336
336
|
checkCoverage(changeset);
|
|
337
337
|
// 登记表覆盖率(子项级细闸):以登记表为权威、当场重算 A/C,设计侧自报的 coverage 不参与
|
|
@@ -430,7 +430,7 @@ function checkBannedWords(changeset) {
|
|
|
430
430
|
scan(`${label}.form`, c.form);
|
|
431
431
|
if (c.id)
|
|
432
432
|
scan(`${label}.id`, c.id);
|
|
433
|
-
//
|
|
433
|
+
// 三个声明维度:禁词扫描 + 结构校验(apply_via / layer / structure_ops)
|
|
434
434
|
if (c.apply_via !== undefined && c.apply_via !== null)
|
|
435
435
|
scan(`${label}.apply_via`, c.apply_via);
|
|
436
436
|
if (typeof c.layer === "string")
|
|
@@ -525,7 +525,7 @@ function printStyleTranslation(entry, change, idLabel, fieldPending, valueDict)
|
|
|
525
525
|
lines.push(` . ${field}: ${valueLabel} → var 覆盖 ${entry.css_vars[field]}(@ ${entry.style_scope})`);
|
|
526
526
|
}
|
|
527
527
|
else if (entry.custom_style_map && entry.custom_style_map[field]) {
|
|
528
|
-
//
|
|
528
|
+
// :按变更集 layer 指认落点(host 宿主盒 / inner 内层文本盒),从词典 anchors 取真实选择器
|
|
529
529
|
const spot = resolveAnchorTarget(entry, field, layerOf(change, field));
|
|
530
530
|
const layerLabel = spot.layer ? ` · ${spot.layer} 层` : "";
|
|
531
531
|
lines.push(` . ${field}: ${valueLabel} → 自定义 ${entry.custom_style_map[field]}(@ ${spot.target}${layerLabel})`);
|
|
@@ -547,7 +547,7 @@ function printStyleTranslation(entry, change, idLabel, fieldPending, valueDict)
|
|
|
547
547
|
}
|
|
548
548
|
}
|
|
549
549
|
|
|
550
|
-
// ----
|
|
550
|
+
// ---- · 落点 / 结构施工 / 优先级 解析 ----
|
|
551
551
|
|
|
552
552
|
/** 取字段的落点层级:change.layer 支持字符串(整条生效)或对象(按字段指认) */
|
|
553
553
|
function layerOf(change, field) {
|
|
@@ -623,7 +623,7 @@ function printApplyPlan(entry, change, idLabel, index) {
|
|
|
623
623
|
}
|
|
624
624
|
|
|
625
625
|
/**
|
|
626
|
-
* 覆写优先级 →
|
|
626
|
+
* 覆写优先级 → 落地写法要求()
|
|
627
627
|
* 该维度不是「提示」,是硬要求:写错写法 = 规则写了也不生效(同权重被组件 scoped 后注入覆盖,或被出厂 !important 压制)。
|
|
628
628
|
*/
|
|
629
629
|
function priorityRequirement(strategy) {
|
|
@@ -640,7 +640,7 @@ function priorityRequirement(strategy) {
|
|
|
640
640
|
}
|
|
641
641
|
|
|
642
642
|
/**
|
|
643
|
-
* oracle
|
|
643
|
+
* oracle 验收基线校验()
|
|
644
644
|
* 两类事故都出在「基线本身不可用」,而不是落地写法:
|
|
645
645
|
* ① 主题错配:效果图是 A 主题、变更集是 B 主题 → 逐点比对必然全红(搬错基线)。
|
|
646
646
|
* ② 覆盖度缺口:效果图里有、changes[] 却未声明的点位 → 永远不可能被还原(欠声明);
|
|
@@ -777,7 +777,7 @@ function registrySids(item) {
|
|
|
777
777
|
const GLOBAL_PSEUDO_ID = "global";
|
|
778
778
|
|
|
779
779
|
/**
|
|
780
|
-
*
|
|
780
|
+
* 登记表覆盖率(子项级细闸,)
|
|
781
781
|
* 组级台账(restore-checklist)只能防「整组忘光」;组内子项是否被静默丢失,必须由登记表
|
|
782
782
|
* (规范里每条带样式结论的子项 → 一条登记项)来计数。这里以登记表为权威**当场重算**:
|
|
783
783
|
* 适用 A = always 子项 ∪ 效果图已标注同名 data-sid 的子项
|
|
@@ -869,7 +869,7 @@ function checkRegistryCoverage(changeset, plan, opts = {}) {
|
|
|
869
869
|
}
|
|
870
870
|
|
|
871
871
|
/**
|
|
872
|
-
*
|
|
872
|
+
* 登记表通道核验()
|
|
873
873
|
* 与 match 的覆盖率校验互补:不需要变更集,直接拿登记表对词典,回答一件事——
|
|
874
874
|
* 「这张登记表里的必登项,有多少在项目侧真有承载字段」。这是 1:1 对接的**通道缺口清单**:
|
|
875
875
|
* · sid 词典无此 ID 且未标 pending → 硬缺口(登记表引用了不存在的点位,exit 1)
|
|
@@ -1062,7 +1062,7 @@ function checkApplyFields(change, label, violations) {
|
|
|
1062
1062
|
}
|
|
1063
1063
|
}
|
|
1064
1064
|
|
|
1065
|
-
// ---- audit:挂载点存在性 +
|
|
1065
|
+
// ---- audit:挂载点存在性 + 死通道(,静态审计,需目标项目源码) ----
|
|
1066
1066
|
// 本节的模块级常量(AUDIT_SKIP_DIRS / STRUCT_EXT / STYLE_EXT / DESIGN_LAYER_RE /
|
|
1067
1067
|
// BUILTIN_BARE_CLASSES)已在文件顶部声明——模块级常量必须在 main() 调用前初始化,勿下移。
|
|
1068
1068
|
|
|
@@ -1267,7 +1267,7 @@ function cmdAudit(args, dataset) {
|
|
|
1267
1267
|
}
|
|
1268
1268
|
}
|
|
1269
1269
|
|
|
1270
|
-
// ---- verify:渲染态逐点验收(
|
|
1270
|
+
// ---- verify:渲染态逐点验收( 补丁 3 · 闭环验收回路) ----
|
|
1271
1271
|
/**
|
|
1272
1272
|
* 比对两份 computed style 转储:oracle(效果图期望)vs actual(项目实测)。
|
|
1273
1273
|
* 转储格式:{ "<语义ID>": { "<css属性>": "<值>", ... }, ... }
|
|
@@ -1495,7 +1495,7 @@ function cmdList(args, dataset) {
|
|
|
1495
1495
|
console.log(` style 字段:${fields.join(" ")}`);
|
|
1496
1496
|
if (forms.length > 0)
|
|
1497
1497
|
console.log(` form 形态:${forms.join(" / ")}`);
|
|
1498
|
-
//
|
|
1498
|
+
// :落点层级与覆写优先级(设计侧声明 layer / 项目侧选提权策略时可见)
|
|
1499
1499
|
const anchors = Array.isArray(e.anchors) ? e.anchors : [];
|
|
1500
1500
|
const layers = [...new Set(anchors.filter(a => a.kind === "class" && a.layer).map(a => a.layer))];
|
|
1501
1501
|
if (layers.length > 0 || (e.priority && e.priority.strategy))
|
package/parser/regression.js
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* G match 旧协议兼容 → exit 0 且输出含 ⚠ 告警
|
|
18
18
|
* H match 整页场景还原样例 → exit 0 且输出含 #245BFF(壳层+内容区全模块 L1)
|
|
19
19
|
* I build --dry 产物链自检 → exit 0 且输出含 dry-run
|
|
20
|
-
* J match
|
|
20
|
+
* J match 三声明维度 → exit 0 且输出含「结构施工 structure_ops」
|
|
21
21
|
* K audit 挂载点 / 死通道审计 → exit 1(夹具项目故意存在挂载点缺失 / 死通道)
|
|
22
22
|
* L verify 渲染态逐点验收 → exit 1 且三类归因各计其数(夹具含故意缺口)
|
|
23
23
|
* M match 登记表覆盖率细闸 → exit 1(夹具故意欠声明两条恒存在子项)
|
|
@@ -112,7 +112,7 @@ const steps = [
|
|
|
112
112
|
},
|
|
113
113
|
{
|
|
114
114
|
key: "J",
|
|
115
|
-
name: "match
|
|
115
|
+
name: "match 三声明维度 + coverage 覆盖率(apply_via / layer / structure_ops / coverage)",
|
|
116
116
|
script: INDEX,
|
|
117
117
|
args: ["match", path.join(FIXTURES, "changeset-v32-fields.json")],
|
|
118
118
|
expect: { code: 0, includes: ["结构施工 structure_ops", "验收基线 oracle", "覆盖率 coverage"] },
|
package/parser/validator.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* 1. 字段完整性(必须字段存在且类型正确)
|
|
6
6
|
* 2. 枚举合法性(type/forms 值域)
|
|
7
7
|
* 3. 层级一致性(children 引用的 ID 必须存在于同级或同场景映射集)
|
|
8
|
-
* 4.
|
|
8
|
+
* 4. 三字段结构:anchors(kind/layer 枚举 + target 必填)、
|
|
9
9
|
* preconditions(非空字符串数组)、priority(strategy 枚举)
|
|
10
10
|
*
|
|
11
11
|
* 说明:selector / anchors.target 的「挂载点存在性」需要在**目标项目源码**里查证,
|
|
@@ -101,7 +101,7 @@ export function validateMappingDataset(dataset) {
|
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
-
// anchors(
|
|
104
|
+
// anchors( §3.2):条目可承载的全部通道,含落点层级 layer
|
|
105
105
|
if (entry.anchors !== undefined) {
|
|
106
106
|
if (!Array.isArray(entry.anchors)) {
|
|
107
107
|
errors.push(`[${file}] ${id}.anchors 必须为数组`);
|
|
@@ -130,7 +130,7 @@ export function validateMappingDataset(dataset) {
|
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
132
|
|
|
133
|
-
// preconditions(
|
|
133
|
+
// preconditions( §3.2):几何 / 取值成立的宿主前提,非空字符串数组
|
|
134
134
|
if (entry.preconditions !== undefined) {
|
|
135
135
|
if (!Array.isArray(entry.preconditions) || entry.preconditions.length === 0) {
|
|
136
136
|
errors.push(`[${file}] ${id}.preconditions 必须为非空字符串数组`);
|
|
@@ -143,7 +143,7 @@ export function validateMappingDataset(dataset) {
|
|
|
143
143
|
}
|
|
144
144
|
}
|
|
145
145
|
|
|
146
|
-
// priority(
|
|
146
|
+
// priority( §4.6.4):覆写优先级策略
|
|
147
147
|
if (entry.priority !== undefined) {
|
|
148
148
|
if (typeof entry.priority !== "object" || entry.priority === null) {
|
|
149
149
|
errors.push(`[${file}] ${id}.priority 必须为对象`);
|
|
@@ -0,0 +1,468 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "design.changeset/1.0",
|
|
3
|
+
"changeset_version": "1.0.0",
|
|
4
|
+
"mapping_version": "1.0.0",
|
|
5
|
+
"scene": "admin",
|
|
6
|
+
"layout_type": "vertical",
|
|
7
|
+
"global": {
|
|
8
|
+
"brand_primary": "钴蓝-5"
|
|
9
|
+
},
|
|
10
|
+
"changes": [
|
|
11
|
+
{
|
|
12
|
+
"id": "admin.layout.sidebar",
|
|
13
|
+
"style": {
|
|
14
|
+
"width": "208px",
|
|
15
|
+
"collapsed_width": "64px",
|
|
16
|
+
"bg": "#001529"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"id": "admin.layout.sidebar.logo_area",
|
|
21
|
+
"style": {
|
|
22
|
+
"height": "54px",
|
|
23
|
+
"title_font_size": "16px",
|
|
24
|
+
"title_font_weight": "中等",
|
|
25
|
+
"title_color": "#FFFFFF"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"id": "admin.layout.sidebar.menu",
|
|
30
|
+
"form": "pill",
|
|
31
|
+
"style": {
|
|
32
|
+
"padding_y": "8px",
|
|
33
|
+
"item_height": "40px",
|
|
34
|
+
"font_size": "14px",
|
|
35
|
+
"font_weight": "常规",
|
|
36
|
+
"text_color": "rgba(255,255,255,0.65)",
|
|
37
|
+
"menu_hover_bg": "rgba(255,255,255,0.08)",
|
|
38
|
+
"menu_active_bg": "钴蓝-5",
|
|
39
|
+
"menu_active_indicator": "钴蓝-5"
|
|
40
|
+
},
|
|
41
|
+
"priority": { "strategy": "deep_qualified" }
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"id": "admin.layout.sidebar.collapse_trigger",
|
|
45
|
+
"visible": false
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"id": "admin.layout.header",
|
|
49
|
+
"style": {
|
|
50
|
+
"height": "54px",
|
|
51
|
+
"padding_x": "24px",
|
|
52
|
+
"bg": "#FFFFFF",
|
|
53
|
+
"border_color": "#F0F0F0"
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"id": "admin.layout.header.collapse_trigger",
|
|
58
|
+
"form": "header_inline",
|
|
59
|
+
"style": {
|
|
60
|
+
"btn_width": "40px",
|
|
61
|
+
"btn_height": "40px",
|
|
62
|
+
"icon_size": "16px",
|
|
63
|
+
"border_radius": "6px"
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"id": "admin.layout.header.logo_area",
|
|
68
|
+
"visible": false
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"id": "admin.layout.header.breadcrumb",
|
|
72
|
+
"visible": false,
|
|
73
|
+
"priority": { "strategy": "deep_qualified" }
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"id": "admin.layout.header.lang_switch",
|
|
77
|
+
"form": "inline_switch",
|
|
78
|
+
"style": {
|
|
79
|
+
"gap": "2px",
|
|
80
|
+
"icon_size": "16px",
|
|
81
|
+
"text_color": "#000000A6"
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"id": "admin.layout.header.fullscreen",
|
|
86
|
+
"style": {
|
|
87
|
+
"icon_size": "16px",
|
|
88
|
+
"width": "32px"
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"id": "admin.layout.header.setting_button",
|
|
93
|
+
"style": {
|
|
94
|
+
"icon_size": "16px",
|
|
95
|
+
"hover_bg": "#FAFAFA",
|
|
96
|
+
"text_color": "#000000A6"
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"id": "admin.layout.header.user_profile",
|
|
101
|
+
"form": "greeting_avatar_name",
|
|
102
|
+
"style": {
|
|
103
|
+
"avatar_width": "28px",
|
|
104
|
+
"avatar_height": "28px",
|
|
105
|
+
"avatar_radius": "9999px",
|
|
106
|
+
"name_font_size": "14px",
|
|
107
|
+
"name_font_weight": "中等",
|
|
108
|
+
"greeting_font_size": "14px",
|
|
109
|
+
"gap": "12px",
|
|
110
|
+
"text_color": "#000000E6",
|
|
111
|
+
"hover_bg": "#FAFAFA"
|
|
112
|
+
},
|
|
113
|
+
"structure_ops": [{ "op": "add_node", "node": "问候区" }]
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"id": "admin.layout.tabs",
|
|
117
|
+
"form": "flat",
|
|
118
|
+
"style": {
|
|
119
|
+
"height": "40px",
|
|
120
|
+
"bg": "#FFFFFF",
|
|
121
|
+
"border_bottom": "1px solid #F0F0F0",
|
|
122
|
+
"padding_inline": "0px"
|
|
123
|
+
},
|
|
124
|
+
"priority": { "strategy": "deep_qualified" }
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"id": "admin.layout.tabs.home_tab",
|
|
128
|
+
"form": "icon_only",
|
|
129
|
+
"style": {
|
|
130
|
+
"width": "40px",
|
|
131
|
+
"height": "40px",
|
|
132
|
+
"icon_size": "16px",
|
|
133
|
+
"icon_color": "钴蓝-5"
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"id": "admin.layout.tabs.item",
|
|
138
|
+
"form": "text_only",
|
|
139
|
+
"style": {
|
|
140
|
+
"card_height": "40px",
|
|
141
|
+
"padding_x": "12px",
|
|
142
|
+
"title_gap": "6px",
|
|
143
|
+
"close_size": "12px",
|
|
144
|
+
"close_opacity": "0.45",
|
|
145
|
+
"close_hover_color": "#FF4D4F",
|
|
146
|
+
"divider_color": "#F0F0F0"
|
|
147
|
+
},
|
|
148
|
+
"priority": { "strategy": "deep_qualified" }
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"id": "admin.layout.tabs.item_active",
|
|
152
|
+
"form": "text_color_only",
|
|
153
|
+
"style": {
|
|
154
|
+
"text_color": "钴蓝-5",
|
|
155
|
+
"font_weight": "中等"
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
"id": "admin.layout.tabs.divider",
|
|
160
|
+
"style": {
|
|
161
|
+
"width": "1px",
|
|
162
|
+
"height": "100%",
|
|
163
|
+
"bg": "#F0F0F0",
|
|
164
|
+
"opacity": "1"
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
"id": "admin.layout.tabs.context_menu",
|
|
169
|
+
"style": {
|
|
170
|
+
"width": "120px",
|
|
171
|
+
"border_color": "#F0F0F0",
|
|
172
|
+
"radius": "6px"
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"id": "admin.content.container",
|
|
177
|
+
"form": "fixed"
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
"id": "admin.layout.content",
|
|
181
|
+
"style": {
|
|
182
|
+
"padding": "24px"
|
|
183
|
+
}
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
"id": "component.card.base",
|
|
187
|
+
"style": {
|
|
188
|
+
"bg_color": "#FFFFFF",
|
|
189
|
+
"radius": "8px",
|
|
190
|
+
"border_color": "transparent",
|
|
191
|
+
"box_shadow": "0 2px 8px rgba(0,0,0,0.06)",
|
|
192
|
+
"padding_x": "0px",
|
|
193
|
+
"padding_y": "0px"
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
"id": "admin.content.page_header",
|
|
198
|
+
"style": {
|
|
199
|
+
"margin_bottom": "1px solid #F0F0F0",
|
|
200
|
+
"title_size": "20px",
|
|
201
|
+
"title_weight": "加粗",
|
|
202
|
+
"desc_size": "14px",
|
|
203
|
+
"desc_color": "#000000A6",
|
|
204
|
+
"actions_gap": "8px",
|
|
205
|
+
"padding_x": "20px",
|
|
206
|
+
"padding_y": "20px"
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
"id": "admin.content.filter_area",
|
|
211
|
+
"style": {
|
|
212
|
+
"radius": "6px",
|
|
213
|
+
"padding_y": "20px",
|
|
214
|
+
"padding_x": "20px",
|
|
215
|
+
"margin_bottom": "1px solid #F0F0F0",
|
|
216
|
+
"bg": "#FFFFFF",
|
|
217
|
+
"border_color": "#F0F0F0",
|
|
218
|
+
"font_size": "14px",
|
|
219
|
+
"text_color": "#000000E6",
|
|
220
|
+
"text_align": "右对齐",
|
|
221
|
+
"icon_size": "16px",
|
|
222
|
+
"gap": "20px"
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
"id": "admin.content.table.operation_bar",
|
|
227
|
+
"style": {
|
|
228
|
+
"gap": "8px",
|
|
229
|
+
"padding_y": "20px 20px 8px",
|
|
230
|
+
"btn_height": "32px",
|
|
231
|
+
"btn_radius": "6px",
|
|
232
|
+
"btn_font_size": "14px",
|
|
233
|
+
"font_size": "14px",
|
|
234
|
+
"font_weight": "常规",
|
|
235
|
+
"text_color": "#000000E6"
|
|
236
|
+
}
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
"id": "admin.content.table.area",
|
|
240
|
+
"style": {
|
|
241
|
+
"radius": "8px",
|
|
242
|
+
"header_bg": "#FAFAFA",
|
|
243
|
+
"header_text": "#000000E6",
|
|
244
|
+
"row_hover_bg": "#FAFAFA",
|
|
245
|
+
"bg_color": "#FFFFFF"
|
|
246
|
+
}
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
"id": "admin.content.table.header_cell",
|
|
250
|
+
"layer": { "padding": "host", "text_align": "inner" },
|
|
251
|
+
"style": {
|
|
252
|
+
"height": "48px",
|
|
253
|
+
"padding": "16px",
|
|
254
|
+
"bg": "#FAFAFA",
|
|
255
|
+
"font_size": "14px",
|
|
256
|
+
"font_weight": "中等",
|
|
257
|
+
"text_color": "#000000E6",
|
|
258
|
+
"text_align": "左对齐",
|
|
259
|
+
"border_bottom": "1px solid #F0F0F0",
|
|
260
|
+
"nowrap": "禁止换行",
|
|
261
|
+
"gap": "8px",
|
|
262
|
+
"icon_size": "16px"
|
|
263
|
+
},
|
|
264
|
+
"priority": { "strategy": "self_plus_important" }
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
"id": "admin.content.table.cell",
|
|
268
|
+
"layer": "host",
|
|
269
|
+
"style": {
|
|
270
|
+
"padding": "16px",
|
|
271
|
+
"height": "55px",
|
|
272
|
+
"font_size": "14px",
|
|
273
|
+
"font_weight": "常规",
|
|
274
|
+
"text_color": "#000000E6",
|
|
275
|
+
"border_bottom": "1px solid #F0F0F0",
|
|
276
|
+
"vertical_align": "居中",
|
|
277
|
+
"nowrap": "禁止换行"
|
|
278
|
+
}
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
"id": "admin.content.table.cell_status",
|
|
282
|
+
"form": "filled",
|
|
283
|
+
"style": {
|
|
284
|
+
"bg": "#F6FFED",
|
|
285
|
+
"border_color": "#D9F7BE",
|
|
286
|
+
"text_color": "#52C41A",
|
|
287
|
+
"font_size": "12px",
|
|
288
|
+
"radius": "6px",
|
|
289
|
+
"icon_size": "16px"
|
|
290
|
+
},
|
|
291
|
+
"structure_ops": [{ "op": "render_branch", "node": "状态列" }]
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
"id": "admin.content.table.cell_amount",
|
|
295
|
+
"layer": "inner",
|
|
296
|
+
"style": {
|
|
297
|
+
"align": "右对齐"
|
|
298
|
+
},
|
|
299
|
+
"structure_ops": [{ "op": "bind_source", "node": "金额列", "source": "列类名" }]
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
"id": "admin.content.table.operation_column",
|
|
303
|
+
"style": {
|
|
304
|
+
"link_color": "钴蓝-5",
|
|
305
|
+
"danger_color": "#FF4D4F",
|
|
306
|
+
"divider_color": "#F0F0F0",
|
|
307
|
+
"align": "居中",
|
|
308
|
+
"min_width": "160px",
|
|
309
|
+
"column_width": "160px",
|
|
310
|
+
"nowrap": "禁止换行",
|
|
311
|
+
"bg": "#FFFFFF",
|
|
312
|
+
"box_shadow": "-2px 0 4px rgba(0,0,0,0.06)",
|
|
313
|
+
"font_size": "14px",
|
|
314
|
+
"gap": "8px",
|
|
315
|
+
"radius": "6px",
|
|
316
|
+
"vertical_align": "居中"
|
|
317
|
+
},
|
|
318
|
+
"structure_ops": [
|
|
319
|
+
{ "op": "render_branch", "node": "操作列图标" },
|
|
320
|
+
{ "op": "add_node", "node": "操作列分隔线" }
|
|
321
|
+
]
|
|
322
|
+
},
|
|
323
|
+
{
|
|
324
|
+
"id": "admin.content.pagination",
|
|
325
|
+
"style": {
|
|
326
|
+
"font_size": "14px",
|
|
327
|
+
"text_color": "#000000A6",
|
|
328
|
+
"gap": "8px",
|
|
329
|
+
"margin_bottom": "20px",
|
|
330
|
+
"padding_y": "8px 20px",
|
|
331
|
+
"active_bg": "钴蓝-5",
|
|
332
|
+
"active_color": "#FFFFFF",
|
|
333
|
+
"border_color": "#D9D9D9",
|
|
334
|
+
"hover_color": "钴蓝-5"
|
|
335
|
+
}
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
"id": "admin.content.empty_state",
|
|
339
|
+
"style": {
|
|
340
|
+
"font_size": "14px",
|
|
341
|
+
"text_color": "#000000A6",
|
|
342
|
+
"icon_size": "40px",
|
|
343
|
+
"padding": "40px"
|
|
344
|
+
}
|
|
345
|
+
},
|
|
346
|
+
{
|
|
347
|
+
"id": "component.button.primary",
|
|
348
|
+
"style": {
|
|
349
|
+
"bg_color": "钴蓝-5",
|
|
350
|
+
"text_color": "#FFFFFF",
|
|
351
|
+
"border_color": "钴蓝-5",
|
|
352
|
+
"font_weight": "常规",
|
|
353
|
+
"padding_x": "15px",
|
|
354
|
+
"height": "32px",
|
|
355
|
+
"radius": "6px"
|
|
356
|
+
}
|
|
357
|
+
},
|
|
358
|
+
{
|
|
359
|
+
"id": "component.button.default",
|
|
360
|
+
"style": {
|
|
361
|
+
"bg_color": "#FFFFFF",
|
|
362
|
+
"text_color": "#000000E6",
|
|
363
|
+
"border_color": "#D9D9D9",
|
|
364
|
+
"font_weight": "常规",
|
|
365
|
+
"padding_x": "15px",
|
|
366
|
+
"height": "32px",
|
|
367
|
+
"radius": "6px"
|
|
368
|
+
}
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
"id": "component.button.danger",
|
|
372
|
+
"style": {
|
|
373
|
+
"bg_color": "#FF4D4F",
|
|
374
|
+
"text_color": "#FFFFFF",
|
|
375
|
+
"border_color": "#FF4D4F",
|
|
376
|
+
"font_weight": "常规",
|
|
377
|
+
"padding_x": "12px",
|
|
378
|
+
"height": "32px",
|
|
379
|
+
"radius": "6px"
|
|
380
|
+
}
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
"id": "component.tag.status",
|
|
384
|
+
"form": "filled",
|
|
385
|
+
"style": {
|
|
386
|
+
"bg_color": "#F6FFED",
|
|
387
|
+
"text_color": "#52C41A",
|
|
388
|
+
"border_color": "#D9F7BE",
|
|
389
|
+
"font_size": "12px",
|
|
390
|
+
"radius": "6px",
|
|
391
|
+
"icon_size": "16px"
|
|
392
|
+
}
|
|
393
|
+
},
|
|
394
|
+
{
|
|
395
|
+
"id": "component.input.base",
|
|
396
|
+
"style": {
|
|
397
|
+
"bg_color": "#FFFFFF",
|
|
398
|
+
"text_color": "#000000E6",
|
|
399
|
+
"border_color": "#D9D9D9",
|
|
400
|
+
"radius": "6px",
|
|
401
|
+
"height": "32px",
|
|
402
|
+
"font_size": "14px",
|
|
403
|
+
"icon_size": "16px",
|
|
404
|
+
"padding_x": "12px"
|
|
405
|
+
}
|
|
406
|
+
},
|
|
407
|
+
{
|
|
408
|
+
"id": "component.pagination.base",
|
|
409
|
+
"style": {
|
|
410
|
+
"height": "32px",
|
|
411
|
+
"gap": "8px",
|
|
412
|
+
"radius": "6px",
|
|
413
|
+
"active_bg": "钴蓝-5",
|
|
414
|
+
"active_color": "#FFFFFF",
|
|
415
|
+
"border_color": "#D9D9D9",
|
|
416
|
+
"text_color": "#000000E6",
|
|
417
|
+
"hover_color": "钴蓝-5",
|
|
418
|
+
"icon_size": "16px"
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
],
|
|
422
|
+
"oracle": {
|
|
423
|
+
"mockup": "project-ui-design/references/page-specs/styles/default/scenes/admin/mockups/list-page/运单管理-钴蓝.html",
|
|
424
|
+
"sids": [
|
|
425
|
+
"admin.layout.sidebar",
|
|
426
|
+
"admin.layout.sidebar.logo_area",
|
|
427
|
+
"admin.layout.sidebar.menu",
|
|
428
|
+
"admin.layout.header",
|
|
429
|
+
"admin.layout.header.collapse_trigger",
|
|
430
|
+
"admin.layout.header.lang_switch",
|
|
431
|
+
"admin.layout.header.fullscreen",
|
|
432
|
+
"admin.layout.header.setting_button",
|
|
433
|
+
"admin.layout.header.user_profile",
|
|
434
|
+
"admin.layout.tabs",
|
|
435
|
+
"admin.layout.tabs.home_tab",
|
|
436
|
+
"admin.layout.tabs.item",
|
|
437
|
+
"admin.layout.tabs.item_active",
|
|
438
|
+
"admin.layout.tabs.divider",
|
|
439
|
+
"admin.layout.content",
|
|
440
|
+
"admin.content.container",
|
|
441
|
+
"component.card.base",
|
|
442
|
+
"admin.content.page_header",
|
|
443
|
+
"admin.content.filter_area",
|
|
444
|
+
"admin.content.table.operation_bar",
|
|
445
|
+
"admin.content.table.area",
|
|
446
|
+
"admin.content.table.header_cell",
|
|
447
|
+
"admin.content.table.cell",
|
|
448
|
+
"admin.content.table.cell_status",
|
|
449
|
+
"admin.content.table.cell_amount",
|
|
450
|
+
"admin.content.table.operation_column",
|
|
451
|
+
"admin.content.pagination",
|
|
452
|
+
"component.button.primary",
|
|
453
|
+
"component.button.default",
|
|
454
|
+
"component.button.danger",
|
|
455
|
+
"component.tag.status",
|
|
456
|
+
"component.input.base",
|
|
457
|
+
"component.pagination.base"
|
|
458
|
+
]
|
|
459
|
+
},
|
|
460
|
+
"coverage": {
|
|
461
|
+
"registry": "project-ui-design/references/page-specs/styles/default/scenes/admin/restore-registry.json",
|
|
462
|
+
"registrable": 186,
|
|
463
|
+
"applicable": 186,
|
|
464
|
+
"covered": 186,
|
|
465
|
+
"gaps": []
|
|
466
|
+
},
|
|
467
|
+
"notes": "钴蓝主题 admin 列表页完整还原变更集(首版,待 verify 验收)。值优先取效果图精确字面量;官方主色走语义值 钴蓝-5。侧栏为深色 #001529(钴蓝主题壳层约定)。cell_thumb 列本页未出现故未声明;sidebar.collapse_trigger / header.logo_area 按出厂中性收口(visible:false)。"
|
|
468
|
+
}
|
|
@@ -71,9 +71,9 @@ parser match(确定性翻译)→ 施工坐标 → AI 按坐标改代码 →
|
|
|
71
71
|
"position": "right", // 可选:相对方位(left/right/top/bottom)
|
|
72
72
|
"form": "card", // 可选:形态切换(见条目 forms 枚举)
|
|
73
73
|
"style": { "menu_bg": "钴蓝-9" }, // 可选:抽象样式字段(词典 css_vars/custom_style_map key;值 = 语义名或 hex)
|
|
74
|
-
"apply_via": "admin.layout.sidebar.menu", //
|
|
75
|
-
"layer": { "menu_text": "host" }, //
|
|
76
|
-
"structure_ops": [ //
|
|
74
|
+
"apply_via": "admin.layout.sidebar.menu", // 可选:本声明引用的锚点来源条目(缺省 = 自身;值 = 语义 ID,不是选择器)
|
|
75
|
+
"layer": { "menu_text": "host" }, // 可选:落点层级(host 宿主盒 / inner 内层文本盒);可为字符串(整条生效)或「字段 → 层级」对象
|
|
76
|
+
"structure_ops": [ // 可选:结构施工声明(数据 / 结构驱动点位必须给,只写 CSS = 无效声明)
|
|
77
77
|
{ "op": "render_branch", "node": "status_tag", "source": "row.status" }
|
|
78
78
|
]
|
|
79
79
|
}
|
|
@@ -84,7 +84,7 @@ parser match(确定性翻译)→ 施工坐标 → AI 按坐标改代码 →
|
|
|
84
84
|
}
|
|
85
85
|
```
|
|
86
86
|
|
|
87
|
-
**
|
|
87
|
+
** 三个声明维度**(补齐「由哪个通道落地 / 被压时怎么赢 / 需要改结构时落在哪」):
|
|
88
88
|
|
|
89
89
|
| 字段 | 作用 | 值域 |
|
|
90
90
|
|---|---|---|
|
|
@@ -135,7 +135,7 @@ node parser/index.js match --batch <changesets-dir>
|
|
|
135
135
|
|
|
136
136
|
`缺口清单` 只承载第二类,且必须给出点位 ID + 缺失字段名。
|
|
137
137
|
|
|
138
|
-
|
|
138
|
+
**转换计划新增四类输出()**:每条 L1/L2 点位除样式指令外,还会输出——
|
|
139
139
|
|
|
140
140
|
| 输出 | 含义 | 施工含义 |
|
|
141
141
|
|---|---|---|
|
|
@@ -148,7 +148,7 @@ node parser/index.js match --batch <changesets-dir>
|
|
|
148
148
|
**验收基线输出**:转换计划末尾另打印 `=== 验收基线 oracle ===`(效果图路径 + 待比对点位)与 `=== 覆盖率 coverage ===`(登记项 R / 适用 A / 已兑现 C)。有 `oracle` → 落地后必须跑第 6 步 `verify`;缺 `oracle` / `coverage` → 输出提示,把「补基线 / 补登记覆盖率」回流设计侧(场景还原应给)。
|
|
149
149
|
**覆盖率校验**:`coverage.covered` 必须等于 `coverage.applicable`、`gaps` 为空,否则打印缺口清单——`C < A` 即**欠声明**(有规范子项未落进 `changes[]`/`visible`/`pending`),属设计侧交付不完整,必须回流,不得在项目侧"猜着补"。
|
|
150
150
|
|
|
151
|
-
### 第 1 步附加 ·
|
|
151
|
+
### 第 1 步附加 · 挂载点审计(,静态查三类隐性缺口)
|
|
152
152
|
|
|
153
153
|
```bash
|
|
154
154
|
node parser/index.js audit --project <目标项目根目录> [<changeset.json…>]
|
|
@@ -164,7 +164,7 @@ node parser/index.js audit --project <目标项目根目录> [<changeset.json…
|
|
|
164
164
|
|
|
165
165
|
审计报错 = **能力缺口**:当场按 `structure_ops` 补挂载 / 补消费者,交付说明单列申报;不得以「词典没建」为由跳过。审计通过 ≠ 还原达标——**静态审计查不出「值对了、位置不对」**,那要靠第 6 步渲染态验收。
|
|
166
166
|
|
|
167
|
-
### 第 1 步附加(之二)· 登记表覆盖率(子项级细闸 ·
|
|
167
|
+
### 第 1 步附加(之二)· 登记表覆盖率(子项级细闸 · )
|
|
168
168
|
|
|
169
169
|
组级台账(`restore-checklist`)只能防「整组忘光」;**组内子项**是否被静默丢失,用登记表计数。
|
|
170
170
|
|
|
@@ -213,7 +213,7 @@ node parser/index.js registry <restore-registry.json> [--verbose] # 只
|
|
|
213
213
|
- 设计要求换掉出厂卡片容器(去卡片、改通栏、改内部排布)→ **照做,不打折**:页面根声明 `data-content-mode`,把 `data-fill` **平移**到新容器及其「体」层,视觉全落设计层文件。此路径下 `tableHeight` 几何实测照常成立。
|
|
214
214
|
- **双向禁止**:① 以「保高度」为由拒绝改容器/内边距/去卡片(= 放弃设计还原);② 为凑还原效果改写壳层结构层规则、或在视觉层重写/压掉 `[data-fill]` / `.main-content[data-content-mode]`(= 高度链断裂,返工项)。
|
|
215
215
|
|
|
216
|
-
#### 第 2 步附加 · 结构施工(structure_ops
|
|
216
|
+
#### 第 2 步附加 · 结构施工(structure_ops)与优先级策略()
|
|
217
217
|
|
|
218
218
|
**A. 结构施工 `structure_ops`(数据 / 结构驱动点位)**——有些点位**换不掉也写不出来**,因为呈现由数据源或模板结构决定。变更集给出 `structure_ops` 时必须照做,**只写 CSS = 无效声明**:
|
|
219
219
|
|
|
@@ -286,7 +286,7 @@ node parser/index.js registry <restore-registry.json> [--verbose] # 只
|
|
|
286
286
|
- 出厂 `--vts-theme-menu-active-before` 默认 `transparent` 且无消费者 → 声明 `form=indicator_*` 时必须在此文件内**同时**落地「关胶囊令牌 `menu_active_bg: transparent`」与「新建 `::after` 消费者」,缺一即未施工成功。
|
|
287
287
|
- **自举(项目被还原到出厂时必做,幂等)**:文件不存在 → 新建(仅保留文件头纪律注释,无任何设计结论)+ 在 `src/styles/index.scss` **末位**补 `@use 'design-shell';`(必须末位,靠后置压出厂)。此动作属「补通道」,交付说明单列申报。**文件缺失时径直把设计规则写进 `element-plus.scss` / `sidebar.scss` / `theme.scss` = 污染出厂文件,禁止**(这也是「设计还原度为零」的常见成因:规则无处可落)。
|
|
288
288
|
|
|
289
|
-
### 第 3 步附加(之二)· 覆写优先级消费(
|
|
289
|
+
### 第 3 步附加(之二)· 覆写优先级消费( 硬步骤)
|
|
290
290
|
|
|
291
291
|
第 1 步输出的 `▸ 覆写优先级 priority` **不是提示,是落地写法的硬要求**。每落一条规则前先按策略决定写法;写法错了,规则就是「写了不生效」。历史缺口「面包屑 `visible:false` 写了 `display:none` 却照旧显示」「页签关闭钮 `opacity` 写了却仍要 hover 才显」全部源于此——两条规则本身都没写错,是**赢了才是硬道理**这一步没人做。
|
|
292
292
|
|
|
@@ -341,12 +341,12 @@ html .navbar .navbar-breadcrumb-wrap {
|
|
|
341
341
|
- 表头 / 行 / 分页都在视口内,仅表格体内滚动,无外层滚动条、无拉伸 / 塌陷 / 双滚动条,`tableHeight > 0`;
|
|
342
342
|
- **结构层 diff 为空**:`lay-content/index.vue` 的 `.main-content[data-content-mode]` 与 `element-plus.scss` 的 `[data-fill]` 未被改动;同时确认没有「为保高度而放弃设计还原」(出厂卡片 / 内边距 / 内部排布原样未动而变更集声明了改动)——两个方向任一命中即返工
|
|
343
343
|
- [ ] **映射通道活性检查(杂必查)**:样式落地引用的每个 CSS 变量必须在项目样式中**存在消费者**(`变量名` 有 `var(--xxx)` 引用点);只定义不消费的变量 = 通道死路,翻译再准也不生效(menu_active_indicator 曾因 --vts-theme-menu-active-before 无消费者而「映射了却没效果」)。施工时 grep 核对,无消费者时改走消费者存在的作用域或补挂载点并申报。
|
|
344
|
-
- [ ] **同权重失效检查(
|
|
344
|
+
- [ ] **同权重失效检查( · 专查「写了不生效」)**:逐条核对设计层新增规则是否真能取胜——① 对手是组件 `<style scoped>` 时,本条特异度必须**严格高于**它(**平手即错**,因为组件样式在全局之后注入);② 对手带 `!important` 时本条必须同样 `!important`,或改走通道变量。**判定方法(必须真数,不许目测)**:对每条新规则与其对手分别数出选择器权重,权重相同一律判为「失效」并提权。历史缺口全部命中本项:面包屑 `display:none`(与组件 scoped 同为 0,2,0)→ 照旧显示;页签关闭钮 `opacity`(同为 0,5,0)→ 仍要 hover 才显;页签项 `padding`(对手带 `!important`)→ 无论怎么抬特异度都改不动
|
|
345
345
|
- [ ] **oracle 基线可用性检查**:变更集带 `oracle` 时——① `oracle.mockup` 必须与**本次主题、本次页面**一致(禁止复用异主题效果图:主题错配会让逐点比对必然全红);② `oracle.sids` 与 `changes[]` **双向闭合**:效果图里有、changes[] 未声明 = **欠声明**(该点位永远不可能被还原);changes[] 已声明、效果图无 sid = **无基线**(落地后无法机器验收)。两类出现即回流设计侧补齐,**不得直接开工**(`parser match` 已自动报出)
|
|
346
346
|
- [ ] **dark.scss 暗色同步**:新增视觉规则在 `html.dark` 有对应覆盖
|
|
347
347
|
- [ ] **缺口清单只含意图缺口**:清单每一项都必须是「设计侧未给值 / 值非法」且已注明「回流设计侧补齐」;能力缺口(词典缺 ID / 缺字段枚举 / 缺 form)不得出现在清单里——出现即把可落地项搁置
|
|
348
348
|
- [ ] **台账逐行兑现对账(对账闸门)**:把设计侧交付的提取台账逐行过一遍,每行必须有落地结论——已落地(写明落在哪个文件/选择器)或已入缺口清单(写明缺失字段)。存在「台账有行、落地无结论」的行 = 交付不完整,与红线同级
|
|
349
|
-
- [ ]
|
|
349
|
+
- [ ] **登记表覆盖率对账(子项级细闸,)**:带登记表交付时必须跑 `match --registry`——`C = A` 且无缺口才可交付;同时确认无「效果图标注缺口」(`always:true` 子项在效果图上都有同名 `data-sid`)。**禁止采信设计侧自报的 `coverage` 数字**(parser 会当场重算,自报数不参与);缺口逐条点名回流设计侧
|
|
350
350
|
- [ ] **零搁置交付**:最终回复不含「待确认」类停顿项;交付说明的「补映射 / 补通道 / 缺口回流」三段齐全(无内容写「无」)
|
|
351
351
|
- [ ] `node parser/index.js build --dry` 通过(mapping 若有临时新增)
|
|
352
352
|
|
|
@@ -408,7 +408,7 @@ node parser/index.js match parser/fixtures/changeset-neg3.json # F. 负例3
|
|
|
408
408
|
node parser/index.js match parser/fixtures/changeset-legacy.json # G. 旧协议:exit 0 + layout 键/schema 历史值两条告警
|
|
409
409
|
node parser/index.js match parser/fixtures/changeset-fullpage-restore.json # H. 整页场景还原样例:exit 0;壳层+内容区全模块 L1 命中;数值字面量(40px 等)透传无 ⚠
|
|
410
410
|
node parser/index.js build --dry # I. 产物链自检
|
|
411
|
-
node parser/index.js match parser/fixtures/changeset-v32-fields.json # J.
|
|
411
|
+
node parser/index.js match parser/fixtures/changeset-v32-fields.json # J. 声明维:exit 0;输出「结构施工 structure_ops」与 layer / apply_via
|
|
412
412
|
node parser/index.js audit --project parser/fixtures/fake-project parser/fixtures/changeset-v32-fields.json # K. 静态审计:夹具项目存在挂载点缺失/死通道 → exit 1
|
|
413
413
|
node parser/index.js verify --oracle parser/fixtures/verify/oracle.json --actual parser/fixtures/verify/actual.json # L. 渲染态验收:夹具含三类故意缺口 → exit 1;归因计数 选择器落空1/权重被压1/语境错位2
|
|
414
414
|
node parser/index.js match --registry parser/fixtures/registry-sample.json parser/fixtures/changeset-registry-gap.json # M. 登记表覆盖率细闸:夹具欠声明 2 条恒存在子项 → exit 1
|