@agile-team/wl-skills-ui 1.8.7 → 1.8.9
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 +13 -0
- package/README.md +1 -1
- package/design/tokens/base.css +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +1 -1
- package/scanner/__tests__/fixtures/r028-fail.vue +9 -0
- package/scanner/__tests__/fixtures/r028-pass.vue +9 -0
- package/scanner/rules/semantic.mjs +39 -0
- package/standards/rules.json +11 -0
- package/styles/tokens/index.scss +2 -2
- package/styles/vendors/_base-query-toolbar.scss +14 -14
- package/styles/vendors/_base-table.scss +1 -1
- package/styles/vendors/_jh-pagination.scss +6 -6
- package/styles/vendors/_jh-tree.scss +1 -1
- package/styles/vendors/_jh-ui.scss +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,19 @@ 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
|
+
|
|
14
|
+
## [1.8.8] - 2026-05-17
|
|
15
|
+
|
|
16
|
+
### Fixed
|
|
17
|
+
|
|
18
|
+
- **圆角统一**:`--el-border-radius-base` 从 4px 升级为 6px,所有 el-button / el-input / el-select / el-card 等页面级按钮与弹窗按钮圆角完全一致,修复页面场景与 dialog 不统一问题。
|
|
19
|
+
|
|
7
20
|
## [1.8.7] - 2026-05-17
|
|
8
21
|
|
|
9
22
|
### Added
|
package/README.md
CHANGED
package/design/tokens/base.css
CHANGED
|
@@ -117,7 +117,7 @@
|
|
|
117
117
|
--el-box-shadow-light: 0px 4px 10px 0px rgba(0, 0, 0, 0.1);
|
|
118
118
|
--el-box-shadow-lighter: 0px 6px 12px 0px rgba(0, 0, 0, 0.12);
|
|
119
119
|
--el-box-shadow-dark: 0px 16px 48px 16px rgba(0, 0, 0, 0.08), 0px 12px 32px rgba(0, 0, 0, 0.12), 0px 8px 16px -8px rgba(0, 0, 0, 0.16);
|
|
120
|
-
--el-border-radius-base:
|
|
120
|
+
--el-border-radius-base: 6px;
|
|
121
121
|
--el-border-radius-small: 2px;
|
|
122
122
|
--el-border-radius-round: 20px;
|
|
123
123
|
--el-border-radius-circle: 100%;
|
package/dist/tokens.css
CHANGED
|
@@ -117,7 +117,7 @@
|
|
|
117
117
|
--el-box-shadow-light: 0px 4px 10px 0px rgba(0, 0, 0, 0.1);
|
|
118
118
|
--el-box-shadow-lighter: 0px 6px 12px 0px rgba(0, 0, 0, 0.12);
|
|
119
119
|
--el-box-shadow-dark: 0px 16px 48px 16px rgba(0, 0, 0, 0.08), 0px 12px 32px rgba(0, 0, 0, 0.12), 0px 8px 16px -8px rgba(0, 0, 0, 0.16);
|
|
120
|
-
--el-border-radius-base:
|
|
120
|
+
--el-border-radius-base: 6px;
|
|
121
121
|
--el-border-radius-small: 2px;
|
|
122
122
|
--el-border-radius-round: 20px;
|
|
123
123
|
--el-border-radius-circle: 100%;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agile-team/wl-skills-ui",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.9",
|
|
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",
|
|
@@ -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
|
];
|
package/standards/rules.json
CHANGED
|
@@ -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
|
}
|
package/styles/tokens/index.scss
CHANGED
|
@@ -203,7 +203,7 @@ $wk-sidebar-width: var(--el-sidebar-width) !default;
|
|
|
203
203
|
--el-box-shadow-light: 0px 4px 10px 0px rgba(0, 0, 0, 0.1);
|
|
204
204
|
--el-box-shadow-lighter: 0px 6px 12px 0px rgba(0, 0, 0, 0.12);
|
|
205
205
|
--el-box-shadow-dark: 0px 16px 48px 16px rgba(0, 0, 0, 0.08), 0px 12px 32px rgba(0, 0, 0, 0.12), 0px 8px 16px -8px rgba(0, 0, 0, 0.16);
|
|
206
|
-
--el-border-radius-base:
|
|
206
|
+
--el-border-radius-base: 6px;
|
|
207
207
|
--el-border-radius-small: 2px;
|
|
208
208
|
--el-border-radius-round: 20px;
|
|
209
209
|
--el-border-radius-circle: 100%;
|
|
@@ -227,4 +227,4 @@ $wk-sidebar-width: var(--el-sidebar-width) !default;
|
|
|
227
227
|
--el-sidebar-width: 240px;
|
|
228
228
|
--el-menu-item-font-size: 16px;
|
|
229
229
|
--el-menu-item-height: 40px;
|
|
230
|
-
}
|
|
230
|
+
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
// 维护:只改这一个文件,全项目生效
|
|
5
5
|
//
|
|
6
6
|
// 【设计语言】
|
|
7
|
-
// - 输入框:圆角
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
286
|
-
|
|
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:
|
|
291
|
-
|
|
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:
|
|
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;
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
// 页码按钮
|
|
10
10
|
.el-pager .number {
|
|
11
|
-
border-radius:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
76
|
+
border-radius: var(--el-border-radius-small) !important;
|
|
77
77
|
height: 26px;
|
|
78
78
|
}
|
|
79
79
|
.el-input__inner { font-size: 12px; }
|
|
@@ -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:
|
|
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:
|
|
90
|
+
border-radius: var(--el-border-radius-base);
|
|
91
91
|
}
|
|
92
92
|
|
|
93
93
|
// 6) 必填星号兼容 jh-ui label 结构
|