@web-utils/form-ui 1.0.0-beta53 → 1.0.0-beta55

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 (81) hide show
  1. package/chunks/{B3yVc-P62.mjs → 5KomemiE2.mjs} +20 -20
  2. package/chunks/{H70Z56YY.mjs → 6GcIyEQV.mjs} +8 -8
  3. package/chunks/{DjnHvHXo.mjs → 8c9TEVNY.mjs} +3 -2
  4. package/chunks/AAZfNtly.mjs +119 -0
  5. package/chunks/{ByTyNsWf.mjs → B3A-CnYr.mjs} +2 -2
  6. package/chunks/{D5EQJdPL.mjs → BKlMENhV.mjs} +8 -8
  7. package/chunks/{9MExJqL-.mjs → BNVYEWWW.mjs} +7 -7
  8. package/chunks/{c0Niqotr.mjs → BTuzBfTA.mjs} +18 -18
  9. package/chunks/{DawYTjoT.mjs → BpCiVuKL.mjs} +2 -2
  10. package/chunks/{D7R9Or2m2.mjs → Bq62m7IR2.mjs} +13 -13
  11. package/chunks/BvKUeniN.mjs +127 -0
  12. package/chunks/{CGuDBVCB.mjs → C3MF_-bN.mjs} +11 -11
  13. package/chunks/{BNXbI4OG.mjs → C6Dq9Dgb.mjs} +1 -1
  14. package/chunks/{DwkOWXIR.mjs → C6u76g6o.mjs} +21 -21
  15. package/chunks/{B6yWUT6z.mjs → C7Mak2La.mjs} +2 -2
  16. package/chunks/{BV-XUugQ.mjs → CLO5X9Lb.mjs} +34 -34
  17. package/chunks/{DFFNxlqD.mjs → CNK4mfga.mjs} +3 -3
  18. package/chunks/{BEvOkSfB.mjs → CauzhVSa2.mjs} +10 -10
  19. package/chunks/{BJYlobMz2.mjs → CdoiMj7L2.mjs} +3 -2
  20. package/chunks/{CgN7m-1v.mjs → Czz_49pC.mjs} +22 -22
  21. package/chunks/{XwerN1TU.mjs → D0kIhzQo.mjs} +5 -5
  22. package/chunks/{CGDnQr1c.mjs → D2B9Y3oT.mjs} +1 -1
  23. package/chunks/{oVFbZ6yk.mjs → DTVTvvq-.mjs} +5 -1
  24. package/chunks/{BjGlxyi6.mjs → DWE67l1f.mjs} +47 -47
  25. package/chunks/{BqC_VU52.mjs → DZrQmH9Y.mjs} +5 -5
  26. package/chunks/{BgTCTXs72.mjs → D_L1p3vm2.mjs} +6 -6
  27. package/chunks/{BqzJ6vY6.mjs → Dluor05A.mjs} +2 -2
  28. package/chunks/{z5FJgzdc.mjs → Dy_5vPdP.mjs} +8 -8
  29. package/chunks/{Dytof5EW.mjs → Goee5Y-H.mjs} +13 -13
  30. package/chunks/{CB9QUXUX.mjs → ecpQ-ODX.mjs} +5 -5
  31. package/chunks/{D9IFsT272.mjs → g8MIBMw92.mjs} +10 -10
  32. package/form-cascader/index.mjs +1 -1
  33. package/form-checkbox/index.mjs +1 -1
  34. package/form-checkbox-group/index.mjs +1 -1
  35. package/form-date-picker/index.mjs +1 -1
  36. package/form-holder/index.mjs +1 -1
  37. package/form-image/index.mjs +1 -1
  38. package/form-input/index.mjs +1 -1
  39. package/form-input-cron-expression/index.mjs +1 -1
  40. package/form-input-email/index.mjs +1 -1
  41. package/form-input-id-card/index.mjs +1 -1
  42. package/form-input-number/index.mjs +1 -1
  43. package/form-input-phone-number/index.mjs +1 -1
  44. package/form-input-tag/index.mjs +1 -1
  45. package/form-input-time/index.mjs +1 -1
  46. package/form-item-group/index.mjs +1 -1
  47. package/form-item-x/index.mjs +1 -1
  48. package/form-radio-group/index.mjs +1 -1
  49. package/form-rate/index.mjs +1 -1
  50. package/form-row/index.mjs +1 -1
  51. package/form-select/index.mjs +1 -1
  52. package/form-slider/index.mjs +1 -1
  53. package/form-switch/index.mjs +1 -1
  54. package/form-table/index.mjs +1 -1
  55. package/form-table-plus/index.mjs +1 -1
  56. package/form-text/index.mjs +1 -1
  57. package/form-textarea/index.mjs +1 -1
  58. package/form-time-select/index.mjs +1 -1
  59. package/helper/form-item.d.ts +10 -0
  60. package/helper/form-item.mjs +2 -0
  61. package/helper/input.d.ts +44 -0
  62. package/helper/input.mjs +2 -0
  63. package/index.mjs +34 -34
  64. package/package.json +1 -1
  65. package/pageable-table/index.mjs +1 -1
  66. package/sub-table/index.mjs +1 -1
  67. package/sub-table-plus/index.mjs +1 -1
  68. package/table-column/index.mjs +1 -1
  69. package/table-column-def/index.mjs +1 -1
  70. package/table-view/index.mjs +3 -3
  71. package/toolbar/index.mjs +1 -1
  72. package/vue-cron/index.mjs +1 -1
  73. package/web-types.json +1 -1
  74. package/year-calendar/index.mjs +1 -1
  75. package/chunks/BHbMJZPp.mjs +0 -237
  76. /package/chunks/{B_RAcbs_.mjs → BNqVEHk_.mjs} +0 -0
  77. /package/chunks/{DOP3aBxf.mjs → BlxLaWcU.mjs} +0 -0
  78. /package/chunks/{CPvdsnRN.mjs → BoJgSMkL.mjs} +0 -0
  79. /package/chunks/{GI8krYU82.mjs → Dg4R65aG2.mjs} +0 -0
  80. /package/chunks/{DyCO22Ia2.mjs → Dt_s96gL2.mjs} +0 -0
  81. /package/chunks/{XoImEoke.mjs → xq_LR6R2.mjs} +0 -0
