@web-utils/form-ui 1.0.0-beta54 → 1.0.0-beta56

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.
Files changed (94) hide show
  1. package/api/index.d.ts +6 -0
  2. package/chunks/{B3yVc-P62.mjs → 5KomemiE2.mjs} +20 -20
  3. package/chunks/{H70Z56YY.mjs → 6GcIyEQV.mjs} +8 -8
  4. package/chunks/{DjnHvHXo.mjs → 8c9TEVNY.mjs} +3 -2
  5. package/chunks/AAZfNtly.mjs +119 -0
  6. package/chunks/{ByTyNsWf.mjs → B3A-CnYr.mjs} +2 -2
  7. package/chunks/{D5EQJdPL.mjs → BKlMENhV.mjs} +8 -8
  8. package/chunks/{9MExJqL-.mjs → BNVYEWWW.mjs} +7 -7
  9. package/chunks/{c0Niqotr.mjs → BTuzBfTA.mjs} +18 -18
  10. package/chunks/{GI8krYU82.mjs → BZTAuJxn2.mjs} +1 -1
  11. package/chunks/{DawYTjoT.mjs → BpCiVuKL.mjs} +2 -2
  12. package/chunks/{D7R9Or2m2.mjs → Bq62m7IR2.mjs} +13 -13
  13. package/chunks/BvKUeniN.mjs +127 -0
  14. package/chunks/{CGuDBVCB.mjs → C3MF_-bN.mjs} +11 -11
  15. package/chunks/{BNXbI4OG.mjs → C6Dq9Dgb.mjs} +1 -1
  16. package/chunks/{DwkOWXIR.mjs → C6u76g6o.mjs} +21 -21
  17. package/chunks/{B6yWUT6z.mjs → C7Mak2La.mjs} +2 -2
  18. package/chunks/{BV-XUugQ.mjs → CLO5X9Lb.mjs} +34 -34
  19. package/chunks/{DFFNxlqD.mjs → CNK4mfga.mjs} +3 -3
  20. package/chunks/{BEvOkSfB.mjs → CauzhVSa2.mjs} +10 -10
  21. package/chunks/{BJYlobMz2.mjs → CdoiMj7L2.mjs} +3 -2
  22. package/chunks/{CgN7m-1v.mjs → Czz_49pC.mjs} +22 -22
  23. package/chunks/{XwerN1TU.mjs → D0kIhzQo.mjs} +5 -5
  24. package/chunks/{CGDnQr1c.mjs → D2B9Y3oT.mjs} +1 -1
  25. package/chunks/{BjGlxyi6.mjs → DWE67l1f.mjs} +47 -47
  26. package/chunks/{BqC_VU52.mjs → DZrQmH9Y.mjs} +5 -5
  27. package/chunks/{BgTCTXs72.mjs → D_L1p3vm2.mjs} +6 -6
  28. package/chunks/{BqzJ6vY6.mjs → Dluor05A.mjs} +2 -2
  29. package/chunks/{z5FJgzdc.mjs → Dy_5vPdP.mjs} +8 -8
  30. package/chunks/{Dytof5EW.mjs → Goee5Y-H.mjs} +13 -13
  31. package/chunks/{CB9QUXUX.mjs → ecpQ-ODX.mjs} +5 -5
  32. package/chunks/{D9IFsT272.mjs → g8MIBMw92.mjs} +10 -10
  33. package/constants/index.d.ts +18 -0
  34. package/editable-tree/index.d.ts +27 -0
  35. package/form-cascader/index.mjs +1 -1
  36. package/form-checkbox/index.mjs +1 -1
  37. package/form-checkbox-group/index.d.ts +3 -0
  38. package/form-checkbox-group/index.mjs +1 -1
  39. package/form-date-picker/index.d.ts +6 -0
  40. package/form-date-picker/index.mjs +1 -1
  41. package/form-holder/index.mjs +1 -1
  42. package/form-holder/style.css +1 -1
  43. package/form-image/index.mjs +1 -1
  44. package/form-input/index.mjs +1 -1
  45. package/form-input-cron-expression/index.mjs +1 -1
  46. package/form-input-email/index.mjs +1 -1
  47. package/form-input-id-card/index.mjs +1 -1
  48. package/form-input-number/index.mjs +1 -1
  49. package/form-input-phone-number/index.mjs +1 -1
  50. package/form-input-tag/index.mjs +1 -1
  51. package/form-input-time/index.mjs +1 -1
  52. package/form-item-config-provider/index.d.ts +18 -0
  53. package/form-item-group/index.mjs +1 -1
  54. package/form-item-x/index.mjs +1 -1
  55. package/form-item-x/style.css +1 -1
  56. package/form-radio-group/index.mjs +1 -1
  57. package/form-rate/index.mjs +1 -1
  58. package/form-row/index.mjs +1 -1
  59. package/form-select/index.mjs +1 -1
  60. package/form-slider/index.mjs +1 -1
  61. package/form-switch/index.mjs +1 -1
  62. package/form-table/index.mjs +1 -1
  63. package/form-table-plus/index.mjs +1 -1
  64. package/form-text/index.mjs +1 -1
  65. package/form-textarea/index.mjs +1 -1
  66. package/form-time-select/index.mjs +1 -1
  67. package/helper/dictionary.d.ts +14 -0
  68. package/helper/form-item.d.ts +17 -0
  69. package/helper/form-item.mjs +2 -0
  70. package/helper/input.d.ts +47 -0
  71. package/helper/input.mjs +2 -0
  72. package/helper/sub-table-plus.d.ts +60 -0
  73. package/index.css +1 -1
  74. package/index.mjs +34 -34
  75. package/package.json +1 -1
  76. package/pageable-table/index.mjs +1 -1
  77. package/sub-table/index.d.ts +3 -0
  78. package/sub-table/index.mjs +1 -1
  79. package/sub-table-plus/index.mjs +1 -1
  80. package/table-column/index.mjs +1 -1
  81. package/table-column-def/index.mjs +1 -1
  82. package/table-view/index.mjs +3 -3
  83. package/toolbar/index.mjs +1 -1
  84. package/vue-cron/index.mjs +1 -1
  85. package/web-types.json +1 -1
  86. package/year-calendar/index.mjs +1 -1
  87. package/year-calendar/style.css +1 -1
  88. package/chunks/BHbMJZPp.mjs +0 -237
  89. /package/chunks/{B_RAcbs_.mjs → BNqVEHk_.mjs} +0 -0
  90. /package/chunks/{DOP3aBxf.mjs → BlxLaWcU.mjs} +0 -0
  91. /package/chunks/{CPvdsnRN.mjs → BoJgSMkL.mjs} +0 -0
  92. /package/chunks/{4rnKCvCw.mjs → DTVTvvq-.mjs} +0 -0
  93. /package/chunks/{DyCO22Ia2.mjs → Dt_s96gL2.mjs} +0 -0
  94. /package/chunks/{XoImEoke.mjs → xq_LR6R2.mjs} +0 -0
