@agile-team/wl-skills-ui 1.10.3 → 1.10.4

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,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.10.4] - 2026-08-22
8
+
9
+ ### Fixed
10
+
11
+ - 统一新旧 Element Plus/jh-ui 输入控件的左右内边距,包含 placeholder、textarea、picker 和复合输入结构,避免内容贴边。
12
+ - 统一普通与 jh 复合数字输入框步进按钮的右侧上下布局、尺寸、分隔线和 hover 状态,避免箭头错位。
13
+ - 增加输入间距与数字控件几何回归契约测试。
14
+
7
15
  ## [1.10.3] - 2026-08-16
8
16
 
9
17
  ### Added
package/README.md CHANGED
@@ -228,9 +228,11 @@ yarn add @agile-team/wl-skills-ui
228
228
 
229
229
  ## 版本亮点
230
230
 
231
- 当前 v1.10.3
231
+ 当前 v1.10.4
232
232
 
233
- - **复合结构精准修复**:仅在 MessageBox 容器直接含状态图标时统一图标与文字布局;`jh-input-number` 仅给内层文本 wrapper 补 11px 左间距,不改步进按钮、单位后缀和对齐语义。
233
+ - **输入控件间距与数字箭头闭环**:统一新旧 Element Plus/jh-ui 输入框、placeholder、textarea、picker 的左右间距;普通与复合数字框的步进箭头统一右侧上下布局和尺寸。
234
+
235
+ - **复合结构精准修复**:仅在 MessageBox 容器直接含状态图标时统一图标与文字布局;`jh-input-number` 保留单位后缀与对齐语义,内层文本和步进按钮由统一几何契约治理。
234
236
  - **AG Grid 编辑与对齐闭环**:仅对已标记编辑态的单元格退出普通文本 padding;`align/headerAlign` 桥接为共享适配层可执行的函数配置,表头与内容使用同一对齐轴,并合并保留业务 `cellStyle/cellClass` 返回值。
235
237
  - **AG Grid 完整空态闭环**:按真实 `.ag-body-viewport` 定位,数据区统一保留 160px;插图、主文案和辅助说明始终完整同规格。上下/左右多表格空间不足时由最近分屏受控滚动,数据恢复后自动清理全部标记。
236
238
  - **按钮尺寸可重现**:新增 R041,只报告未显式声明 `size` 的 `el-button` / `ElButton` / `BaseToolbar`;默认建议 `small`,已设置其他或动态尺寸的业务代码不受影响。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agile-team/wl-skills-ui",