@@ -1,8 +1,8 @@
1
1
  import { i as e } from "./DcTVYqeJ.mjs";
2
- import { i as t, n } from "./BHbMJZPp.mjs";
3
- import { n as r, t as i } from "./BNXbI4OG.mjs";
4
- import { r as a } from "./DwkOWXIR.mjs";
5
- import { n as o, t as s } from "./D9IFsT272.mjs";
2
+ import { n as t, o as n } from "./BvKUeniN.mjs";
3
+ import { n as r, t as i } from "./C6Dq9Dgb.mjs";
4
+ import { r as a } from "./C6u76g6o.mjs";
5
+ import { n as o, t as s } from "./g8MIBMw92.mjs";
6
6
  import { isArray as c, isString as l, trace as u, warning as d } from "@web-utils/core";
7
7
  import { computed as f, createVNode as p, getCurrentInstance as m, mergeProps as h, useModel as g, useTemplateRef as _ } from "vue";
8
8
  import { useEventBus as v } from "@web-utils/vue/hooks/useEventBus";
@@ -20,10 +20,10 @@ var y = {
20
20
  }, x = (e) => r[e] === void 0 && b[e] !== !0, S = {
21
21
  name: "FormTablePlus",
22
22
  props: { ...y },
23
- emits: { ...n },
24
- setup(n, { emit: r, slots: i, attrs: o, expose: y }) {
25
- let b = g(n, "modelValue"), S = _("table"), C = [];
26
- n.viewId && C.push(n.viewId);
23
+ emits: { ...t },
24
+ setup(t, { emit: r, slots: i, attrs: o, expose: y }) {
25
+ let b = g(t, "modelValue"), S = _("table"), C = [];
26
+ t.viewId && C.push(t.viewId);
27
27
  let w = m();
28
28
  C.includes(w.parent.proxy.$options.name) || C.push(w.parent.proxy.$options.name);
29
29
  let T = () => {
@@ -39,12 +39,12 @@ var y = {
39
39
  l(t) && (t = t.split(",")), C.some((e) => t.includes(e)) && (u.call(w.parent.proxy || {}, "reloadTableView"), T());
40
40
  } else d.call(w.parent.proxy || {}, "`viewId`的类型必须是字符串或数组");
41
41
  });
42
- let D = (...t) => {
43
- n.rowDbClick ? n.rowDbClick(...t) : w.proxy.$router.push(e(n.formPath, t[0]));
42
+ let D = (...n) => {
43
+ t.rowDbClick ? t.rowDbClick(...n) : w.proxy.$router.push(e(t.formPath, n[0]));
44
44
  }, O = () => {
45
- w.proxy.$router.push(e(n.formPath));
46
- }, { render: k, placeholder: A, disabled: j, listeners: M, inputProps: N } = t(n, {
47
- rules: f(() => [n.fetchApi ? {
45
+ w.proxy.$router.push(e(t.formPath));
46
+ }, { render: k, placeholder: A, disabled: j, listeners: M, inputProps: N } = n(t, {
47
+ rules: f(() => [t.fetchApi ? {
48
48
  required: !0,
49
49
  validator: a
50
50
  } : { required: !0 }]),
@@ -52,17 +52,17 @@ var y = {
52
52
  slots: i,
53
53
  attrs: o,
54
54
  predicate: x,
55
- block: n.block === void 0 ? !0 : n.block
55
+ block: t.block === void 0 ? !0 : t.block
56
56
  });
57
57
  return y({
58
58
  reloadTable: T,
59
59
  refreshTable: E
60
60
  }), () => {
61
61
  var e;
62
- let t = {};
63
- for (let r = 0; r < (((e = n.columns) == null ? void 0 : e.length) ?? 0); r++) {
64
- let e = n.columns[r];
65
- t[e.prop] = ({ row: t, column: n, index: r, prop: a, required: o }) => {
62
+ let n = {};
63
+ for (let r = 0; r < (((e = t.columns) == null ? void 0 : e.length) ?? 0); r++) {
64
+ let e = t.columns[r];
65
+ n[e.prop] = ({ row: t, column: n, index: r, prop: a, required: o }) => {
66
66
  var s;
67
67
  return (s = i[e.prop]) == null ? void 0 : s.call(i, {
68
68
  row: t,
@@ -74,7 +74,7 @@ var y = {
74
74
  };
75
75
  }
76
76
  return k({ vNodes: p(s, h({ ref: "table" }, M.value, N.value, {
77
- prop: n.prop,
77
+ prop: t.prop,
78
78
  disabled: j.value,
79
79
  onRowDbClick: D,
80
80
  rowDbClick: D,
@@ -83,7 +83,7 @@ var y = {
83
83
  placeholder: A.value,
84
84
  onAddRow: O
85
85
  }), {
86
- ...t,
86
+ ...n,
87
87
  columns: ({ columns: e }) => {
88
88
  var t;
89
89
  return (t = i.columns) == null ? void 0 : t.call(i, { columns: e });
@@ -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 { ElCheckbox as o } from "element-plus/es";
5
5
  //#region src/components/form/props/checkbox.ts
@@ -73,20 +73,20 @@ var s = {
73
73
  name: "FormCheckbox",
74
74
  inheritAttrs: !1,
75
75
  props: { ...s },
76
- emits: { ...t },
77
- setup(t, { emit: n, slots: s, attrs: c }) {
78
- let u = a(t, "modelValue"), { render: d, disabled: f, listeners: p, inputProps: m } = e(t, {
76
+ emits: { ...e },
77
+ setup(e, { emit: n, slots: s, attrs: c }) {
78
+ let u = a(e, "modelValue"), { render: d, disabled: f, listeners: p, inputProps: m } = t(e, {
79
79
  emit: n,
80
80
  slots: s,
81
81
  attrs: c,
82
82
  predicate: l
83
83
  });
84
84
  return () => d({ vNodes: r(o, i(m.value, p.value, {
85
- label: t.labelValue,
85
+ label: e.labelValue,
86
86
  modelValue: u.value,
87
87
  "onUpdate:modelValue": (e) => u.value = e,
88
- trueValue: t.trueLabel ?? t.trueValue,
89
- falseValue: t.falseLabel ?? t.falseValue,
88
+ trueValue: e.trueLabel ?? e.trueValue,
89
+ falseValue: e.falseLabel ?? e.falseValue,
90
90
  disabled: f.value
91
91
  }), { default: s.default }) });
92
92
  }
@@ -1,6 +1,7 @@
1
1
  import { f as e } from "./DcTVYqeJ.mjs";
2
- import { o as t, r as n } from "./BHbMJZPp.mjs";
3
- import { n as r } from "./BNXbI4OG.mjs";
2
+ import { t } from "./AAZfNtly.mjs";
3
+ import { r as n } from "./BvKUeniN.mjs";
4
+ import { n as r } from "./C6Dq9Dgb.mjs";
4
5
  import { createVNode as i, isVNode as a, mergeProps as o } from "vue";
5
6
  import { ElImage as s } from "element-plus/es";
6
7
  //#region src/components/form/props/image.ts
@@ -0,0 +1,119 @@
1
+ import { o as e } from "./DcTVYqeJ.mjs";
2
+ import { formHolderContextKey as t } from "../constants/index.mjs";
3
+ import { isArray as n, isPlainObject as r, isString as i } from "@web-utils/core";
4
+ import { computed as a, inject as o, unref as s } from "vue";
5
+ //#region src/components/form/props/form-item.ts
6
+ var c = {
7
+ prop: [String, Array],
8
+ label: String,
9
+ labelPosition: {
10
+ type: String,
11
+ default: ""
12
+ },
13
+ labelWidth: [String, Number],
14
+ required: {
15
+ type: Boolean,
16
+ default: !1
17
+ },
18
+ rules: Object,
19
+ error: String,
20
+ showMessage: {
21
+ type: Boolean,
22
+ default: !0
23
+ },
24
+ inlineMessage: {
25
+ type: Boolean,
26
+ default: !1
27
+ },
28
+ size: String,
29
+ for: String,
30
+ validateStatus: String,
31
+ messagePrefix: String,
32
+ message: String,
33
+ wrapCol: {
34
+ type: Boolean,
35
+ default: !0
36
+ },
37
+ fixedSpan: Number,
38
+ block: {
39
+ type: Boolean,
40
+ default: void 0
41
+ },
42
+ unwrap: Boolean,
43
+ half: Boolean,
44
+ formItemClass: String,
45
+ hideLabel: Boolean,
46
+ tips: { type: String },
47
+ tipsAfterLabel: {
48
+ type: Boolean,
49
+ default: !1
50
+ },
51
+ labelColspan: [Number, String],
52
+ inputColspan: [Number, String],
53
+ labelRowspan: [Number, String],
54
+ inputRowspan: [Number, String]
55
+ }, l = {
56
+ required: !0,
57
+ rules: !0,
58
+ messagePrefix: !0,
59
+ message: !0,
60
+ wrapCol: !0,
61
+ fixedSpan: !0,
62
+ block: !0,
63
+ unwrap: !0,
64
+ half: !0,
65
+ formItemClass: !0,
66
+ hideLabel: !0,
67
+ tips: !0,
68
+ tipsAfterLabel: !0,
69
+ labelColspan: !0,
70
+ inputColspan: !0,
71
+ labelRowspan: !0,
72
+ inputRowspan: !0
73
+ }, u = (e) => c[e] !== void 0 && l[e] !== !0, d = (t, { emit: n, events: r, predicate: i }) => a(() => e(t, i, r, n)), f = {
74
+ span: {
75
+ type: Number,
76
+ default: 12
77
+ },
78
+ offset: {
79
+ type: Number,
80
+ default: 0
81
+ },
82
+ push: {
83
+ type: Number,
84
+ default: 0
85
+ },
86
+ pull: {
87
+ type: Number,
88
+ default: 0
89
+ },
90
+ xs: { type: [Number, Object] },
91
+ sm: { type: [Number, Object] },
92
+ md: { type: [Number, Object] },
93
+ lg: { type: [Number, Object] },
94
+ xl: { type: [Number, Object] },
95
+ tag: {
96
+ type: String,
97
+ default: "div"
98
+ }
99
+ }, p = { span: !0 }, m = (e) => f[e] !== void 0 && p[e] !== !0, h = (t, { emit: n, events: r, predicate: i }) => a(() => e(t, i, r, n)), g = (e) => {
100
+ let n = o(t, null);
101
+ return a(() => e.required === !0 ? !0 : (n == null ? void 0 : n.requiredFieldsMap[e.prop]) === !0);
102
+ }, _ = (e, t) => {
103
+ i(t) ? e.push(t) : n(t) ? e.push(...t) : r(t) && e.push(t);
104
+ }, v = (e, { rules: t, attrs: n, block: r, class: i, messagePrefix: o, message: l } = {}) => {
105
+ let u = g(e);
106
+ return a(() => {
107
+ let a = { message: l }, d = s(t);
108
+ Object.keys({
109
+ ...c,
110
+ ...f
111
+ }).forEach((t) => {
112
+ t === "rules" ? e[t] && d ? a[t] = [...e[t], ...d] : e[t] ? a[t] = e[t] : d && (a[t] = d) : t === "messagePrefix" ? a[t] = e.messagePrefix || o : t === "block" ? a[t] = r ?? e.block : a[t] = e[t];
113
+ });
114
+ let p = [];
115
+ return _(p, s(n == null ? void 0 : n.class)), _(p, s(i)), a.required = u.value, a.class = p, a.style = n == null ? void 0 : n.style, a;
116
+ });
117
+ };
118
+ //#endregion
119
+ export { h as a, d as c, m as i, g as n, c as o, f as r, u as s, v as t };
@@ -3,8 +3,8 @@ import { getDictLabel as i } from "../helper/dictionary.mjs";
3
3
  import { cellClickHandlerContextKey as a, pageableTableContextKey as o } from "../constants/index.mjs";
4
4
  import { t as s } from "./7GmKqdbC.mjs";
5
5
  import c from "../element-resize-observer/index.mjs";
6
- import { t as l } from "./XoImEoke.mjs";
7
- import { t as u } from "./CGDnQr1c.mjs";
6
+ import { t as l } from "./xq_LR6R2.mjs";
7
+ import { t as u } from "./D2B9Y3oT.mjs";
8
8
  import { useVisibilityChange as ee } from "../hook/useVisibilityChange.mjs";
9
9
  import { Fragment as te, computed as d, createBlock as f, createTextVNode as p, createVNode as m, inject as h, isVNode as g, mergeModels as _, mergeProps as v, nextTick as ne, onUpdated as y, openBlock as b, provide as x, reactive as S, ref as C, toDisplayString as w, useModel as T, useTemplateRef as E, watch as D, withCtx as O } from "vue";
10
10
  import { ElMessage as re } from "element-plus";
@@ -1,6 +1,6 @@
1
- import { i as e, n as t } from "./BHbMJZPp.mjs";
2
- import { n, t as r } from "./BNXbI4OG.mjs";
3
- import { t as i } from "./CPvdsnRN.mjs";
1
+ import { n as e, o as t } from "./BvKUeniN.mjs";
2
+ import { n, t as r } from "./C6Dq9Dgb.mjs";
3
+ import { t as i } from "./BoJgSMkL.mjs";
4
4
  import { createVNode as a, mergeProps as o, ref as s } from "vue";
5
5
  import { ElInput as c, ElPopover as l } from "element-plus/es";
6
6
  //#region src/components/form/props/input-cron.ts
@@ -18,9 +18,9 @@ var u = {
18
18
  }, f = (e) => n[e] === void 0 && d[e] !== !0, p = {
19
19
  name: "FormInputCronExpression",
20
20
  props: { ...u },
21
- emits: { ...t },
22
- setup(t, { emit: n, slots: r, attrs: u }) {
23
- let d = s(!1), { emitInput: p, render: m, placeholder: h, disabled: g, listeners: _, inputProps: v } = e(t, {
21
+ emits: { ...e },
22
+ setup(e, { emit: n, slots: r, attrs: u }) {
23
+ let d = s(!1), { emitInput: p, render: m, placeholder: h, disabled: g, listeners: _, inputProps: v } = t(e, {
24
24
  emit: n,
25
25
  slots: r,
26
26
  attrs: u,
@@ -39,12 +39,12 @@ var u = {
39
39
  }, {
40
40
  default: () => a(i, o(_.value, v.value, {
41
41
  i18n: "cn",
42
- expression: t.modelValue,
42
+ expression: e.modelValue,
43
43
  onChange: p,
44
44
  onClose: b
45
45
  }), null),
46
46
  reference: () => a(c, {
47
- modelValue: t.modelValue,
47
+ modelValue: e.modelValue,
48
48
  readonly: !0,
49
49
  disabled: g.value,
50
50
  placeholder: h.value,
@@ -1,5 +1,5 @@
1
- import { i as e, n as t } from "./BHbMJZPp.mjs";
2
- import { n, t as r } from "./BNXbI4OG.mjs";
1
+ import { n as e, o as t } from "./BvKUeniN.mjs";
2
+ import { n, t as r } from "./C6Dq9Dgb.mjs";
3
3
  import i from "../x-input-tag/index.mjs";
4
4
  import { createVNode as a, mergeProps as o } from "vue";
5
5
  //#region src/components/form/props/input-tag.ts
@@ -35,18 +35,18 @@ var s = {
35
35
  name: "FormInputTag",
36
36
  inheritAttrs: !1,
37
37
  props: { ...s },
38
- emits: { ...t },
39
- setup(t, { emit: n, slots: r, attrs: s }) {
40
- let { emitInput: c, render: u, placeholder: d, disabled: f, listeners: p, inputProps: m } = e(t, {
38
+ emits: { ...e },
39
+ setup(e, { emit: n, slots: r, attrs: s }) {
40
+ let { emitInput: c, render: u, placeholder: d, disabled: f, listeners: p, inputProps: m } = t(e, {
41
41
  emit: n,
42
42
  slots: r,
43
43
  attrs: s,
44
44
  predicate: l,
45
- block: t.block === void 0 ? !0 : t.block
45
+ block: e.block === void 0 ? !0 : e.block
46
46
  });
47
47
  return () => u({ vNodes: a(i, o(p.value, m.value, {
48
48
  style: "width: 100%",
49
- modelValue: t.modelValue,
49
+ modelValue: e.modelValue,
50
50
  disabled: f.value,
51
51
  "onUpdate:modelValue": c,
52
52
  placeholder: d.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 { useDictionary as r } from "../hook/useDictionary.mjs";
4
4
  import { computed as i, createVNode as a, isVNode as o, mergeProps as s, useModel as c } from "vue";
5
5
  import { ElRadio as l, ElRadioButton as u, ElRadioGroup as d } from "element-plus/es";
@@ -95,27 +95,27 @@ var g = {
95
95
  name: "FormRadioGroup",
96
96
  inheritAttrs: !1,
97
97
  props: { ...f },
98
- emits: { ...t },
99
- setup(t, { slots: n, attrs: o, emit: f }) {
100
- let p = c(t, "modelValue"), { render: g, disabled: _, listeners: v, inputProps: y } = e(t, {
98
+ emits: { ...e },
99
+ setup(e, { slots: n, attrs: o, emit: f }) {
100
+ let p = c(e, "modelValue"), { render: g, disabled: _, listeners: v, inputProps: y } = t(e, {
101
101
  emit: f,
102
102
  slots: n,
103
103
  attrs: o,
104
104
  predicate: m,
105
105
  messagePrefix: "请选择"
106
- }), b = i(() => t.classic ? "label" : t.labelProp), x = i(() => t.classic ? "value" : t.valueProp), { dictItems: S } = r(t), C = i(() => t.dictType ? S.value : t.gender ? [{
106
+ }), b = i(() => e.classic ? "label" : e.labelProp), x = i(() => e.classic ? "value" : e.valueProp), { dictItems: S } = r(e), C = i(() => e.dictType ? S.value : e.gender ? [{
107
107
  [b.value]: "男",
108
- [x.value]: t.chinese ? "男" : t.typing ? 1 : "1"
108
+ [x.value]: e.chinese ? "男" : e.typing ? 1 : "1"
109
109
  }, {
110
110
  [b.value]: "女",
111
- [x.value]: t.chinese ? "女" : t.typing ? 2 : "2"
112
- }] : t.confirm ? [{
111
+ [x.value]: e.chinese ? "女" : e.typing ? 2 : "2"
112
+ }] : e.confirm ? [{
113
113
  [b.value]: "是",
114
- [x.value]: t.chinese ? "是" : t.english ? "Y" : t.typing ? 1 : "1"
114
+ [x.value]: e.chinese ? "是" : e.english ? "Y" : e.typing ? 1 : "1"
115
115
  }, {
116
116
  [b.value]: "否",
117
- [x.value]: t.chinese ? "否" : t.english ? "N" : t.typing ? 0 : "0"
118
- }] : t.options);
117
+ [x.value]: e.chinese ? "否" : e.english ? "N" : e.typing ? 0 : "0"
118
+ }] : e.options);
119
119
  return () => g({ vNodes: a(d, s(v.value, y.value, {
120
120
  modelValue: p.value,
121
121
  "onUpdate:modelValue": (e) => p.value = e,
@@ -123,14 +123,14 @@ var g = {
123
123
  }), {
124
124
  ...n,
125
125
  default: n.default || (() => {
126
- var e;
127
- return (e = C.value) == null ? void 0 : e.map(({ value: e, label: n, disabled: r }) => t.type === "button" || t.radioType === "button" ? a(u, {
128
- key: e,
129
- value: e,
126
+ var t;
127
+ return (t = C.value) == null ? void 0 : t.map(({ value: t, label: n, disabled: r }) => e.type === "button" || e.radioType === "button" ? a(u, {
128
+ key: t,
129
+ value: t,
130
130
  disabled: r
131
131
  }, h(n) ? n : { default: () => [n] }) : a(l, {
132
- key: e,
133
- value: e,
132
+ key: t,
133
+ value: t,
134
134
  disabled: r
135
135
  }, h(n) ? n : { default: () => [n] }));
136
136
  })
@@ -1,5 +1,5 @@
1
- import { n as e } from "./BHbMJZPp.mjs";
2
- import { n as t, t as n } from "./DwkOWXIR.mjs";
1
+ import { n as e } from "./BvKUeniN.mjs";
2
+ import { n as t, t as n } from "./C6u76g6o.mjs";
3
3
  import { createVNode as r, isVNode as i, mergeProps as a, useModel as o } from "vue";
4
4
  //#region src/components/form/FormInputIdCard.vue?vue&type=script&lang.jsx
5
5
  function s(e) {
@@ -1,6 +1,6 @@
1
- import { i as e, n as t } from "./BHbMJZPp.mjs";
2
- import { n, t as r } from "./BNXbI4OG.mjs";
3
- import { n as i, t as a } from "./BEvOkSfB.mjs";
1
+ import { n as e, o as t } from "./BvKUeniN.mjs";
2
+ import { n, t as r } from "./C6Dq9Dgb.mjs";
3
+ import { n as i, t as a } from "./CauzhVSa2.mjs";
4
4
  import { createVNode as o, mergeProps as s, ref as c, useModel as l } from "vue";
5
5
  //#region src/components/table/form-table.ts
6
6
  var u = {
@@ -14,27 +14,27 @@ var u = {
14
14
  name: "FormTable",
15
15
  props: { ...u },
16
16
  emits: {
17
- ...t,
17
+ ...e,
18
18
  "add-row": null
19
19
  },
20
- setup(t, { emit: n, attrs: r, slots: i }) {
21
- let u = l(t, "modelValue"), d = c([]), p = (e) => {
20
+ setup(e, { emit: n, attrs: r, slots: i }) {
21
+ let u = l(e, "modelValue"), d = c([]), p = (e) => {
22
22
  d.value = e;
23
- }, { render: m, placeholder: h, disabled: g, listeners: _, inputProps: v } = e(t, {
23
+ }, { render: m, placeholder: h, disabled: g, listeners: _, inputProps: v } = t(e, {
24
24
  emit: n,
25
25
  slots: i,
26
26
  attrs: r,
27
27
  predicate: f,
28
- block: t.block === void 0 ? !0 : t.block
28
+ block: e.block === void 0 ? !0 : e.block
29
29
  });
30
30
  return () => {
31
- var e;
31
+ var t;
32
32
  let n = {};
33
- for (let r = 0; r < (((e = t.columns) == null ? void 0 : e.length) ?? 0); r++) {
34
- let e = t.columns[r];
35
- n[e.prop] = (t, n, r) => {
33
+ for (let r = 0; r < (((t = e.columns) == null ? void 0 : t.length) ?? 0); r++) {
34
+ let t = e.columns[r];
35
+ n[t.prop] = (e, n, r) => {
36
36
  var a;
37
- return (a = i[e.prop]) == null ? void 0 : a.call(i, t, n, r);
37
+ return (a = i[t.prop]) == null ? void 0 : a.call(i, e, n, r);
38
38
  };
39
39
  }
40
40
  return m({ vNodes: o(a, s(_.value, v.value, {
@@ -0,0 +1,127 @@
1
+ import { f as e, o as t, p as n } from "./DcTVYqeJ.mjs";
2
+ import { formHolderContextKey as r, formItemConfigProviderContextKey as i, formItemGroupContextKey as a, formViewContextKey as o } from "../constants/index.mjs";
3
+ import { a as s, c, i as l, n as u, o as d, r as f, s as p, t as m } from "./AAZfNtly.mjs";
4
+ import { computed as h, createVNode as g, h as _, inject as v, mergeProps as y, nextTick as b, useTemplateRef as x } from "vue";
5
+ import { ElCol as S, rowContextKey as C } from "element-plus";
6
+ import { ElCol as w, ElFormItem as T, ElTooltip as E } from "element-plus/es";
7
+ //#endregion
8
+ //#region src/components/form/FormItemX.vue
9
+ var D = {
10
+ name: "FormItemX",
11
+ inheritAttrs: !1,
12
+ props: {
13
+ ...d,
14
+ ...f
15
+ },
16
+ setup(e, { attrs: t, slots: n, expose: a }) {
17
+ let o = v(C, null), d = v(i, null), f = v(r, null), m = t.embed ? h(() => t.disabled) : k(e), _ = c(e, { predicate: p }), S = s(e, { predicate: l }), D = h(() => (d == null ? void 0 : d.reactive) === !0 && d.block === !1 && e.fixedSpan === void 0 && !e.half), O = u(e), A = x("formItem"), j = h(() => (d == null ? void 0 : d.wrapCol) === !1 ? !1 : !!o && e.wrapCol), M = h(() => f != null && f.tableForm ? "" : d != null && d.block ? "100%" : e.half && j.value ? `calc(50% - ${o.gutter.value / 2}px)` : ""), N = h(() => (d == null ? void 0 : d.block) === !0 || e.block || e.half ? 24 : e.span), P = h(() => {
18
+ if (m.value) return [];
19
+ if (O.value) {
20
+ let t = {
21
+ required: !0,
22
+ message: e.message || `${e.messagePrefix || "请输入"}${e.label}`
23
+ };
24
+ return e.rules ? [...e.rules, t] : [t];
25
+ }
26
+ return e.rules;
27
+ });
28
+ return a({
29
+ clearValidate: async () => {
30
+ var e;
31
+ await b(), (e = A.value) == null || e.clearValidate();
32
+ },
33
+ validate: async () => {
34
+ var e;
35
+ await b(), (e = A.value) == null || e.validate();
36
+ }
37
+ }), () => {
38
+ var r;
39
+ let i = n.tips || e.tips, a = i ? g(E, {
40
+ effect: "light",
41
+ content: e.tips,
42
+ offset: 4
43
+ }, {
44
+ default: () => g("i", { class: "el-icon-info form-item-input-info" }, null),
45
+ content: n.tips ? n.tips : null
46
+ }) : null, o = g(T, y(_.value, t, {
47
+ ref: "formItem",
48
+ style: { width: M.value },
49
+ class: [
50
+ "form-item",
51
+ e.formItemClass,
52
+ {
53
+ "form-item-hide-label": e.hideLabel,
54
+ "with-tips": !e.tipsAfterLabel && i,
55
+ required: m.value === !1 && O.value
56
+ }
57
+ ],
58
+ rules: P.value
59
+ }), {
60
+ ...n,
61
+ default: () => {
62
+ var t;
63
+ return [(t = n.default) == null ? void 0 : t.call(n, {
64
+ disabled: m.value,
65
+ required: O.value
66
+ }), i && !e.tipsAfterLabel ? a : null];
67
+ },
68
+ label: () => [n.label ? n.label() : e.label, e.tipsAfterLabel ? a : null]
69
+ }), s = [o, (r = n.below) == null ? void 0 : r.call(n)];
70
+ return e.unwrap ? s : j.value ? g(w, y(S.value, D.value ? {
71
+ xs: 24,
72
+ sm: 12,
73
+ md: 12,
74
+ lg: 8,
75
+ xl: 6
76
+ } : {}, { span: N.value }), { default: () => s }) : o;
77
+ };
78
+ }
79
+ }, O = "update:modelValue", k = (e) => {
80
+ let t = v(r, null), n = v(a, null);
81
+ return h(() => {
82
+ if (e.disabled !== void 0) return e.disabled;
83
+ if (t) {
84
+ if (t.requiredFieldsMap[e.prop] === !0 || t.enabledFieldsMap[e.prop] === !0) return !1;
85
+ if (t.disabledFieldsMap[e.prop] === !0) return !0;
86
+ }
87
+ return (n == null ? void 0 : n.enabled) === !0 ? !1 : (n == null ? void 0 : n.disabled) === !0 ? !0 : (t == null ? void 0 : t.disabled) === !0;
88
+ });
89
+ }, A = { [O]: null }, j = (e, t) => e(O, t), M = (e, { vNodes: t, formItemProps: n, slots: r, disabled: i }) => e.wrapFormItem ? _(D, {
90
+ ...n.value,
91
+ embed: !0,
92
+ disabled: i == null ? void 0 : i.value
93
+ }, {
94
+ default: () => t,
95
+ label: r.label,
96
+ error: r.error,
97
+ tips: r.tips,
98
+ below: r.below
99
+ }) : t, N = (r, { emit: i, slots: a, events: s, predicate: c, removeOn: l = !1, attrs: u, block: d, class: f, rules: p, messagePrefix: g = "请输入", extraFormItemProps: y }) => {
100
+ let b = k(r), x = v(o, null), C = h(() => b.value ? "" : `${g}${r.label}`), w = m(r, {
101
+ rules: p,
102
+ block: d === void 0 ? r.type === "textarea" && r.block === void 0 ? !0 : r.block : d,
103
+ attrs: u,
104
+ class: f,
105
+ message: C.value,
106
+ messagePrefix: g,
107
+ ...y
108
+ }), T = (e) => j(i, e), E = (e) => r.col ? _(S, { span: r.block ? 24 : r.span }, { default: () => e }) : e, D = ({ vNodes: e }) => M(r, {
109
+ vNodes: E(e),
110
+ formItemProps: w,
111
+ slots: a,
112
+ disabled: b
113
+ }), O = h(() => t(r, c, s, i)), A = n({ removeOn: l });
114
+ return {
115
+ emitInput: T,
116
+ render: D,
117
+ placeholder: C,
118
+ disabled: b,
119
+ formItemProps: w,
120
+ autoBind: O,
121
+ inputProps: e(r, c),
122
+ listeners: A,
123
+ printing: h(() => (x == null ? void 0 : x.printing) === !0)
124
+ };
125
+ }, P = (e) => e.icon ? _("i", { class: e.icon }) : null;
126
+ //#endregion
127
+ export { k as a, j as i, A as n, N as o, M as r, D as s, P as t };
@@ -1,5 +1,5 @@
1
- import { i as e, n as t } from "./BHbMJZPp.mjs";
2
- import { n, t as r } from "./BNXbI4OG.mjs";
1
+ import { n as e, o as t } from "./BvKUeniN.mjs";
2
+ import { n, t as r } from "./C6Dq9Dgb.mjs";
3
3
  import { createVNode as i, mergeProps as a } from "vue";
4
4
  import { ElTimePicker as o } from "element-plus/es";
5
5
  //#region src/components/form/props/time.ts
@@ -140,9 +140,9 @@ var s = {
140
140
  name: "FormInputTime",
141
141
  inheritAttrs: !1,
142
142
  props: { ...s },
143
- emits: { ...t },
144
- setup(t, { emit: n, slots: r, attrs: s }) {
145
- let { emitInput: c, render: u, placeholder: d, disabled: f, listeners: p, inputProps: m } = e(t, {
143
+ emits: { ...e },
144
+ setup(e, { emit: n, slots: r, attrs: s }) {
145
+ let { emitInput: c, render: u, placeholder: d, disabled: f, listeners: p, inputProps: m } = t(e, {
146
146
  emit: n,
147
147
  slots: r,
148
148
  attrs: s,
@@ -152,13 +152,13 @@ var s = {
152
152
  options: { padding: ({ popper: e, reference: t, placement: n }) => e.width / 2 }
153
153
  }] };
154
154
  return () => u({ vNodes: i(o, a(p.value, m.value, {
155
- "popper-options": t.popperOptions || h,
155
+ "popper-options": e.popperOptions || h,
156
156
  style: "width: 100%",
157
- placement: t.placement || "left",
158
- "is-range": t.isRange || t.range,
159
- format: t.format,
160
- "value-format": t.valueFormat || t.format,
161
- modelValue: t.modelValue,
157
+ placement: e.placement || "left",
158
+ "is-range": e.isRange || e.range,
159
+ format: e.format,
160
+ "value-format": e.valueFormat || e.format,
161
+ modelValue: e.modelValue,
162
162
  disabled: f.value,
163
163
  "onUpdate:modelValue": c,
164
164
  placeholder: d.value
@@ -1,4 +1,4 @@
1
- import { c as e, s as t } from "./BHbMJZPp.mjs";
1
+ import { o as e, r as t } from "./AAZfNtly.mjs";
2
2
  //#region src/components/form/props/common.ts
3
3
  var n = {
4
4
  ...e,