@qilitt-mickey/vue3-temp-skill 1.1.60 → 1.1.61

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.
@@ -245,6 +245,7 @@
245
245
  "font_weight": "font-weight",
246
246
  "text_color": "color",
247
247
  "border_bottom": "border-bottom",
248
+ "nowrap": "white-space",
248
249
  "vertical_align": "vertical-align"
249
250
  },
250
251
  "anchors": [
@@ -254,7 +255,8 @@
254
255
  "preconditions": [
255
256
  "出厂 element-plus.scss 已给 .el-table .el-table__cell 设了 padding(var(--vts-space-xs) 0),本条目字段必须落 host 层才能覆盖它;写在 inner 层只改内层文本盒,观感上「改了没反应」。",
256
257
  "几何语境随值迁移:padding/padding_x/padding_y 落宿主 td 时必须同步声明 suppress_inner(内层 .cell padding 清零口径)——出厂内层 .cell 自带 padding 0 12px,不清零则两层之和 ≠ 设计值(28px/侧 → 列挤坏)。",
257
- "行高由「单元格 padding + 内容行高」共同决定;声明行高档位时必须同时给出 padding 取值,只改其一会得到非预期行高。"
258
+ "行高由「单元格 padding + 内容行高」共同决定;声明行高档位时必须同时给出 padding 取值,只改其一会得到非预期行高。",
259
+ "white-space:nowrap 为强制维度(登记表 §11.43 always:true,与表头一致):数据单元格禁止换行。nowrap 属内层盒属性族,解析器自动路由到 inner 锚点(.cell),无需显式声明 layer;落 host 会被 EP 内层 .cell{white-space:normal} 覆盖,导致「牛奶乳品」类竖排换行。"
258
260
  ],
259
261
  "priority": {
260
262
  "strategy": "scope_qualified",
@@ -262,6 +264,23 @@
262
264
  },
263
265
  "$note": "设计意图(list-page §11.43):padding 16px、字号 14px、字重 400、文字色 #000000E0、底边框 1px solid #F0F0F0、垂直居中。⚠ 数据单元格此前无承载点位(历史缺口:只覆盖了表头,单元格 padding 改不动),本条目即为补建的通道。不声明时项目侧保留出厂值,效果图要求的 16px 必须显式给出。"
264
266
  },
267
+ "admin.content.table.index_column": {
268
+ "type": "element",
269
+ "selector": ".vts-table-area .el-table__cell.col-index",
270
+ "file": "业务 views(序号列 el-table-column type=\"index\" 需绑定 class-name=\"col-index\")",
271
+ "style_scope": ".vts-page-card",
272
+ "data_channels": {
273
+ "column_width": "序号列宽度通道(结构通道:列定义绑定 class-name=col-index + 设 width prop;设计只声明列宽意图,禁 CSS 仿冒)"
274
+ },
275
+ "custom_style_map": {
276
+ "align": "text-align"
277
+ },
278
+ "anchors": [
279
+ { "kind": "class", "layer": "host", "target": ".vts-table-area .el-table__cell.col-index" },
280
+ { "kind": "class", "layer": "inner", "target": ".vts-table-area .el-table__cell.col-index > .cell" }
281
+ ],
282
+ "$note": "序号列宽度属业务层(与选择列/操作列同为列宽业务归属):本条目仅当设计明确固定序号列宽时,经 structure_ops 在列定义绑定 class-name=col-index 并设 width prop 落地(禁 CSS 收口 width)。默认宽度由业务列定义控制,避免「序号列过宽挤压内容列 / 类型列被压窄」这类列宽失衡。设计侧不声明列宽时项目侧保留出厂值。"
283
+ },
265
284
  "admin.content.table.cell_status": {
266
285
  "type": "element",
267
286
  "selector": ".vts-table-area .el-table__cell .el-tag",
@@ -114,6 +114,21 @@
114
114
  },
115
115
  "$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_* / pill_indicator_left 时必须在本条目 style_scope 内成对落地两件事才算施工完成——① 竖条消费者(form 不含 pill 时另需覆写 --vts-theme-menu-active-bg: transparent 关胶囊);② 在设计层文件(不可写出厂 sidebar.scss)新建 ::after/::before 消费者引用 var(--vts-theme-menu-active-before)。缺任一项 = 「映射了却没效果」。所有几何参数(方位/粗细/长度/圆角/内缩)取自变更集 style 字段,禁止写死 left:0 / 3px 等常量。⚠field_forms 硬闸(parser G7 机检):style 声明的字段必须被当前 form 消费——如 active_indicator_* 只在 indicator_* / pill_indicator_left 形态下有消费者,声明 pill 却带竖条字段 = 字段被静默丢弃(历史事故:孔雀绿变更集声明 pill + active_indicator_*,设计层按 pill 施工把竖条令牌置透明,效果图要求的左竖条消失)。"
