@agile-team/wl-skills-ui 1.8.9 → 1.8.13
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 +8 -0
- package/README.md +4 -2
- package/package.json +2 -2
- package/skills/vendors/jh-components/SKILL.md +3 -3
- package/standards/ui/03-form.md +24 -0
- package/styles/element/_form.scss +21 -1
- package/styles/vendors/_base-components.scss +65 -3
- package/styles/vendors/_jh-ui.scss +23 -6
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,14 @@ 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.13] - 2026-05-21
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- **表单间距统一**:label 与右侧 Element Plus / jh-* 单行控件间距统一为 `--wk-form-label-control-gap: 16px`,避免 22px / 26px / 28px 混杂。
|
|
12
|
+
- **表单高度统一**:input / select / date-picker / cascader / input-number / autocomplete 等单行控件统一为 `--wk-form-control-height: 26px`,textarea 不强制固定高度。
|
|
13
|
+
- **label 冒号统一**:屏蔽 `@jhlc/jh-ui` 的 `.has-colon .com-text::after` 冒号注入,picker / select / input label 不再出现有的带冒号、有的不带冒号。
|
|
14
|
+
|
|
7
15
|
## [1.8.9] - 2026-05-17
|
|
8
16
|
|
|
9
17
|
### Improved
|
package/README.md
CHANGED
|
@@ -198,7 +198,7 @@ yarn add @agile-team/wl-skills-ui
|
|
|
198
198
|
| 依赖 | 推荐版本 | 备注 |
|
|
199
199
|
|---|---|---|
|
|
200
200
|
| `element-plus` | **`2.2.6-prod.3`** | 集团 jh- 定制版;EP 2.3.0 起引入 `.el-input__wrapper`,与 jh-ui 3.x 不兼容 |
|
|
201
|
-
| `@jhlc/jh-ui` | **`3.1.0`** | SCSS 皮肤包,`.com-text` label 包裹 + `.has-colon`
|
|
201
|
+
| `@jhlc/jh-ui` | **`3.1.0`** | SCSS 皮肤包,`.com-text` label 包裹 + `.has-colon` 冒号注入(wl-skills-ui 已统一屏蔽表单冒号) |
|
|
202
202
|
| `@agile-team/wl-skills-ui` | `^1.7.0` | 已对齐上述组合的 DOM 假设 |
|
|
203
203
|
|
|
204
204
|
三种识别方式,任选其一:
|
|
@@ -213,8 +213,10 @@ yarn add @agile-team/wl-skills-ui
|
|
|
213
213
|
|
|
214
214
|
## 版本亮点
|
|
215
215
|
|
|
216
|
-
当前 v1.8.
|
|
216
|
+
当前 v1.8.13:
|
|
217
217
|
|
|
218
|
+
- **表单密度统一**:label 与右侧控件间距统一 16px,单行 input / select / picker / jh-* 控件高度统一 26px
|
|
219
|
+
- **label 冒号统一**:屏蔽 jh-ui `.has-colon .com-text::after` 冒号注入,picker / select / input 不再有的带冒号、有的不带冒号
|
|
218
220
|
- **loading 遮罩质感优化**:BaseTable / AG Grid 的 v-loading 由灰色蒙层改为毛玻璃半透明(backdrop-filter),数据切换无感
|
|
219
221
|
- **R027** 检测业务代码硬编码 `.el-loading-mask` 背景色 → 提示删除,由包统一覆盖
|
|
220
222
|
- **R025** 语义合规:`options:[]` 退化检测 → 升级 `renderTagSlot` / `renderDictClassifyTag`
|
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.13",
|
|
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
|
+
}
|
|
@@ -29,8 +29,8 @@ applyTo: "**/*.vue"
|
|
|
29
29
|
|
|
30
30
|
项目同时安装 `@jhlc/jh-ui` 与 `element-plus@2.2.x` 时,输入控件 DOM 为 `.el-input > .el-input__inner`(**无 `.el-input__wrapper`**,EP 2.3.0 起才引入),表单 label 文本被包成 `<span class="com-text">`,并由 `.has-colon .com-text::after` 注入冒号。`_jh-ui.scss` 已精准覆盖:
|
|
31
31
|
|
|
32
|
-
- label `.com-text` 单行省略 + has-colon
|
|
33
|
-
- EP 2.2.x `.el-input__inner`
|
|
32
|
+
- label `.com-text` 单行省略 + has-colon 冒号屏蔽
|
|
33
|
+
- EP 2.2.x `.el-input__inner` 26px 高度、圆角 / focus / error 三态
|
|
34
34
|
- jh-select / jh-date-picker 的 `.el-select.is-focus` / `.el-input.is-focus` 兼容
|
|
35
35
|
- 必填星号在 inline-flex label 下显式声明颜色
|
|
36
36
|
|
|
@@ -38,7 +38,7 @@ applyTo: "**/*.vue"
|
|
|
38
38
|
|
|
39
39
|
- ❌ 在 jh-ui 项目里用 `.el-input__wrapper.is-focus` —— EP 2.2.x 没有 `__wrapper`,规则永不生效。
|
|
40
40
|
- ❌ 直接给 `.el-form-item__label` 写 `text-overflow: ellipsis` —— jh-ui 把它设为 `inline-flex`,文本在 `.com-text` 里,省略不会触发。
|
|
41
|
-
- ❌ 给 `.el-form-item__label` 加 `padding-right` 期望腾出冒号位 ——
|
|
41
|
+
- ❌ 给 `.el-form-item__label` 加 `padding-right` 期望腾出冒号位 —— 表单 label 不强制冒号,`.has-colon .com-text::after` 已由 `_jh-ui.scss` 统一屏蔽。
|
|
42
42
|
- ❌ 在不确定 EP 版本的情况下下笔修复 —— 必须先跑 `wl_ui_detect_skin` 或 `wl-ui check` 看 I005 结果。
|
|
43
43
|
|
|
44
44
|
## Diagnose
|
package/standards/ui/03-form.md
CHANGED
|
@@ -56,6 +56,30 @@ date-picker 默认宽度固定,在 grid 布局中需撑满列宽:
|
|
|
56
56
|
|
|
57
57
|
---
|
|
58
58
|
|
|
59
|
+
## 规则:label 与控件间距、单行控件高度必须统一
|
|
60
|
+
|
|
61
|
+
左侧 label 与右侧输入、选择、日期、数字输入、级联、自动完成等单行控件的横向间距统一为:
|
|
62
|
+
|
|
63
|
+
```scss
|
|
64
|
+
--wk-form-label-control-gap: 16px;
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
单行表单控件高度统一为:
|
|
68
|
+
|
|
69
|
+
```scss
|
|
70
|
+
--wk-form-control-height: 26px;
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
textarea 不强制 26px 高度,只继承统一圆角、字体和状态样式。
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## 规则:表单 label 不强制冒号
|
|
78
|
+
|
|
79
|
+
Element Plus 原生控件、picker 类控件和 jh-* 封装控件的 label 后不强制追加 `:`。`@jhlc/jh-ui` 的 `.has-colon .com-text::after` 冒号注入由 wl-skills-ui 统一屏蔽,避免 input / select / picker 之间出现有的带冒号、有的不带冒号。
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
59
83
|
## 布局标准
|
|
60
84
|
|
|
61
85
|
### 搜索区(列表页顶部)
|
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
html body {
|
|
4
4
|
--wk-form-control-radius: var(--el-border-radius-base, 6px);
|
|
5
|
+
--wk-form-control-height: 26px;
|
|
6
|
+
--wk-form-label-control-gap: 16px;
|
|
7
|
+
--wk-form-label-line-height: 22px;
|
|
5
8
|
}
|
|
6
9
|
|
|
7
10
|
html body .el-form-item--small {
|
|
@@ -14,6 +17,9 @@ html body .is-error.el-form-item--small {
|
|
|
14
17
|
}
|
|
15
18
|
|
|
16
19
|
// ── 全局输入框圆角统一(6px,与搜索区保持一致)──────────────────────────────
|
|
20
|
+
html body .el-form:not(.el-form--label-top) .el-form-item__label {
|
|
21
|
+
padding-right: var(--wk-form-label-control-gap) !important;
|
|
22
|
+
}
|
|
17
23
|
html body .el-input__wrapper,
|
|
18
24
|
html body .el-select__wrapper,
|
|
19
25
|
html body .el-select .el-select__wrapper,
|
|
@@ -21,7 +27,21 @@ html body .el-date-editor.el-input__wrapper,
|
|
|
21
27
|
html body .el-date-editor .el-input__wrapper,
|
|
22
28
|
html body .el-input-number .el-input__wrapper,
|
|
23
29
|
html body .el-cascader .el-input__wrapper,
|
|
24
|
-
html body .el-autocomplete .el-input__wrapper
|
|
30
|
+
html body .el-autocomplete .el-input__wrapper {
|
|
31
|
+
height: var(--wk-form-control-height) !important;
|
|
32
|
+
min-height: var(--wk-form-control-height) !important;
|
|
33
|
+
border-radius: var(--wk-form-control-radius) !important;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
html body .el-input__inner,
|
|
37
|
+
html body .el-select__selected-item,
|
|
38
|
+
html body .el-date-editor .el-input__inner,
|
|
39
|
+
html body .el-input-number .el-input__inner,
|
|
40
|
+
html body .el-cascader .el-input__inner,
|
|
41
|
+
html body .el-autocomplete .el-input__inner {
|
|
42
|
+
height: calc(var(--wk-form-control-height) - 2px) !important;
|
|
43
|
+
line-height: calc(var(--wk-form-control-height) - 2px) !important;
|
|
44
|
+
}
|
|
25
45
|
html body .el-textarea__inner {
|
|
26
46
|
border-radius: var(--wk-form-control-radius) !important;
|
|
27
47
|
}
|
|
@@ -510,24 +510,86 @@
|
|
|
510
510
|
|
|
511
511
|
// 必填星号:只保留一颗 — 默认 asterisk-left(::before),asterisk-right 用 ::after
|
|
512
512
|
// 旧写法同时 display:inline-block 两个伪元素导致 * * 重复
|
|
513
|
-
.el-form
|
|
513
|
+
html body .el-form.el-form--label-left .el-form-item__label,
|
|
514
|
+
html body .el-form.el-form--label-right .el-form-item__label {
|
|
515
|
+
align-items: baseline !important;
|
|
516
|
+
font-size: 12px !important;
|
|
517
|
+
line-height: var(--wk-form-label-line-height, 22px) !important;
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
html body .el-form.el-form--label-left .el-form-item__label>.com-text,
|
|
521
|
+
html body .el-form.el-form--label-right .el-form-item__label>.com-text {
|
|
522
|
+
font-size: 12px !important;
|
|
523
|
+
line-height: var(--wk-form-label-line-height, 22px) !important;
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
.el-form-item.is-required:not(.is-no-asterisk)>.el-form-item__label::before,
|
|
527
|
+
html body .el-form.el-form--label-left .el-form-item.is-required:not(.is-no-asterisk)>.el-form-item__label::before,
|
|
528
|
+
html body .el-form.el-form--label-right .el-form-item.is-required:not(.is-no-asterisk)>.el-form-item__label::before {
|
|
529
|
+
content: "*" !important;
|
|
530
|
+
color: var(--el-color-danger, #f56c6c) !important;
|
|
531
|
+
font-size: 12px !important;
|
|
532
|
+
font-weight: 400 !important;
|
|
533
|
+
line-height: var(--wk-form-label-line-height, 22px) !important;
|
|
534
|
+
display: inline-block !important;
|
|
535
|
+
margin-right: 2px !important;
|
|
536
|
+
vertical-align: baseline !important;
|
|
537
|
+
position: relative !important;
|
|
538
|
+
top: 0 !important;
|
|
539
|
+
align-self: baseline !important;
|
|
540
|
+
}
|
|
541
|
+
.el-form-item.is-required:not(.is-no-asterisk)>.el-form-item__label>.com-text::before,
|
|
542
|
+
html body .el-form.el-form--label-left .el-form-item.is-required:not(.is-no-asterisk)>.el-form-item__label>.com-text::before,
|
|
543
|
+
html body .el-form.el-form--label-right .el-form-item.is-required:not(.is-no-asterisk)>.el-form-item__label>.com-text::before {
|
|
544
|
+
content: "*" !important;
|
|
514
545
|
color: var(--el-color-danger, #f56c6c) !important;
|
|
546
|
+
font-size: 12px !important;
|
|
547
|
+
font-weight: 400 !important;
|
|
548
|
+
line-height: var(--wk-form-label-line-height, 22px) !important;
|
|
515
549
|
display: inline-block !important;
|
|
550
|
+
margin-right: 2px !important;
|
|
551
|
+
vertical-align: baseline !important;
|
|
552
|
+
position: relative !important;
|
|
553
|
+
top: 0 !important;
|
|
554
|
+
align-self: baseline !important;
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
.el-form-item.is-required:not(.is-no-asterisk)>.el-form-item__label:has(>.com-text)::before,
|
|
558
|
+
html body .el-form .el-form-item.is-required:not(.is-no-asterisk)>.el-form-item__label:has(>.com-text)::before {
|
|
559
|
+
display: none !important;
|
|
516
560
|
}
|
|
561
|
+
|
|
517
562
|
// asterisk-right 模式:显示 ::after,隐藏 ::before
|
|
518
|
-
.el-form-item.is-required:not(.is-no-asterisk).asterisk-right>.el-form-item__label::before
|
|
563
|
+
.el-form-item.is-required:not(.is-no-asterisk).asterisk-right>.el-form-item__label::before,
|
|
564
|
+
.el-form-item.is-required:not(.is-no-asterisk).asterisk-right>.el-form-item__label>.com-text::before {
|
|
519
565
|
display: none !important;
|
|
520
566
|
}
|
|
521
567
|
|
|
522
|
-
.el-form-item.is-required:not(.is-no-asterisk).asterisk-right>.el-form-item__label::after
|
|
568
|
+
.el-form-item.is-required:not(.is-no-asterisk).asterisk-right>.el-form-item__label::after,
|
|
569
|
+
html body .el-form.el-form--label-left .el-form-item.is-required:not(.is-no-asterisk).asterisk-right>.el-form-item__label::after,
|
|
570
|
+
html body .el-form.el-form--label-right .el-form-item.is-required:not(.is-no-asterisk).asterisk-right>.el-form-item__label::after {
|
|
571
|
+
content: "*" !important;
|
|
523
572
|
color: var(--el-color-danger, #f56c6c) !important;
|
|
573
|
+
font-size: 12px !important;
|
|
574
|
+
font-weight: 400 !important;
|
|
575
|
+
line-height: var(--wk-form-label-line-height, 22px) !important;
|
|
524
576
|
display: inline-block !important;
|
|
577
|
+
margin-left: 2px !important;
|
|
578
|
+
vertical-align: baseline !important;
|
|
579
|
+
position: relative !important;
|
|
580
|
+
top: 0 !important;
|
|
581
|
+
align-self: baseline !important;
|
|
525
582
|
}
|
|
526
583
|
|
|
527
584
|
// 默认模式:隐藏 ::after 防止重复星号
|
|
528
585
|
.el-form-item.is-required:not(.is-no-asterisk):not(.asterisk-right)>.el-form-item__label::after {
|
|
529
586
|
display: none !important;
|
|
530
587
|
}
|
|
588
|
+
.el-form-item.is-required.is-no-asterisk>.el-form-item__label::before,
|
|
589
|
+
.el-form-item.is-required.is-no-asterisk>.el-form-item__label::after,
|
|
590
|
+
.el-form-item.is-required.is-no-asterisk>.el-form-item__label>.com-text::before {
|
|
591
|
+
display: none !important;
|
|
592
|
+
}
|
|
531
593
|
|
|
532
594
|
.el-form-item.is-error {
|
|
533
595
|
.el-form-item__label,
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
// `.el-form-item__label` 自身是 `display: inline-flex`。
|
|
11
11
|
// → 直接在 label 上写 ellipsis 不生效,必须落到 `.com-text`。
|
|
12
12
|
// 2. `.has-colon .el-form-item__label .com-text::after` 注入冒号。
|
|
13
|
-
// →
|
|
13
|
+
// → wl-skills-ui 统一隐藏冒号,避免 picker / select / input label 风格不一致。
|
|
14
14
|
// 3. 输入控件 DOM 为 `.el-input > .el-input__inner`(无 `.el-input__wrapper`)。
|
|
15
15
|
// → focus / error 必须命中 `.el-input__inner`,
|
|
16
16
|
// `.el-input__wrapper.is-focus` 这类 EP 2.6+ 规则在这里不生效。
|
|
@@ -44,17 +44,28 @@
|
|
|
44
44
|
vertical-align: middle;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
// has-colon 模式下,.com-text::after 注入冒号,
|
|
48
|
-
// 给一点 padding 避免冒号被 ellipsis 裁掉
|
|
49
47
|
.has-colon .el-form-item__label > .com-text,
|
|
50
48
|
.has-colon .el-form-item__label .com-text {
|
|
51
|
-
padding-right:
|
|
49
|
+
padding-right: 0;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.has-colon .el-form-item__label>.com-text::after,
|
|
53
|
+
.has-colon .el-form-item__label .com-text::after {
|
|
54
|
+
content: "" !important;
|
|
55
|
+
display: none !important;
|
|
52
56
|
}
|
|
53
57
|
|
|
54
58
|
// 2) Element Plus 2.2.x 输入控件统一圆角(无 .el-input__wrapper)
|
|
55
59
|
.el-input > .el-input__inner,
|
|
56
|
-
.el-
|
|
57
|
-
.el-
|
|
60
|
+
.el-date-editor>.el-input__inner,
|
|
61
|
+
.el-select .el-input>.el-input__inner {
|
|
62
|
+
height: var(--wk-form-control-height, 26px);
|
|
63
|
+
line-height: var(--wk-form-control-height, 26px);
|
|
64
|
+
border-radius: var(--el-border-radius-base);
|
|
65
|
+
transition: box-shadow 0.15s ease, border-color 0.15s ease;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.el-textarea>.el-textarea__inner {
|
|
58
69
|
border-radius: var(--el-border-radius-base);
|
|
59
70
|
transition: box-shadow 0.15s ease, border-color 0.15s ease;
|
|
60
71
|
}
|
|
@@ -85,6 +96,12 @@
|
|
|
85
96
|
// 保留 jh-ui 自身 margin-bottom、has-tip 间距,不覆盖;
|
|
86
97
|
// 仅对齐内部输入控件圆角,避免在 wrapper 内 fallback 成方角。
|
|
87
98
|
.com-input > .el-input > .el-input__inner,
|
|
99
|
+
.com-input>.el-select .el-input>.el-input__inner,
|
|
100
|
+
.com-input>.el-date-editor>.el-input__inner {
|
|
101
|
+
height: var(--wk-form-control-height, 26px);
|
|
102
|
+
line-height: var(--wk-form-control-height, 26px);
|
|
103
|
+
border-radius: var(--el-border-radius-base);
|
|
104
|
+
}
|
|
88
105
|
.com-input > .el-textarea > .el-textarea__inner,
|
|
89
106
|
.com-textarea > .el-textarea > .el-textarea__inner {
|
|
90
107
|
border-radius: var(--el-border-radius-base);
|