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

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 (153) hide show
  1. package/chunks/-qKZw-3p2.mjs +23 -0
  2. package/chunks/{CauzhVSa2.mjs → 4-vc_q1t.mjs} +12 -12
  3. package/chunks/{Bq62m7IR2.mjs → 4C611CU2.mjs} +11 -11
  4. package/chunks/{gLPy4Sus.mjs → 8P-OAGbj.mjs} +1 -1
  5. package/chunks/B2PuSZ_F.mjs +35 -0
  6. package/chunks/B6B-rhhB.mjs +37 -0
  7. package/chunks/{C7Mak2La.mjs → BHT38Us-.mjs} +7 -6
  8. package/chunks/BWoKh6f6.mjs +66 -0
  9. package/chunks/{Dt_s96gL2.mjs → BXrA0SYn2.mjs} +2 -2
  10. package/chunks/BZ0v5mka.mjs +30 -0
  11. package/chunks/{5KomemiE2.mjs → BlmtfUfl2.mjs} +29 -29
  12. package/chunks/CE1uX9hJ.mjs +95 -0
  13. package/chunks/CGnOR2gn.mjs +59 -0
  14. package/chunks/CJ1-f8sg.mjs +30 -0
  15. package/chunks/{B3A-CnYr.mjs → CSnlDCNV.mjs} +5 -5
  16. package/chunks/CdzoVG6J.mjs +47 -0
  17. package/chunks/{BZTAuJxn2.mjs → CqoMZ9Wo2.mjs} +1 -1
  18. package/chunks/CrQmTHMA.mjs +105 -0
  19. package/chunks/Crh2RUrS.mjs +106 -0
  20. package/chunks/DBUJ7Bva.mjs +56 -0
  21. package/chunks/DB_UKPay.mjs +27 -0
  22. package/chunks/{BvKUeniN.mjs → DEC2O0q-.mjs} +46 -44
  23. package/chunks/{BoJgSMkL.mjs → DUhF8YOY.mjs} +2 -2
  24. package/chunks/{g8MIBMw92.mjs → Dqq8z1t4.mjs} +13 -13
  25. package/chunks/Du1PslcN.mjs +28 -0
  26. package/chunks/{Dluor05A.mjs → DyEYDv4B.mjs} +7 -6
  27. package/chunks/EAJCsX8W.mjs +32 -0
  28. package/chunks/ZFJ73RWd2.mjs +29 -0
  29. package/chunks/{D2B9Y3oT.mjs → fmIV_kHp.mjs} +2 -2
  30. package/chunks/h5488Kii.mjs +27 -0
  31. package/chunks/k3cC9SGC.mjs +27 -0
  32. package/chunks/{7GmKqdbC.mjs → usyXQe35.mjs} +1 -1
  33. package/chunks/{BpCiVuKL.mjs → v3wbYL_-.mjs} +7 -6
  34. package/chunks/vd9nXj8B.mjs +59 -0
  35. package/confirm-button/index.mjs +1 -1
  36. package/confirmable/index.mjs +1 -1
  37. package/editable-tree/index.mjs +591 -2
  38. package/element-dialog/index.mjs +1 -1
  39. package/element-resize-observer/index.mjs +1 -1
  40. package/form-cascader/index.mjs +1 -1
  41. package/form-checkbox/index.mjs +1 -1
  42. package/form-checkbox-group/index.mjs +1 -1
  43. package/form-date-picker/index.mjs +1 -1
  44. package/form-holder/index.mjs +1 -1
  45. package/form-image/index.mjs +1 -1
  46. package/form-input/index.mjs +1 -1
  47. package/form-input-cron-expression/index.mjs +1 -1
  48. package/form-input-email/index.mjs +1 -1
  49. package/form-input-id-card/index.mjs +1 -1
  50. package/form-input-number/index.mjs +1 -1
  51. package/form-input-phone-number/index.mjs +1 -1
  52. package/form-input-tag/index.mjs +1 -1
  53. package/form-input-time/index.mjs +1 -1
  54. package/form-item-group/index.mjs +1 -1
  55. package/form-item-x/index.mjs +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.mjs +1 -1
  68. package/helper/form-item.d.ts +1 -1
  69. package/helper/form-item.mjs +27 -2
  70. package/helper/input.mjs +1 -1
  71. package/iframe-window/index.mjs +1 -1
  72. package/index.mjs +37 -37
  73. package/package.json +1 -1
  74. package/pageable-table/index.mjs +1 -1
  75. package/props/cascader.d.ts +326 -0
  76. package/{chunks/Czz_49pC.mjs → props/cascader.mjs} +8 -58
  77. package/props/checkbox-group.d.ts +213 -0
  78. package/props/checkbox-group.mjs +83 -0
  79. package/props/checkbox.d.ts +202 -0
  80. package/props/checkbox.mjs +71 -0
  81. package/props/col.d.ts +74 -0
  82. package/props/col.mjs +32 -0
  83. package/props/common.d.ts +114 -0
  84. package/props/common.mjs +18 -0
  85. package/props/date.d.ts +339 -0
  86. package/props/date.mjs +145 -0
  87. package/props/form-item.d.ts +144 -0
  88. package/props/form-item.mjs +73 -0
  89. package/props/form.d.ts +157 -0
  90. package/props/form.mjs +89 -0
  91. package/props/image.d.ts +102 -0
  92. package/props/image.mjs +10 -0
  93. package/props/input-cron.d.ts +102 -0
  94. package/props/input-cron.mjs +16 -0
  95. package/props/input-number.d.ts +216 -0
  96. package/props/input-number.mjs +72 -0
  97. package/props/input-tag.d.ts +123 -0
  98. package/props/input-tag.mjs +33 -0
  99. package/props/input.d.ts +299 -0
  100. package/props/input.mjs +97 -0
  101. package/props/radio-group.d.ts +205 -0
  102. package/props/radio-group.mjs +84 -0
  103. package/props/rate.d.ts +211 -0
  104. package/{chunks/D0kIhzQo.mjs → props/rate.mjs} +7 -28
  105. package/props/select.d.ts +450 -0
  106. package/props/select.mjs +218 -0
  107. package/props/slide.d.ts +235 -0
  108. package/{chunks/DZrQmH9Y.mjs → props/slide.mjs} +7 -28
  109. package/props/switch.d.ts +229 -0
  110. package/{chunks/ecpQ-ODX.mjs → props/switch.mjs} +7 -33
  111. package/props/text.d.ts +127 -0
  112. package/props/text.mjs +22 -0
  113. package/props/textarea.d.ts +266 -0
  114. package/{chunks/CNK4mfga.mjs → props/textarea.mjs} +19 -31
  115. package/props/time-select.d.ts +216 -0
  116. package/props/time-select.mjs +67 -0
  117. package/props/time.d.ts +304 -0
  118. package/{chunks/C3MF_-bN.mjs → props/time.mjs} +8 -39
  119. package/props/tree.d.ts +76 -0
  120. package/props/tree.mjs +75 -0
  121. package/sub-table/index.mjs +1 -1
  122. package/sub-table-plus/index.mjs +1 -1
  123. package/table-column/index.mjs +1 -1
  124. package/table-column-def/index.mjs +1 -1
  125. package/table-view/index.mjs +13 -13
  126. package/toolbar/index.mjs +1 -1
  127. package/toolbar-button/index.mjs +1 -1
  128. package/vue-cron/index.mjs +1 -1
  129. package/web-types.json +1 -1
  130. package/x-input-tag/index.mjs +2 -2
  131. package/year-calendar/index.mjs +1 -1
  132. package/chunks/6GcIyEQV.mjs +0 -95
  133. package/chunks/8c9TEVNY.mjs +0 -36
  134. package/chunks/AAZfNtly.mjs +0 -119
  135. package/chunks/BKlMENhV.mjs +0 -57
  136. package/chunks/BNVYEWWW.mjs +0 -57
  137. package/chunks/BTuzBfTA.mjs +0 -141
  138. package/chunks/C6Dq9Dgb.mjs +0 -17
  139. package/chunks/C6u76g6o.mjs +0 -158
  140. package/chunks/CLO5X9Lb.mjs +0 -176
  141. package/chunks/CdoiMj7L2.mjs +0 -39
  142. package/chunks/DTVTvvq-.mjs +0 -189
  143. package/chunks/DWE67l1f.mjs +0 -317
  144. package/chunks/DWMePN6q.mjs +0 -660
  145. package/chunks/D_L1p3vm2.mjs +0 -90
  146. package/chunks/Dy_5vPdP.mjs +0 -101
  147. package/chunks/Goee5Y-H.mjs +0 -198
  148. /package/chunks/{BlxLaWcU.mjs → 6av50rJm.mjs} +0 -0
  149. /package/chunks/{CkOD-_VV.mjs → B1MSrc6f.mjs} +0 -0
  150. /package/chunks/{BNqVEHk_.mjs → C-0zqLII.mjs} +0 -0
  151. /package/chunks/{xq_LR6R2.mjs → CI1ehQi5.mjs} +0 -0
  152. /package/chunks/{DcTVYqeJ.mjs → DuOxL6xh.mjs} +0 -0
  153. /package/chunks/{CXsoKP22.mjs → mekxD3ef.mjs} +0 -0
