@agile-team/wl-skills-ui 1.8.8 → 1.8.12

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/CHANGELOG.md CHANGED
@@ -4,6 +4,13 @@ All notable changes to **@agile-team/wl-skills-ui** will be documented in this f
4
4
 
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
6
6
 
7
+ ## [1.8.9] - 2026-05-17
8
+
9
+ ### Improved
10
+
11
+ - **token 化圆角**:`_base-query-toolbar.scss` / `_jh-pagination.scss` / `_jh-ui.scss` / `_jh-tree.scss` 所有硬编码 `border-radius: 6px` / `4px` 全部替换为 `var(--el-border-radius-base)` / `var(--el-border-radius-small)` token 引用,未来调整圆角一处生效。
12
+ - **R028** 新增:检测业务 `<style>` 中硬编码 `border-radius` 数值,提示改用 token,避免升级后残留旧值。
13
+
7
14
  ## [1.8.8] - 2026-05-17
8
15
 
9
16
  ### Fixed
package/README.md CHANGED
@@ -213,7 +213,7 @@ yarn add @agile-team/wl-skills-ui
213
213
 
214
214
  ## 版本亮点
215
215
 
216
- 当前 v1.8.8:
216
+ 当前 v1.8.9:
217
217
 
218
218
  - **loading 遮罩质感优化**:BaseTable / AG Grid 的 v-loading 由灰色蒙层改为毛玻璃半透明(backdrop-filter),数据切换无感
219
219
  - **R027** 检测业务代码硬编码 `.el-loading-mask` 背景色 → 提示删除,由包统一覆盖
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agile-team/wl-skills-ui",
3
- "version": "1.8.8",
3
+ "version": "1.8.12",
4
4
  "description": "企业级 UI 风格对齐框架 — Vue + Element Plus 项目通用化妆/原生双模式(tokens / element / vendors / layouts / runtime / scanner / fixer / skills)",
5
5
  "type": "module",
6
6
  "main": "./es/index.js",
@@ -134,4 +134,4 @@
134
134
  "eslint --fix --no-cache"
135
135
  ]
136
136
  }
137
- }
137
+ }
@@ -0,0 +1,9 @@
1
+ <template>
2
+ <div class="card">内容</div>
3
+ </template>
4
+ <style scoped>
5
+ .card {
6
+ border-radius: 8px;
7
+ background: #fff;
8
+ }
9
+ </style>
@@ -0,0 +1,9 @@
1
+ <template>
2
+ <div class="card">内容</div>
3
+ </template>
4
+ <style scoped>
5
+ .card {
6
+ border-radius: var(--el-border-radius-base);
7
+ background: #fff;
8
+ }
9
+ </style>
@@ -160,4 +160,43 @@ export const semanticRules = [
160
160
  return issues;
161
161
  },
162
162
  },
163
+
164
+ // R028: 检测业务 <style> 中硬编码 border-radius 数值(应使用 var(--el-border-radius-*))
165
+ {
166
+ id: "R028",
167
+ category: "style",
168
+ severity: "info",
169
+ name: "业务代码硬编码 border-radius 数值(建议使用 --el-border-radius-base/small token)",
170
+ check() {
171
+ return [];
172
+ },
173
+ checkStyle(styleBlock, file, lineOffset) {
174
+ const issues = [];
175
+ const lines = styleBlock.split("\n");
176
+ for (let i = 0; i < lines.length; i++) {
177
+ const line = lines[i];
178
+ // 匹配 border-radius: Npx 但不含 var(
179
+ if (!/border-radius\s*:/.test(line)) continue;
180
+ if (/var\(/.test(line)) continue;
181
+ // 排除注释
182
+ if (/^\s*\/\//.test(line)) continue;
183
+ // 排除 50% / 100% / 99px(圆形/胶囊,刻意设计)
184
+ if (/border-radius\s*:\s*(50%|100%|99px|999px)/.test(line)) continue;
185
+ // 排除 0(无圆角,刻意重置)
186
+ if (/border-radius\s*:\s*0[;\s]/.test(line)) continue;
187
+ issues.push(
188
+ issue(
189
+ file,
190
+ lineOffset + i + 1,
191
+ "R028",
192
+ "style",
193
+ "info",
194
+ "border-radius 使用硬编码数值,未引用设计 token",
195
+ "建议改为 var(--el-border-radius-base) 或 var(--el-border-radius-small),确保圆角随 token 统一调整",
196
+ ),
197
+ );
198
+ }
199
+ return issues;
200
+ },
201
+ },
163
202
  ];
@@ -422,6 +422,17 @@
422
422
  "autoFixable": true,
423
423
  "scanner": "scanner/rules/semantic.mjs",
424
424
  "skills": ["vendors/base-table", "element/el-table"]
425
+ },
426
+ {
427
+ "id": "R028",
428
+ "category": "style",
429
+ "severity": "info",
430
+ "title": "业务代码 border-radius 应使用设计 token",
431
+ "rationale": "硬编码圆角数值无法随 --el-border-radius-base token 统一调整,升级 token 后业务侧残留旧值导致视觉不一致。",
432
+ "appliesTo": ["border-radius"],
433
+ "autoFixable": true,
434
+ "scanner": "scanner/rules/semantic.mjs",
435
+ "skills": ["tokens/index"]
425
436
  }
