@kayak-sj/design 1.0.59 → 1.0.61

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.
@@ -3,6 +3,7 @@ import { FormInstance } from 'element-plus';
3
3
  /**
4
4
  * 按「label + 控件 min」实测容器宽度,得到实际列数(不超过 colLength)。
5
5
  * 宽→窄时逐级降列,例如 colLength=3 时:3 → 2 → 1。
6
+ * 标准 newLineStart 字段只占第 1 列,与同列多字段天然同宽,无需再算单列控件宽。
6
7
  */
7
8
  export declare function useFormGridCols(options: {
8
9
  formRef: Ref<FormInstance | undefined>;
package/dist/index.js CHANGED
@@ -611,7 +611,7 @@ var pt = /* @__PURE__ */ j({
611
611
  return c.value;
612
612
  }
613
613
  function Ce(e) {
614
- return e.newLineStart && ut(e.component) ? e.component === "Editor" || e.component === "Upload" || e.component === "Radio" || e.component === "Checkbox" || e.component === "Tag" || e.component === "DatePicker" && String(e.componentProps?.type ?? "").includes("range") : !1;
614
+ return e.newLineStart ? !ut(e.component) || e.component === "Editor" || e.component === "Upload" || e.component === "Radio" || e.component === "Checkbox" || e.component === "Tag" || e.component === "DatePicker" && String(e.componentProps?.type ?? "").includes("range") : !1;
615
615
  }
616
616
  function we(e) {
617
617
  return !!e.newLineStart && !Ce(e);
@@ -691,7 +691,7 @@ var pt = /* @__PURE__ */ j({
691
691
  "rules",
692
692
  "class",
693
693
  "style"
694
- ]), g.value && U(_) > 1 && we(n) ? (I(), E("div", ht)) : T("", !0)], 64))), 128)), z(e.$slots, "default")]),
694
+ ]), we(n) && U(_) > 1 ? (I(), E("div", ht)) : T("", !0)], 64))), 128)), z(e.$slots, "default")]),
695
695
  _: 3
696
696
  }, 16, [
697
697
  "class",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kayak-sj/design",
3
- "version": "1.0.59",
3
+ "version": "1.0.61",
4
4
  "type": "module",
5
5
  "description": "PC 组件库(Vue3 + Element Plus,对应旧 @kayak/kayak-design-vue2)",
6
6
  "license": "ISC",
@@ -28,12 +28,7 @@
28
28
  width: 100%;
29
29
  }
30
30
 
31
- /// newLineStart 普通字段:靠左占一列,宽度与同列双字段对齐
32
- .k-form__item--row-start {
33
- grid-column-start: 1;
34
- }
35
-
36
- /// Editor / Upload / 日期区间:真正撑满整行
31
+ /// newLineStart 宽内容(业务自定义 / Editor / Upload / 区间等):整行铺满
37
32
  .k-form__item--full-row,
38
33
  .k-form__item:has(.k-editor),
39
34
  .k-form__item:has(.k-upload),
@@ -41,18 +36,33 @@
41
36
  grid-column: 1 / -1;
42
37
  }
43
38
 
44
- /// 与 --row-start 配对,占满同行剩余列,避免下一个字段挤上来
45
- > .k-form__row-fill {
39
+ /// 标准 newLineStart(Input / Select / 单日期等):只占第 1 列,与多列同行字段同轨同宽
40
+ .k-form__item--row-start {
41
+ grid-column: 1;
42
+ }
43
+
44
+ /// 占满本行剩余列,避免后续字段挤到同一行
45
+ .k-form__row-fill {
46
46
  grid-column: 2 / -1;
47
47
  height: 0;
48
48
  margin: 0;
49
49
  padding: 0;
50
- border: 0;
51
50
  overflow: hidden;
52
- visibility: hidden;
53
51
  pointer-events: none;
54
52
  }
55
53
 
54
+ .k-form__item--full-row {
55
+ .k-form-date-picker--datetimerange,
56
+ .k-form-date-picker:has(.el-date-editor--datetimerange),
57
+ .k-editor,
58
+ .k-upload,
59
+ .k-upload-wrap {
60
+ max-width: none;
61
+ min-width: 0;
62
+ width: 100%;
63
+ }
64
+ }
65
+
56
66
  .el-form-item__label {
57
67
  flex-shrink: 0;
58
68
  height: auto;
@@ -105,6 +115,7 @@
105
115
  .el-date-editor,
106
116
  .el-cascader,
107
117
  .k-datePicker {
118
+ width: 100%;
108
119
  max-width: var(--k-form-control-max-width);
109
120
  /* 硬下限:与换行阈值一致,不再随容器无限压扁 */
110
121
  min-width: var(--k-form-control-min-width);
@@ -221,8 +232,7 @@
221
232
  max-width: var(--k-form-query-daterange-col-width);
222
233
  }
223
234
 
224
- .k-form__item--full-row,
225
- .k-form__item--row-start {
235
+ .k-form__item--full-row {
226
236
  flex: 1 1 100%;
227
237
  max-width: none;
228
238
  }