3
- "version": "1.10.3",
3
+ "version": "1.10.4",
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",
@@ -5,6 +5,10 @@
5
5
  html body {
6
6
  --wk-form-control-radius: var(--el-border-radius-base, 6px);
7
7
  --wk-form-control-height: 26px;
8
+ // 所有单行控件共用同一组左右内边距;旧版 jh-ui 直挂 input DOM
9
+ // 不会继承 Element Plus wrapper 的默认 11px,需要显式补齐。
10
+ --wk-form-control-padding-inline: 11px;
11
+ --wk-form-number-controls-width: 24px;
8
12
  --wk-form-font-size: 12px !important;
9
13
  --wk-form-label-control-gap: 16px;
10
14
  --wk-form-label-line-height: 22px;
@@ -62,9 +66,21 @@ html body {
62
66
  &.el-autocomplete .el-input__wrapper {
63
67
  height: var(--wk-form-control-height) !important;
64
68
  min-height: var(--wk-form-control-height) !important;
69
+ padding: 0 var(--wk-form-control-padding-inline) !important;
65
70
  border-radius: var(--wk-form-control-radius) !important;
66
71
  }
67
72
 
73
+ // 选择器、日期和自动完成在不同 Element Plus 版本中可能把 wrapper
74
+ // 作为根节点或子节点;两种结构都必须保留文本起始间距。
75
+ &.el-select__wrapper,
76
+ &.el-select .el-select__wrapper,
77
+ &.el-date-editor.el-input__wrapper,
78
+ &.el-date-editor .el-input__wrapper,
79
+ &.el-cascader .el-input__wrapper,
80
+ &.el-autocomplete .el-input__wrapper {
81
+ padding-inline: var(--wk-form-control-padding-inline) !important;
82
+ }
83
+
68
84
  &.el-input__inner,
69
85
  &.el-select__selected-item,
70
86
  &.el-date-editor .el-input__inner,
@@ -75,6 +91,15 @@ html body {
75
91
  line-height: calc(var(--wk-form-control-height) - 2px) !important;
76
92
  }
77
93
 
94
+ // 原生 textarea 是唯一不使用 wrapper 的输入控件,左右间距与单行输入
95
+ // 对齐;同时覆盖只读、禁用和 placeholder 状态,避免文字贴边。
96
+ &.el-textarea__inner,
97
+ &.com-input > .el-textarea > .el-textarea__inner,
98
+ &.com-textarea > .el-textarea > .el-textarea__inner {
99
+ padding: 4px var(--wk-form-control-padding-inline) !important;
100
+ box-sizing: border-box !important;
101
+ }
102
+
78
103
  // ── 带前/后附加段的输入框 ────────────────────────────────────────────────
79
104
  // Element input-group 把输入主体与 append/prepend 分成多个描边节点;平台或
80
105
  // 业务局部高度只改其中一段时,就会出现截图中的右侧图标高低、圆角和边框不齐。
@@ -98,6 +123,7 @@ html body {
98
123
  min-width: 0 !important;
99
124
  height: 100% !important;
100
125
  min-height: 0 !important;
126
+ padding: 0 var(--wk-form-control-padding-inline) !important;
101
127
  border: 0 !important;
102
128
  border-radius: 0 !important;
103
129
  background: transparent !important;
@@ -110,6 +136,7 @@ html body {
110
136
  min-width: 0 !important;
111
137
  height: 100% !important;
112
138
  min-height: 0 !important;
139
+ padding: 0 var(--wk-form-control-padding-inline) !important;
113
140
  border: 0 !important;
114
141
  border-radius: 0 !important;
115
142
  outline: none !important;
@@ -236,7 +263,7 @@ html body {
236
263
  width: 100% !important;
237
264
  height: 100% !important;
238
265
  min-height: 0 !important;
239
- padding: 0 11px !important;
266
+ padding: 0 var(--wk-form-control-padding-inline) !important;
240
267
  border: 0 !important;
241
268
  border-radius: calc(var(--wk-form-control-radius) - 1px) !important;
242
269
  box-sizing: border-box !important;
@@ -297,9 +324,58 @@ html body {
297
324
  padding: 0 !important;
298
325
  }
299
326
 
300
- &.el-input-number:not(.com-inputNumber-content) .el-input-number__increase,
327
+ // 数字框步进按钮固定在右侧上下两格,避免平台默认的绝对定位与
328
+ // 业务高度覆盖互相错开。controls=false 时 Element Plus 不渲染按钮,
329
+ // 因此该规则不会凭空制造控件。
330
+ &.el-input-number:not(.com-inputNumber-content) {
331
+ position: relative !important;
332
+ }
333
+
334
+ &.el-input-number:not(.com-inputNumber-content):has(> .el-input-number__increase)
335
+ .el-input__wrapper {
336
+ padding-right: calc(
337
+ var(--wk-form-control-padding-inline) + var(--wk-form-number-controls-width)
338
+ ) !important;
339
+ }
340
+
341
+ &.el-input-number:not(.com-inputNumber-content)
342
+ :where(.el-input-number__increase, .el-input-number__decrease) {
343
+ position: absolute !important;
344
+ right: 0 !important;
345
+ left: auto !important;
346
+ z-index: 2 !important;
347
+ display: inline-flex !important;
348
+ align-items: center !important;
349
+ justify-content: center !important;
350
+ width: var(--wk-form-number-controls-width) !important;
351
+ height: 50% !important;
352
+ min-height: 0 !important;
353
+ margin: 0 !important;
354
+ padding: 0 !important;
355
+ border: 0 !important;
356
+ border-left: 1px solid var(--el-border-color, #dcdfe6) !important;
357
+ box-sizing: border-box !important;
358
+ color: var(--el-text-color-secondary, #909399) !important;
359
+ line-height: 1 !important;
360
+ cursor: pointer !important;
361
+ transition: color 0.15s ease, background-color 0.15s ease !important;
362
+ }
363
+
364
+ &.el-input-number:not(.com-inputNumber-content) .el-input-number__increase {
365
+ top: 0 !important;
366
+ bottom: auto !important;
367
+ border-bottom: 1px solid var(--el-border-color, #dcdfe6) !important;
368
+ }
369
+
301
370
  &.el-input-number:not(.com-inputNumber-content) .el-input-number__decrease {
302
- display: none !important;
371
+ top: auto !important;
372
+ bottom: 0 !important;
373
+ }
374
+
375
+ &.el-input-number:not(.com-inputNumber-content)
376
+ :where(.el-input-number__increase, .el-input-number__decrease):hover {
377
+ color: var(--el-color-primary, #002a8f) !important;
378
+ background: rgba(var(--el-color-primary-rgb, 0, 42, 143), 0.06) !important;
303
379
  }
304
380
 
305
381
  &.el-input-number:not(.com-inputNumber-content)
@@ -88,11 +88,15 @@
88
88
  &.el-select .el-input > .el-input__inner {
89
89
  height: var(--wk-form-control-height, 26px) !important;
90
90
  line-height: var(--wk-form-control-height, 26px) !important;
91
+ padding: 0 var(--wk-form-control-padding-inline, 11px) !important;
92
+ box-sizing: border-box !important;
91
93
  border-radius: var(--el-border-radius-base) !important;
92
94
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
93
95
  }
94
96
 
95
97
  &.el-textarea > .el-textarea__inner {
98
+ padding: 4px var(--wk-form-control-padding-inline, 11px) !important;
99
+ box-sizing: border-box !important;
96
100
  border-radius: var(--el-border-radius-base);
97
101
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
98
102
  }
@@ -124,6 +128,8 @@
124
128
  &.com-input > .el-date-editor > .el-input__inner {
125
129
  height: var(--wk-form-control-height, 26px) !important;
126
130
  line-height: var(--wk-form-control-height, 26px) !important;
131
+ padding: 0 var(--wk-form-control-padding-inline, 11px) !important;
132
+ box-sizing: border-box !important;
127
133
  border-radius: var(--el-border-radius-base) !important;
128
134
  }
129
135
 
@@ -200,9 +206,10 @@
200
206
  // common-core jh-input-number 是“数字框根节点同时复用 el-input__wrapper”的复合结构:
201
207
  // .com-inputNumber-content.el-input-number.el-input__wrapper > .el-input。
202
208
  // 普通 Element InputNumber 的根/子 wrapper 规则不能套到这里,否则会同时压缩外壳、
203
- // 清空组件自己的 textAlign/controls 语义。复合根只统一外轮廓和高度,内部继续由
204
- // jh-input-number 自己负责左右对齐、单位附加段与步进按钮。
209
+ // 清空组件自己的 textAlign/controls 语义。复合根只统一外轮廓和高度,业务仍负责
210
+ // textAlign/controls/单位语义,步进按钮几何由本适配层统一治理。
205
211
  &.com-inputNumber-content.el-input-number.el-input__wrapper {
212
+ position: relative !important;
206
213
  display: inline-flex !important;
207
214
  align-items: stretch !important;
208
215
  width: 100% !important;
@@ -254,7 +261,7 @@
254
261
  min-height: 0 !important;
255
262
  // common-core 原始样式会把左内边距清零;由内部 wrapper 单点补回文本起始间距,
256
263
  // 不改变右侧步进按钮、单位后缀和 textAlign 的组件语义。
257
- padding-left: 11px !important;
264
+ padding-left: var(--wk-form-control-padding-inline, 11px) !important;
258
265
  border: 0 !important;
259
266
  border-radius: 0 !important;
260
267
  background: transparent !important;
@@ -272,6 +279,58 @@
272
279
  box-shadow: none !important;
273
280
  }
274
281
 
282
+ // jh 复合数字框的步进按钮与普通 Element Plus 数字框共享同一几何:
283
+ // 固定在右侧上下两格,避免业务高度或单位附加段导致箭头错位。
284
+ &.com-inputNumber-content.el-input-number.el-input__wrapper:has(
285
+ > .el-input-number__increase
286
+ )
287
+ > .el-input {
288
+ padding-right: var(--wk-form-number-controls-width, 24px) !important;
289
+ box-sizing: border-box !important;
290
+ }
291
+
292
+ &.com-inputNumber-content.el-input-number.el-input__wrapper
293
+ :where(.el-input-number__increase, .el-input-number__decrease) {
294
+ position: absolute !important;
295
+ right: 0 !important;
296
+ left: auto !important;
297
+ z-index: 2 !important;
298
+ display: inline-flex !important;
299
+ align-items: center !important;
300
+ justify-content: center !important;
301
+ width: var(--wk-form-number-controls-width, 24px) !important;
302
+ height: 50% !important;
303
+ min-height: 0 !important;
304
+ margin: 0 !important;
305
+ padding: 0 !important;
306
+ border: 0 !important;
307
+ border-left: 1px solid var(--el-border-color, #dcdfe6) !important;
308
+ box-sizing: border-box !important;
309
+ color: var(--el-text-color-secondary, #909399) !important;
310
+ line-height: 1 !important;
311
+ cursor: pointer !important;
312
+ transition: color 0.15s ease, background-color 0.15s ease !important;
313
+ }
314
+
315
+ &.com-inputNumber-content.el-input-number.el-input__wrapper
316
+ .el-input-number__increase {
317
+ top: 0 !important;
318
+ bottom: auto !important;
319
+ border-bottom: 1px solid var(--el-border-color, #dcdfe6) !important;
320
+ }
321
+
322
+ &.com-inputNumber-content.el-input-number.el-input__wrapper
323
+ .el-input-number__decrease {
324
+ top: auto !important;
325
+ bottom: 0 !important;
326
+ }
327
+
328
+ &.com-inputNumber-content.el-input-number.el-input__wrapper
329
+ :where(.el-input-number__increase, .el-input-number__decrease):hover {
330
+ color: var(--el-color-primary, #002a8f) !important;
331
+ background: rgba(var(--el-color-primary-rgb, 0, 42, 143), 0.06) !important;
332
+ }
333
+
275
334
  // 带单位/后缀时,外层数字框仍是唯一描边所有者;子 input-group 只负责布局和分隔线。
276
335
  &.com-inputNumber-content.el-input-number.el-input__wrapper
277
336
  > .el-input.el-input-group {
@@ -294,6 +353,8 @@
294
353
  &.jh-picker-trigger.el-input > .el-input__inner {
295
354
  height: var(--wk-form-control-height, 26px) !important;
296
355
  line-height: var(--wk-form-control-height, 26px) !important;
356
+ padding: 0 var(--wk-form-control-padding-inline, 11px) !important;
357
+ box-sizing: border-box !important;
297
358
  border-radius: var(--el-border-radius-base) !important;
298
359
  }
299
360