@web-utils/form-ui 1.0.0-beta15 → 1.0.0-beta17

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 (100) hide show
  1. package/base.css +1 -1
  2. package/chunks/1BaFmq0z.mjs +168 -0
  3. package/chunks/3ItTydl6.mjs +100 -0
  4. package/chunks/B5B9au3z.mjs +180 -0
  5. package/chunks/Bh_CMUlo.mjs +12 -0
  6. package/chunks/CEWLi7G1.mjs +222 -0
  7. package/chunks/CH_v7XkN.mjs +53 -0
  8. package/chunks/CQTt0Oq1.mjs +17 -0
  9. package/chunks/CbGBSOlX.mjs +26 -0
  10. package/chunks/CqgD2b0r.mjs +106 -0
  11. package/chunks/CrWDXTno.mjs +108 -0
  12. package/chunks/D0EeP-eB.mjs +41 -0
  13. package/chunks/D9GcEl6r.mjs +8 -0
  14. package/chunks/DCKxvrCR.mjs +189 -0
  15. package/chunks/DFuF0u2g.mjs +51 -0
  16. package/chunks/DQDBsEel.mjs +26 -0
  17. package/chunks/DUBc-1s4.mjs +108 -0
  18. package/chunks/DX4Wq2Fb.mjs +73 -0
  19. package/chunks/Do5h5GzH.mjs +98 -0
  20. package/chunks/DsBWDK1-.mjs +222 -0
  21. package/chunks/Du6wl65y.mjs +88 -0
  22. package/chunks/Lnj54GAG.mjs +95 -0
  23. package/chunks/f-CM5UVD.mjs +26 -0
  24. package/chunks/uWRsKwOO.mjs +76 -0
  25. package/chunks/wfL1FAwc.mjs +1360 -0
  26. package/constants.d.ts +21 -2
  27. package/element-dialog/index.d.ts +58 -15
  28. package/element-dialog/index.mjs +2 -91
  29. package/form-cascader/index.d.ts +2 -0
  30. package/form-cascader/index.mjs +10 -0
  31. package/form-check-box-group/index.d.ts +196 -22
  32. package/form-check-box-group/index.mjs +1 -1
  33. package/form-checkbox/index.d.ts +188 -24
  34. package/form-checkbox/index.mjs +1 -1
  35. package/form-date-picker/index.d.ts +313 -26
  36. package/form-date-picker/index.mjs +1 -1
  37. package/form-holder/index.d.ts +92 -21
  38. package/form-holder/index.mjs +1 -1
  39. package/form-holder/style.css +1 -1
  40. package/form-image/index.d.ts +138 -20
  41. package/form-image/index.mjs +1 -1
  42. package/form-input/index.d.ts +281 -40
  43. package/form-input/index.mjs +1 -1
  44. package/form-input-cron-expression/index.d.ts +215 -0
  45. package/form-input-cron-expression/index.mjs +2 -0
  46. package/form-input-cron-expression/style.css +1 -0
  47. package/form-input-email/index.d.ts +279 -21
  48. package/form-input-email/index.mjs +1 -1
  49. package/form-input-id-card/index.d.ts +279 -21
  50. package/form-input-id-card/index.mjs +1 -1
  51. package/form-input-number/index.d.ts +228 -24
  52. package/form-input-number/index.mjs +1 -1
  53. package/form-input-phone-number/index.d.ts +279 -21
  54. package/form-input-phone-number/index.mjs +1 -1
  55. package/form-item-config-provider/index.d.ts +3 -1
  56. package/form-item-config-provider/index.mjs +1 -1
  57. package/form-item-x/index.d.ts +124 -15
  58. package/form-item-x/index.mjs +1 -1
  59. package/form-radio-group/index.d.ts +196 -22
  60. package/form-radio-group/index.mjs +1 -1
  61. package/form-rate/index.d.ts +232 -18
  62. package/form-rate/index.mjs +1 -1
  63. package/form-row/index.mjs +1 -1
  64. package/form-select/index.d.ts +455 -22
  65. package/form-select/index.mjs +1 -1
  66. package/form-slider/index.d.ts +261 -18
  67. package/form-slider/index.mjs +1 -1
  68. package/form-switch/index.d.ts +238 -20
  69. package/form-switch/index.mjs +1 -1
  70. package/form-text/index.d.ts +144 -20
  71. package/form-text/index.mjs +1 -1
  72. package/index.d.ts +4 -1
  73. package/index.mjs +37 -60
  74. package/month-calendar/index.mjs +312 -2
  75. package/month-calendar/style.css +1 -1
  76. package/package.json +3 -1
  77. package/vue-cron/index.d.ts +191 -0
  78. package/vue-cron/index.mjs +2 -0
  79. package/vue-cron/style.css +1 -0
  80. package/web-types.json +1 -1
  81. package/year-calendar/index.mjs +2 -1
  82. package/chunks/B5BIQCcK.mjs +0 -149
  83. package/chunks/BDhGvPmU.mjs +0 -32
  84. package/chunks/BXOvvlL2.mjs +0 -35
  85. package/chunks/C6tYoDfK.mjs +0 -43
  86. package/chunks/CAYDWMXC.mjs +0 -47
  87. package/chunks/CXHvVx2H.mjs +0 -54
  88. package/chunks/CykRgGj0.mjs +0 -90
  89. package/chunks/D4SiGR5u.mjs +0 -28
  90. package/chunks/DAEpRn3D.mjs +0 -28
  91. package/chunks/DK2YoEOD.mjs +0 -167
  92. package/chunks/DL4ovOwO.mjs +0 -36
  93. package/chunks/DXrQ5tWJ.mjs +0 -35
  94. package/chunks/Xww4oyW1.mjs +0 -47
  95. package/chunks/ciEWoJ1U.mjs +0 -23
  96. package/chunks/dwnrVqcq.mjs +0 -315
  97. package/chunks/jpMiw_3M.mjs +0 -74
  98. package/chunks/vlkluoXb.mjs +0 -32
  99. package/chunks/wo0ekOcp.mjs +0 -28
  100. /package/chunks/{CI_28Uw4.mjs → 98bTmBOR.mjs} +0 -0