426
437
  ]
427
438
  }
@@ -181,13 +181,14 @@
181
181
 
182
182
  // ── 状态标签 — 精致小标签(GitHub/Linear label 风格)────────────────────────
183
183
  // 实色填充 + 轻柔圆角 + 克制字号
184
- .ag-cell .el-tag {
184
+ .ag-cell .el-tag,
185
+ .el-table .el-tag {
185
186
  display: inline-flex !important;
186
187
  align-items: center !important;
187
188
  justify-content: center !important;
188
- height: 20px !important;
189
+ height: 18px !important;
189
190
  line-height: 1 !important;
190
- padding: 0 8px !important;
191
+ padding: 0 7px !important;
191
192
  font-size: 11px !important;
192
193
  font-weight: 600 !important;
193
194
  border-radius: 4px !important;
@@ -196,7 +197,7 @@
196
197
  flex-shrink: 0;
197
198
 
198
199
  &.el-tag--danger {
199
- background: var(--el-color-danger) !important;
200
+ background: var(--el-color-danger) !important;
200
201
  color: #fff !important;
201
202
  }
202
203
 
@@ -220,6 +221,12 @@
220
221
  background: var(--el-color-primary) !important;
221
222
  color: #fff !important;
222
223
  }
224
+ >span,
225
+ .el-tag__content,
226
+ * {
227
+ font-size: inherit !important;
228
+ line-height: inherit !important;
229
+ }
223
230
  }
224
231
 
225
232
  // ── 数值型徽标(考核基数/评分等)────────────────────────────────────────────
@@ -510,24 +517,86 @@
510
517
 
511
518
  // 必填星号:只保留一颗 — 默认 asterisk-left(::before),asterisk-right 用 ::after
512
519
  // 旧写法同时 display:inline-block 两个伪元素导致 * * 重复
