@agile-team/wl-skills-ui 1.9.2 → 1.9.3
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 +16 -2
- package/docs/compat-matrix.md +2 -2
- package/package.json +1 -1
- package/styles/_scope.scss +8 -0
- package/styles/element/_button.scss +44 -42
- package/styles/element/_form.scss +40 -34
- package/styles/vendors/_base-components.scss +128 -121
- package/styles/vendors/_jh-ui.scss +137 -141
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.9.3] - 2026-07-22
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- 登录页 `.lp-root` 与二次登录 `.session-login` 退出高权重表单、按钮和 jh-ui 组件化妆,恢复各登录页自身的高度、圆角、配色、焦点态与校验态,不再被业务页紧凑规则压制。
|
|
12
|
+
- 新增 `.wl-ui-skin-exempt` / `[data-wl-ui-skin="off"]` 通用定制页边界;边界内仅停用组件级强覆盖,边界外业务页面仍保持包内样式最高优先级,品牌主题锁继续全局生效。
|
|
13
|
+
- 将豁免贯穿 Element Plus 新旧输入 DOM、主按钮、textarea、必填标记及 jh-ui picker 适配,避免只恢复默认态、聚焦或报错后再次被覆盖。
|
|
14
|
+
|
|
7
15
|
## [1.9.2] - 2026-07-21
|
|
8
16
|
|
|
9
17
|
### Fixed
|
package/README.md
CHANGED
|
@@ -200,7 +200,7 @@ yarn add @agile-team/wl-skills-ui
|
|
|
200
200
|
|---|---|---|
|
|
201
201
|
| `element-plus` | **`2.2.6-prod.3`** | 集团 jh- 定制版;EP 2.3.0 起引入 `.el-input__wrapper`,与 jh-ui 3.x 不兼容 |
|
|
202
202
|
| `@jhlc/jh-ui` | **`3.1.0`** | SCSS 皮肤包,`.com-text` label 包裹 + `.has-colon` 冒号注入(wl-skills-ui 已统一屏蔽表单冒号) |
|
|
203
|
-
| `@agile-team/wl-skills-ui` | `^1.9.
|
|
203
|
+
| `@agile-team/wl-skills-ui` | `^1.9.3` | 已对齐上述组合的 DOM 假设、客户主题锁、圆角契约与定制页样式边界 |
|
|
204
204
|
|
|
205
205
|
三种识别方式,任选其一:
|
|
206
206
|
|
|
@@ -214,7 +214,21 @@ yarn add @agile-team/wl-skills-ui
|
|
|
214
214
|
|
|
215
215
|
## 版本亮点
|
|
216
216
|
|
|
217
|
-
当前 v1.9.
|
|
217
|
+
当前 v1.9.3:
|
|
218
|
+
|
|
219
|
+
- **登录页精准退出**:内置识别 `.lp-root` 与 `.session-login`,其内部表单、按钮、焦点和校验态保留登录页自身设计;业务页面仍由包高权重统一管控。
|
|
220
|
+
- **通用定制页边界**:其他定制页在根节点增加 `.wl-ui-skin-exempt` 或 `data-wl-ui-skin="off"` 即可退出组件级强覆盖,不需要删除全局化妆包。
|
|
221
|
+
- **主题锁不降级**:豁免只作用于 Element Plus / vendor 的直接组件覆盖;全局客户品牌 token 和平台动态主题防反覆盖继续生效。定制页若需独立色,可在自己的根节点重新声明 token 或直接编写局部样式。
|
|
222
|
+
|
|
223
|
+
```vue
|
|
224
|
+
<template>
|
|
225
|
+
<main class="wl-ui-skin-exempt">
|
|
226
|
+
<!-- 登录、大屏等定制内容 -->
|
|
227
|
+
</main>
|
|
228
|
+
</template>
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
上一版 v1.9.2:
|
|
218
232
|
|
|
219
233
|
- **动态主题不可反覆盖**:品牌色、功能色和圆角使用 CSS `!important` + runtime `MutationObserver` 双保险;平台登录后写入 `document.body.style` 也会立即恢复为包内规范值。
|
|
220
234
|
- **圆角契约恢复**:按钮、输入框等基础控件统一 `6px`,不再回退到 jh-ui 的 `2px`;圆形、胶囊、按钮组仍保留各自语义。
|
package/docs/compat-matrix.md
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
| `element-plus` | **`2.2.6-prod.3`** | 集团 jh- 定制版,搭配 `@jhlc/jh-ui` 使用,DOM 仍为 `.el-input > .el-input__inner` 直挂结构(**EP 2.3.0 起才引入 `.el-input__wrapper`**) |
|
|
12
12
|
| `@jhlc/jh-ui` | **`3.1.0`** | SCSS 皮肤包,`.com-text` label 包裹、`.has-colon ::after` 冒号注入、`.el-form-item--default { margin-bottom: 24px }` 等强约束 |
|
|
13
13
|
| `@jhlc/common-core` | `3.1.0` 或 `3.1.0-prod.x` | 基础 util/types,`@jhlc/jh-ui` 间接依赖 |
|
|
14
|
-
| `@agile-team/wl-skills-ui` | `^1.9.
|
|
14
|
+
| `@agile-team/wl-skills-ui` | `^1.9.3` | 已对齐 jh-ui 3.1.0 + EP 2.2.6-prod.3 的 DOM 假设、客户主题锁、6px 基础圆角与定制页样式边界 |
|
|
15
15
|
|
|
16
16
|
## 项目集群当前实测
|
|
17
17
|
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
|
|
36
36
|
## 适配建议
|
|
37
37
|
|
|
38
|
-
- 集团内项目:**统一锚定 `element-plus@2.2.6-prod.3` + `@jhlc/jh-ui@3.1.0`**,与 wl-skills-ui v1.9.
|
|
38
|
+
- 集团内项目:**统一锚定 `element-plus@2.2.6-prod.3` + `@jhlc/jh-ui@3.1.0`**,与 wl-skills-ui v1.9.3 三方对齐。
|
|
39
39
|
- 升级 `element-plus` 到 2.3+ 前,必须同步升级 `@jhlc/jh-ui` 到对应支持版本,否则 `.com-text` / `.el-input__inner` DOM 与 EP `__wrapper` 体系不兼容。
|
|
40
40
|
- 新项目接入:见 README 「快速接入」章节,默认会按本表声明 peerDependency 范围。
|
|
41
41
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agile-team/wl-skills-ui",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.3",
|
|
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",
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// Component-level skin rules are intentionally strict on business pages, but
|
|
2
|
+
// custom presentation pages (login, large screens, etc.) must be able to keep
|
|
3
|
+
// their own component geometry and colors.
|
|
4
|
+
//
|
|
5
|
+
// Brand tokens remain globally locked. This selector only limits the direct
|
|
6
|
+
// Element Plus / vendor component overrides that use high specificity or
|
|
7
|
+
// !important.
|
|
8
|
+
$managed-scope-selector: "html body :not(:where(.lp-root, .lp-root *, .session-login, .session-login *, .wl-ui-skin-exempt, .wl-ui-skin-exempt *, [data-wl-ui-skin='off'], [data-wl-ui-skin='off'] *))";
|
|
@@ -3,54 +3,56 @@
|
|
|
3
3
|
// 使用 html body 提升组件覆盖特异性;品牌 token 由 L0 + runtime 双层锁定,
|
|
4
4
|
// 填充按钮同时以 !important 抵御 jh-ui/业务旧皮肤硬编码。
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
border-radius: var(--el-border-radius-base, 6px) !important;
|
|
8
|
-
}
|
|
6
|
+
@use "../scope" as skin;
|
|
9
7
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
#{skin.$managed-scope-selector} {
|
|
9
|
+
&.el-button:not(.is-round):not(.is-circle) {
|
|
10
|
+
border-radius: var(--el-border-radius-base, 6px) !important;
|
|
11
|
+
}
|
|
13
12
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
13
|
+
&.el-button.is-round {
|
|
14
|
+
border-radius: var(--el-border-radius-round, 20px) !important;
|
|
15
|
+
}
|
|
17
16
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
--el-button-hover-bg-color: var(--el-color-primary-light-1);
|
|
22
|
-
--el-button-hover-border-color: var(--el-color-primary-light-1);
|
|
23
|
-
--el-button-active-color: var(--el-color-primary-dark-1);
|
|
24
|
-
--el-button-active-bg-color: var(--el-color-primary-dark-1);
|
|
25
|
-
--el-button-active-border-color: var(--el-color-primary-dark-1);
|
|
26
|
-
--el-button-disabled-bg-color: var(--el-color-primary-light-7);
|
|
27
|
-
--el-button-disabled-border-color: var(--el-color-primary-light-7);
|
|
28
|
-
--el-button-outline-color: var(--el-color-primary-light-5);
|
|
29
|
-
}
|
|
17
|
+
&.el-button.is-circle {
|
|
18
|
+
border-radius: var(--el-border-radius-circle, 100%) !important;
|
|
19
|
+
}
|
|
30
20
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
border-color: var(--el-color-primary-light-
|
|
41
|
-
|
|
21
|
+
&.el-button--primary {
|
|
22
|
+
--el-button-bg-color: var(--el-color-primary);
|
|
23
|
+
--el-button-border-color: var(--el-color-primary);
|
|
24
|
+
--el-button-hover-bg-color: var(--el-color-primary-light-1);
|
|
25
|
+
--el-button-hover-border-color: var(--el-color-primary-light-1);
|
|
26
|
+
--el-button-active-color: var(--el-color-primary-dark-1);
|
|
27
|
+
--el-button-active-bg-color: var(--el-color-primary-dark-1);
|
|
28
|
+
--el-button-active-border-color: var(--el-color-primary-dark-1);
|
|
29
|
+
--el-button-disabled-bg-color: var(--el-color-primary-light-7);
|
|
30
|
+
--el-button-disabled-border-color: var(--el-color-primary-light-7);
|
|
31
|
+
--el-button-outline-color: var(--el-color-primary-light-5);
|
|
42
32
|
}
|
|
43
33
|
|
|
44
|
-
|
|
45
|
-
background-color: var(--el-color-primary
|
|
46
|
-
border-color: var(--el-color-primary
|
|
47
|
-
box-shadow: 0 1px 2px rgba(var(--el-color-primary-rgb), 0.
|
|
34
|
+
&.el-button.el-button--primary:not(.is-link):not(.is-text):not(.is-plain):not(.is-disabled) {
|
|
35
|
+
background-color: var(--el-color-primary) !important;
|
|
36
|
+
border-color: var(--el-color-primary) !important;
|
|
37
|
+
box-shadow: 0 1px 2px rgba(var(--el-color-primary-rgb), 0.16);
|
|
38
|
+
|
|
39
|
+
&:hover,
|
|
40
|
+
&:focus {
|
|
41
|
+
background-color: var(--el-color-primary-light-1) !important;
|
|
42
|
+
border-color: var(--el-color-primary-light-1) !important;
|
|
43
|
+
box-shadow: 0 2px 6px rgba(var(--el-color-primary-rgb), 0.2);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&:active {
|
|
47
|
+
background-color: var(--el-color-primary-dark-1) !important;
|
|
48
|
+
border-color: var(--el-color-primary-dark-1) !important;
|
|
49
|
+
box-shadow: 0 1px 2px rgba(var(--el-color-primary-rgb), 0.14);
|
|
50
|
+
}
|
|
48
51
|
}
|
|
49
|
-
}
|
|
50
52
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
53
|
+
&.el-button.el-button--primary.is-disabled:not(.is-link):not(.is-text):not(.is-plain) {
|
|
54
|
+
background-color: var(--el-color-primary-light-7) !important;
|
|
55
|
+
border-color: var(--el-color-primary-light-7) !important;
|
|
56
|
+
box-shadow: none !important;
|
|
57
|
+
}
|
|
56
58
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
// styles/element/_form.scss — el-form / el-input 覆盖
|
|
2
2
|
|
|
3
|
+
@use "../scope" as skin;
|
|
4
|
+
|
|
3
5
|
html body {
|
|
4
6
|
--wk-form-control-radius: var(--el-border-radius-base, 6px);
|
|
5
7
|
--wk-form-control-height: 26px;
|
|
@@ -7,41 +9,45 @@ html body {
|
|
|
7
9
|
--wk-form-label-line-height: 22px;
|
|
8
10
|
}
|
|
9
11
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
12
|
+
#{skin.$managed-scope-selector} {
|
|
13
|
+
&.el-form-item--small {
|
|
14
|
+
margin-bottom: 8px;
|
|
15
|
+
}
|
|
13
16
|
|
|
14
|
-
// 解决 el-form-item 出现错误提示时底部 margin 增加的问题
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
17
|
+
// 解决 el-form-item 出现错误提示时底部 margin 增加的问题
|
|
18
|
+
&.is-error.el-form-item--small {
|
|
19
|
+
margin-bottom: 18px !important;
|
|
20
|
+
}
|
|
18
21
|
|
|
19
|
-
// ── 全局输入框圆角统一(6px
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
html body .el-input__wrapper,
|
|
24
|
-
html body .el-select__wrapper,
|
|
25
|
-
html body .el-select .el-select__wrapper,
|
|
26
|
-
html body .el-date-editor.el-input__wrapper,
|
|
27
|
-
html body .el-date-editor .el-input__wrapper,
|
|
28
|
-
html body .el-input-number .el-input__wrapper,
|
|
29
|
-
html body .el-cascader .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
|
-
}
|
|
22
|
+
// ── 全局输入框圆角统一(6px,与搜索区保持一致)────────────────────────────
|
|
23
|
+
&.el-form:not(.el-form--label-top) .el-form-item__label {
|
|
24
|
+
padding-right: var(--wk-form-label-control-gap) !important;
|
|
25
|
+
}
|
|
35
26
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
27
|
+
&.el-input__wrapper,
|
|
28
|
+
&.el-select__wrapper,
|
|
29
|
+
&.el-select .el-select__wrapper,
|
|
30
|
+
&.el-date-editor.el-input__wrapper,
|
|
31
|
+
&.el-date-editor .el-input__wrapper,
|
|
32
|
+
&.el-input-number .el-input__wrapper,
|
|
33
|
+
&.el-cascader .el-input__wrapper,
|
|
34
|
+
&.el-autocomplete .el-input__wrapper {
|
|
35
|
+
height: var(--wk-form-control-height) !important;
|
|
36
|
+
min-height: var(--wk-form-control-height) !important;
|
|
37
|
+
border-radius: var(--wk-form-control-radius) !important;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&.el-input__inner,
|
|
41
|
+
&.el-select__selected-item,
|
|
42
|
+
&.el-date-editor .el-input__inner,
|
|
43
|
+
&.el-input-number .el-input__inner,
|
|
44
|
+
&.el-cascader .el-input__inner,
|
|
45
|
+
&.el-autocomplete .el-input__inner {
|
|
46
|
+
height: calc(var(--wk-form-control-height) - 2px) !important;
|
|
47
|
+
line-height: calc(var(--wk-form-control-height) - 2px) !important;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
&.el-textarea__inner {
|
|
51
|
+
border-radius: var(--wk-form-control-radius) !important;
|
|
52
|
+
}
|
|
47
53
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
@use "../scope" as skin;
|
|
2
|
+
|
|
1
3
|
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
2
4
|
// 通用组件样式 — wl-ui-safe 统一设计规范
|
|
3
5
|
// 包含:操作按钮组、状态标签、徽标、兼容旧按钮
|
|
@@ -444,161 +446,166 @@
|
|
|
444
446
|
}
|
|
445
447
|
|
|
446
448
|
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
447
|
-
//
|
|
449
|
+
// 表单组件统一化妆(登录页 / 显式定制页除外)
|
|
448
450
|
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
451
|
+
#{skin.$managed-scope-selector} {
|
|
452
|
+
// el-textarea 编辑模式精致化
|
|
453
|
+
&.el-textarea {
|
|
454
|
+
.el-textarea__inner {
|
|
455
|
+
border-radius: 6px !important;
|
|
456
|
+
font-size: 13px !important;
|
|
457
|
+
line-height: 1.65 !important;
|
|
458
|
+
padding: 7px 10px !important;
|
|
459
|
+
resize: vertical !important; // 只允许垂直拉伸,不允许水平
|
|
460
|
+
transition: border-color 0.15s, box-shadow 0.15s;
|
|
461
|
+
|
|
462
|
+
&:hover:not(:focus) {
|
|
463
|
+
border-color: var(--el-border-color-hover, #c0c4cc) !important;
|
|
464
|
+
}
|
|
457
465
|
|
|
458
|
-
|
|
459
|
-
|
|
466
|
+
&:focus {
|
|
467
|
+
border-color: var(--el-color-primary) !important;
|
|
468
|
+
box-shadow: 0 0 0 2px rgba(var(--el-color-primary-rgb), 0.12) !important;
|
|
469
|
+
}
|
|
460
470
|
}
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
471
|
+
|
|
472
|
+
// 字数统计:更小、更淡、不遮挡内容
|
|
473
|
+
.el-input__count {
|
|
474
|
+
font-size: 10px !important;
|
|
475
|
+
color: #c0c4cc !important;
|
|
476
|
+
background: transparent !important;
|
|
477
|
+
line-height: 1 !important;
|
|
478
|
+
bottom: 5px !important;
|
|
479
|
+
right: 8px !important;
|
|
480
|
+
padding: 0 !important;
|
|
464
481
|
}
|
|
465
482
|
}
|
|
466
483
|
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
bottom: 5px !important;
|
|
474
|
-
right: 8px !important;
|
|
475
|
-
padding: 0 !important;
|
|
484
|
+
&.el-input__wrapper,
|
|
485
|
+
&.el-select__wrapper,
|
|
486
|
+
&.el-date-editor.el-input__wrapper,
|
|
487
|
+
&.el-textarea__inner {
|
|
488
|
+
border-radius: 6px !important;
|
|
489
|
+
transition: box-shadow 0.15s ease, border-color 0.15s ease;
|
|
476
490
|
}
|
|
477
|
-
}
|
|
478
491
|
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
.el-input__wrapper:focus-within,
|
|
490
|
-
.el-select__wrapper.is-focus,
|
|
491
|
-
.el-select__wrapper.is-focused,
|
|
492
|
-
.el-select__wrapper:focus-within,
|
|
493
|
-
.el-date-editor.el-input__wrapper.is-focus,
|
|
494
|
-
.el-date-editor.el-input__wrapper:focus-within,
|
|
495
|
-
.el-textarea__inner:focus {
|
|
496
|
-
box-shadow: 0 0 0 1.5px var(--el-color-primary, #002a8f) inset !important;
|
|
497
|
-
}
|
|
492
|
+
&.el-input__wrapper.is-focus,
|
|
493
|
+
&.el-input__wrapper:focus-within,
|
|
494
|
+
&.el-select__wrapper.is-focus,
|
|
495
|
+
&.el-select__wrapper.is-focused,
|
|
496
|
+
&.el-select__wrapper:focus-within,
|
|
497
|
+
&.el-date-editor.el-input__wrapper.is-focus,
|
|
498
|
+
&.el-date-editor.el-input__wrapper:focus-within,
|
|
499
|
+
&.el-textarea__inner:focus {
|
|
500
|
+
box-shadow: 0 0 0 1.5px var(--el-color-primary, #002a8f) inset !important;
|
|
501
|
+
}
|
|
498
502
|
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
[class*='base-form'] .el-form-item__label {
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
}
|
|
503
|
+
&.el-form-item__label,
|
|
504
|
+
&.base-query-box .el-form-item__label,
|
|
505
|
+
&[class*='base-form'] .el-form-item__label {
|
|
506
|
+
white-space: nowrap;
|
|
507
|
+
overflow: hidden;
|
|
508
|
+
text-overflow: ellipsis;
|
|
509
|
+
word-break: keep-all;
|
|
510
|
+
}
|
|
507
511
|
|
|
508
|
-
// 必填星号:只保留一颗 — 默认 asterisk-left(::before),asterisk-right 用 ::after
|
|
509
|
-
// 旧写法同时 display:inline-block 两个伪元素导致 * * 重复
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
}
|
|
512
|
+
// 必填星号:只保留一颗 — 默认 asterisk-left(::before),asterisk-right 用 ::after
|
|
513
|
+
// 旧写法同时 display:inline-block 两个伪元素导致 * * 重复
|
|
514
|
+
&.el-form.el-form--label-left .el-form-item__label,
|
|
515
|
+
&.el-form.el-form--label-right .el-form-item__label {
|
|
516
|
+
align-items: baseline !important;
|
|
517
|
+
font-size: 12px !important;
|
|
518
|
+
line-height: var(--wk-form-label-line-height, 22px) !important;
|
|
519
|
+
}
|
|
516
520
|
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
}
|
|
521
|
+
&.el-form.el-form--label-left .el-form-item__label > .com-text,
|
|
522
|
+
&.el-form.el-form--label-right .el-form-item__label > .com-text {
|
|
523
|
+
font-size: 12px !important;
|
|
524
|
+
line-height: var(--wk-form-label-line-height, 22px) !important;
|
|
525
|
+
}
|
|
522
526
|
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
527
|
+
&.el-form-item.is-required:not(.is-no-asterisk) > .el-form-item__label::before,
|
|
528
|
+
&.el-form.el-form--label-left .el-form-item.is-required:not(.is-no-asterisk) > .el-form-item__label::before,
|
|
529
|
+
&.el-form.el-form--label-right .el-form-item.is-required:not(.is-no-asterisk) > .el-form-item__label::before {
|
|
530
|
+
content: "*" !important;
|
|
531
|
+
color: var(--el-color-danger, #f56c6c) !important;
|
|
532
|
+
font-size: 12px !important;
|
|
533
|
+
font-weight: 400 !important;
|
|
530
534
|
line-height: var(--wk-form-label-line-height, 22px) !important;
|
|
531
|
-
|
|
532
|
-
|
|
535
|
+
display: inline-block !important;
|
|
536
|
+
margin-right: 2px !important;
|
|
533
537
|
vertical-align: baseline !important;
|
|
534
538
|
position: relative !important;
|
|
535
539
|
top: 0 !important;
|
|
536
540
|
align-self: baseline !important;
|
|
537
|
-
}
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
&.el-form-item.is-required:not(.is-no-asterisk) > .el-form-item__label > .com-text::before,
|
|
544
|
+
&.el-form.el-form--label-left .el-form-item.is-required:not(.is-no-asterisk) > .el-form-item__label > .com-text::before,
|
|
545
|
+
&.el-form.el-form--label-right .el-form-item.is-required:not(.is-no-asterisk) > .el-form-item__label > .com-text::before {
|
|
546
|
+
content: "*" !important;
|
|
547
|
+
color: var(--el-color-danger, #f56c6c) !important;
|
|
548
|
+
font-size: 12px !important;
|
|
549
|
+
font-weight: 400 !important;
|
|
545
550
|
line-height: var(--wk-form-label-line-height, 22px) !important;
|
|
546
|
-
|
|
547
|
-
|
|
551
|
+
display: inline-block !important;
|
|
552
|
+
margin-right: 2px !important;
|
|
548
553
|
vertical-align: baseline !important;
|
|
549
554
|
position: relative !important;
|
|
550
555
|
top: 0 !important;
|
|
551
556
|
align-self: baseline !important;
|
|
552
|
-
}
|
|
557
|
+
}
|
|
553
558
|
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
}
|
|
559
|
+
&.el-form-item.is-required:not(.is-no-asterisk) > .el-form-item__label:has(> .com-text)::before,
|
|
560
|
+
&.el-form .el-form-item.is-required:not(.is-no-asterisk) > .el-form-item__label:has(> .com-text)::before {
|
|
561
|
+
display: none !important;
|
|
562
|
+
}
|
|
558
563
|
|
|
559
|
-
// asterisk-right 模式:显示 ::after,隐藏 ::before
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
}
|
|
564
|
+
// asterisk-right 模式:显示 ::after,隐藏 ::before
|
|
565
|
+
&.el-form-item.is-required:not(.is-no-asterisk).asterisk-right > .el-form-item__label::before,
|
|
566
|
+
&.el-form-item.is-required:not(.is-no-asterisk).asterisk-right > .el-form-item__label > .com-text::before {
|
|
567
|
+
display: none !important;
|
|
568
|
+
}
|
|
564
569
|
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
570
|
+
&.el-form-item.is-required:not(.is-no-asterisk).asterisk-right > .el-form-item__label::after,
|
|
571
|
+
&.el-form.el-form--label-left .el-form-item.is-required:not(.is-no-asterisk).asterisk-right > .el-form-item__label::after,
|
|
572
|
+
&.el-form.el-form--label-right .el-form-item.is-required:not(.is-no-asterisk).asterisk-right > .el-form-item__label::after {
|
|
573
|
+
content: "*" !important;
|
|
574
|
+
color: var(--el-color-danger, #f56c6c) !important;
|
|
575
|
+
font-size: 12px !important;
|
|
576
|
+
font-weight: 400 !important;
|
|
572
577
|
line-height: var(--wk-form-label-line-height, 22px) !important;
|
|
573
|
-
|
|
574
|
-
|
|
578
|
+
display: inline-block !important;
|
|
579
|
+
margin-left: 2px !important;
|
|
575
580
|
vertical-align: baseline !important;
|
|
576
581
|
position: relative !important;
|
|
577
582
|
top: 0 !important;
|
|
578
583
|
align-self: baseline !important;
|
|
579
|
-
}
|
|
584
|
+
}
|
|
580
585
|
|
|
581
|
-
// 默认模式:隐藏 ::after 防止重复星号
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
}
|
|
585
|
-
.el-form-item.is-required.is-no-asterisk>.el-form-item__label::before,
|
|
586
|
-
.el-form-item.is-required.is-no-asterisk>.el-form-item__label::after,
|
|
587
|
-
.el-form-item.is-required.is-no-asterisk>.el-form-item__label>.com-text::before {
|
|
588
|
-
display: none !important;
|
|
589
|
-
}
|
|
586
|
+
// 默认模式:隐藏 ::after 防止重复星号
|
|
587
|
+
&.el-form-item.is-required:not(.is-no-asterisk):not(.asterisk-right) > .el-form-item__label::after {
|
|
588
|
+
display: none !important;
|
|
589
|
+
}
|
|
590
590
|
|
|
591
|
-
|
|
592
|
-
.el-form-item__label,
|
|
593
|
-
.el-form-
|
|
594
|
-
|
|
591
|
+
&.el-form-item.is-required.is-no-asterisk > .el-form-item__label::before,
|
|
592
|
+
&.el-form-item.is-required.is-no-asterisk > .el-form-item__label::after,
|
|
593
|
+
&.el-form-item.is-required.is-no-asterisk > .el-form-item__label > .com-text::before {
|
|
594
|
+
display: none !important;
|
|
595
595
|
}
|
|
596
596
|
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
597
|
+
&.el-form-item.is-error {
|
|
598
|
+
.el-form-item__label,
|
|
599
|
+
.el-form-item__error {
|
|
600
|
+
color: var(--el-color-danger, #f56c6c) !important;
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
.el-input__wrapper,
|
|
604
|
+
.el-select__wrapper,
|
|
605
|
+
.el-date-editor.el-input__wrapper,
|
|
606
|
+
.el-textarea__inner {
|
|
607
|
+
box-shadow: 0 0 0 1px var(--el-color-danger, #f56c6c) inset !important;
|
|
608
|
+
}
|
|
602
609
|
}
|
|
603
610
|
}
|
|
604
611
|
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
@use "../scope" as skin;
|
|
2
|
+
|
|
1
3
|
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
2
4
|
// @jhlc/jh-ui adapter — L2 vendor 化妆层(项目集群专用)
|
|
3
5
|
//
|
|
@@ -28,158 +30,152 @@
|
|
|
28
30
|
// `_base-components.scss` 统一处理。
|
|
29
31
|
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
30
32
|
|
|
31
|
-
|
|
32
|
-
//
|
|
33
|
-
//
|
|
34
|
-
.
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
#{skin.$managed-scope-selector} {
|
|
34
|
+
// 1) label 文本容器(.com-text) — 单行省略,允许收缩
|
|
35
|
+
// .el-form-item__label 在 jh-ui 中是 inline-flex,
|
|
36
|
+
// 必须放开 min-width 才能让内部 .com-text 真的 shrink。
|
|
37
|
+
&.el-form-item__label {
|
|
38
|
+
min-width: 0;
|
|
39
|
+
}
|
|
37
40
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}
|
|
41
|
+
&.el-form-item__label > .com-text,
|
|
42
|
+
&.el-form-item__label .com-text {
|
|
43
|
+
display: inline-block;
|
|
44
|
+
min-width: 0;
|
|
45
|
+
max-width: 100%;
|
|
46
|
+
white-space: nowrap;
|
|
47
|
+
overflow: hidden;
|
|
48
|
+
text-overflow: ellipsis;
|
|
49
|
+
vertical-align: middle;
|
|
50
|
+
}
|
|
48
51
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}
|
|
52
|
+
&.has-colon .el-form-item__label > .com-text,
|
|
53
|
+
&.has-colon .el-form-item__label .com-text,
|
|
54
|
+
&.has-colon .el-form-item__label > .text-line-2,
|
|
55
|
+
&.has-colon .el-form-item__label .text-line-2 {
|
|
56
|
+
padding-right: 0;
|
|
57
|
+
}
|
|
55
58
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}
|
|
59
|
+
&.has-colon .el-form-item__label > .com-text::after,
|
|
60
|
+
&.has-colon .el-form-item__label > .com-text:after,
|
|
61
|
+
&.has-colon .el-form-item__label .com-text::after,
|
|
62
|
+
&.has-colon .el-form-item__label .com-text:after,
|
|
63
|
+
&.has-colon .el-form-item__label > .text-line-2::after,
|
|
64
|
+
&.has-colon .el-form-item__label > .text-line-2:after,
|
|
65
|
+
&.has-colon .el-form-item__label .text-line-2::after,
|
|
66
|
+
&.has-colon .el-form-item__label .text-line-2:after {
|
|
67
|
+
content: "" !important;
|
|
68
|
+
display: none !important;
|
|
69
|
+
}
|
|
67
70
|
|
|
68
|
-
// 1-b) 通杀冒号(不限 .has-colon)
|
|
69
|
-
//
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
html body .el-form-item__label .text-line-2:after {
|
|
82
|
-
content: "" !important;
|
|
83
|
-
display: none !important;
|
|
84
|
-
}
|
|
71
|
+
// 1-b) 通杀冒号(不限 .has-colon)
|
|
72
|
+
// jh-* 的 showColon 默认 true,但不一定带 .has-colon,需覆盖 label 内全部注入。
|
|
73
|
+
&.el-form-item__label > .com-text::after,
|
|
74
|
+
&.el-form-item__label > .com-text:after,
|
|
75
|
+
&.el-form-item__label .com-text::after,
|
|
76
|
+
&.el-form-item__label .com-text:after,
|
|
77
|
+
&.el-form-item__label > .text-line-2::after,
|
|
78
|
+
&.el-form-item__label > .text-line-2:after,
|
|
79
|
+
&.el-form-item__label .text-line-2::after,
|
|
80
|
+
&.el-form-item__label .text-line-2:after {
|
|
81
|
+
content: "" !important;
|
|
82
|
+
display: none !important;
|
|
83
|
+
}
|
|
85
84
|
|
|
86
|
-
// 2) Element Plus 2.2.x 输入控件统一圆角(无 .el-input__wrapper)
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
}
|
|
85
|
+
// 2) Element Plus 2.2.x 输入控件统一圆角(无 .el-input__wrapper)
|
|
86
|
+
&.el-input > .el-input__inner,
|
|
87
|
+
&.el-date-editor > .el-input__inner,
|
|
88
|
+
&.el-select .el-input > .el-input__inner {
|
|
89
|
+
height: var(--wk-form-control-height, 26px) !important;
|
|
90
|
+
line-height: var(--wk-form-control-height, 26px) !important;
|
|
91
|
+
border-radius: var(--el-border-radius-base) !important;
|
|
92
|
+
transition: box-shadow 0.15s ease, border-color 0.15s ease;
|
|
93
|
+
}
|
|
95
94
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
}
|
|
95
|
+
&.el-textarea > .el-textarea__inner {
|
|
96
|
+
border-radius: var(--el-border-radius-base);
|
|
97
|
+
transition: box-shadow 0.15s ease, border-color 0.15s ease;
|
|
98
|
+
}
|
|
100
99
|
|
|
101
|
-
// 3) focus 品牌色边框(兼容 EP 2.2.x DOM 与 jh-select / jh-date-picker)
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
}
|
|
100
|
+
// 3) focus 品牌色边框(兼容 EP 2.2.x DOM 与 jh-select / jh-date-picker)
|
|
101
|
+
&.el-input.is-focus > .el-input__inner,
|
|
102
|
+
&.el-input > .el-input__inner:focus,
|
|
103
|
+
&.el-textarea.is-focus > .el-textarea__inner,
|
|
104
|
+
&.el-textarea > .el-textarea__inner:focus,
|
|
105
|
+
&.el-select.is-focus .el-input > .el-input__inner,
|
|
106
|
+
&.el-select .el-input.is-focus > .el-input__inner,
|
|
107
|
+
&.el-date-editor.is-focus > .el-input__inner,
|
|
108
|
+
&.el-date-editor .el-input.is-focus > .el-input__inner {
|
|
109
|
+
border-color: var(--el-color-primary, #002a8f) !important;
|
|
110
|
+
box-shadow: 0 0 0 1px var(--el-color-primary, #002a8f) inset;
|
|
111
|
+
}
|
|
113
112
|
|
|
114
|
-
// 4) error 红色边框(兼容 EP 2.2.x DOM
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
}
|
|
113
|
+
// 4) error 红色边框(兼容 EP 2.2.x DOM)
|
|
114
|
+
&.el-form-item.is-error .el-input > .el-input__inner,
|
|
115
|
+
&.el-form-item.is-error .el-textarea > .el-textarea__inner,
|
|
116
|
+
&.el-form-item.is-error .el-date-editor > .el-input__inner {
|
|
117
|
+
border-color: var(--el-color-danger, #f56c6c) !important;
|
|
118
|
+
box-shadow: 0 0 0 1px var(--el-color-danger, #f56c6c) inset !important;
|
|
119
|
+
}
|
|
122
120
|
|
|
123
|
-
// 5) com-input / com-textarea / com-input-tip — jh-ui form-item wrapper
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
border-radius: var(--el-border-radius-base) !important;
|
|
132
|
-
}
|
|
133
|
-
.com-input > .el-textarea > .el-textarea__inner,
|
|
134
|
-
.com-textarea > .el-textarea > .el-textarea__inner {
|
|
135
|
-
border-radius: var(--el-border-radius-base);
|
|
136
|
-
}
|
|
121
|
+
// 5) com-input / com-textarea / com-input-tip — jh-ui form-item wrapper
|
|
122
|
+
&.com-input > .el-input > .el-input__inner,
|
|
123
|
+
&.com-input > .el-select .el-input > .el-input__inner,
|
|
124
|
+
&.com-input > .el-date-editor > .el-input__inner {
|
|
125
|
+
height: var(--wk-form-control-height, 26px) !important;
|
|
126
|
+
line-height: var(--wk-form-control-height, 26px) !important;
|
|
127
|
+
border-radius: var(--el-border-radius-base) !important;
|
|
128
|
+
}
|
|
137
129
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
html body .com-user-picker .el-input,
|
|
143
|
-
html body .com-dept-picker .el-input,
|
|
144
|
-
html body .com-userPicker .el-input,
|
|
145
|
-
html body .com-deptPicker .el-input,
|
|
146
|
-
html body .jh-picker .el-input,
|
|
147
|
-
html body .jh-picker-trigger.el-input {
|
|
148
|
-
height: var(--wk-form-control-height, 26px) !important;
|
|
149
|
-
}
|
|
130
|
+
&.com-input > .el-textarea > .el-textarea__inner,
|
|
131
|
+
&.com-textarea > .el-textarea > .el-textarea__inner {
|
|
132
|
+
border-radius: var(--el-border-radius-base);
|
|
133
|
+
}
|
|
150
134
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
}
|
|
135
|
+
// 6) jh-picker / reference-picker — 不走 .com-input wrapper,也要继承单行控件高度
|
|
136
|
+
&.com-picker .el-input,
|
|
137
|
+
&.com-reference-picker .el-input,
|
|
138
|
+
&.com-reference-picker-input .el-input,
|
|
139
|
+
&.com-user-picker .el-input,
|
|
140
|
+
&.com-dept-picker .el-input,
|
|
141
|
+
&.com-userPicker .el-input,
|
|
142
|
+
&.com-deptPicker .el-input,
|
|
143
|
+
&.jh-picker .el-input,
|
|
144
|
+
&.jh-picker-trigger.el-input {
|
|
145
|
+
height: var(--wk-form-control-height, 26px) !important;
|
|
146
|
+
}
|
|
164
147
|
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
}
|
|
148
|
+
&.com-picker .el-input__wrapper,
|
|
149
|
+
&.com-reference-picker .el-input__wrapper,
|
|
150
|
+
&.com-reference-picker-input .el-input__wrapper,
|
|
151
|
+
&.com-user-picker .el-input__wrapper,
|
|
152
|
+
&.com-dept-picker .el-input__wrapper,
|
|
153
|
+
&.com-userPicker .el-input__wrapper,
|
|
154
|
+
&.com-deptPicker .el-input__wrapper,
|
|
155
|
+
&.jh-picker .el-input__wrapper,
|
|
156
|
+
&.jh-picker-trigger.el-input .el-input__wrapper {
|
|
157
|
+
height: var(--wk-form-control-height, 26px) !important;
|
|
158
|
+
min-height: var(--wk-form-control-height, 26px) !important;
|
|
159
|
+
border-radius: var(--el-border-radius-base) !important;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
&.com-picker .el-input > .el-input__inner,
|
|
163
|
+
&.com-reference-picker .el-input > .el-input__inner,
|
|
164
|
+
&.com-reference-picker-input .el-input > .el-input__inner,
|
|
165
|
+
&.com-user-picker .el-input > .el-input__inner,
|
|
166
|
+
&.com-dept-picker .el-input > .el-input__inner,
|
|
167
|
+
&.com-userPicker .el-input > .el-input__inner,
|
|
168
|
+
&.com-deptPicker .el-input > .el-input__inner,
|
|
169
|
+
&.jh-picker .el-input > .el-input__inner,
|
|
170
|
+
&.jh-picker-trigger.el-input > .el-input__inner {
|
|
171
|
+
height: var(--wk-form-control-height, 26px) !important;
|
|
172
|
+
line-height: var(--wk-form-control-height, 26px) !important;
|
|
173
|
+
border-radius: var(--el-border-radius-base) !important;
|
|
174
|
+
}
|
|
178
175
|
|
|
179
|
-
// 7) 必填星号兼容 jh-ui label 结构
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
color: var(--el-color-danger, #f56c6c) !important;
|
|
176
|
+
// 7) 必填星号兼容 jh-ui label 结构
|
|
177
|
+
&.el-form-item.is-required:not(.is-no-asterisk) > .el-form-item__label::before,
|
|
178
|
+
&.el-form-item.is-required:not(.is-no-asterisk) > .el-form-item__label > .com-text::before {
|
|
179
|
+
color: var(--el-color-danger, #f56c6c) !important;
|
|
180
|
+
}
|
|
185
181
|
}
|