@@ -1,5 +1,5 @@
1
- import { i as e, n as t } from "./BHbMJZPp.mjs";
2
- import { n } from "./BNXbI4OG.mjs";
1
+ import { n as e, o as t } from "./BvKUeniN.mjs";
2
+ import { n } from "./C6Dq9Dgb.mjs";
3
3
  import { computed as r, createVNode as i, mergeProps as a } from "vue";
4
4
  import { ElDatePicker as o } from "element-plus/es";
5
5
  import { toDate as s } from "@web-utils/integrations/dayjs";
@@ -149,31 +149,31 @@ var c = {
149
149
  inheritAttrs: !1,
150
150
  props: { ...c },
151
151
  emits: {
152
- ...t,
152
+ ...e,
153
153
  "update:startDate": null,
154
154
  "update:endDate": null
155
155
  },
156
- setup(t, { emit: n, slots: c, attrs: l }) {
157
- let { emitInput: d, render: f, placeholder: p, disabled: m, listeners: h, inputProps: g } = e(t, {
156
+ setup(e, { emit: n, slots: c, attrs: l }) {
157
+ let { emitInput: d, render: f, placeholder: p, disabled: m, listeners: h, inputProps: g } = t(e, {
158
158
  emit: n,
159
159
  slots: c,
160
160
  attrs: l,
161
161
  predicate: u,
162
162
  messagePrefix: "请选择"
163
- }), _ = r(() => t.dateTimeRange || t.dateRange || t.monthRange), v = r(() => t.year ? "YYYY" : t.month || t.monthRange ? "YYYY-MM" : t.week ? "YYYY 第 WW 周" : t.dateTime || t.dateTimeRange ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD"), y = r(() => t.year ? "year" : t.month ? "month" : t.dates ? "dates" : t.week ? "week" : t.dateTime ? "datetime" : t.dateTimeRange ? "datetimerange" : t.dateRange ? "daterange" : t.monthRange ? "monthrange" : "date"), b = r(() => {
164
- if (t.miniDate) {
165
- let e = s(t.miniDate);
166
- return e.setDate(e.getDate() - 1), e;
163
+ }), _ = r(() => e.dateTimeRange || e.dateRange || e.monthRange), v = r(() => e.year ? "YYYY" : e.month || e.monthRange ? "YYYY-MM" : e.week ? "YYYY 第 WW 周" : e.dateTime || e.dateTimeRange ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD"), y = r(() => e.year ? "year" : e.month ? "month" : e.dates ? "dates" : e.week ? "week" : e.dateTime ? "datetime" : e.dateTimeRange ? "datetimerange" : e.dateRange ? "daterange" : e.monthRange ? "monthrange" : "date"), b = r(() => {
164
+ if (e.miniDate) {
165
+ let t = s(e.miniDate);
166
+ return t.setDate(t.getDate() - 1), t;
167
167
  } else return null;
168
- }), x = r(() => t.maxDate ? s(t.maxDate) : null), S = (e) => {
168
+ }), x = r(() => e.maxDate ? s(e.maxDate) : null), S = (e) => {
169
169
  if (!b.value && !x.value) return !1;
170
170
  let t = e.getTime();
171
171
  return b.value && !x.value ? t <= b.value.getTime() : !b.value && x.value ? t >= x.value.getTime() : b.value && x.value ? !(t > b.value.getTime() && t <= x.value.getTime()) : !1;
172
172
  }, C = (e, t) => {
173
173
  n("update:startDate", e), n("update:endDate", t);
174
- }, w = (e) => {
175
- _.value && t.split ? e ? C(e[0], e[1]) : C(null, null) : d(e);
176
- }, T = r(() => _.value && t.split ? [t.startDate, t.endDate] : t.modelValue), E = r(() => t.week ? "YYYY-MM-DD" : t.valueFormat || v.value), D = r(() => t.format || v.value);
174
+ }, w = (t) => {
175
+ _.value && e.split ? t ? C(t[0], t[1]) : C(null, null) : d(t);
176
+ }, T = r(() => _.value && e.split ? [e.startDate, e.endDate] : e.modelValue), E = r(() => e.week ? "YYYY-MM-DD" : e.valueFormat || v.value), D = r(() => e.format || v.value);
177
177
  return () => f({ vNodes: i(o, a(h.value, g.value, {
178
178
  style: "width: 100%",
179
179
  type: y.value,
@@ -1,5 +1,5 @@
1
- import { i as e, n as t } from "./BHbMJZPp.mjs";
2
- import { n } from "./BNXbI4OG.mjs";
1
+ import { n as e, o as t } from "./BvKUeniN.mjs";
2
+ import { n } from "./C6Dq9Dgb.mjs";
3
3
  import { createVNode as r, mergeProps as i, useModel as a } from "vue";
4
4
  import { ElSwitch as o } from "element-plus/es";
5
5
  //#region src/components/form/props/switch.ts
@@ -82,9 +82,9 @@ var s = {
82
82
  name: "FormSwitch",
83
83
  inheritAttrs: !1,
84
84
  props: { ...s },
85
- emits: { ...t },
86
- setup(t, { emit: n, slots: s, attrs: c }) {
87
- let u = a(t, "modelValue"), { render: d, disabled: f, listeners: p, inputProps: m } = e(t, {
85
+ emits: { ...e },
86
+ setup(e, { emit: n, slots: s, attrs: c }) {
87
+ let u = a(e, "modelValue"), { render: d, disabled: f, listeners: p, inputProps: m } = t(e, {
88
88
  emit: n,
89
89
  attrs: c,
90
90
  slots: s,
@@ -3,16 +3,16 @@ import { t } from "./DOZRzqlo.mjs";
3
3
  import { cellClickHandlerContextKey as n } from "../constants/index.mjs";
4
4
  import { t as r } from "./7GmKqdbC.mjs";
5
5
  import { t as i } from "./CkOD-_VV.mjs";
6
- import { n as a } from "./BHbMJZPp.mjs";
7
- import { t as o } from "./CgN7m-1v.mjs";
8
- import { t as ee } from "./H70Z56YY.mjs";
9
- import { t as s } from "./DwkOWXIR.mjs";
10
- import { t as c } from "./BV-XUugQ.mjs";
11
- import { t as l } from "./Dytof5EW.mjs";
12
- import { t as u } from "./z5FJgzdc.mjs";
13
- import { t as d } from "./B6yWUT6z.mjs";
14
- import { t as f } from "./BjGlxyi6.mjs";
15
- import { t as p } from "./ByTyNsWf.mjs";
6
+ import { n as a } from "./BvKUeniN.mjs";
7
+ import { t as o } from "./Czz_49pC.mjs";
8
+ import { t as ee } from "./6GcIyEQV.mjs";
9
+ import { t as s } from "./C6u76g6o.mjs";
10
+ import { t as c } from "./CLO5X9Lb.mjs";
11
+ import { t as l } from "./Goee5Y-H.mjs";
12
+ import { t as u } from "./Dy_5vPdP.mjs";
13
+ import { t as d } from "./C7Mak2La.mjs";
14
+ import { t as f } from "./DWE67l1f.mjs";
15
+ import { t as p } from "./B3A-CnYr.mjs";
16
16
  import m from "../table-column-def/index.mjs";
17
17
  import { findTreeChildren as h, isFunction as g } from "@web-utils/core";
18
18
  import { Fragment as _, createBlock as v, createCommentVNode as y, createElementBlock as b, createElementVNode as x, createSlots as S, createTextVNode as C, createVNode as w, mergeProps as T, normalizeClass as E, openBlock as D, renderList as O, renderSlot as k, resolveComponent as A, toDisplayString as j, toHandlers as M, withCtx as N, withModifiers as P } from "vue";
@@ -1,22 +1,40 @@
1
1
  import { InjectionKey, ComputedRef } from 'vue';
2
2
  export declare const formHolderContextKey: InjectionKey<{
3
+ /** 表单实例的响应式引用 */
3
4
  tableForm: boolean;
5
+ /** 是否禁用整个表单的响应式引用 */
4
6
  disabled: boolean;
7
+ /** 启用的字段列表的响应式引用 */
5
8
  enabledFields: string[];
9
+ /** 必填字段列表的响应式引用 */
6
10
  requiredFields: string[];
11
+ /** 启用字段的映射表的响应式引用,用于快速查找字段状态 */
7
12
  enabledFieldsMap: Record<string, boolean | undefined>;
13
+ /** 禁用字段的映射表的响应式引用,用于快速查找字段状态 */
8
14
  disabledFieldsMap: Record<string, boolean | undefined>;
15
+ /** 必填字段的映射表的响应式引用,用于快速查找字段状态 */
9
16
  requiredFieldsMap: Record<string, boolean | undefined>;
17
+ /** 禁用字段列表的响应式引用 */
10
18
  disabledFields: string[];
19
+ /** 滚动到第一个必填字段的方法 */
11
20
  scrollIntoRequiredField: () => Promise<void> | any;
21
+ /** 表单的模板引用,用于直接访问DOM元素或组件实例 */
12
22
  formRef: unknown;
23
+ /** 验证整个表单的方法,返回Promise以便支持异步验证 */
13
24
  validate: () => Promise<void> | any;
25
+ /** 验证指定字段的方法 */
14
26
  validateField: () => any;
27
+ /** 重置所有表单字段到初始值的方法 */
15
28
  resetFields: () => any;
29
+ /** 滚动到指定字段的方法 */
16
30
  scrollToField: () => any;
31
+ /** 清除所有验证错误信息的方法 */
17
32
  clearValidate: () => any;
33
+ /** 获取指定字段实例的方法 */
18
34
  getField: () => any;
35
+ /** 设置表单初始值的方法 */
19
36
  setInitialValues: () => any;
37
+ /** 获取所有字段实例的方法 */
20
38
  getFields: () => any;
21
39
  }>;
22
40
  export declare const formItemGroupContextKey: InjectionKey<{
@@ -140,14 +140,41 @@ declare const _default: import('vue').DefineComponent<globalThis.ExtractPropType
140
140
  registerNode(node: any): void;
141
141
  reloadTree(): Promise<void>;
142
142
  }, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
143
+ /**
144
+ * 移除新增节点事件
145
+ */
143
146
  'remove-new-node': null;
147
+ /**
148
+ * 节点加载完成事件
149
+ */
144
150
  'node-loaded': null;
151
+ /**
152
+ * 根节点加载完成事件
153
+ */
145
154
  'root-node-loaded': null;
155
+ /**
156
+ * 节点删除事件
157
+ */
146
158
  'node-deleted': null;
159
+ /**
160
+ * 节点更新事件
161
+ */
147
162
  'node-updated': null;
163
+ /**
164
+ * 节点添加事件
165
+ */
148
166
  'node-added': null;
167
+ /**
168
+ * 节点点击事件
169
+ */
149
170
  'on-node-click': null;
171
+ /**
172
+ * 添加根节点事件
173
+ */
150
174
  'add-root-node': null;
175
+ /**
176
+ * 创建新节点事件
177
+ */
151
178
  'create-new-node': null;
152
179
  }, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
153
180
  label: {
@@ -1,2 +1,2 @@
1
- import { t as e } from "../chunks/CgN7m-1v.mjs";
1
+ import { t as e } from "../chunks/Czz_49pC.mjs";
2
2
  export { e as default };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../chunks/H70Z56YY.mjs";
1
+ import { t as e } from "../chunks/6GcIyEQV.mjs";
2
2
  export { e as default };
@@ -162,6 +162,9 @@ declare const _default: import('vue').DefineComponent<globalThis.ExtractPropType
162
162
  }>, () => globalThis.VNode<import('vue').RendererNode, import('vue').RendererElement, {
163
163
  [key: string]: any;
164
164
  }>, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
165
+ /**
166
+ * 更新其他
167
+ */
165
168
  'update:other': null;
166
169
  "update:modelValue": null;
167
170
  }, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
@@ -1,2 +1,2 @@
1
- import { t as e } from "../chunks/BV-XUugQ.mjs";
1
+ import { t as e } from "../chunks/CLO5X9Lb.mjs";
2
2
  export { e as default };
@@ -211,7 +211,13 @@ declare const _default: import('vue').DefineComponent<globalThis.ExtractPropType
211
211
  }>, () => globalThis.VNode<import('vue').RendererNode, import('vue').RendererElement, {
212
212
  [key: string]: any;
213
213
  }>, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
214
+ /**
215
+ * 更新开始时间, split 为 true 时有效
216
+ */
214
217
  'update:startDate': null;
218
+ /**
219
+ * 更新结束时间, split 为 true 时有效
220
+ */
215
221
  'update:endDate': null;
216
222
  "update:modelValue": null;
217
223
  }, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
@@ -1,2 +1,2 @@
1
- import { t as e } from "../chunks/Dytof5EW.mjs";
1
+ import { t as e } from "../chunks/Goee5Y-H.mjs";
2
2
  export { e as default };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../chunks/4rnKCvCw.mjs";
1
+ import { t as e } from "../chunks/DTVTvvq-.mjs";
2
2
  export { e as default };
@@ -1 +1 @@
1
- @keyframes breathe{0%{box-shadow:0 0 #ff7a7a}to{box-shadow:0 0 10px 1px #ff7a7a}}.breathe-animation{border-radius:4px;animation-name:breathe;animation-duration:.3s;animation-timing-function:ease-in-out;animation-iteration-count:6;animation-direction:alternate;animation-delay:.1s}.red-form .red-form-footer{margin-top:14px}.red-form .hide-error-message .el-form-item__error{display:none}@media print{.red-form .el-input__suffix,.red-form .el-input__prefix,.red-form .el-input__icon.el-range__icon.el-icon-date,.red-form .red-form-footer,.red-form .el-input__count{display:none}.red-form .el-input__inner,.red-form .el-textarea__inner,.red-form .x-input-tag,.red-form .el-input.is-disabled .el-input__inner,.red-form .el-input.is-readonly .el-input__inner{background-color:#0000;border:none;padding:0!important}.red-form .el-form-item{margin-bottom:0}.red-form .el-form-item .el-form-item__content,.red-form .el-form-item .el-form-item__label,.red-form .el-input__inner{height:auto;min-height:0;line-height:1.5}}
1
+ @keyframes breathe{0%{box-shadow:0 0 #ff7a7a}to{box-shadow:0 0 10px 1px #ff7a7a}}.breathe-animation{border-radius:4px;animation-name:breathe;animation-duration:.3s;animation-timing-function:ease-in-out;animation-iteration-count:6;animation-direction:alternate;animation-delay:.1s}.red-form .red-form-footer{margin-top:14px}.red-form .hide-error-message .el-form-item__error{display:none}@media print{.red-form .el-input__suffix,.red-form .el-input__prefix,.red-form .el-input__icon.el-range__icon.el-icon-date,.red-form .red-form-footer,.red-form .el-icon.el-select__caret.el-select__icon,.red-form .el-input__count{display:none}.red-form .el-input__inner,.red-form .el-input__wrapper,.red-form .el-textarea__inner,.red-form .x-input-tag,.red-form .el-input.is-disabled .el-input__wrapper,.red-form .el-select__wrapper.is-disabled,.red-form .el-input.is-disabled .el-input__inner,.red-form .el-input.is-readonly .el-input__inner{box-shadow:none;background-color:#0000;border:none;padding:0!important}.red-form .el-input.is-disabled .el-input__inner,.red-form .el-select__wrapper.is-disabled .el-select__selected-item,.red-form .el-radio__input.is-disabled+span.el-radio__label{color:#000;-webkit-text-fill-color:#000}.red-form .el-form-item{margin-bottom:0}.red-form .el-form-item .el-form-item__content,.red-form .el-form-item .el-form-item__label,.red-form .el-input__inner{height:auto;min-height:0;line-height:1.5}}
@@ -1,2 +1,2 @@
1
- import { t as e } from "../chunks/DjnHvHXo.mjs";
1
+ import { t as e } from "../chunks/8c9TEVNY.mjs";
2
2
  export { e as default };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../chunks/DwkOWXIR.mjs";
1
+ import { t as e } from "../chunks/C6u76g6o.mjs";
2
2
  export { e as default };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../chunks/D5EQJdPL.mjs";
1
+ import { t as e } from "../chunks/BKlMENhV.mjs";
2
2
  export { e as default };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../chunks/BqzJ6vY6.mjs";
1
+ import { t as e } from "../chunks/Dluor05A.mjs";
2
2
  export { e as default };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../chunks/DawYTjoT.mjs";
1
+ import { t as e } from "../chunks/BpCiVuKL.mjs";
2
2
  export { e as default };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../chunks/z5FJgzdc.mjs";
1
+ import { t as e } from "../chunks/Dy_5vPdP.mjs";
2
2
  export { e as default };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../chunks/B6yWUT6z.mjs";
1
+ import { t as e } from "../chunks/C7Mak2La.mjs";
2
2
  export { e as default };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../chunks/9MExJqL-.mjs";
1
+ import { t as e } from "../chunks/BNVYEWWW.mjs";
2
2
  export { e as default };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../chunks/CGuDBVCB.mjs";
1
+ import { t as e } from "../chunks/C3MF_-bN.mjs";
2
2
  export { e as default };
@@ -1,6 +1,15 @@
1
1
  declare const _default: import('vue').DefineComponent<globalThis.ExtractPropTypes<{
2
+ /**
3
+ * 表单项是否为响应式
4
+ */
2
5
  reactive: BooleanConstructor;
6
+ /**
7
+ * 表单项是否占满一行
8
+ */
3
9
  block: BooleanConstructor;
10
+ /**
11
+ * 表单项是使用 ElCol 包裹
12
+ */
4
13
  wrapCol: {
5
14
  type: BooleanConstructor;
6
15
  default: boolean;
@@ -8,8 +17,17 @@ declare const _default: import('vue').DefineComponent<globalThis.ExtractPropType
8
17
  }>, () => globalThis.VNode<import('vue').RendererNode, import('vue').RendererElement, {
9
18
  [key: string]: any;
10
19
  }>[], {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
20
+ /**
21
+ * 表单项是否为响应式
22
+ */
11
23
  reactive: BooleanConstructor;
24
+ /**
25
+ * 表单项是否占满一行
26
+ */
12
27
  block: BooleanConstructor;
28
+ /**
29
+ * 表单项是使用 ElCol 包裹
30
+ */
13
31
  wrapCol: {
14
32
  type: BooleanConstructor;
15
33
  default: boolean;
@@ -1,2 +1,2 @@
1
- import { t as e } from "../chunks/B_RAcbs_.mjs";
1
+ import { t as e } from "../chunks/BNqVEHk_.mjs";
2
2
  export { e as default };
@@ -1,2 +1,2 @@
1
- import { a as e } from "../chunks/BHbMJZPp.mjs";
1
+ import { s as e } from "../chunks/BvKUeniN.mjs";
2
2
  export { e as default };
@@ -1 +1 @@
1
- .form-item{--el-disabled-text-color:#606266}.form-item .el-checkbox,.form-item .el-radio__input.is-disabled .el-radio__inner:after{--el-checkbox-disabled-checked-icon-color:#606266;--el-text-color-placeholder:#606266}.form-item.with-tips .el-form-item__content{flex-wrap:nowrap}.form-item.required.el-form-item.is-required>.el-form-item__label:before,.form-item.required.el-form-item.is-required>.el-form-item__label-wrap>.el-form-item__label:before{display:block!important}.form-item-input-info{color:gray;cursor:help;margin-left:4px;font-size:16px}.form-item.el-form-item.is-required:not(.is-no-asterisk) .el-form-item__label:before{color:#f56c6c;content:"*";margin-right:4px;display:inline}.form-item.el-form-item .el-form-item__content{min-height:29px}.form-item.el-form-item.el-form-item--mini .el-form-item__content{line-height:27px}.form-item.el-form-item.form-item-hide-label{margin-left:6px}.form-item.el-form-item.form-item-hide-label .el-form-item__label{display:none}.form-item-input-wrapper{flex-direction:row;align-items:center;width:100%;display:flex}.form-item-input-wrapper>form{width:100%}.form-item-input-wrapper .el-input{flex:auto}.form-item-input-wrapper .form-item-input-info{color:gray;cursor:help;margin-left:4px;font-size:16px}@media print{.form-item-input-info{display:none}}
1
+ .form-item{--el-disabled-text-color:#606266;--el-text-color-placeholder:var(--el-disabled-text-color)}.form-item .el-checkbox,.form-item .el-radio__input.is-disabled .el-radio__inner:after{--el-checkbox-disabled-checked-icon-color:#606266;--el-text-color-placeholder:#606266}.form-item.with-tips .el-form-item__content{flex-wrap:nowrap}.form-item.required.el-form-item.is-required>.el-form-item__label:before,.form-item.required.el-form-item.is-required>.el-form-item__label-wrap>.el-form-item__label:before{display:block!important}.form-item-input-info{color:gray;cursor:help;margin-left:4px;font-size:16px}.form-item.el-form-item.is-required:not(.is-no-asterisk) .el-form-item__label:before{color:#f56c6c;content:"*";margin-right:4px;display:inline}.form-item.el-form-item .el-form-item__content{min-height:29px}.form-item.el-form-item.el-form-item--mini .el-form-item__content{line-height:27px}.form-item.el-form-item.form-item-hide-label{margin-left:6px}.form-item.el-form-item.form-item-hide-label .el-form-item__label{display:none}.form-item-input-wrapper{flex-direction:row;align-items:center;width:100%;display:flex}.form-item-input-wrapper>form{width:100%}.form-item-input-wrapper .el-input{flex:auto}.form-item-input-wrapper .form-item-input-info{color:gray;cursor:help;margin-left:4px;font-size:16px}@media print{.form-item-input-info{display:none}}
@@ -1,2 +1,2 @@
1
- import { t as e } from "../chunks/c0Niqotr.mjs";
1
+ import { t as e } from "../chunks/BTuzBfTA.mjs";
2
2
  export { e as default };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../chunks/XwerN1TU.mjs";
1
+ import { t as e } from "../chunks/D0kIhzQo.mjs";
2
2
  export { e as default };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../chunks/DOP3aBxf.mjs";
1
+ import { t as e } from "../chunks/BlxLaWcU.mjs";
2
2
  export { e as default };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../chunks/BjGlxyi6.mjs";
1
+ import { t as e } from "../chunks/DWE67l1f.mjs";
2
2
  export { e as default };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../chunks/BqC_VU52.mjs";
1
+ import { t as e } from "../chunks/DZrQmH9Y.mjs";
2
2
  export { e as default };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../chunks/CB9QUXUX.mjs";
1
+ import { t as e } from "../chunks/ecpQ-ODX.mjs";
2
2
  export { e as default };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../chunks/D7R9Or2m2.mjs";
1
+ import { t as e } from "../chunks/Bq62m7IR2.mjs";
2
2
  export { e as default };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../chunks/B3yVc-P62.mjs";
1
+ import { t as e } from "../chunks/5KomemiE2.mjs";
2
2
  export { e as default };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../chunks/BJYlobMz2.mjs";
1
+ import { t as e } from "../chunks/CdoiMj7L2.mjs";
2
2
  export { e as default };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../chunks/DFFNxlqD.mjs";
1
+ import { t as e } from "../chunks/CNK4mfga.mjs";
2
2
  export { e as default };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../chunks/BgTCTXs72.mjs";
1
+ import { t as e } from "../chunks/D_L1p3vm2.mjs";
2
2
  export { e as default };
@@ -6,8 +6,22 @@ export type DictOption = {
6
6
  idAsValue?: boolean;
7
7
  labelAsValue?: boolean;
8
8
  };
9
+ /**
10
+ * 获取字典
11
+ * @param type 字典类型
12
+ * @param cache 是否使用缓存
13
+ * @param api
14
+ * @param idAsValue
15
+ * @param labelAsValue
16
+ */
9
17
  export declare const getDictData: (type: string, cache?: boolean, { options, treeDict, idAsValue, labelAsValue }?: DictOption) => DictItem[] | readonly DictItem[] | Promise<DictItem[] | readonly DictItem[] | null>;
18
+ /**
19
+ * 获取字典项
20
+ */
10
21
  export declare const getDictItem: (type: string, value: any, cache?: boolean, { treeDict, idAsValue, labelAsValue }?: DictOption) => Promise<any>;
22
+ /**
23
+ * 获取字典项
24
+ */
11
25
  export declare const getDictLabel: (type: string, value: any, cache?: boolean, { treeDict, idAsValue, labelAsValue }?: DictOption) => Promise<any>;
12
26
  export declare const confirmOptions: readonly {
13
27
  label: string;
@@ -0,0 +1,17 @@
1
+ import { Attrs } from 'vue';
2
+ export declare const useRequired: (props: Record<string, any>) => globalThis.ComputedRef<boolean>;
3
+ /**
4
+ *
5
+ * @param props
6
+ * @param param1
7
+ * @param param1.rules
8
+ * @returns {ComputedRef<{}>}
9
+ */
10
+ export declare const useFormItemProps: (props: Record<string, any>, { rules, attrs, block, class: clas, messagePrefix, message }?: {
11
+ rules?: object[];
12
+ attrs?: Attrs;
13
+ class?: string;
14
+ block?: boolean;
15
+ messagePrefix?: string;
16
+ message?: string;
17
+ }) => ComputedRef<Record<string, any>>;
@@ -0,0 +1,2 @@
1
+ import { n as e, t } from "../chunks/AAZfNtly.mjs";
2
+ export { t as useFormItemProps, e as useRequired };
@@ -0,0 +1,47 @@
1
+ import { Attrs } from 'vue';
2
+ export declare const useDisabled: (props: Record<string, any>) => globalThis.ComputedRef<any>;
3
+ export declare const inputEmits: {
4
+ /**
5
+ * 输入事件
6
+ */
7
+ "update:modelValue": null;
8
+ };
9
+ export declare const updateModelValue: (emit: (event: string, ...args: any[]) => void, value: any) => void;
10
+ export declare const renderFormItem: (props: Record<string, any>, { vNodes, formItemProps, slots, disabled }: {
11
+ disabled: ComputedRef<boolean>;
12
+ vNodes: VNode;
13
+ formItemProps: Record<string, any>;
14
+ slots: Readonly<any>;
15
+ }) => globalThis.VNode<import('vue').RendererNode, import('vue').RendererElement, {
16
+ [key: string]: any;
17
+ }>;
18
+ export declare const useInput: (props: Record<string, any>, { emit, slots, events, predicate, removeOn, attrs, block, class: clas, rules, messagePrefix, extraFormItemProps }: {
19
+ emit: (event: string, ...args: any[]) => void;
20
+ events: string[];
21
+ slots: Readonly<any>;
22
+ attrs: Attrs;
23
+ block?: boolean;
24
+ rules: object[];
25
+ class?: string;
26
+ messagePrefix?: string;
27
+ removeOn?: boolean;
28
+ predicate: (key: string) => boolean;
29
+ extraFormItemProps: Record<string, any>;
30
+ }) => {
31
+ emitInput: (value: any) => void;
32
+ render: ({ vNodes }: {
33
+ vNodes: VNode;
34
+ }) => globalThis.VNode<import('vue').RendererNode, import('vue').RendererElement, {
35
+ [key: string]: any;
36
+ }>;
37
+ placeholder: globalThis.ComputedRef<string>;
38
+ disabled: globalThis.ComputedRef<any>;
39
+ formItemProps: globalThis.ComputedRef<Record<string, any>>;
40
+ autoBind: globalThis.ComputedRef<Record<string, any>>;
41
+ inputProps: globalThis.ComputedRef<Record<string, any>>;
42
+ listeners: globalThis.ComputedRef<Record<string, any>>;
43
+ printing: globalThis.ComputedRef<boolean>;
44
+ };
45
+ export declare const FontIcon: (props: Record<string, any>) => globalThis.VNode<import('vue').RendererNode, import('vue').RendererElement, {
46
+ [key: string]: any;
47
+ }> | null;
@@ -0,0 +1,2 @@
1
+ import { a as e, i as t, n, o as r, r as i, t as a } from "../chunks/BvKUeniN.mjs";
2
+ export { a as FontIcon, n as inputEmits, i as renderFormItem, t as updateModelValue, e as useDisabled, r as useInput };
@@ -6,24 +6,76 @@ export type Option = {
6
6
  label?: string;
7
7
  [key: string]: any;
8
8
  };
9
+ /**
10
+ * 表格列配置类型定义
11
+ * 用于定义动态表格或表单的列属性和行为
12
+ */
9
13
  export type ColumnType = {
14
+ /** 列显示标签文本,如不设置则默认为 prop 的转换 */
10
15
  label?: string;
16
+ /** 字段属性名,对应数据对象中的键名 */
11
17
  prop: string;
18
+ /** 字段类型 */
12
19
  type?: InputType;
20
+ /** 是否为必填字段 */
13
21
  required?: boolean;
22
+ /** 是否可编辑 */
14
23
  editable?: boolean;
24
+ /** 是否设置默认值,为 true 时会根据 type 自动设置初始值 */
15
25
  setVal?: boolean;
26
+ /** 字段对应的UI组件属性配置对象 */
16
27
  attrs?: object;
28
+ /**
29
+ * 动态获取字段属性的函数
30
+ * @param row 当前行数据对象
31
+ * @returns 动态属性配置对象
32
+ */
17
33
  getAttrs?: (row: object) => object;
34
+ /**
35
+ * 判断字段是否禁用的函数
36
+ * @param row 当前行数据对象
37
+ * @returns 是否禁用
38
+ */
18
39
  isDisabled?: (row: object) => boolean;
40
+ /**
41
+ * 设置字段值的自定义函数
42
+ * @param row 当前行数据对象
43
+ * @param val 当前字段值
44
+ * @param item 当前列配置对象
45
+ * @param rows 表格所有行数据
46
+ */
19
47
  setValue?: (row: object, val: any, item: ColumnType, rows: object[]) => void;
48
+ /**
49
+ * 字段失去焦点时的回调函数
50
+ * @param row 当前行数据对象
51
+ * @param item 当前列配置对象
52
+ * @param rows 表格所有行数据
53
+ */
20
54
  onBlur?: (row: object, item: ColumnType, rows: object[]) => void;
55
+ /**
56
+ * 动态获取字段类型的函数
57
+ * @param row 当前行数据对象
58
+ * @param item 当前列配置对象
59
+ * @returns 字段类型字符串
60
+ */
21
61
  getType?: (row: object, item: ColumnType) => string;
62
+ /**
63
+ * 获取显示值
64
+ * @param row 当前行数据对象
65
+ * @param column 列对象
66
+ * @param item 当前列配置对象
67
+ * @returns 显示值
68
+ */
22
69
  getVal?: (row: object, column: TableColumnCtx<object>, item: ColumnType) => any;
70
+ /** 是否单选,type 为 user, department 时有效 */
23
71
  single?: boolean;
72
+ /** id 属性名,type 为 user 时有效 */
24
73
  idProp?: string;
74
+ /** 部门类型,type 为 department 时有效 */
25
75
  ouType?: string;
76
+ /** 开始时间属性名,type 为 datePicker 时有效 */
26
77
  start?: string;
78
+ /** 结束时间属性名,type 为 datePicker 时有效 */
27
79
  end?: string;
28
80
  options?: Option[];
29
81
  dictType?: string;
@@ -34,5 +86,13 @@ export type ColumnType = {
34
86
  clickable?: boolean;
35
87
  showOverflowTooltip?: boolean;
36
88
  };
89
+ /**
90
+ * 定义列
91
+ * @param column
92
+ */
37
93
  export declare const definColumn: (column: ColumnType) => ColumnType;
94
+ /**
95
+ * 定义列
96
+ * @param columns
97
+ */
38
98
  export declare const defineColumns: (columns: ColumnType[]) => ColumnType[];