@@ -0,0 +1,47 @@
1
+ import { n as e, o as t } from "./DEC2O0q-.mjs";
2
+ import { t as n } from "./DUhF8YOY.mjs";
3
+ import { allProps as r, predicate as i } from "../props/input-cron.mjs";
4
+ import { createVNode as a, mergeProps as o, ref as s } from "vue";
5
+ import { ElInput as c, ElPopover as l } from "element-plus/es";
6
+ //#endregion
7
+ //#region src/components/form/FormInputCronExpression.vue
8
+ var u = {
9
+ name: "FormInputCronExpression",
10
+ props: { ...r },
11
+ emits: { ...e },
12
+ setup(e, { emit: r, slots: u, attrs: d }) {
13
+ let f = s(!1), { emitInput: p, render: m, placeholder: h, disabled: g, listeners: _, inputProps: v } = t(e, {
14
+ emit: r,
15
+ slots: u,
16
+ attrs: d,
17
+ predicate: i
18
+ }), y = () => {
19
+ f.value = !0;
20
+ }, b = () => {
21
+ f.value = !1;
22
+ };
23
+ return () => m({ vNodes: a("div", { class: "cron" }, [a(l, {
24
+ placement: "bottom-start",
25
+ disabled: g.value,
26
+ visible: f.value,
27
+ "onUpdate:visible": (e) => f.value = e,
28
+ "popper-class": "cron-popover"
29
+ }, {
30
+ default: () => a(n, o(_.value, v.value, {
31
+ i18n: "cn",
32
+ expression: e.modelValue,
33
+ onChange: p,
34
+ onClose: b
35
+ }), null),
36
+ reference: () => a(c, {
37
+ modelValue: e.modelValue,
38
+ readonly: !0,
39
+ disabled: g.value,
40
+ placeholder: h.value,
41
+ onClick: y
42
+ }, null)
43
+ })]) });
44
+ }
45
+ };
46
+ //#endregion
47
+ export { u as t };
@@ -1,4 +1,4 @@
1
- import { t as e } from "./CkOD-_VV.mjs";
1
+ import { t as e } from "./B1MSrc6f.mjs";
2
2
  import { Fragment as t, createCommentVNode as n, createElementBlock as r, createElementVNode as i, createStaticVNode as a, createVNode as o, normalizeClass as s, normalizeStyle as c, openBlock as l, renderList as u, toDisplayString as d, withModifiers as f } from "vue";