116
116
  },
117
+ "admin.layout.sidebar.menu_item_icon": {
118
+ "type": "element",
119
+ "selector": ".sidebar-container .el-menu-item .el-icon, .sidebar-container .el-menu-item .el-menu-item__icon",
120
+ "file": "src/layout/components/lay-sidebar/NavVertical.vue(菜单图标,el-menu-item 内 svg-icon)",
121
+ "style_scope": ".sidebar-container",
122
+ "css_vars": {},
123
+ "custom_style_map": {
124
+ "icon_size": "font-size",
125
+ "icon_color": "color"
126
+ },
127
+ "anchors": [
128
+ { "kind": "class", "layer": "inner", "target": ".sidebar-container .el-menu-item .el-icon" }
129
+ ],
130
+ "$note": "菜单图标 16×16px(unified-framework §6.17 / §1 导航栏「图标 16×16px」)。图标为 font-icon,尺寸经 font-size 承载、颜色经 color 承载,落 inner 层(图标元素本身)。此前进出厂中性基线:菜单图标尺寸由图标组件默认决定,设计侧无承载点位 = 图标大小/颜色不可控,本条目即为补建通道(unified-framework §6.17 此前缺 registry 收口,属登记表真空缺口)。"
131
+ },
117
132
  "admin.layout.sidebar.collapse_trigger": {
118
133
  "type": "element",
119
134
  "selector": ".left-collapse / .center-collapse",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qilitt-mickey/vue3-temp-skill",
3
- "version": "1.1.60",
3
+ "version": "1.1.61",
4
4
  "type": "module",
5
5
  "description": "Vue 3 企业级中后台项目开发规范技能包 — core-kernel 架构、按需功能模块",
6
6
  "bin": {
package/parser/index.js CHANGED
@@ -45,7 +45,15 @@ const COMPOSITE_VALUE_RE = /\s/;
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
- /** 内层盒属性族(changeset-schema §layer):这些属性落在 inner 才生效(G5 几何语境闸使用) */
48
+ /**
49
+ * 内层盒属性族(changeset-schema §layer):这些文本控制/行高/对齐类属性必须落在 inner 层
50
+ * 才生效。根因:Element Plus 给内层文本盒 .cell 写了 white-space:normal / text-align 等出厂
51
+ * 样式,写在宿主盒(th/td)上会被内层覆盖 —— 这是「表头/内容竖排换行」的复发根因。
52
+ * 本集合作两处消费:
53
+ * ① resolveAnchorTarget —— 命中即把该字段自动路由到 inner 锚点(保底落点,杜绝静默落 host);
54
+ * ② checkInnerOnlyProps 闸门 —— 条目缺 inner 锚点却声明了此类字段时,报词典完整性缺口。
55
+ * (此前为死常量,从未被任何闸引用,导致 nowrap/text_align 可裸声明落 host 被覆盖。)
56
+ */
49
57
  const INNER_ONLY_PROPS = new Set(["white_space", "text_overflow", "overflow", "word_break", "text_align", "line_height", "vertical_align", "nowrap", "text_align_last"]);
50
58
  /** 几何字段(宿主内边距/外边距族):落 host 时与出厂内层盒自带 padding 叠加,必须同步清零内层(G5) */
51
59
  const GEOMETRY_PAD_RE = /^(padding|padding_x|padding_y|padding_inline|padding_block|margin|margin_x|margin_y|margin_inline|margin_block)$/;
@@ -464,6 +472,7 @@ function matchOne(file, dataset, batchSummary, opts = {}) {
464
472
  checkFormEnum(p.entry, p.change);
465
473
  checkSuppress(p.change, p.entry, p.id, gateViolations);
466
474
  checkGeometryContext(p.change, p.entry, p.id, gateViolations);
475
+ checkInnerOnlyProps(p.change, p.entry, p.id, gateViolations);
467
476
  checkFieldForms(p.change, p.entry, p.id, gateViolations);
468
477
  printApplyPlan(p.entry, p.change, p.id, index);
469
478
  printStyleTranslation(p.entry, p.change, p.id, fieldPending, valueDict);
@@ -473,6 +482,7 @@ function matchOne(file, dataset, batchSummary, opts = {}) {
473
482
  console.log(` 结构:定位父容器按相对位置增量插入;样式:复用父模块映射 + 全局组件映射`);
474
483
  checkSuppress(p.change, p.entry, p.id, gateViolations);
475
484
  checkGeometryContext(p.change, p.entry, p.id, gateViolations);
485
+ checkInnerOnlyProps(p.change, p.entry, p.id, gateViolations);
476
486
  checkFieldForms(p.change, p.entry, p.id, gateViolations);
477
487
  printApplyPlan(p.entry, p.change, `${p.id}(继承 ${p.parent})`, index);
478
488
  printStyleTranslation(p.entry, p.change, `${p.id}(继承 ${p.parent})`, fieldPending, valueDict);
@@ -704,6 +714,13 @@ function layerOf(change, field) {
704
714
  function resolveAnchorTarget(entry, field, layer) {
705
715
  const anchors = Array.isArray(entry.anchors) ? entry.anchors : [];
706
716
  const classAnchors = anchors.filter(a => a && a.kind === "class" && typeof a.target === "string");
717
+ // 内层盒属性族保底路由:nowrap / text_align / line_height 等即使未显式声明 layer,
718
+ // 也强制落到 inner 锚点(EP 内层 .cell 出厂样式会覆盖 host 层声明,裸落 host = 竖排换行)。
719
+ if (INNER_ONLY_PROPS.has(field)) {
720
+ const innerHit = classAnchors.find(a => a.layer === "inner");
721
+ if (innerHit)
722
+ return { target: innerHit.target, layer: "inner" };
723
+ }
707
724
  if (layer) {
708
725
  const hit = classAnchors.find(a => a.layer === layer);
709
726
  if (hit)
@@ -1466,6 +1483,33 @@ function checkGeometryContext(change, entry, idLabel, violations) {
1466
1483
  }
1467
1484
  }
1468
1485
 
1486
+ /**
1487
+ * G5b:内层盒属性族 · 词典完整性闸 —— INNER_ONLY_PROPS 字段(nowrap/text_align/line_height 等)
1488
+ * 必须能落到 inner 层,否则这些文本控制属性无处可落、必然被 EP 内层 .cell 出厂样式吞掉。
1489
+ * 触发条件(零误报):仅当条目本身「声明了 INNER_ONLY_PROPS 字段」却「没有 inner 锚点」时报警
1490
+ * —— 这是词典侧的能力缺口(缺 inner 锚点),须补 anchors 里的 inner 条目,而非设计侧能补救。
1491
+ * 条目带 inner 锚点时由 resolveAnchorTarget 自动路由兜底,本闸不重复拦截(避免噪音)。
1492
+ */
1493
+ function checkInnerOnlyProps(change, entry, idLabel, violations) {
1494
+ if (!entry || !Array.isArray(entry.anchors))
1495
+ return;
1496
+ const hasInner = entry.anchors.some(a => a && a.kind === "class" && a.layer === "inner");
1497
+ if (hasInner)
1498
+ return;
1499
+ const style = change.style && typeof change.style === "object" ? change.style : null;
1500
+ if (!style)
1501
+ return;
1502
+ const offenders = Object.keys(style).filter(f => INNER_ONLY_PROPS.has(f));
1503
+ if (offenders.length === 0)
1504
+ return;
1505
+ violations.push(
1506
+ `${idLabel}.anchors 完整性缺口:条目 style 声明了内层盒属性族 [${offenders.join("、")}]`
1507
+ + `(文本控制/行高/对齐类,必须落 inner 层才不被 EP 内层 .cell 出厂样式覆盖),`
1508
+ + `但本条目 anchors 无 inner 锚点 —— 这些字段无处可落,必然复发「竖排换行 / 对齐失效」。`
1509
+ + `修复:在 anchors 补 { kind:"class", layer:"inner", target:"… > .cell" } 承载选择器。`,
1510
+ );
1511
+ }
1512
+
1469
1513
  /**
1470
1514
  * G7:field_forms 声明-消费闭合 —— style 字段必须被当前 form 消费。
1471
1515
  * 词典条目声明 field_forms(字段 → 合法 form 枚举)后:变更集 style 里的字段若不在