@kayak-sj/design 1.0.52 → 1.0.54

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kayak-sj/design",
3
- "version": "1.0.52",
3
+ "version": "1.0.54",
4
4
  "type": "module",
5
5
  "description": "PC 组件库(Vue3 + Element Plus,对应旧 @kayak/kayak-design-vue2)",
6
6
  "license": "ISC",
@@ -7,9 +7,28 @@
7
7
  flex-wrap: wrap;
8
8
 
9
9
  /// 编辑/弹窗:Grid 多列 + 右对齐标签
10
+ /// auto-fit:列最小宽给足「偏宽 label(含 tip) + 300px 控件」,不够两列时先换行,不改 label 宽度算法
10
11
  &--grid-layout {
11
12
  display: grid;
12
- grid-template-columns: repeat(var(--k-form-cols, 2), minmax(0, 1fr));
13
+ /* 面板再窄也不把控件压扁,由外层滚动条横向承载 */
14
+ min-width: var(--k-form-min-width);
15
+ width: 100%;
16
+ box-sizing: border-box;
17
+ grid-template-columns: repeat(
18
+ auto-fit,
19
+ minmax(
20
+ min(
21
+ 100%,
22
+ max(
23
+ var(--k-form-grid-min-col, 450px),
24
+ calc(
25
+ (100% - (var(--k-form-cols, 2) - 1) * var(--k-form-grid-gap-x)) / var(--k-form-cols, 2)
26
+ )
27
+ )
28
+ ),
29
+ 1fr
30
+ )
31
+ );
13
32
  column-gap: var(--k-form-grid-gap-x);
14
33
  row-gap: 0;
15
34
  padding: 4px var(--k-form-padding-x) 0;
@@ -5,11 +5,11 @@
5
5
  min-height: 100%;
6
6
 
7
7
  /**
8
- * 叠层约定(与 AdminTags 对齐):
9
- * 2 — sticky 壳(本页 header/footer、页签),只压文档流
10
- * 10 — 活动等业务面板(如右侧抽屉)
11
- * 12 — 本页 loading
12
- * 勿把 header/footer 提到 ≥10,否则会盖住面板内 ElImageViewer 预览
8
+ * 叠层约定(与 AdminTags / 活动布局对齐):
9
+ * 2 — sticky 壳(本页 header/footer、页签),只压文档流
10
+ * 100 — 活动等业务面板(form-panel)
11
+ * 110 — 本页 loading
12
+ * 勿把 header/footer 提到 ≥100,否则会盖住业务面板 / Upload 预览
13
13
  */
14
14
  &__header {
15
15
  position: sticky;
@@ -46,7 +46,7 @@
46
46
  &__loading {
47
47
  position: absolute;
48
48
  inset: 0;
49
- z-index: 12;
49
+ z-index: 110;
50
50
  display: flex;
51
51
  align-items: center;
52
52
  justify-content: center;
@@ -82,6 +82,8 @@
82
82
  --k-form-padding-x: #{sem.$form-padding-x};
83
83
  --k-form-padding-y: #{sem.$form-padding-y};
84
84
  --k-form-grid-gap-x: #{sem.$form-grid-gap-x};
85
+ --k-form-grid-min-col: #{sem.$form-grid-min-col};
86
+ --k-form-min-width: #{sem.$form-min-width};
85
87
  --k-form-item-margin-bottom: #{sem.$form-item-margin-bottom};
86
88
  --k-form-label-width: #{sem.$form-label-width};
87
89
  --k-form-label-width-query: #{sem.$form-label-width-query};
@@ -24,6 +24,10 @@ $shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.08) !default;
24
24
  $form-padding-x: 24px !default;
25
25
  $form-padding-y: 20px !default;
26
26
  $form-grid-gap-x: 24px !default;
27
+ /** grid 单列最小宽度, 两列临界时先换行,避免输入框被挤窄 */
28
+ $form-grid-min-col: 450px !default;
29
+ /** 编辑表单整体最小宽:单列 label+控件+左右 padding,再窄则横向撑开由容器滚动 */
30
+ $form-min-width: calc(#{$form-grid-min-col} + #{$form-padding-x} * 2) !default;
27
31
  $form-item-margin-bottom: 20px !default;
28
32
  $form-label-width: 110px !default;
29
33
  $form-label-width-query: 120px !default;