3
3
  import p from "dayjs";
4
4
  //#region src/components/material-year-calendar/MonthCalendar.vue
@@ -0,0 +1,105 @@
1
+ import { n as e, o as t } from "./DEC2O0q-.mjs";
2
+ import { useDictionary as n } from "../hook/useDictionary.mjs";
3
+ import { allProps as r, predicate as i } from "../props/select.mjs";
4
+ import { isNumber as a, isPlainObject as o, isString as s } from "@web-utils/core";
5
+ import { computed as c, createVNode as l, mergeProps as u, ref as d, watchEffect as f } from "vue";
6
+ import { ElOption as p, ElSelect as m } from "element-plus/es";
7
+ //#endregion
8
+ //#region src/components/form/FormSelect.vue
9
+ var h = {
10
+ name: "FormSelect",
11
+ inheritAttrs: !1,
12
+ props: { ...r },
13
+ emits: { ...e },
14
+ setup(e, { emit: r, slots: h, attrs: g }) {
15
+ let { emitInput: _, render: v, placeholder: y, disabled: b, listeners: x, inputProps: S } = t(e, {
16
+ emit: r,
17
+ slots: h,
18
+ attrs: g,
19
+ predicate: i,
20
+ messagePrefix: "请选择"
21
+ }), C = d(null), w = d(!1);
22
+ f(() => {
23
+ if (e.multiple && e.multipleStringMode) {
24
+ var t;
25
+ C.value = (t = e.modelValue) == null ? void 0 : t.split(",").filter((e) => e);
26
+ } else C.value = e.modelValue;
27
+ });
28
+ let T = (t) => {
29
+ if (e.multiple && e.multipleStringMode ? _(t.join(e.multipleStringSeparator)) : _(t), e.emitLabel) {
30
+ let n = O.value.find((n) => n[e.props.value] === t), i = n == null ? void 0 : n[e.props.label];
31
+ i !== e.optionLabel && r("update:optionLabel", i);
32
+ }
33
+ }, { dictItems: E } = n(e), D = d([]), O = c(() => {
34
+ if (e.dictType) return E.value;
35
+ if (e.remote) return D.value;
36
+ if (e.gender) return [{
37
+ [e.props.label]: "男",
38
+ [e.props.value]: e.chinese ? "男" : e.typing ? 1 : "1"
39
+ }, {
40
+ [e.props.label]: "女",
41
+ [e.props.value]: e.chinese ? "女" : e.typing ? 2 : "2"
42
+ }];
43
+ if (e.confirm) return [{
44
+ [e.props.label]: "是",
45
+ [e.props.value]: e.chinese ? "是" : e.english ? "Y" : e.typing ? 1 : "1"
46
+ }, {
47
+ [e.props.label]: "否",
48
+ [e.props.value]: e.chinese ? "否" : e.english ? "N" : e.typing ? 0 : "0"
49
+ }];
50
+ if (e.all) return [{
51
+ [e.props.value]: "",
52
+ [e.props.label]: "全部"
53
+ }, ...e.options];
54
+ if (e.start && e.end) return Array(e.end - e.start + 1).fill(1).map((t, n) => ({
55
+ [e.props.label]: e.start + n,
56
+ [e.props.value]: e.start + n
57
+ }));
58
+ if (e.year) {
59
+ let t = (/* @__PURE__ */ new Date()).getFullYear(), n = [], r = 10;
60
+ a(e.year) && (r = e.year);
61
+ for (let i = -r; i <= r; i++) {
62
+ let r = t + i;
63
+ n.push({
64
+ [e.props.label]: r,
65
+ [e.props.value]: r
66
+ });
67
+ }
68
+ return n;
69
+ }
70
+ return e.options ? e.options.map((t) => (t[e.props.value] = t[e.props.value] ?? t[e.props.label], t)) : [];
71
+ }), k = async (t) => {
72
+ try {
73
+ var n;
74
+ w.value = !0;
75
+ let r = await e.remoteMethod(t, e.prop);
76
+ ((n = r.data.data) == null ? void 0 : n.length) >= 0 ? s(r.data.data[0]) ? D.value = r.data.data.map((t) => ({
77
+ [e.props.value]: t,
78
+ [e.props.label]: t
79
+ })) : o(r.data.data[0]) && (D.value = r.data.data) : D.value = [];
80
+ } catch {}
81
+ w.value = !1;
82
+ };
83
+ return f(() => {
84
+ e.remote && k();
85
+ }), () => v({ vNodes: l(m, u(x.value, S.value, {
86
+ offset: e.dropDownOffset,
87
+ "model-value": C.value,
88
+ "onUpdate:modelValue": T,
89
+ disabled: b.value,
90
+ placeholder: y.value
91
+ }), {
92
+ ...h,
93
+ default: h.default || (() => {
94
+ var e;
95
+ return (e = O.value) == null ? void 0 : e.map(({ value: e, label: t }) => l(p, {
96
+ key: e,
97
+ label: t,
98
+ value: e
99
+ }, null));
100
+ })
101
+ }) });
102
+ }
103
+ };
104
+ //#endregion
105
+ export { h as t };
@@ -0,0 +1,106 @@
1
+ import { d as e } from "./DuOxL6xh.mjs";
2
+ import { formHolderContextKey as t, formViewContextKey as n } from "../constants/index.mjs";
3
+ import { allProps as r, predicate as i } from "../props/form.mjs";
4
+ import a from "../form-advice/index.mjs";
5
+ import o from "../form-red-table/index.mjs";
6
+ import { animate as s } from "@web-utils/core";
7
+ import { computed as c, createVNode as l, inject as u, mergeProps as d, nextTick as f, provide as p, reactive as m, toRef as h, useTemplateRef as g } from "vue";
8
+ import { ElForm as _, ElRow as v } from "element-plus/es";
9
+ //#endregion
10
+ //#region src/components/form/FormHolder.vue
11
+ var y = {
12
+ name: "FormHolder",
13
+ inheritAttrs: !1,
14
+ props: { ...r },
15
+ emits: {},
16
+ setup(r, { slots: y, expose: b, attrs: x }) {
17
+ let { autoBindProps: S, listeners: C } = e(r, { predicate: i }), w = u(n, null), T = g("form"), E = c(() => r.notTableForm === void 0 ? (w == null ? void 0 : w.tableForm) === void 0 ? !1 : w == null ? void 0 : w.tableForm : !r.notTableForm), D = c(() => E.value ? !1 : r.showMessage), O = c(() => {
18
+ let e = {};
19
+ return r.disabledFields && r.disabledFields.forEach((t) => {
20
+ e[t] = !0;
21
+ }), e;
22
+ }), k = c(() => {
23
+ let e = {};
24
+ return r.enabledFields && r.enabledFields.length && r.enabledFields.forEach((t) => {
25
+ e[t] = !0;
26
+ }), e;
27
+ }), A = c(() => {
28
+ let e = {};
29
+ return r.requiredFields && r.requiredFields.length && r.requiredFields.forEach((t) => {
30
+ e[t] = !0;
31
+ }), e;
32
+ }), j = c(() => r.disabled === !0 ? !0 : r.disabled), M = h(() => r.enabledFields), N = h(() => r.requiredFields), P = h(() => r.disabledFields), F = async () => {
33
+ await f();
34
+ let e = T.value.$el.querySelector(".el-form-item.is-error");
35
+ e && e.scrollIntoView({
36
+ block: "center",
37
+ inline: "center",
38
+ behavior: "smooth"
39
+ });
40
+ }, I = m({
41
+ tableForm: E,
42
+ disabled: j,
43
+ enabledFields: M,
44
+ requiredFields: N,
45
+ enabledFieldsMap: k,
46
+ disabledFieldsMap: O,
47
+ requiredFieldsMap: A,
48
+ disabledFields: P,
49
+ scrollIntoRequiredField: F,
50
+ formRef: T,
51
+ validate: async () => {
52
+ try {
53
+ return await T.value.validate();
54
+ } catch {
55
+ throw await F(), T.value.$el.querySelectorAll(".el-form-item.is-error .el-form-item__content > :first-child").forEach((e) => {
56
+ s(e, "breathe-animation");
57
+ }), Error("表单验证不通过!");
58
+ }
59
+ },
60
+ validateField: (e) => T.value.validateField(e),
61
+ resetFields: (e) => T.value.resetFields(e),
62
+ scrollToField: (e) => T.value.scrollToField(e),
63
+ clearValidate: (e) => T.value.clearValidate(e),
64
+ getField: () => T.value.getField(),
65
+ setInitialValues: (e) => T.value.setInitialValues(e),
66
+ getFields: () => T.value.fields
67
+ });
68
+ return p(t, I), b(I), () => l(_, d(C.value, S.value, x, {
69
+ ref: "form",
70
+ class: [
71
+ "form-holder",
72
+ "clear-fix",
73
+ { "red-form": E }
74
+ ],
75
+ "show-message": D.value
76
+ }), { default: () => {
77
+ if (E.value) {
78
+ var e, t, n;
79
+ return [
80
+ (e = y.top) == null ? void 0 : e.call(y),
81
+ l(o, {
82
+ class: { "hide-error-message": E.value },
83
+ columns: r.columns,
84
+ "col-count": r.colCount
85
+ }, { default: () => {
86
+ var e;
87
+ return [(e = y.default) == null ? void 0 : e.call(y), r.showAdvice ? l(a, {
88
+ "label-colspan": r.commentLabelColspan,
89
+ "value-colspan": r.commentValueColspan
90
+ }, null) : null];
91
+ } }),
92
+ (t = y.bottom) == null ? void 0 : t.call(y),
93
+ l("div", { class: "red-form-footer" }, [(n = y.footer) == null ? void 0 : n.call(y)])
94
+ ];
95
+ } else {
96
+ var i;
97
+ return r.wrapRow ? l(v, null, { default: () => {
98
+ var e;
99
+ return [(e = y.default) == null ? void 0 : e.call(y)];
100
+ } }) : (i = y.default) == null ? void 0 : i.call(y);
101
+ }
102
+ } });
103
+ }
104
+ };
105
+ //#endregion
106
+ export { y as t };
@@ -0,0 +1,56 @@
1
+ import { allProps as e, predicate as t } from "../props/cascader.mjs";
2
+ import { n, o as r } from "./DEC2O0q-.mjs";
3
+ import { useDictionary as i } from "../hook/useDictionary.mjs";
4
+ import { findTreeChildren as a, isArray as o, isString as s, setParent as c } from "@web-utils/core";
5
+ import { computed as l, createVNode as u, mergeProps as d } from "vue";
6
+ import { cloneDeep as f } from "@web-utils/integrations/lodash";
7
+ import { ElCascader as p } from "element-plus/es";
8
+ //#endregion
9
+ //#region src/components/form/FormCascader.vue
10
+ var m = {
11
+ name: "FormCascader",
12
+ props: { ...e },
13
+ emits: { ...n },
14
+ setup(e, { emit: n, slots: m, attrs: h }) {
15
+ let { emitInput: g, render: _, placeholder: v, disabled: y, listeners: b, inputProps: x } = r(e, {
16
+ emit: n,
17
+ slots: m,
18
+ attrs: h,
19
+ predicate: t
20
+ }), { dictItems: S } = i(e), C = l(() => {
21
+ if (e.dictType) return S.value;
22
+ if (e.options) {
23
+ let t = f(e.options);
24
+ return e.last && c(t), t;
25
+ } else return [];
26
+ }), w = l(() => {
27
+ if (e.join) return o(e.modelValue) ? e.modelValue : s(e.modelValue) ? e.modelValue.split(e.separator) : [];
28
+ if (e.last) {
29
+ let [t] = a(C.value, (t) => t[e.valueKey] === e.modelValue), n = [];
30
+ for (; t;) n.push(t[e.valueKey]), t = t.parent;
31
+ return n.reverse();
32
+ }
33
+ return e.modelValue;
34
+ }), T = (t) => {
35
+ e.join && o(t) ? g(t.join(e.separator)) : g(e.last ? t[t.length - 1] : t);
36
+ };
37
+ return () => _({ vNodes: u(p, d(b.value, x.value, {
38
+ style: "width: 100%",
39
+ class: { "is-readonly": e.readonly },
40
+ "model-value": w.value,
41
+ options: C.value,
42
+ props: {
43
+ checkStrictly: e.checkStrictly,
44
+ label: e.labelKey,
45
+ value: e.valueKey,
46
+ emitPath: e.emitPath,
47
+ expandTrigger: "hover"
48
+ },
49
+ disabled: y.value,
50
+ placeholder: v.value,
51
+ "onUpdate:modelValue": T
52
+ }), null) });
53
+ }
54
+ };
55
+ //#endregion
56
+ export { m as t };
@@ -0,0 +1,27 @@
1
+ import { n as e } from "./DEC2O0q-.mjs";
2
+ import { t } from "./BWoKh6f6.mjs";
3
+ import { allProps as n } from "../props/textarea.mjs";
4
+ import { createVNode as r, isVNode as i, mergeProps as a, useModel as o } from "vue";
5
+ //#region src/components/form/FormTextarea.vue?vue&type=script&lang.jsx
6
+ function s(e) {
7
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !i(e);
8
+ }
9
+ //#endregion
10
+ //#region src/components/form/FormTextarea.vue
11
+ var c = {
12
+ name: "FormTextarea",
13
+ inheritAttrs: !1,
14
+ props: { ...n },
15
+ emits: { ...e },
16
+ setup(e, { slots: n, attrs: i }) {
17
+ let c = o(e, "modelValue");
18
+ return () => r(t, a(e, i, {
19
+ modelValue: c.value,
20
+ "onUpdate:modelValue": (e) => c.value = e,
21
+ block: e.block === void 0 ? !0 : e.block,
22
+ type: "textarea"
23
+ }), s(n) ? n : { default: () => [n] });
24
+ }
25
+ };
26
+ //#endregion
27
+ export { c as t };
@@ -1,21 +1,23 @@
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";
1
+ import { f as e, o as t, p as n } from "./DuOxL6xh.mjs";
2
+ import { formItemProps as r, predicate as i, useFormItemAutoBind as a } from "../props/form-item.mjs";
3
+ import { colProps as o, predicate as s, useColAutoBind as c } from "../props/col.mjs";
4
+ import { formHolderContextKey as l, formItemConfigProviderContextKey as u, formItemGroupContextKey as d, formViewContextKey as f } from "../constants/index.mjs";
5
+ import { useFormItemProps as p, useRequired as m } from "../helper/form-item.mjs";
6
+ import { computed as h, createVNode as g, h as _, inject as v, mergeProps as y, nextTick as b, toRef as x, useTemplateRef as S } from "vue";
7
+ import { ElCol as C, rowContextKey as w } from "element-plus";
8
+ import { ElCol as T, ElFormItem as E, ElTooltip as D } from "element-plus/es";
7
9
  //#endregion