513
- .el-form-item.is-required:not(.is-no-asterisk)>.el-form-item__label::before {
520
+ html body .el-form.el-form--label-left .el-form-item__label,
521
+ html body .el-form.el-form--label-right .el-form-item__label {
522
+ align-items: baseline !important;
523
+ font-size: 12px !important;
524
+ line-height: 22px !important;
525
+ }
526
+
527
+ html body .el-form.el-form--label-left .el-form-item__label>.com-text,
528
+ html body .el-form.el-form--label-right .el-form-item__label>.com-text {
529
+ font-size: 12px !important;
530
+ line-height: 22px !important;
531
+ }
532
+
533
+ .el-form-item.is-required:not(.is-no-asterisk)>.el-form-item__label::before,
534
+ html body .el-form.el-form--label-left .el-form-item.is-required:not(.is-no-asterisk)>.el-form-item__label::before,
535
+ html body .el-form.el-form--label-right .el-form-item.is-required:not(.is-no-asterisk)>.el-form-item__label::before {
536
+ content: "*" !important;
537
+ color: var(--el-color-danger, #f56c6c) !important;
538
+ font-size: 12px !important;
539
+ font-weight: 400 !important;
540
+ line-height: 22px !important;
541
+ display: inline-block !important;
542
+ margin-right: 2px !important;
543
+ vertical-align: baseline !important;
544
+ position: relative !important;
545
+ top: 0 !important;
546
+ align-self: baseline !important;
547
+ }
548
+ .el-form-item.is-required:not(.is-no-asterisk)>.el-form-item__label>.com-text::before,
549
+ html body .el-form.el-form--label-left .el-form-item.is-required:not(.is-no-asterisk)>.el-form-item__label>.com-text::before,
550
+ html body .el-form.el-form--label-right .el-form-item.is-required:not(.is-no-asterisk)>.el-form-item__label>.com-text::before {
551
+ content: "*" !important;
514
552
  color: var(--el-color-danger, #f56c6c) !important;
553
+ font-size: 12px !important;
554
+ font-weight: 400 !important;
555
+ line-height: 22px !important;
515
556
  display: inline-block !important;
557
+ margin-right: 2px !important;
558
+ vertical-align: baseline !important;
559
+ position: relative !important;
560
+ top: 0 !important;
561
+ align-self: baseline !important;
562
+ }
563
+
564
+ .el-form-item.is-required:not(.is-no-asterisk)>.el-form-item__label:has(>.com-text)::before,
565
+ html body .el-form .el-form-item.is-required:not(.is-no-asterisk)>.el-form-item__label:has(>.com-text)::before {
566
+ display: none !important;
516
567
  }
568
+
517
569
  // asterisk-right 模式:显示 ::after,隐藏 ::before
518
- .el-form-item.is-required:not(.is-no-asterisk).asterisk-right>.el-form-item__label::before {
570
+ .el-form-item.is-required:not(.is-no-asterisk).asterisk-right>.el-form-item__label::before,
571
+ .el-form-item.is-required:not(.is-no-asterisk).asterisk-right>.el-form-item__label>.com-text::before {
519
572
  display: none !important;
520
573
  }
521
574
 
522
- .el-form-item.is-required:not(.is-no-asterisk).asterisk-right>.el-form-item__label::after {
575
+ .el-form-item.is-required:not(.is-no-asterisk).asterisk-right>.el-form-item__label::after,
576
+ html body .el-form.el-form--label-left .el-form-item.is-required:not(.is-no-asterisk).asterisk-right>.el-form-item__label::after,
577
+ html body .el-form.el-form--label-right .el-form-item.is-required:not(.is-no-asterisk).asterisk-right>.el-form-item__label::after {
578
+ content: "*" !important;
523
579
  color: var(--el-color-danger, #f56c6c) !important;
580
+ font-size: 12px !important;
581
+ font-weight: 400 !important;
582
+ line-height: 22px !important;
524
583
  display: inline-block !important;
584
+ margin-left: 2px !important;
585
+ vertical-align: baseline !important;
586
+ position: relative !important;
587
+ top: 0 !important;
588
+ align-self: baseline !important;
525
589
  }
526
590
 
527
591
  // 默认模式:隐藏 ::after 防止重复星号
528
592
  .el-form-item.is-required:not(.is-no-asterisk):not(.asterisk-right)>.el-form-item__label::after {
529
593
  display: none !important;
530
594
  }
595
+ .el-form-item.is-required.is-no-asterisk>.el-form-item__label::before,
596
+ .el-form-item.is-required.is-no-asterisk>.el-form-item__label::after,
597
+ .el-form-item.is-required.is-no-asterisk>.el-form-item__label>.com-text::before {
598
+ display: none !important;
599
+ }
531
600
 
532
601
  .el-form-item.is-error {
533
602
  .el-form-item__label,
@@ -4,7 +4,7 @@
4
4
  // 维护:只改这一个文件,全项目生效
5
5
  //
6
6
  // 【设计语言】
7
- // - 输入框:圆角 6px、轻描边、focus 品牌蓝光环
7
+ // - 输入框:圆角 var(--el-border-radius-base)、轻描边、focus 品牌蓝光环
8
8
  // - 按钮:主操作填充蓝、次级操作线框灰、危险填充红
9
9
  // - 整体:紧凑(32px 高)、清晰层次感、与 AG Grid 视觉风格统一
10
10
  // ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
@@ -13,12 +13,12 @@
13
13
  .base-query-box {
14
14
  padding: 10px 12px 4px;
15
15
  background: #ffffff;
16
- border-radius: 6px 6px 0 0;
16
+ border-radius: var(--el-border-radius-base) var(--el-border-radius-base) 0 0;
17
17
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
18
18
 
19
19
  // ── 通用输入框精致化 ──────────────────────────────────────────────────────
20
20
  .el-input__wrapper {
21
- border-radius: 6px !important;
21
+ border-radius: var(--el-border-radius-base) !important;
22
22
  box-shadow: 0 0 0 1px var(--el-border-color) inset !important;
23
23
  transition: box-shadow 0.15s ease;
24
24
 
@@ -50,7 +50,7 @@
50
50
  }
51
51
  // ── 选择框 ────────────────────────────────────────────────────────────────
52
52
  .el-select .el-select__wrapper {
53
- border-radius: 6px !important;
53
+ border-radius: var(--el-border-radius-base) !important;
54
54
  box-shadow: 0 0 0 1px var(--el-border-color) inset !important;
55
55
  transition: box-shadow 0.15s ease;
56
56
 
@@ -65,7 +65,7 @@
65
65
  // ── 日期/时间选择器 ───────────────────────────────────────────────────────
66
66
  .el-date-editor .el-input__wrapper,
67
67
  .el-date-editor.el-input__wrapper {
68
- border-radius: 6px !important;
68
+ border-radius: var(--el-border-radius-base) !important;
69
69
  box-shadow: 0 0 0 1px var(--el-border-color) inset !important;
70
70
  transition: box-shadow 0.15s ease;
71
71
 
@@ -88,7 +88,7 @@
88
88
 
89
89
  // 查询按钮(type=primary)→ 品牌蓝填充
90
90
  .el-button--primary {
91
- border-radius: 6px !important;
91
+ border-radius: var(--el-border-radius-base) !important;
92
92
  font-weight: 500;
93
93
  letter-spacing: 0.01em;
94
94
  height: 24px !important;
@@ -110,7 +110,7 @@
110
110
 
111
111
  // 重置按钮(type=default)→ 轻线框样式
112
112
  .el-button--default:not(.el-button--primary):not(.el-button--danger) {
113
- border-radius: 6px !important;
113
+ border-radius: var(--el-border-radius-base) !important;
114
114
  font-size: 12px !important;
115
115
  height: 24px !important;
116
116
  line-height: 1 !important;
@@ -162,7 +162,7 @@
162
162
 
163
163
  // 统一按钮高度、圆角、字号
164
164
  .el-button {
165
- border-radius: 6px !important;
165
+ border-radius: var(--el-border-radius-base) !important;
166
166
  font-size: 11px !important;
167
167
  font-weight: 500;
168
168
  height: 24px !important;
@@ -266,7 +266,7 @@
266
266
  .base-toolbar-box .el-dropdown > .el-button,
267
267
  .base-toolbar-box .el-button-group .el-button {
268
268
  height: 24px !important;
269
- border-radius: 6px !important;
269
+ border-radius: var(--el-border-radius-base) !important;
270
270
  font-size: 11px !important;
271
271
  font-weight: 500;
272
272
  }
@@ -282,13 +282,13 @@
282
282
  }
283
283
 
284
284
  .el-button:first-child {
285
- border-top-left-radius: 6px !important;
286
- border-bottom-left-radius: 6px !important;
285
+ border-top-left-radius: var(--el-border-radius-base) !important;
286
+ border-bottom-left-radius: var(--el-border-radius-base) !important;
287
287
  }
288
288
 
289
289
  .el-button:last-child {
290
- border-top-right-radius: 6px !important;
291
- border-bottom-right-radius: 6px !important;
290
+ border-top-right-radius: var(--el-border-radius-base) !important;
291
+ border-bottom-right-radius: var(--el-border-radius-base) !important;
292
292
  margin-left: -1px !important;
293
293
  }
294
294
  }
@@ -324,7 +324,7 @@
324
324
  }
325
325
  // ── 弹窗/抽屉底部按钮行 ──────────────────────────────────────────────────────
326
326
  .dialog-footer .el-button {
327
- border-radius: 6px !important;
327
+ border-radius: var(--el-border-radius-base) !important;
328
328
  font-size: 13px !important;
329
329
  height: 24px !important;
330
330
  padding: 0 14px !important;
@@ -17,7 +17,7 @@
17
17
  [class^='base-table-'],
18
18
  [class*=' base-table-'] {
19
19
  background: var(--el-bg-color, #fff);
20
- border-radius: var(--el-border-radius-base, 4px);
20
+ border-radius: var(--el-border-radius-base, 6px);
21
21
  overflow: hidden;
22
22
  }
23
23
 
@@ -8,7 +8,7 @@
8
8
 
9
9
  // 页码按钮
10
10
  .el-pager .number {
11
- border-radius: 4px !important;
11
+ border-radius: var(--el-border-radius-small) !important;
12
12
  font-size: 12px;
13
13
  min-width: 26px;
14
14
  height: 26px;
@@ -24,7 +24,7 @@
24
24
  &.is-active {
25
25
  background-color: var(--el-color-primary) !important;
26
26
  color: #ffffff !important;
27
- border-radius: 4px !important;
27
+ border-radius: var(--el-border-radius-small) !important;
28
28
  font-weight: 600;
29
29
  }
30
30
  }
@@ -35,13 +35,13 @@
35
35
  min-width: 26px;
36
36
  height: 26px;
37
37
  line-height: 26px;
38
- border-radius: 4px !important;
38
+ border-radius: var(--el-border-radius-small) !important;
39
39
  }
40
40
 
41
41
  // 上/下一页按钮
42
42
  .btn-prev,
43
43
  .btn-next {
44
- border-radius: 4px !important;
44
+ border-radius: var(--el-border-radius-small) !important;
45
45
  min-width: 26px;
46
46
  height: 26px;
47
47
  line-height: 26px;
@@ -65,7 +65,7 @@
65
65
  .el-pagination__sizes .el-select__wrapper {
66
66
  font-size: 12px;
67
67
  height: 26px;
68
- border-radius: 4px !important;
68
+ border-radius: var(--el-border-radius-small) !important;
69
69
  }
70
70
 
71
71
  // 跳页输入框
@@ -73,7 +73,7 @@
73
73
  font-size: 12px;
74
74
 
75
75
  .el-input__wrapper {
76
- border-radius: 4px !important;
76
+ border-radius: var(--el-border-radius-small) !important;
77
77
  height: 26px;
78
78
  }
79
79
  .el-input__inner { font-size: 12px; }
@@ -27,7 +27,7 @@
27
27
  padding: 0 10px 8px;
28
28
 
29
29
  .el-input__wrapper {
30
- border-radius: 6px;
30
+ border-radius: var(--el-border-radius-base);
31
31
  background: #ffffff;
32
32
  box-shadow: 0 0 0 1px var(--el-border-color) inset;
33
33
  transition: box-shadow 0.18s;
@@ -55,7 +55,7 @@
55
55
  .el-input > .el-input__inner,
56
56
  .el-textarea > .el-textarea__inner,
57
57
  .el-date-editor > .el-input__inner {
58
- border-radius: 6px;
58
+ border-radius: var(--el-border-radius-base);
59
59
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
60
60
  }
61
61
 
@@ -87,7 +87,7 @@
87
87
  .com-input > .el-input > .el-input__inner,
88
88
  .com-input > .el-textarea > .el-textarea__inner,
89
89
  .com-textarea > .el-textarea > .el-textarea__inner {
90
- border-radius: 6px;
90
+ border-radius: var(--el-border-radius-base);
91
91
  }
92
92
 
93
93
  // 6) 必填星号兼容 jh-ui label 结构