package/base.css CHANGED
@@ -1 +1 @@
1
- :root{--el-disabled-text-color:#606266}
1
+ :root{--el-disabled-text-color:#606266}.border-bottom{border-bottom:1px solid #d7dae0}.clear-fix:after{clear:both;visibility:hidden;content:" ";height:0;display:block}.flex-row{flex-direction:row;flex-shrink:0;display:flex}.flex-row.vertical-center{align-items:center}.flex-row.vertical-start{align-items:flex-start}.flex-row.horizon-center{justify-content:center}.text-center{text-align:center}.flex-column{flex-direction:column;display:flex}.flex-column.vertical-center{justify-content:center}.flex-column.horizon-center{align-items:center}.flex-item,.flex-item-relative{flex:auto}.flex-item-relative{position:relative}.flex-item-relative .flex-content{position:absolute;top:0;bottom:0;left:0;right:0}.flex-not-shrink{flex-shrink:0}
@@ -0,0 +1,168 @@
1
+ import { i as e, n as t } from "./CEWLi7G1.mjs";
2
+ import { n } from "./CQTt0Oq1.mjs";
3
+ import { ElDatePicker as r } from "element-plus/es";
4
+ import { computed as i, createVNode as a, mergeProps as o } from "vue";
5
+ //#region src/components/form/props/date.js
6
+ var s = {
7
+ ...n,
8
+ modelValue: [
9
+ Number,
10
+ String,
11
+ Date,
12
+ Array
13
+ ],
14
+ readonly: {
15
+ type: Boolean,
16
+ default: !1
17
+ },
18
+ size: String,
19
+ editable: {
20
+ type: Boolean,
21
+ default: !0
22
+ },
23
+ clearable: {
24
+ type: Boolean,
25
+ default: !0
26
+ },
27
+ placeholder: {
28
+ type: String,
29
+ default: ""
30
+ },
31
+ startPlaceholder: String,
32
+ endPlaceholder: String,
33
+ type: {
34
+ type: String,
35
+ default: "date"
36
+ },
37
+ format: {
38
+ type: String,
39
+ default: "YYYY-MM-DD"
40
+ },
41
+ popperClass: String,
42
+ popperStyle: [String, Object],
43
+ popperOptions: {
44
+ type: Object,
45
+ default: () => ({})
46
+ },
47
+ rangeSeparator: {
48
+ type: String,
49
+ default: "-"
50
+ },
51
+ defaultValue: Object,
52
+ defaultTime: Object,
53
+ valueFormat: String,
54
+ id: [String, Array],
55
+ name: {
56
+ type: [String, Array],
57
+ default: ""
58
+ },
59
+ unlinkPanels: {
60
+ type: Boolean,
61
+ default: !1
62
+ },
63
+ prefixIcon: [String, Object],
64
+ clearIcon: [String, Object],
65
+ validateEvent: {
66
+ type: Boolean,
67
+ default: !0
68
+ },
69
+ disabledDate: Function,
70
+ shortcuts: {
71
+ type: Array,
72
+ default: () => []
73
+ },
74
+ cellClassName: Function,
75
+ teleported: {
76
+ type: Boolean,
77
+ default: !0
78
+ },
79
+ emptyValues: Array,
80
+ valueOnClear: [
81
+ String,
82
+ Number,
83
+ Boolean,
84
+ Function
85
+ ],
86
+ fallbackPlacements: {
87
+ type: Array,
88
+ default: () => [
89
+ "bottom",
90
+ "top",
91
+ "right",
92
+ "left"
93
+ ]
94
+ },
95
+ placement: {
96
+ type: String,
97
+ default: "bottom"
98
+ },
99
+ showFooter: {
100
+ type: Boolean,
101
+ default: !0
102
+ },
103
+ showConfirm: {
104
+ type: Boolean,
105
+ default: !0
106
+ },
107
+ showWeekNumber: {
108
+ type: Boolean,
109
+ default: !1
110
+ },
111
+ automaticDropdown: {
112
+ type: Boolean,
113
+ default: !0
114
+ }
115
+ }, c = { modelValue: !0 }, l = ["change"], u = (e) => n[e] === void 0 && c[e] !== !0, d = {
116
+ name: "FormDatePicker",
117
+ inheritAttrs: !1,
118
+ props: {
119
+ ...s,
120
+ split: Boolean,
121
+ startDate: String,
122
+ endDate: String
123
+ },
124
+ emits: {
125
+ ...t,
126
+ "update:startDate": null,
127
+ "update:endDate": null
128
+ },
129
+ setup(t, { emit: n, slots: s, attrs: c }) {
130
+ let { emitInput: d, render: f, placeholder: p, disabled: m, autoBind: h } = e(t, {
131
+ emit: n,
132
+ slots: s,
133
+ attrs: c,
134
+ events: l,
135
+ predicate: u,
136
+ messagePrefix: "请选择"
137
+ }), g = i(() => {
138
+ switch (t.type) {
139
+ case "date":
140
+ case "daterange": return "YYYY-MM-DD";
141
+ case "datetime":
142
+ case "datetimerange": return "YYYY-MM-DD HH:mm:ss";
143
+ default: return "";
144
+ }
145
+ }), _ = i(() => t.split && t.type.indexOf("range") > -1), v = (e, t) => {
146
+ n("update:startDate", e), n("update:endDate", t);
147
+ }, y = (e) => {
148
+ _.value ? e ? v(e[0], e[1]) : v(null, null) : d(e);
149
+ }, b = i(() => _.value ? [t.startDate, t.endDate] : t.modelValue);
150
+ return () => f({ vNodes: a(r, o({ style: "width: 100%" }, h.value, {
151
+ modelValue: b.value,
152
+ disabled: m.value,
153
+ placeholder: p.value,
154
+ format: g.value,
155
+ "value-format": g.value,
156
+ "onUpdate:modelValue": y
157
+ }), {
158
+ default: s.default,
159
+ "range-separator": s["range-separator"],
160
+ "pre-month": s["pre-month"],
161
+ "next-month": s["next-month"],
162
+ "pre-year": s["pre-year"],
163
+ "next-year": s["next-year"]
164
+ }) });
165
+ }
166
+ };
167
+ //#endregion
168
+ export { d as t };
@@ -0,0 +1,100 @@
1
+ import { i as e, n as t } from "./CEWLi7G1.mjs";
2
+ import { n } from "./CQTt0Oq1.mjs";
3
+ import { ElSwitch as r } from "element-plus/es";
4
+ import { createVNode as i, mergeProps as a, useModel as o } from "vue";
5
+ //#region src/components/form/props/switch.js
6
+ var s = {
7
+ ...n,
8
+ modelValue: [
9
+ Boolean,
10
+ String,
11
+ Number
12
+ ],
13
+ loading: {
14
+ type: Boolean,
15
+ default: !1
16
+ },
17
+ size: {
18
+ type: String,
19
+ default: ""
20
+ },
21
+ width: [Number, String],
22
+ inlinePrompt: {
23
+ type: Boolean,
24
+ default: !1
25
+ },
26
+ activeIcon: [String, Object],
27
+ inactiveIcon: [String, Object],
28
+ activeActionIcon: [String, Object],
29
+ inactiveActionIcon: [String, Object],
30
+ activeText: {
31
+ type: String,
32
+ default: ""
33
+ },
34
+ inactiveText: {
35
+ type: String,
36
+ default: ""
37
+ },
38
+ activeValue: [
39
+ Boolean,
40
+ String,
41
+ Number
42
+ ],
43
+ inactiveValue: [
44
+ Boolean,
45
+ String,
46
+ Number
47
+ ],
48
+ name: {
49
+ type: String,
50
+ default: ""
51
+ },
52
+ validateEvent: {
53
+ type: Boolean,
54
+ default: !0
55
+ },
56
+ beforeChange: Function,
57
+ id: String,
58
+ tabindex: [String, Number],
59
+ ariaLabel: String,
60
+ activeColor: {
61
+ type: String,
62
+ default: ""
63
+ },
64
+ inactiveColor: {
65
+ type: String,
66
+ default: ""
67
+ },
68
+ borderColor: {
69
+ type: String,
70
+ default: ""
71
+ }
72
+ }, c = { modelValue: !0 }, l = ["change"], u = (e) => n[e] === void 0 && c[e] !== !0, d = {
73
+ name: "FormSwitch",
74
+ inheritAttrs: !1,
75
+ props: { ...s },
76
+ emits: {
77
+ ...t,
78
+ change: null
79
+ },
80
+ setup(t, { emit: n, slots: s, attrs: c }) {
81
+ let d = o(t, "modelValue"), { render: f, disabled: p, autoBind: m } = e(t, {
82
+ emit: n,
83
+ slots: s,
84
+ events: l,
85
+ predicate: u
86
+ });
87
+ return () => f({ vNodes: i(r, a(m.value, c, {
88
+ modelValue: d.value,
89
+ "onUpdate:modelValue": (e) => d.value = e,
90
+ disabled: p.value
91
+ }), {
92
+ "active-action": s["active-action"],
93
+ "inactive-action": s["inactive-action"],
94
+ active: s.active,
95
+ inactive: s.inactive
96
+ }) });
97
+ }
98
+ };
99
+ //#endregion
100
+ export { d as t };
@@ -0,0 +1,180 @@
1
+ import { n as e } from "./Bh_CMUlo.mjs";
2
+ import { ElDialog as t } from "element-plus/es";
3
+ import { computed as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createSlots as s, getCurrentInstance as c, mergeModels as l, mergeProps as u, normalizeClass as d, openBlock as f, ref as p, renderSlot as m, toDisplayString as h, unref as g, useModel as _, useTemplateRef as v, withCtx as y, withModifiers as b } from "vue";
4
+ //#region src/components/dialog/props.js
5
+ var x = {
6
+ modelValue: {
7
+ type: Boolean,
8
+ default: !1
9
+ },
10
+ title: {
11
+ type: String,
12
+ default: ""
13
+ },
14
+ width: [String, Number],
15
+ fullscreen: {
16
+ type: Boolean,
17
+ default: !1
18
+ },
19
+ top: {
20
+ type: String,
21
+ default: ""
22
+ },
23
+ modal: {
24
+ type: Boolean,
25
+ default: !0
26
+ },
27
+ modalPenetrable: {
28
+ type: Boolean,
29
+ default: !1
30
+ },
31
+ modalClass: String,
32
+ headerClass: String,
33
+ bodyClass: String,
34
+ footerClass: String,
35
+ appendToBody: {
36
+ type: Boolean,
37
+ default: !0
38
+ },
39
+ appendTo: [String, Object],
40
+ lockScroll: {
41
+ type: Boolean,
42
+ default: !0
43
+ },
44
+ openDelay: {
45
+ type: Number,
46
+ default: 0
47
+ },
48
+ closeDelay: {
49
+ type: Number,
50
+ default: 0
51
+ },
52
+ closeOnClickModal: { type: Boolean },
53
+ closeOnPressEscape: {
54
+ type: Boolean,
55
+ default: !0
56
+ },
57
+ showClose: {
58
+ type: Boolean,
59
+ default: !0
60
+ },
61
+ beforeClose: Function,
62
+ draggable: {
63
+ type: Boolean,
64
+ default: !0
65
+ },
66
+ overflow: {
67
+ type: Boolean,
68
+ default: !1
69
+ },
70
+ center: {
71
+ type: Boolean,
72
+ default: !1
73
+ },
74
+ alignCenter: {
75
+ type: Boolean,
76
+ default: !1
77
+ },
78
+ destroyOnClose: {
79
+ type: Boolean,
80
+ default: !1
81
+ },
82
+ closeIcon: [String, Object],
83
+ zIndex: Number,
84
+ headerAriaLevel: {
85
+ type: String,
86
+ default: "2"
87
+ },
88
+ transition: [String, Object],
89
+ customClass: {
90
+ type: String,
91
+ default: ""
92
+ },
93
+ height: String,
94
+ embed: Boolean,
95
+ showFullscreen: Boolean,
96
+ showFullScreen: Boolean
97
+ }, S = {
98
+ embed: !0,
99
+ height: !0,
100
+ showFullscreen: !0,
101
+ showFullScreen: !0,
102
+ fullscreen: !0,
103
+ showClose: !0
104
+ }, C = [
105
+ "open",
106
+ "opened",
107
+ "close",
108
+ "closed",
109
+ "open-auto-focus",
110
+ "close-auto-focus"
111
+ ], w = (e) => S[e] !== !0, T = { class: "dialog-title" }, E = { class: "dialog-header-buttons" }, D = {
112
+ __name: "ElementDialog",
113
+ props: /* @__PURE__ */ l({ ...x }, {
114
+ modelValue: {
115
+ type: Boolean,
116
+ default: !1
117
+ },
118
+ modelModifiers: {}
119
+ }),
120
+ emits: /* @__PURE__ */ l({
121
+ open: null,
122
+ opened: null,
123
+ close: null,
124
+ closed: null,
125
+ "open-auto-focus": null,
126
+ "close-auto-focus": null,
127
+ "toggle-fullscreen": null
128
+ }, ["update:modelValue"]),
129
+ setup(l, { expose: x, emit: S }) {
130
+ let D = _(l, "modelValue"), O = l, k = S, A = e(O, {
131
+ emit: k,
132
+ events: C,
133
+ predicate: w
134
+ }), j = v("dialog"), M = p(O.fullscreen), N = () => {
135
+ M.value = !M.value, k("toggle-fullscreen", M.value);
136
+ }, P = n(() => M.value ? "100%" : O.height), F = c(), I = () => {
137
+ O.embed ? (F.parent.emit("update:visible", !1), F.parent.emit("update:modelValue", !1)) : j.value.handleClose();
138
+ };
139
+ return x({
140
+ close: I,
141
+ hide: I
142
+ }), (e, n) => {
143
+ let c = t;
144
+ return f(), r(c, u({
145
+ ref: "dialog",
146
+ modelValue: D.value,
147
+ "onUpdate:modelValue": n[0] || (n[0] = (e) => D.value = e)
148
+ }, g(A), {
149
+ "show-close": !1,
150
+ fullscreen: g(M),
151
+ style: { "--dialog-body-height": g(P) }
152
+ }), s({
153
+ header: y(() => [i(" @slot 对话框标题的内容;会替换标题部分,但会移除关闭按钮 "), m(e.$slots, "header", {}, () => [o("div", T, h(e.title), 1), o("div", E, [e.showFullscreen || e.showFullScreen ? (f(), a("i", {
154
+ key: 0,
155
+ class: d(["dialog-header-button", {
156
+ "el-icon-full-screen": !e.fullscreen,
157
+ "el-icon-copy-document": e.fullscreen
158
+ }]),
159
+ onClick: b(N, ["stop"])
160
+ }, null, 2)) : i("v-if", !0), e.showClose ? (f(), a("i", {
161
+ key: 1,
162
+ class: "dialog-header-button el-icon-close",
163
+ onClick: b(I, ["stop"])
164
+ })) : i("v-if", !0)])])]),
165
+ default: y(() => [i(" @slot 对话框的默认内容 "), m(e.$slots, "default")]),
166
+ _: 2
167
+ }, [e.$slots.footer ? {
168
+ name: "footer",
169
+ fn: y(() => [i(" @slot Dialog 按钮操作区的内容 "), m(e.$slots, "footer", { close: I })]),
170
+ key: "0"
171
+ } : void 0]), 1040, [
172
+ "modelValue",
173
+ "fullscreen",
174
+ "style"
175
+ ]);
176
+ };
177
+ }
178
+ };
179
+ //#endregion
180
+ export { D as t };
@@ -0,0 +1,12 @@
1
+ import { computed as e } from "vue";
2
+ import { capitalize as t } from "@web-utils/core";
3
+ //#region src/util/index.js
4
+ var n = (e, n, r, i) => {
5
+ let a = {};
6
+ if (n) for (let t in e) n(t) && (a[t] = e[t]);
7
+ return r && r.forEach((e) => {
8
+ a[`on${t(e)}`] = (...t) => i(e, ...t);
9
+ }), a;
10
+ }, r = (t, { emit: r, events: i, predicate: a }) => e(() => n(t, a, i, r));
11
+ //#endregion
12
+ export { r as n, n as t };
@@ -0,0 +1,222 @@
1
+ import { formHolderContextKey as e, formItemConfigProviderContextKey as t } from "../constants.mjs";
2
+ import { t as n } from "./Bh_CMUlo.mjs";
3
+ import { ElCol as r, ElFormItem as i, ElTooltip as a } from "element-plus/es";
4
+ import { computed as o, createVNode as s, h as c, inject as l, mergeProps as u, nextTick as d, unref as f, useTemplateRef as p } from "vue";
5
+ import { ElCol as m, rowContextKey as h } from "element-plus";
6
+ //#region src/components/form/props/form-item.js
7
+ var g = {
8
+ prop: [String, Array],
9
+ label: String,
10
+ labelPosition: {
11
+ type: String,
12
+ default: ""
13
+ },
14
+ labelWidth: [String, Number],
15
+ required: {
16
+ type: Boolean,
17
+ default: !1
18
+ },
19
+ rules: Object,
20
+ error: String,
21
+ showMessage: {
22
+ type: Boolean,
23
+ default: !0
24
+ },
25
+ inlineMessage: {
26
+ type: Boolean,
27
+ default: !1
28
+ },
29
+ size: String,
30
+ for: String,
31
+ validateStatus: String,
32
+ messagePrefix: String,
33
+ message: String,
34
+ wrapCol: {
35
+ type: Boolean,
36
+ default: !0
37
+ },
38
+ fixedSpan: Number,
39
+ block: Boolean,
40
+ unwrap: Boolean,
41
+ half: Boolean,
42
+ formItemClass: String,
43
+ hideLabel: Boolean,
44
+ tips: { type: String },
45
+ tipsAfterLabel: {
46
+ type: Boolean,
47
+ default: !1
48
+ },
49
+ labelColspan: [Number, String],
50
+ inputColspan: [Number, String],
51
+ labelRowspan: [Number, String],
52
+ inputRowspan: [Number, String]
53
+ }, _ = {
54
+ required: !0,
55
+ rules: !0,
56
+ messagePrefix: !0,
57
+ message: !0,
58
+ wrapCol: !0,
59
+ fixedSpan: !0,
60
+ block: !0,
61
+ unwrap: !0,
62
+ half: !0,
63
+ formItemClass: !0,
64
+ hideLabel: !0,
65
+ tips: !0,
66
+ tipsAfterLabel: !0,
67
+ labelColspan: !0,
68
+ inputColspan: !0,
69
+ labelRowspan: !0,
70
+ inputRowspan: !0
71
+ }, v = (e) => g[e] !== void 0 && _[e] !== !0, y = (e, { emit: t, events: r, predicate: i }) => o(() => n(e, i, r, t)), b = {
72
+ span: {
73
+ type: Number,
74
+ default: 12
75
+ },
76
+ offset: {
77
+ type: Number,
78
+ default: 0
79
+ },
80
+ push: {
81
+ type: Number,
82
+ default: 0
83
+ },
84
+ pull: {
85
+ type: Number,
86
+ default: 0
87
+ },
88
+ xs: { type: [Number, Object] },
89
+ sm: { type: [Number, Object] },
90
+ md: { type: [Number, Object] },
91
+ lg: { type: [Number, Object] },
92
+ xl: { type: [Number, Object] },
93
+ tag: {
94
+ type: String,
95
+ default: "div"
96
+ }
97
+ }, x = { span: !0 }, S = (e) => b[e] !== void 0 && x[e] !== !0, C = (e, { emit: t, events: r, predicate: i }) => o(() => n(e, i, r, t)), w = (t) => {
98
+ let n = l(e, null);
99
+ return o(() => t.required === !0 ? !0 : (n == null ? void 0 : n.requiredFieldsMap[t.prop]) === !0);
100
+ }, T = (e, { rules: t, attrs: n, messagePrefix: r, message: i } = {}) => {
101
+ let a = w(e);
102
+ return o(() => {
103
+ let o = { message: i }, s = f(t);
104
+ return Object.keys({
105
+ ...g,
106
+ ...b
107
+ }).forEach((t) => {
108
+ t === "rules" ? e[t] && s ? o[t] = [...e[t], ...s] : e[t] ? o[t] = e[t] : s && (o[t] = s) : t === "messagePrefix" ? o[t] = e.messagePrefix || r : o[t] = e[t];
109
+ }), o.required = a.value, o.class = n == null ? void 0 : n.class, o.style = n == null ? void 0 : n.style, o;
110
+ });
111
+ }, E = {
112
+ name: "FormItemX",
113
+ inheritAttrs: !1,
114
+ props: {
115
+ ...g,
116
+ ...b
117
+ },
118
+ setup(n, { attrs: c, slots: f, expose: m }) {
119
+ let g = l(h, null), _ = l(t, null), b = l(e, null), x = c.embed ? o(() => c.disabled) : O(n), T = y(n, { predicate: v }), E = C(n, { predicate: S }), D = o(() => (_ == null ? void 0 : _.reactive) === !0 && _.block === !1 && n.fixedSpan === void 0 && !n.half), k = w(n), A = p("formItem"), j = o(() => (_ == null ? void 0 : _.wrapCol) === !1 ? !1 : !!g && n.wrapCol), M = o(() => b != null && b.tableForm ? "" : _ != null && _.block ? "100%" : n.half && j.value ? `calc(50% - ${g.gutter.value / 2}px)` : ""), N = o(() => (_ == null ? void 0 : _.block) === !0 || n.block || n.half ? 24 : n.span), P = o(() => {
120
+ if (x.value) return [];
121
+ if (k.value) {
122
+ let e = {
123
+ required: !0,
124
+ message: n.message || `${n.messagePrefix || "请输入"}${n.label}`
125
+ };
126
+ return n.rules ? [...n.rules, e] : [e];
127
+ }
128
+ return n.rules;
129
+ });
130
+ return m({
131
+ clearValidate: async () => {
132
+ var e;
133
+ await d(), (e = A.value) == null || e.clearValidate();
134
+ },
135
+ validate: async () => {
136
+ var e;
137
+ await d(), (e = A.value) == null || e.validate();
138
+ }
139
+ }), () => {
140
+ var e;
141
+ let t = f.tips || n.tips, o = t ? s(a, {
142
+ effect: "light",
143
+ content: n.tips,
144
+ offset: 4
145
+ }, {
146
+ default: () => s("i", { class: "el-icon-info form-item-input-info" }, null),
147
+ content: f.tips ? f.tips : null
148
+ }) : null, c = s(i, u(T.value, {
149
+ ref: "formItem",
150
+ style: { width: M.value },
151
+ class: [
152
+ "form-item",
153
+ n.formItemClass,
154
+ {
155
+ "form-item-hide-label": n.hideLabel,
156
+ "with-tips": !n.tipsAfterLabel && t,
157
+ required: x.value === !1 && k.value
158
+ }
159
+ ],
160
+ rules: P.value
161
+ }), {
162
+ ...f,
163
+ default: () => {
164
+ var e;
165
+ return [(e = f.default) == null ? void 0 : e.call(f, {
166
+ disabled: x.value,
167
+ required: k.value
168
+ }), t && !n.tipsAfterLabel ? o : null];
169
+ },
170
+ label: () => [f.label ? f.label() : n.label, n.tipsAfterLabel ? o : null]
171
+ }), l = [c, (e = f.below) == null ? void 0 : e.call(f)];
172
+ return n.unwrap ? l : j.value ? s(r, u(E.value, D.value ? {
173
+ xs: 24,
174
+ sm: 12,
175
+ md: 12,
176
+ lg: 8,
177
+ xl: 6
178
+ } : {}, { span: N.value }), { default: () => l }) : c;
179
+ };
180
+ }
181
+ }, D = "update:modelValue", O = (t) => {
182
+ let n = l(e, null), r = l("formItemGroup", null);
183
+ return o(() => {
184
+ if (t.disabled !== void 0) return t.disabled;
185
+ if (n) {
186
+ if (n.requiredFieldsMap[t.prop] === !0 || n.enabledFieldsMap[t.prop] === !0) return !1;
187
+ if (n.disabledFieldsMap[t.prop] === !0) return !0;
188
+ }
189
+ return (r == null ? void 0 : r.enabled) === !0 ? !1 : (r == null ? void 0 : r.disabled) === !0 ? !0 : (n == null ? void 0 : n.disabled) === !0;
190
+ });
191
+ }, k = { [D]: null }, A = (e, t) => e(D, t), j = (e, { vNodes: t, formItemProps: n, slots: r, disabled: i }) => e.wrapFormItem ? c(E, {
192
+ ...n.value,
193
+ embed: !0,
194
+ disabled: i == null ? void 0 : i.value
195
+ }, {
196
+ default: () => t,
197
+ label: r.label,
198
+ error: r.error,
199
+ tips: r.tips,
200
+ below: r.below
201
+ }) : t, M = (e, { emit: t, slots: r, attrs: i, rules: a, events: s, predicate: l, messagePrefix: u = "请输入" }) => {
202
+ let d = O(e), f = o(() => d.value ? "" : `${u}${e.label}`), p = T(e, {
203
+ rules: a,
204
+ attrs: i,
205
+ message: f.value
206
+ }), h = (e) => A(t, e), g = (t) => e.col ? c(m, { span: e.block ? 24 : e.span }, { default: () => t }) : t;
207
+ return {
208
+ emitInput: h,
209
+ render: ({ vNodes: t }) => j(e, {
210
+ vNodes: g(t),
211
+ formItemProps: p,
212
+ slots: r,
213
+ disabled: d
214
+ }),
215
+ placeholder: f,
216
+ disabled: d,
217
+ formItemProps: p,
218
+ autoBind: o(() => n(e, l, s, t))
219
+ };
220
+ }, N = (e) => e.icon ? c("i", { class: e.icon }) : null;
221
+ //#endregion
222
+ export { E as a, g as c, M as i, k as n, T as o, j as r, b as s, N as t };