8
10
  //#region src/components/form/FormItemX.vue
9
- var D = {
11
+ var O = {
10
12
  name: "FormItemX",
11
13
  inheritAttrs: !1,
12
14
  props: {
13
- ...d,
14
- ...f
15
+ ...r,
16
+ ...o
15
17
  },
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 [];
18
+ setup(e, { attrs: t, slots: n, expose: r }) {
19
+ let o = v(w, null), d = v(u, null), f = v(l, null), p = t.embed ? h(() => t.disabled) : A(e), _ = a(e, { predicate: i }), x = c(e, { predicate: s }), C = h(() => (d == null ? void 0 : d.reactive) === !0 && d.block === !1 && e.fixedSpan === void 0 && !e.half), O = m(e), k = S("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(() => {
20
+ if (p.value) return [];
19
21
  if (O.value) {
20
22
  let t = {
21
23
  required: !0,
@@ -25,25 +27,25 @@ var D = {
25
27
  }
26
28
  return e.rules;
27
29
  });
28
- return a({
30
+ return r({
29
31
  clearValidate: async () => {
30
32
  var e;
31
- await b(), (e = A.value) == null || e.clearValidate();
33
+ await b(), (e = k.value) == null || e.clearValidate();
32
34
  },
33
35
  validate: async () => {
34
36
  var e;
35
- await b(), (e = A.value) == null || e.validate();
37
+ await b(), (e = k.value) == null || e.validate();
36
38
  }
37
39
  }), () => {
38
40
  var r;
39
- let i = n.tips || e.tips, a = i ? g(E, {
41
+ let i = n.tips || e.tips, a = i ? g(D, {
40
42
  effect: "light",
41
43
  content: e.tips,
42
44
  offset: 4
43
45
  }, {
44
46
  default: () => g("i", { class: "el-icon-info form-item-input-info" }, null),
45
47
  content: n.tips ? n.tips : null
46
- }) : null, o = g(T, y(_.value, t, {
48
+ }) : null, o = g(E, y(_.value, t, {
47
49
  ref: "formItem",
48
50
  style: { width: M.value },
49
51
  class: [
@@ -52,7 +54,7 @@ var D = {
52
54
  {
53
55
  "form-item-hide-label": e.hideLabel,
54
56
  "with-tips": !e.tipsAfterLabel && i,
55
- required: m.value === !1 && O.value
57
+ required: p.value === !1 && O.value
56
58
  }
57
59
  ],
58
60
  rules: P.value
@@ -61,13 +63,13 @@ var D = {
61
63
  default: () => {
62
64
  var t;
63
65
  return [(t = n.default) == null ? void 0 : t.call(n, {
64
- disabled: m.value,
66
+ disabled: p.value,
65
67
  required: O.value
66
68
  }), i && !e.tipsAfterLabel ? a : null];
67
69
  },
68
70
  label: () => [n.label ? n.label() : e.label, e.tipsAfterLabel ? a : null]
69
71
  }), 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 ? {
72
+ return e.unwrap ? s : j.value ? g(T, y(x.value, C.value ? {
71
73
  xs: 24,
72
74
  sm: 12,
73
75
  md: 12,
@@ -76,8 +78,8 @@ var D = {
76
78
  } : {}, { span: N.value }), { default: () => s }) : o;
77
79
  };
78
80
  }
79
- }, O = "update:modelValue", k = (e) => {
80
- let t = v(r, null), n = v(a, null);
81
+ }, k = "update:modelValue", A = (e) => {
82
+ let t = v(l, null), n = v(d, null);
81
83
  return h(() => {
82
84
  if (e.disabled !== void 0) return e.disabled;
83
85
  if (t) {
@@ -86,7 +88,7 @@ var D = {
86
88
  }
87
89
  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
90
  });
89
- }, A = { [O]: null }, j = (e, t) => e(O, t), M = (e, { vNodes: t, formItemProps: n, slots: r, disabled: i }) => e.wrapFormItem ? _(D, {
91
+ }, j = { [k]: null }, M = (e, t) => e(k, t), N = (e, { vNodes: t, formItemProps: n, slots: r, disabled: i }) => e.wrapFormItem ? _(O, {
90
92
  ...n.value,
91
93
  embed: !0,
92
94
  disabled: i == null ? void 0 : i.value
@@ -96,32 +98,32 @@ var D = {
96
98
  error: r.error,
97
99
  tips: r.tips,
98
100
  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,
101
+ }) : t, P = (r, { emit: i, slots: a, events: o, predicate: s, removeOn: c = !1, attrs: l, block: u, class: d, rules: m, messagePrefix: g = "请输入", extraFormItemProps: y }) => {
102
+ let b = A(r), S = v(f, null), w = h(() => b.value ? "" : `${g}${r.label}`), T = p(r, {
103
+ rules: m,
104
+ block: x(() => u === void 0 ? r.type === "textarea" && r.block === void 0 ? !0 : r.block : u),
105
+ attrs: l,
106
+ class: d,
107
+ message: w.value,
106
108
  messagePrefix: g,
107
109
  ...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,
110
+ }), E = (e) => M(i, e), D = (e) => r.col ? _(C, { span: r.block ? 24 : r.span }, { default: () => e }) : e, O = ({ vNodes: e }) => N(r, {
111
+ vNodes: D(e),
112
+ formItemProps: T,
111
113
  slots: a,
112
114
  disabled: b
113
- }), O = h(() => t(r, c, s, i)), A = n({ removeOn: l });
115
+ }), k = h(() => t(r, s, o, i)), j = n({ removeOn: c });
114
116
  return {
115
- emitInput: T,
116
- render: D,
117
- placeholder: C,
117
+ emitInput: E,
118
+ render: O,
119
+ placeholder: w,
118
120
  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)
121
+ formItemProps: T,
122
+ autoBind: k,
123
+ inputProps: e(r, s),
124
+ listeners: j,
125
+ printing: h(() => (S == null ? void 0 : S.printing) === !0)
124
126
  };
125
- }, P = (e) => e.icon ? _("i", { class: e.icon }) : null;
127
+ }, F = (e) => e.icon ? _("i", { class: e.icon }) : null;
126
128
  //#endregion
127
- export { k as a, j as i, A as n, N as o, M as r, D as s, P as t };
129
+ export { A as a, M as i, j as n, P as o, N as r, O as s, F as t };
@@ -1,5 +1,5 @@
1
- import { t as e } from "./7GmKqdbC.mjs";
2
- import { t } from "./CkOD-_VV.mjs";
1
+ import { t as e } from "./usyXQe35.mjs";
2
+ import { t } from "./B1MSrc6f.mjs";
3
3
  import { copy as n } from "@web-utils/core";
4
4
  import { Fragment as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createTextVNode as c, createVNode as l, openBlock as u, renderList as d, toDisplayString as f, withCtx as p } from "vue";
5
5
  import { ElInputNumber as m, ElOption as h, ElRadio as ee, ElRadioGroup as g, ElSelect as _, ElTabPane as v, ElTabs as y } from "element-plus/es";
@@ -1,18 +1,18 @@
1
- import { s as e } from "./DcTVYqeJ.mjs";
1
+ import { s as e } from "./DuOxL6xh.mjs";
2
2
  import { t } from "./DOZRzqlo.mjs";
3
3
  import { cellClickHandlerContextKey as n } from "../constants/index.mjs";
4
- import { t as r } from "./7GmKqdbC.mjs";
5
- import { t as i } from "./CkOD-_VV.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";
4
+ import { t as r } from "./usyXQe35.mjs";
5
+ import { t as i } from "./B1MSrc6f.mjs";
6
+ import { n as a } from "./DEC2O0q-.mjs";
7
+ import { t as o } from "./DBUJ7Bva.mjs";
8
+ import { t as ee } from "./BZ0v5mka.mjs";
9
+ import { t as s } from "./BWoKh6f6.mjs";
10
+ import { t as c } from "./CE1uX9hJ.mjs";
11
+ import { t as l } from "./CGnOR2gn.mjs";
12
+ import { t as u } from "./B2PuSZ_F.mjs";
13
+ import { t as d } from "./BHT38Us-.mjs";
14
+ import { t as f } from "./CrQmTHMA.mjs";
15
+ import { t as p } from "./CSnlDCNV.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";
@@ -0,0 +1,28 @@
1
+ import { f as e } from "./DuOxL6xh.mjs";
2
+ import { useFormItemProps as t } from "../helper/form-item.mjs";
3
+ import { r as n } from "./DEC2O0q-.mjs";
4
+ import { allProps as r, predicate as i } from "../props/image.mjs";
5
+ import { createVNode as a, isVNode as o, mergeProps as s } from "vue";
6
+ import { ElImage as c } from "element-plus/es";
7
+ //#region src/components/form/FormImage.vue?vue&type=script&lang.jsx
8
+ function l(e) {
9
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !o(e);
10
+ }
11
+ //#endregion
12
+ //#region src/components/form/FormImage.vue
13
+ var u = {
14
+ name: "FormImage",
15
+ inheritAttrs: !1,
16
+ props: { ...r },
17
+ emits: {},
18
+ setup(r, { slots: o, attrs: u }) {
19
+ let d = t(r, { attrs: u }), f = e(r, i);
20
+ return () => n(r, {
21
+ vNodes: a(c, s(f.value, u, { "preview-src-list": [r.src] }), l(o) ? o : { default: () => [o] }),
22
+ formItemProps: d,
23
+ slots: o
24
+ });
25
+ }
26
+ };
27
+ //#endregion
28
+ export { u as t };
@@ -1,5 +1,6 @@
1
- import { n as e } from "./BvKUeniN.mjs";
2
- import { n as t, t as n } from "./C6u76g6o.mjs";
1
+ import { n as e } from "./DEC2O0q-.mjs";
2
+ import { t } from "./BWoKh6f6.mjs";
3
+ import { allProps as n } from "../props/input.mjs";
3
4
  import { createVNode as r, isVNode as i, mergeProps as a, useModel as o } from "vue";
4
5
  //#region src/components/form/FormInputEmail.vue?vue&type=script&lang.jsx
5
6
  function s(e) {
@@ -10,15 +11,15 @@ function s(e) {
10
11
  var c = {
11
12
  name: "FormInputEmail",
12
13
  inheritAttrs: !1,
13
- props: { ...t },
14
+ props: { ...n },
14
15
  emits: { ...e },
15
- setup(e, { slots: t, attrs: i }) {
16
+ setup(e, { slots: n, attrs: i }) {
16
17
  let c = o(e, "modelValue");
17
- return () => r(n, a(e, i, {
18
+ return () => r(t, a(e, i, {
18
19
  modelValue: c.value,
19
20
  "onUpdate:modelValue": (e) => c.value = e,
20
21
  type: "email"
21
- }), s(t) ? t : { default: () => [t] });
22
+ }), s(n) ? n : { default: () => [n] });
22
23
  }
23
24
  };
24
25
  //#endregion
@@ -0,0 +1,32 @@
1
+ import { n as e, o as t } from "./DEC2O0q-.mjs";
2
+ import { allProps as n, predicate as r } from "../props/switch.mjs";
3
+ import { createVNode as i, mergeProps as a, useModel as o } from "vue";
4
+ import { ElSwitch as s } from "element-plus/es";
5
+ //#endregion
6
+ //#region src/components/form/FormSwitch.vue
7
+ var c = {
8
+ name: "FormSwitch",
9
+ inheritAttrs: !1,
10
+ props: { ...n },
11
+ emits: { ...e },
12
+ setup(e, { emit: n, slots: c, attrs: l }) {
13
+ let u = o(e, "modelValue"), { render: d, disabled: f, listeners: p, inputProps: m } = t(e, {
14
+ emit: n,
15
+ attrs: l,
16
+ slots: c,
17
+ predicate: r
18
+ });
19
+ return () => d({ vNodes: i(s, a(p.value, m.value, {
20
+ modelValue: u.value,
21
+ "onUpdate:modelValue": (e) => u.value = e,
22
+ disabled: f.value
23
+ }), {
24
+ "active-action": c["active-action"],
25
+ "inactive-action": c["inactive-action"],
26
+ active: c.active,
27
+ inactive: c.inactive
28
+ }) });
29
+ }
30
+ };
31
+ //#endregion
32
+ export { c as t };