@fishbelly/form-morph-arco 0.1.0 → 0.1.2

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.
package/dist/index.js CHANGED
@@ -1,9 +1,9 @@
1
- import { FORM_RUNTIME_KEY as ve, defineFieldType as V, definePlugin as ge } from "@fishbelly/form-morph";
2
- import { defineComponent as x, computed as m, openBlock as p, createBlock as k, unref as h, withCtx as A, createElementBlock as I, Fragment as X, renderList as Z, createTextVNode as W, toDisplayString as U, inject as ie, ref as j, onBeforeUnmount as de, createVNode as H, normalizeClass as E, provide as we, reactive as se, renderSlot as Y, onMounted as ke, nextTick as le, normalizeStyle as Ve, createCommentVNode as q, createElementVNode as te } from "vue";
3
- import { Textarea as xe, InputPassword as ze, Input as Te, InputNumber as Ce, Select as Se, RadioGroup as Le, Radio as Be, CheckboxGroup as Ie, Checkbox as $e, Switch as Ae, Slider as De, Rate as Fe, RangePicker as Pe, DatePicker as Ue, TimePicker as Ne, Upload as Me, Button as Re, Cascader as Oe, TreeSelect as je, ColorPicker as We, FormItem as Ee, Form as Ye, Card as He, Divider as qe } from "@arco-design/web-vue";
4
- import { IconUpload as Ke, IconCompass as Ge } from "@arco-design/web-vue/es/icon";
5
- import { formInjectionKey as ae } from "@arco-design/web-vue/es/form/context";
6
- const K = /* @__PURE__ */ x({
1
+ import { FORM_RUNTIME_KEY as Ie, matchesFileAccept as ce, defineFieldType as k, definePlugin as $e } from "@fishbelly/form-morph";
2
+ import { defineComponent as V, computed as p, openBlock as c, createBlock as w, unref as h, withCtx as I, createElementBlock as z, Fragment as Q, renderList as ae, createTextVNode as H, toDisplayString as B, inject as he, ref as Y, onMounted as ge, onBeforeUnmount as we, createCommentVNode as W, createVNode as J, normalizeClass as X, provide as De, reactive as ke, renderSlot as Z, nextTick as me, normalizeStyle as Ae, createElementVNode as pe } from "vue";
3
+ import { Textarea as Fe, InputPassword as Ne, Input as Pe, InputNumber as Ue, Select as Me, RadioGroup as Ee, Radio as Re, CheckboxGroup as We, Checkbox as Oe, Switch as je, Slider as Ye, Rate as He, RangePicker as Ke, DatePicker as qe, TimePicker as Ge, Upload as Je, Button as Qe, Cascader as Xe, TreeSelect as Ze, ColorPicker as _e, FormItem as el, Form as ll, Card as tl, Divider as al } from "@arco-design/web-vue";
4
+ import { IconUpload as ol, IconCheckCircleFill as nl, IconCompass as rl } from "@arco-design/web-vue/es/icon";
5
+ import { formInjectionKey as fe } from "@arco-design/web-vue/es/form/context";
6
+ const _ = /* @__PURE__ */ V({
7
7
  __name: "TextInput",
8
8
  props: {
9
9
  modelValue: {},
@@ -17,46 +17,46 @@ const K = /* @__PURE__ */ x({
17
17
  },
18
18
  emits: ["update:modelValue"],
19
19
  setup(e, { emit: t }) {
20
- const l = e, a = t, n = m(() => l.node.type === "textarea"), r = m(() => l.node.type === "password"), o = m(() => l.modelValue === null || l.modelValue === void 0 ? "" : String(l.modelValue));
21
- function i(d) {
22
- a("update:modelValue", d);
20
+ const l = e, a = t, r = p(() => l.node.type === "textarea"), i = p(() => l.node.type === "password"), o = p(() => l.modelValue === null || l.modelValue === void 0 ? "" : String(l.modelValue));
21
+ function s(u) {
22
+ a("update:modelValue", u);
23
23
  }
24
- return (d, u) => {
25
- var v, f, y, $, F, g, w, C, z, T, S, N;
26
- return n.value ? (p(), k(h(xe), {
24
+ return (u, d) => {
25
+ var f, y, b, S, F, g, v, T, C, L, $, D;
26
+ return r.value ? (c(), w(h(Fe), {
27
27
  key: 0,
28
28
  "model-value": o.value,
29
- placeholder: ((v = e.node.props) == null ? void 0 : v.placeholder) ?? "请输入",
30
- "max-length": ((f = e.node.props) == null ? void 0 : f.maxLength) ?? void 0,
31
- "auto-size": ((y = e.node.props) == null ? void 0 : y.autoSize) === !0,
32
- "show-word-limit": (($ = e.node.props) == null ? void 0 : $.showWordLimit) === !0,
29
+ placeholder: ((f = e.node.props) == null ? void 0 : f.placeholder) ?? "请输入",
30
+ "max-length": ((y = e.node.props) == null ? void 0 : y.maxLength) ?? void 0,
31
+ "auto-size": ((b = e.node.props) == null ? void 0 : b.autoSize) === !0,
32
+ "show-word-limit": ((S = e.node.props) == null ? void 0 : S.showWordLimit) === !0,
33
33
  "allow-clear": ((F = e.node.props) == null ? void 0 : F.allowClear) === !0,
34
34
  rows: ((g = e.node.props) == null ? void 0 : g.rows) ?? 4,
35
35
  disabled: e.disabled || e.readonly,
36
36
  size: e.size,
37
- "onUpdate:modelValue": i
38
- }, null, 8, ["model-value", "placeholder", "max-length", "auto-size", "show-word-limit", "allow-clear", "rows", "disabled", "size"])) : r.value ? (p(), k(h(ze), {
37
+ "onUpdate:modelValue": s
38
+ }, null, 8, ["model-value", "placeholder", "max-length", "auto-size", "show-word-limit", "allow-clear", "rows", "disabled", "size"])) : i.value ? (c(), w(h(Ne), {
39
39
  key: 1,
40
40
  "model-value": o.value,
41
- placeholder: ((w = e.node.props) == null ? void 0 : w.placeholder) ?? "请输入",
42
- "max-length": ((C = e.node.props) == null ? void 0 : C.maxLength) ?? void 0,
43
- "allow-clear": ((z = e.node.props) == null ? void 0 : z.allowClear) !== !1,
41
+ placeholder: ((v = e.node.props) == null ? void 0 : v.placeholder) ?? "请输入",
42
+ "max-length": ((T = e.node.props) == null ? void 0 : T.maxLength) ?? void 0,
43
+ "allow-clear": ((C = e.node.props) == null ? void 0 : C.allowClear) !== !1,
44
44
  disabled: e.disabled || e.readonly,
45
45
  size: e.size,
46
- "onUpdate:modelValue": i
47
- }, null, 8, ["model-value", "placeholder", "max-length", "allow-clear", "disabled", "size"])) : (p(), k(h(Te), {
46
+ "onUpdate:modelValue": s
47
+ }, null, 8, ["model-value", "placeholder", "max-length", "allow-clear", "disabled", "size"])) : (c(), w(h(Pe), {
48
48
  key: 2,
49
49
  "model-value": o.value,
50
- placeholder: ((T = e.node.props) == null ? void 0 : T.placeholder) ?? "请输入",
51
- "max-length": ((S = e.node.props) == null ? void 0 : S.maxLength) ?? void 0,
52
- "allow-clear": ((N = e.node.props) == null ? void 0 : N.allowClear) !== !1,
50
+ placeholder: ((L = e.node.props) == null ? void 0 : L.placeholder) ?? "请输入",
51
+ "max-length": (($ = e.node.props) == null ? void 0 : $.maxLength) ?? void 0,
52
+ "allow-clear": ((D = e.node.props) == null ? void 0 : D.allowClear) !== !1,
53
53
  disabled: e.disabled || e.readonly,
54
54
  size: e.size,
55
- "onUpdate:modelValue": i
55
+ "onUpdate:modelValue": s
56
56
  }, null, 8, ["model-value", "placeholder", "max-length", "allow-clear", "disabled", "size"]));
57
57
  };
58
58
  }
59
- }), Je = /* @__PURE__ */ x({
59
+ }), il = /* @__PURE__ */ V({
60
60
  __name: "NumberInput",
61
61
  props: {
62
62
  modelValue: {},
@@ -70,30 +70,30 @@ const K = /* @__PURE__ */ x({
70
70
  },
71
71
  emits: ["update:modelValue"],
72
72
  setup(e, { emit: t }) {
73
- const l = e, a = t, n = m(() => {
73
+ const l = e, a = t, r = p(() => {
74
74
  if (l.modelValue === null || l.modelValue === void 0 || l.modelValue === "") return;
75
75
  const o = Number(l.modelValue);
76
76
  return Number.isFinite(o) ? o : void 0;
77
77
  });
78
- function r(o) {
78
+ function i(o) {
79
79
  a("update:modelValue", o === void 0 || o === "" ? null : o);
80
80
  }
81
- return (o, i) => {
82
- var d, u, v, f, y;
83
- return p(), k(h(Ce), {
84
- "model-value": n.value,
85
- placeholder: ((d = e.node.props) == null ? void 0 : d.placeholder) ?? "请输入数字",
86
- min: ((u = e.node.props) == null ? void 0 : u.min) ?? void 0,
87
- max: ((v = e.node.props) == null ? void 0 : v.max) ?? void 0,
88
- step: ((f = e.node.props) == null ? void 0 : f.step) ?? void 0,
89
- precision: ((y = e.node.props) == null ? void 0 : y.precision) ?? void 0,
81
+ return (o, s) => {
82
+ var u, d, f, y, b;
83
+ return c(), w(h(Ue), {
84
+ "model-value": r.value,
85
+ placeholder: ((u = e.node.props) == null ? void 0 : u.placeholder) ?? "请输入数字",
86
+ min: ((d = e.node.props) == null ? void 0 : d.min) ?? void 0,
87
+ max: ((f = e.node.props) == null ? void 0 : f.max) ?? void 0,
88
+ step: ((y = e.node.props) == null ? void 0 : y.step) ?? void 0,
89
+ precision: ((b = e.node.props) == null ? void 0 : b.precision) ?? void 0,
90
90
  disabled: e.disabled || e.readonly,
91
91
  size: e.size,
92
- "onUpdate:modelValue": r
92
+ "onUpdate:modelValue": i
93
93
  }, null, 8, ["model-value", "placeholder", "min", "max", "step", "precision", "disabled", "size"]);
94
94
  };
95
95
  }
96
- }), oe = /* @__PURE__ */ x({
96
+ }), ye = /* @__PURE__ */ V({
97
97
  __name: "SelectInput",
98
98
  props: {
99
99
  modelValue: {},
@@ -107,30 +107,30 @@ const K = /* @__PURE__ */ x({
107
107
  },
108
108
  emits: ["update:modelValue"],
109
109
  setup(e, { emit: t }) {
110
- const l = e, a = t, n = m(() => {
111
- var i;
112
- return l.node.type === "multi-select" || ((i = l.node.props) == null ? void 0 : i.multiple) === !0;
113
- }), r = m(() => n.value ? Array.isArray(l.modelValue) ? l.modelValue : [] : l.modelValue === null || l.modelValue === void 0 ? void 0 : l.modelValue);
114
- function o(i) {
115
- a("update:modelValue", i === void 0 ? null : i);
110
+ const l = e, a = t, r = p(() => {
111
+ var s;
112
+ return l.node.type === "multi-select" || ((s = l.node.props) == null ? void 0 : s.multiple) === !0;
113
+ }), i = p(() => r.value ? Array.isArray(l.modelValue) ? l.modelValue : [] : l.modelValue === null || l.modelValue === void 0 ? void 0 : l.modelValue);
114
+ function o(s) {
115
+ a("update:modelValue", s === void 0 ? null : s);
116
116
  }
117
- return (i, d) => {
118
- var u, v, f, y;
119
- return p(), k(h(Se), {
120
- "model-value": r.value,
117
+ return (s, u) => {
118
+ var d, f, y, b;
119
+ return c(), w(h(Me), {
120
+ "model-value": i.value,
121
121
  options: e.options,
122
- multiple: n.value,
123
- placeholder: ((u = e.node.props) == null ? void 0 : u.placeholder) ?? "请选择",
124
- "allow-search": ((v = e.node.props) == null ? void 0 : v.allowSearch) === !0,
125
- "max-tag-count": ((f = e.node.props) == null ? void 0 : f.maxTagCount) ?? void 0,
122
+ multiple: r.value,
123
+ placeholder: ((d = e.node.props) == null ? void 0 : d.placeholder) ?? "请选择",
124
+ "allow-search": ((f = e.node.props) == null ? void 0 : f.allowSearch) === !0,
125
+ "max-tag-count": ((y = e.node.props) == null ? void 0 : y.maxTagCount) ?? void 0,
126
126
  disabled: e.disabled || e.readonly,
127
127
  size: e.size,
128
- "allow-clear": ((y = e.node.props) == null ? void 0 : y.allowClear) !== !1,
128
+ "allow-clear": ((b = e.node.props) == null ? void 0 : b.allowClear) !== !1,
129
129
  "onUpdate:modelValue": o
130
130
  }, null, 8, ["model-value", "options", "multiple", "placeholder", "allow-search", "max-tag-count", "disabled", "size", "allow-clear"]);
131
131
  };
132
132
  }
133
- }), Qe = /* @__PURE__ */ x({
133
+ }), dl = /* @__PURE__ */ V({
134
134
  __name: "RadioInput",
135
135
  props: {
136
136
  modelValue: {},
@@ -144,30 +144,30 @@ const K = /* @__PURE__ */ x({
144
144
  },
145
145
  emits: ["update:modelValue"],
146
146
  setup(e, { emit: t }) {
147
- const l = e, a = t, n = m(() => {
147
+ const l = e, a = t, r = p(() => {
148
148
  const o = l.modelValue;
149
149
  if (typeof o == "string" || typeof o == "number" || typeof o == "boolean") return o;
150
150
  });
151
- function r(o) {
151
+ function i(o) {
152
152
  a("update:modelValue", o);
153
153
  }
154
- return (o, i) => {
155
- var d;
156
- return p(), k(h(Le), {
157
- "model-value": n.value,
158
- direction: ((d = e.node.props) == null ? void 0 : d.direction) === "vertical" ? "vertical" : "horizontal",
154
+ return (o, s) => {
155
+ var u;
156
+ return c(), w(h(Ee), {
157
+ "model-value": r.value,
158
+ direction: ((u = e.node.props) == null ? void 0 : u.direction) === "vertical" ? "vertical" : "horizontal",
159
159
  disabled: e.disabled || e.readonly,
160
160
  size: e.size,
161
- onChange: r
161
+ onChange: i
162
162
  }, {
163
- default: A(() => [
164
- (p(!0), I(X, null, Z(e.options, (u) => (p(), k(h(Be), {
165
- key: String(u.value),
166
- value: u.value,
167
- disabled: u.disabled
163
+ default: I(() => [
164
+ (c(!0), z(Q, null, ae(e.options, (d) => (c(), w(h(Re), {
165
+ key: String(d.value),
166
+ value: d.value,
167
+ disabled: d.disabled
168
168
  }, {
169
- default: A(() => [
170
- W(U(u.label), 1)
169
+ default: I(() => [
170
+ H(B(d.label), 1)
171
171
  ]),
172
172
  _: 2
173
173
  }, 1032, ["value", "disabled"]))), 128))
@@ -176,7 +176,7 @@ const K = /* @__PURE__ */ x({
176
176
  }, 8, ["model-value", "direction", "disabled", "size"]);
177
177
  };
178
178
  }
179
- }), Xe = /* @__PURE__ */ x({
179
+ }), sl = /* @__PURE__ */ V({
180
180
  __name: "CheckboxInput",
181
181
  props: {
182
182
  modelValue: {},
@@ -190,27 +190,27 @@ const K = /* @__PURE__ */ x({
190
190
  },
191
191
  emits: ["update:modelValue"],
192
192
  setup(e, { emit: t }) {
193
- const l = e, a = t, n = m(() => Array.isArray(l.modelValue) ? l.modelValue : []);
194
- function r(o) {
193
+ const l = e, a = t, r = p(() => Array.isArray(l.modelValue) ? l.modelValue : []);
194
+ function i(o) {
195
195
  a("update:modelValue", Array.isArray(o) ? o : []);
196
196
  }
197
- return (o, i) => {
198
- var d;
199
- return p(), k(h(Ie), {
200
- "model-value": n.value,
201
- direction: ((d = e.node.props) == null ? void 0 : d.direction) === "vertical" ? "vertical" : "horizontal",
197
+ return (o, s) => {
198
+ var u;
199
+ return c(), w(h(We), {
200
+ "model-value": r.value,
201
+ direction: ((u = e.node.props) == null ? void 0 : u.direction) === "vertical" ? "vertical" : "horizontal",
202
202
  disabled: e.disabled || e.readonly,
203
203
  size: e.size,
204
- onChange: r
204
+ onChange: i
205
205
  }, {
206
- default: A(() => [
207
- (p(!0), I(X, null, Z(e.options, (u) => (p(), k(h($e), {
208
- key: String(u.value),
209
- value: u.value,
210
- disabled: u.disabled
206
+ default: I(() => [
207
+ (c(!0), z(Q, null, ae(e.options, (d) => (c(), w(h(Oe), {
208
+ key: String(d.value),
209
+ value: d.value,
210
+ disabled: d.disabled
211
211
  }, {
212
- default: A(() => [
213
- W(U(u.label), 1)
212
+ default: I(() => [
213
+ H(B(d.label), 1)
214
214
  ]),
215
215
  _: 2
216
216
  }, 1032, ["value", "disabled"]))), 128))
@@ -219,7 +219,7 @@ const K = /* @__PURE__ */ x({
219
219
  }, 8, ["model-value", "direction", "disabled", "size"]);
220
220
  };
221
221
  }
222
- }), Ze = /* @__PURE__ */ x({
222
+ }), ul = /* @__PURE__ */ V({
223
223
  __name: "SwitchInput",
224
224
  props: {
225
225
  modelValue: {},
@@ -233,20 +233,20 @@ const K = /* @__PURE__ */ x({
233
233
  },
234
234
  emits: ["update:modelValue"],
235
235
  setup(e, { emit: t }) {
236
- const l = e, a = t, n = m(() => l.size === "mini" || l.size === "small" ? "small" : "medium");
237
- return (r, o) => {
238
- var i, d;
239
- return p(), k(h(Ae), {
236
+ const l = e, a = t, r = p(() => l.size === "mini" || l.size === "small" ? "small" : "medium");
237
+ return (i, o) => {
238
+ var s, u;
239
+ return c(), w(h(je), {
240
240
  "model-value": e.modelValue === !0,
241
- "checked-text": ((i = e.node.props) == null ? void 0 : i.checkedText) ?? void 0,
242
- "unchecked-text": ((d = e.node.props) == null ? void 0 : d.uncheckedText) ?? void 0,
241
+ "checked-text": ((s = e.node.props) == null ? void 0 : s.checkedText) ?? void 0,
242
+ "unchecked-text": ((u = e.node.props) == null ? void 0 : u.uncheckedText) ?? void 0,
243
243
  disabled: e.disabled || e.readonly,
244
- size: n.value,
245
- "onUpdate:modelValue": o[0] || (o[0] = (u) => a("update:modelValue", !!u))
244
+ size: r.value,
245
+ "onUpdate:modelValue": o[0] || (o[0] = (d) => a("update:modelValue", !!d))
246
246
  }, null, 8, ["model-value", "checked-text", "unchecked-text", "disabled", "size"]);
247
247
  };
248
248
  }
249
- }), _e = /* @__PURE__ */ x({
249
+ }), cl = /* @__PURE__ */ V({
250
250
  __name: "SliderInput",
251
251
  props: {
252
252
  modelValue: {},
@@ -260,27 +260,27 @@ const K = /* @__PURE__ */ x({
260
260
  },
261
261
  emits: ["update:modelValue"],
262
262
  setup(e, { emit: t }) {
263
- const l = e, a = t, n = m(() => {
264
- var i;
265
- const r = Number(((i = l.node.props) == null ? void 0 : i.min) ?? 0);
266
- if (l.modelValue === null || l.modelValue === void 0 || l.modelValue === "") return r;
263
+ const l = e, a = t, r = p(() => {
264
+ var s;
265
+ const i = Number(((s = l.node.props) == null ? void 0 : s.min) ?? 0);
266
+ if (l.modelValue === null || l.modelValue === void 0 || l.modelValue === "") return i;
267
267
  const o = Number(l.modelValue);
268
- return Number.isFinite(o) ? o : r;
268
+ return Number.isFinite(o) ? o : i;
269
269
  });
270
- return (r, o) => {
271
- var i, d, u, v;
272
- return p(), k(h(De), {
273
- "model-value": n.value,
274
- min: ((i = e.node.props) == null ? void 0 : i.min) ?? 0,
275
- max: ((d = e.node.props) == null ? void 0 : d.max) ?? 100,
276
- step: ((u = e.node.props) == null ? void 0 : u.step) ?? 1,
277
- "show-input": ((v = e.node.props) == null ? void 0 : v.showInput) === !0,
270
+ return (i, o) => {
271
+ var s, u, d, f;
272
+ return c(), w(h(Ye), {
273
+ "model-value": r.value,
274
+ min: ((s = e.node.props) == null ? void 0 : s.min) ?? 0,
275
+ max: ((u = e.node.props) == null ? void 0 : u.max) ?? 100,
276
+ step: ((d = e.node.props) == null ? void 0 : d.step) ?? 1,
277
+ "show-input": ((f = e.node.props) == null ? void 0 : f.showInput) === !0,
278
278
  disabled: e.disabled || e.readonly,
279
- onChange: o[0] || (o[0] = (f) => a("update:modelValue", f))
279
+ onChange: o[0] || (o[0] = (y) => a("update:modelValue", y))
280
280
  }, null, 8, ["model-value", "min", "max", "step", "show-input", "disabled"]);
281
281
  };
282
282
  }
283
- }), el = /* @__PURE__ */ x({
283
+ }), ml = /* @__PURE__ */ V({
284
284
  __name: "RateInput",
285
285
  props: {
286
286
  modelValue: {},
@@ -294,32 +294,32 @@ const K = /* @__PURE__ */ x({
294
294
  },
295
295
  emits: ["update:modelValue"],
296
296
  setup(e, { emit: t }) {
297
- const l = e, a = t, n = m(() => {
298
- const r = Number(l.modelValue);
299
- return Number.isFinite(r) ? r : 0;
297
+ const l = e, a = t, r = p(() => {
298
+ const i = Number(l.modelValue);
299
+ return Number.isFinite(i) ? i : 0;
300
300
  });
301
- return (r, o) => {
302
- var i, d;
303
- return p(), k(h(Fe), {
304
- "model-value": n.value,
305
- count: ((i = e.node.props) == null ? void 0 : i.count) ?? 5,
306
- "allow-half": ((d = e.node.props) == null ? void 0 : d.allowHalf) === !0,
301
+ return (i, o) => {
302
+ var s, u;
303
+ return c(), w(h(He), {
304
+ "model-value": r.value,
305
+ count: ((s = e.node.props) == null ? void 0 : s.count) ?? 5,
306
+ "allow-half": ((u = e.node.props) == null ? void 0 : u.allowHalf) === !0,
307
307
  disabled: e.disabled || e.readonly,
308
- onChange: o[0] || (o[0] = (u) => a("update:modelValue", u))
308
+ onChange: o[0] || (o[0] = (d) => a("update:modelValue", d))
309
309
  }, null, 8, ["model-value", "count", "allow-half", "disabled"]);
310
310
  };
311
311
  }
312
312
  });
313
- function ll(e) {
313
+ function pl(e) {
314
314
  return !Array.isArray(e) || e.length === 0 ? [] : [
315
315
  e[0] instanceof Date ? e[0].getTime() : null,
316
316
  e[1] instanceof Date ? e[1].getTime() : null
317
317
  ];
318
318
  }
319
- function tl(e) {
319
+ function fl(e) {
320
320
  return e ? [] : null;
321
321
  }
322
- const ne = /* @__PURE__ */ x({
322
+ const be = /* @__PURE__ */ V({
323
323
  __name: "DateInput",
324
324
  props: {
325
325
  modelValue: {},
@@ -333,57 +333,57 @@ const ne = /* @__PURE__ */ x({
333
333
  },
334
334
  emits: ["update:modelValue"],
335
335
  setup(e, { emit: t }) {
336
- const l = e, a = t, n = m(() => l.node.type === "date-range");
337
- function r(f) {
338
- if (f == null || f === "") return;
339
- const y = Number(f);
340
- return Number.isFinite(y) ? new Date(y) : void 0;
336
+ const l = e, a = t, r = p(() => l.node.type === "date-range");
337
+ function i(y) {
338
+ if (y == null || y === "") return;
339
+ const b = Number(y);
340
+ return Number.isFinite(b) ? new Date(b) : void 0;
341
341
  }
342
- const o = m(() => r(l.modelValue)), i = m(() => {
342
+ const o = p(() => i(l.modelValue)), s = p(() => {
343
343
  if (!(!Array.isArray(l.modelValue) || l.modelValue.length === 0))
344
- return [r(l.modelValue[0]), r(l.modelValue[1])];
344
+ return [i(l.modelValue[0]), i(l.modelValue[1])];
345
345
  });
346
- function d(f, y) {
347
- if (!y) {
346
+ function u(y, b) {
347
+ if (!b) {
348
348
  a("update:modelValue", null);
349
349
  return;
350
350
  }
351
- y instanceof Date && a("update:modelValue", y.getTime());
351
+ b instanceof Date && a("update:modelValue", b.getTime());
352
352
  }
353
- function u(f, y) {
354
- a("update:modelValue", ll(y));
353
+ function d(y, b) {
354
+ a("update:modelValue", pl(b));
355
355
  }
356
- function v() {
357
- a("update:modelValue", tl(n.value));
356
+ function f() {
357
+ a("update:modelValue", fl(r.value));
358
358
  }
359
- return (f, y) => {
360
- var $, F, g, w, C, z, T, S;
361
- return n.value ? (p(), k(h(Pe), {
359
+ return (y, b) => {
360
+ var S, F, g, v, T, C, L, $;
361
+ return r.value ? (c(), w(h(Ke), {
362
362
  key: 0,
363
- "model-value": i.value,
364
- placeholder: (($ = e.node.props) == null ? void 0 : $.placeholder) ?? void 0,
363
+ "model-value": s.value,
364
+ placeholder: ((S = e.node.props) == null ? void 0 : S.placeholder) ?? void 0,
365
365
  "show-time": ((F = e.node.props) == null ? void 0 : F.showTime) === !0,
366
366
  format: ((g = e.node.props) == null ? void 0 : g.format) ?? void 0,
367
- "allow-clear": ((w = e.node.props) == null ? void 0 : w.allowClear) !== !1,
367
+ "allow-clear": ((v = e.node.props) == null ? void 0 : v.allowClear) !== !1,
368
368
  disabled: e.disabled || e.readonly,
369
369
  size: e.size,
370
- onChange: u,
371
- onClear: v
372
- }, null, 8, ["model-value", "placeholder", "show-time", "format", "allow-clear", "disabled", "size"])) : (p(), k(h(Ue), {
370
+ onChange: d,
371
+ onClear: f
372
+ }, null, 8, ["model-value", "placeholder", "show-time", "format", "allow-clear", "disabled", "size"])) : (c(), w(h(qe), {
373
373
  key: 1,
374
374
  "model-value": o.value,
375
- placeholder: ((C = e.node.props) == null ? void 0 : C.placeholder) ?? void 0,
376
- "show-time": ((z = e.node.props) == null ? void 0 : z.showTime) === !0,
377
- format: ((T = e.node.props) == null ? void 0 : T.format) ?? void 0,
378
- "allow-clear": ((S = e.node.props) == null ? void 0 : S.allowClear) !== !1,
375
+ placeholder: ((T = e.node.props) == null ? void 0 : T.placeholder) ?? void 0,
376
+ "show-time": ((C = e.node.props) == null ? void 0 : C.showTime) === !0,
377
+ format: ((L = e.node.props) == null ? void 0 : L.format) ?? void 0,
378
+ "allow-clear": (($ = e.node.props) == null ? void 0 : $.allowClear) !== !1,
379
379
  disabled: e.disabled || e.readonly,
380
380
  size: e.size,
381
- onChange: d,
382
- onClear: v
381
+ onChange: u,
382
+ onClear: f
383
383
  }, null, 8, ["model-value", "placeholder", "show-time", "format", "allow-clear", "disabled", "size"]));
384
384
  };
385
385
  }
386
- }), al = /* @__PURE__ */ x({
386
+ }), yl = /* @__PURE__ */ V({
387
387
  __name: "TimeInput",
388
388
  props: {
389
389
  modelValue: {},
@@ -398,43 +398,43 @@ const ne = /* @__PURE__ */ x({
398
398
  emits: ["update:modelValue"],
399
399
  setup(e, { emit: t }) {
400
400
  const l = t;
401
- function a(r) {
402
- l("update:modelValue", r ?? "");
401
+ function a(i) {
402
+ l("update:modelValue", i ?? "");
403
403
  }
404
- function n() {
404
+ function r() {
405
405
  l("update:modelValue", "");
406
406
  }
407
- return (r, o) => {
408
- var i, d, u;
409
- return p(), k(h(Ne), {
407
+ return (i, o) => {
408
+ var s, u, d;
409
+ return c(), w(h(Ge), {
410
410
  "model-value": e.modelValue === null || e.modelValue === void 0 ? "" : String(e.modelValue),
411
- placeholder: ((i = e.node.props) == null ? void 0 : i.placeholder) ?? "请选择时间",
412
- format: ((d = e.node.props) == null ? void 0 : d.format) ?? void 0,
413
- "allow-clear": ((u = e.node.props) == null ? void 0 : u.allowClear) !== !1,
411
+ placeholder: ((s = e.node.props) == null ? void 0 : s.placeholder) ?? "请选择时间",
412
+ format: ((u = e.node.props) == null ? void 0 : u.format) ?? void 0,
413
+ "allow-clear": ((d = e.node.props) == null ? void 0 : d.allowClear) !== !1,
414
414
  disabled: e.disabled || e.readonly,
415
415
  size: e.size,
416
416
  onChange: a,
417
- onClear: n
417
+ onClear: r
418
418
  }, null, 8, ["model-value", "placeholder", "format", "allow-clear", "disabled", "size"]);
419
419
  };
420
420
  }
421
- }), ol = /* @__PURE__ */ new Set(["uid", "status", "percent", "response", "file", "originFile", "isUploading"]);
422
- function J(e) {
421
+ }), bl = /* @__PURE__ */ new Set(["uid", "status", "percent", "response", "file", "originFile", "isUploading"]);
422
+ function le(e) {
423
423
  return typeof File < "u" && e instanceof File;
424
424
  }
425
- function ue(e) {
425
+ function xe(e) {
426
426
  const t = e.response;
427
427
  return t && typeof t == "object" ? t.data : void 0;
428
428
  }
429
- function nl(e) {
429
+ function vl(e) {
430
430
  const t = {};
431
431
  return Object.entries(e).forEach(([l, a]) => {
432
- ol.has(l) || (t[l] = a);
432
+ bl.has(l) || (t[l] = a);
433
433
  }), t;
434
434
  }
435
- function rl(e) {
435
+ function hl(e) {
436
436
  if (e == null) return e;
437
- if (J(e))
437
+ if (le(e))
438
438
  return {
439
439
  uid: `file-${e.name}-${e.lastModified}`,
440
440
  name: e.name,
@@ -444,32 +444,32 @@ function rl(e) {
444
444
  type: e.type
445
445
  };
446
446
  if (typeof e != "object") return e;
447
- const t = e, l = ue(t);
447
+ const t = e, l = xe(t);
448
448
  if (l && typeof l == "object") return l;
449
- const a = J(t.file) ? t.file : void 0;
449
+ const a = le(t.file) ? t.file : void 0;
450
450
  if (a) {
451
- const n = {
451
+ const r = {
452
452
  uid: t.uid ?? `file-${a.name}-${a.lastModified}`,
453
453
  name: t.name ?? a.name,
454
454
  file: a
455
455
  };
456
- t.url && (n.url = t.url), t.status && (n.status = t.status);
457
- const r = a.size ?? t.size, o = a.type ?? t.type;
458
- return r !== void 0 && (n.size = r), o !== void 0 && (n.type = o), n;
456
+ t.url && (r.url = t.url), t.status && (r.status = t.status);
457
+ const i = a.size ?? t.size, o = a.type ?? t.type;
458
+ return i !== void 0 && (r.size = i), o !== void 0 && (r.type = o), r;
459
459
  }
460
- return typeof l == "string" || typeof l == "number" ? { id: l } : nl(t);
460
+ return typeof l == "string" || typeof l == "number" ? { id: l } : vl(t);
461
461
  }
462
- function il(e) {
462
+ function gl(e) {
463
463
  return Array.isArray(e) ? e.map((t, l) => {
464
- if (J(t))
464
+ if (le(t))
465
465
  return { uid: `local-${l}`, name: t.name, file: t, status: "done" };
466
466
  if (t && typeof t == "object") {
467
- const a = t, n = ue(a), r = n && typeof n == "object" ? n : a, o = r.id ?? a.id, i = r.originalName ?? r.name ?? a.name, d = r.fileUrl ?? r.url ?? a.url, u = {
467
+ const a = t, r = xe(a), i = r && typeof r == "object" ? r : a, o = i.id ?? a.id, s = i.originalName ?? i.name ?? a.name, u = i.fileUrl ?? i.url ?? a.url, d = {
468
468
  ...a,
469
469
  uid: a.uid ?? (o !== void 0 ? `remote-${String(o)}` : `remote-${l}`),
470
470
  status: a.status ?? "done"
471
471
  };
472
- return i !== void 0 && (u.name = i), d !== void 0 && (u.url = d), !a.response && o !== void 0 && (u.response = { data: r }), u;
472
+ return s !== void 0 && (d.name = s), u !== void 0 && (d.url = u), !a.response && o !== void 0 && (d.response = { data: i }), d;
473
473
  }
474
474
  return {
475
475
  uid: `remote-${l}`,
@@ -479,13 +479,26 @@ function il(e) {
479
479
  };
480
480
  }) : [];
481
481
  }
482
- const dl = {
482
+ const wl = {
483
483
  key: 0,
484
484
  class: "fm-upload-view"
485
- }, sl = ["href"], ul = { key: 1 }, cl = {
485
+ }, kl = ["href"], xl = { key: 1 }, Vl = {
486
+ key: 0,
487
+ class: "fm-upload-view__empty"
488
+ }, zl = {
486
489
  key: 1,
490
+ class: "fm-upload-view__summary"
491
+ }, Tl = {
492
+ key: 2,
487
493
  class: "fm-upload-view__empty"
488
- }, pl = ["title"], ml = /* @__PURE__ */ x({
494
+ }, Cl = ["title"], Ll = {
495
+ key: 0,
496
+ class: "fm-upload-field__status"
497
+ }, Sl = {
498
+ key: 1,
499
+ class: "fm-upload-field__notice",
500
+ role: "status"
501
+ }, Bl = /* @__PURE__ */ V({
489
502
  __name: "UploadInput",
490
503
  props: {
491
504
  modelValue: {},
@@ -499,175 +512,200 @@ const dl = {
499
512
  },
500
513
  emits: ["update:modelValue"],
501
514
  setup(e, { emit: t }) {
502
- const l = e, a = t, n = ie(ve, null), r = j(null), o = (s) => {
503
- var c;
504
- return ((c = n == null ? void 0 : n.resolveAssetUrl) == null ? void 0 : c.call(n, s)) ?? s;
515
+ const l = e, a = t, r = he(Ie, null), i = Y(null), o = (n) => {
516
+ var m;
517
+ return ((m = r == null ? void 0 : r.resolveAssetUrl) == null ? void 0 : m.call(r, n)) ?? n;
505
518
  };
506
- function i(s) {
507
- return s && typeof s == "object" ? s : null;
519
+ function s(n) {
520
+ return n && typeof n == "object" ? n : null;
508
521
  }
509
- const d = /* @__PURE__ */ new Set(["http:", "https:", "blob:"]);
510
- function u(s) {
511
- const c = s.trim();
512
- if (!c) return "";
522
+ const u = /* @__PURE__ */ new Set(["http:", "https:", "blob:"]);
523
+ function d(n) {
524
+ const m = n.trim();
525
+ if (!m) return "";
513
526
  try {
514
- const b = new URL(c, "http://form-morph.local").protocol;
515
- return d.has(b) ? c : "";
527
+ const x = new URL(m, "http://form-morph.local").protocol;
528
+ return u.has(x) ? m : "";
516
529
  } catch {
517
530
  return "";
518
531
  }
519
532
  }
520
- function v(s) {
521
- const c = i(s);
522
- if (!c) return "";
523
- const b = c.url ?? c.fileUrl;
524
- return typeof b == "string" && b ? u(o(b)) : "";
533
+ function f(n) {
534
+ const m = s(n);
535
+ if (!m) return "";
536
+ const x = m.url ?? m.fileUrl;
537
+ return typeof x == "string" && x ? d(o(x)) : "";
525
538
  }
526
- function f(s) {
527
- const c = i(s);
528
- return String(c ? c.originalName ?? c.name ?? c.id ?? "附件" : s ?? "");
539
+ function y(n) {
540
+ const m = s(n);
541
+ return String(m ? m.originalName ?? m.name ?? m.id ?? "附件" : n ?? "");
529
542
  }
530
- function y(s, c) {
531
- const b = i(s);
532
- return b ? String(b.uid ?? b.id ?? c) : c;
543
+ function b(n, m) {
544
+ const x = s(n);
545
+ return x ? String(x.uid ?? x.id ?? m) : m;
533
546
  }
534
- const $ = m(
535
- () => il(l.modelValue).map((s) => {
536
- const c = i(s);
537
- if (!c) return s;
538
- const b = c.url ?? c.fileUrl;
539
- if (typeof b != "string" || !b) return s;
540
- const L = v(s);
541
- return c.url === L ? s : { ...c, url: L || void 0 };
547
+ const S = p(
548
+ () => gl(l.modelValue).map((n) => {
549
+ const m = s(n);
550
+ if (!m) return n;
551
+ const x = m.url ?? m.fileUrl;
552
+ if (typeof x != "string" || !x) return n;
553
+ const N = f(n);
554
+ return m.url === N ? n : { ...m, url: N || void 0 };
542
555
  })
543
- ), F = m(
556
+ ), F = p(
544
557
  () => l.mode === "view" || l.mode === "print" || l.disabled || l.readonly
545
- ), g = m(
558
+ ), g = p(() => {
559
+ var n;
560
+ return ((n = l.node.props) == null ? void 0 : n.showFileList) !== !1;
561
+ }), v = p(() => S.value.length), T = p(
546
562
  () => {
547
- var s;
548
- return typeof ((s = l.node.props) == null ? void 0 : s.accept) == "string" ? l.node.props.accept : "";
563
+ var n;
564
+ return typeof ((n = l.node.props) == null ? void 0 : n.accept) == "string" ? l.node.props.accept : "";
549
565
  }
550
- ), w = m(() => {
551
- var s;
552
- return ((s = l.node.props) == null ? void 0 : s.multiple) === !0;
553
- }), C = m(() => {
554
- const s = g.value.trim();
555
- return s ? `支持 ${s},可拖拽上传` : "支持所有文件格式,可拖拽上传";
556
- }), z = j(!1);
557
- let T = 0, S;
558
- function N() {
559
- S && (clearTimeout(S), S = void 0);
566
+ ), C = p(() => {
567
+ var n;
568
+ return ((n = l.node.props) == null ? void 0 : n.multiple) === !0;
569
+ }), L = p(() => {
570
+ var m;
571
+ const n = Number((m = l.node.props) == null ? void 0 : m.limit);
572
+ return Number.isFinite(n) && n > 0 ? Math.floor(n) : void 0;
573
+ }), $ = p(() => {
574
+ const n = T.value.trim();
575
+ return n ? `支持 ${n},可拖拽上传` : "支持所有文件格式,可拖拽上传";
576
+ }), D = Y(!1), P = Y("");
577
+ let U = 0, O, E;
578
+ function oe(n) {
579
+ P.value = n, E && clearTimeout(E), E = setTimeout(() => {
580
+ P.value = "", E = void 0;
581
+ }, 3200);
560
582
  }
561
- function R() {
562
- N(), z.value = !0;
583
+ function K() {
584
+ O && (clearTimeout(O), O = void 0);
563
585
  }
564
- function _(s) {
565
- var b;
566
- const c = (b = s.dataTransfer) == null ? void 0 : b.types;
567
- return !!(c && Array.from(c).includes("Files"));
586
+ function ne() {
587
+ K(), D.value = !0;
568
588
  }
569
- function ee(s, c) {
570
- const b = c.split(",").map((O) => O.trim()).filter(Boolean);
571
- if (!b.length) return !0;
572
- const L = s.name.toLowerCase(), B = (s.type || "").toLowerCase(), M = B.split("/")[0], D = L.includes(".") ? `.${L.split(".").pop()}` : "";
573
- return b.some((O) => {
574
- const P = O.toLowerCase();
575
- return P === B || `${M}${D.replace(".", "/")}` === P || /^\*(\/\*)?$/.test(P) ? !0 : /\/\*/.test(P) ? B.replace(/\/.*$/, "") === P.replace(/\/.*$/, "") : /\..*/.test(P) ? (P === ".jpg" || P === ".jpeg" ? [".jpg", ".jpeg"] : [P]).includes(D) : !1;
576
- });
589
+ function re(n) {
590
+ var x;
591
+ const m = (x = n.dataTransfer) == null ? void 0 : x.types;
592
+ return !!(m && Array.from(m).includes("Files"));
577
593
  }
578
- function ce(s) {
579
- return ee(s, g.value);
594
+ function ze(n) {
595
+ return ce({ name: n.name, type: n.type }, T.value) ? !0 : (oe("文件类型不支持"), !1);
580
596
  }
581
- function pe(s, c, b) {
582
- const L = Array.from(s ?? []).filter((B) => ee(B, c));
583
- return b ? L : L.slice(0, 1);
597
+ function ie() {
598
+ U = 0, K(), D.value = !1;
584
599
  }
585
- function me(s) {
586
- _(s) && (s.preventDefault(), T += 1, R());
600
+ function Te(n) {
601
+ re(n) && (n.preventDefault(), U += 1, ne());
587
602
  }
588
- function fe(s) {
589
- _(s) && (s.preventDefault(), s.dataTransfer && (s.dataTransfer.dropEffect = "copy"), T = Math.max(T, 1), R());
603
+ function Ce(n) {
604
+ re(n) && (n.preventDefault(), n.dataTransfer && (n.dataTransfer.dropEffect = "copy"), U = Math.max(U, 1), ne());
590
605
  }
591
- function ye(s) {
592
- z.value && (s.preventDefault(), T = Math.max(0, T - 1), !(T > 0) && (N(), S = setTimeout(() => {
593
- z.value = !1, S = void 0;
606
+ function Le(n) {
607
+ D.value && (n.preventDefault(), U = Math.max(0, U - 1), !(U > 0) && (K(), O = setTimeout(() => {
608
+ D.value = !1, O = void 0;
594
609
  }, 80)));
595
610
  }
596
- function be(s) {
597
- var L, B, M;
598
- s.preventDefault(), T = 0, N(), z.value = !1;
599
- const c = s.target;
600
- if (c instanceof Element && c.closest(".arco-upload")) return;
601
- const b = pe((L = s.dataTransfer) == null ? void 0 : L.files, g.value, w.value);
602
- b.length && ((M = (B = r.value) == null ? void 0 : B.upload) == null || M.call(B, b));
611
+ function Se(n) {
612
+ var se, G, ue;
613
+ n.preventDefault(), ie();
614
+ const m = n.target;
615
+ if (m instanceof Element && m.closest(".arco-upload")) return;
616
+ const x = Array.from(((se = n.dataTransfer) == null ? void 0 : se.files) ?? []), N = x.filter(
617
+ (j) => ce({ name: j.name, type: j.type }, T.value)
618
+ ), A = x.length - N.length;
619
+ let M = C.value ? N : N.slice(0, 1), de = !1;
620
+ if (L.value) {
621
+ const j = Math.max(0, L.value - v.value);
622
+ M.length > j && (de = !0, M = M.slice(0, j));
623
+ }
624
+ const q = [];
625
+ A && q.push(`${A} 个文件类型不支持`), de && q.push(`最多上传 ${L.value} 个文件`), q.length && oe(q.join(";")), M.length && ((ue = (G = i.value) == null ? void 0 : G.upload) == null || ue.call(G, M));
603
626
  }
604
- de(N);
605
- function he(s) {
606
- a("update:modelValue", Array.isArray(s) ? s.map(rl) : []);
627
+ function R() {
628
+ D.value && ie();
607
629
  }
608
- return (s, c) => {
609
- var b, L, B, M;
610
- return F.value ? (p(), I("div", dl, [
611
- $.value.length ? (p(!0), I(X, { key: 0 }, Z($.value, (D, O) => (p(), I("div", {
612
- key: y(D, O),
613
- class: "fm-upload-view__item"
614
- }, [
615
- v(D) ? (p(), I("a", {
616
- key: 0,
617
- class: "fm-upload-view__link",
618
- href: v(D),
619
- target: "_blank",
620
- rel: "noopener"
621
- }, U(f(D)), 9, sl)) : (p(), I("span", ul, U(f(D)), 1))
622
- ]))), 128)) : (p(), I("span", cl, "未上传"))
623
- ])) : (p(), I("div", {
630
+ ge(() => {
631
+ window.addEventListener("dragend", R), window.addEventListener("drop", R), window.addEventListener("blur", R);
632
+ }), we(() => {
633
+ window.removeEventListener("dragend", R), window.removeEventListener("drop", R), window.removeEventListener("blur", R), K(), E && clearTimeout(E);
634
+ });
635
+ function Be(n) {
636
+ a("update:modelValue", Array.isArray(n) ? n.map(hl) : []);
637
+ }
638
+ return (n, m) => {
639
+ var x, N;
640
+ return F.value ? (c(), z("div", wl, [
641
+ g.value ? (c(), z(Q, { key: 0 }, [
642
+ (c(!0), z(Q, null, ae(S.value, (A, M) => (c(), z("div", {
643
+ key: b(A, M),
644
+ class: "fm-upload-view__item"
645
+ }, [
646
+ f(A) ? (c(), z("a", {
647
+ key: 0,
648
+ class: "fm-upload-view__link",
649
+ href: f(A),
650
+ target: "_blank",
651
+ rel: "noopener"
652
+ }, B(y(A)), 9, kl)) : (c(), z("span", xl, B(y(A)), 1))
653
+ ]))), 128)),
654
+ v.value ? W("", !0) : (c(), z("span", Vl, "未上传"))
655
+ ], 64)) : v.value ? (c(), z("span", zl, "已上传 " + B(v.value) + " 个文件", 1)) : (c(), z("span", Tl, "未上传"))
656
+ ])) : (c(), z("div", {
624
657
  key: 1,
625
658
  class: "fm-upload-field",
626
- title: C.value,
627
- onDragenter: me,
628
- onDragover: fe,
629
- onDragleave: ye,
630
- onDrop: be
659
+ title: $.value,
660
+ onDragenter: Te,
661
+ onDragover: Ce,
662
+ onDragleave: Le,
663
+ onDrop: Se
631
664
  }, [
632
- H(h(Me), {
665
+ J(h(Je), {
633
666
  ref_key: "uploadRef",
634
- ref: r,
635
- "file-list": $.value,
636
- "auto-upload": ((b = e.node.props) == null ? void 0 : b.autoUpload) === !0,
637
- accept: g.value || void 0,
638
- action: ((L = e.node.props) == null ? void 0 : L.action) ?? void 0,
639
- limit: ((B = e.node.props) == null ? void 0 : B.limit) ?? void 0,
640
- multiple: w.value,
667
+ ref: i,
668
+ "file-list": S.value,
669
+ "auto-upload": ((x = e.node.props) == null ? void 0 : x.autoUpload) === !0,
670
+ accept: T.value || void 0,
671
+ action: ((N = e.node.props) == null ? void 0 : N.action) ?? void 0,
672
+ limit: L.value,
673
+ multiple: C.value,
641
674
  disabled: e.disabled || e.readonly,
642
- "show-file-list": ((M = e.node.props) == null ? void 0 : M.showFileList) !== !1,
643
- "on-before-upload": ce,
644
- onChange: c[0] || (c[0] = (D) => he(D))
675
+ "show-file-list": g.value,
676
+ "on-before-upload": ze,
677
+ onChange: m[0] || (m[0] = (A) => Be(A))
645
678
  }, {
646
- "upload-button": A(() => [
647
- H(h(Re), {
679
+ "upload-button": I(() => [
680
+ J(h(Qe), {
648
681
  type: "primary",
649
682
  disabled: e.disabled || e.readonly
650
683
  }, {
651
- icon: A(() => [
652
- H(h(Ke))
684
+ icon: I(() => [
685
+ J(h(ol))
653
686
  ]),
654
- default: A(() => [
655
- W(" " + U(z.value ? "松开上传" : "点击上传"), 1)
687
+ default: I(() => [
688
+ H(" " + B(D.value ? "松开上传" : "点击上传"), 1)
656
689
  ]),
657
690
  _: 1
658
691
  }, 8, ["disabled"])
659
692
  ]),
660
693
  _: 1
661
- }, 8, ["file-list", "auto-upload", "accept", "action", "limit", "multiple", "disabled", "show-file-list"])
662
- ], 40, pl));
694
+ }, 8, ["file-list", "auto-upload", "accept", "action", "limit", "multiple", "disabled", "show-file-list"]),
695
+ !g.value && v.value ? (c(), z("span", Ll, [
696
+ J(h(nl), { class: "fm-upload-field__status-icon" }),
697
+ H(" 已上传 " + B(v.value) + " 个文件 ", 1)
698
+ ])) : W("", !0),
699
+ P.value ? (c(), z("span", Sl, B(P.value), 1)) : W("", !0)
700
+ ], 40, Cl));
663
701
  };
664
702
  }
665
- }), fl = (e, t) => {
703
+ }), Il = (e, t) => {
666
704
  const l = e.__vccOpts || e;
667
- for (const [a, n] of t)
668
- l[a] = n;
705
+ for (const [a, r] of t)
706
+ l[a] = r;
669
707
  return l;
670
- }, re = /* @__PURE__ */ fl(ml, [["__scopeId", "data-v-9e64a989"]]), yl = /* @__PURE__ */ x({
708
+ }, ve = /* @__PURE__ */ Il(Bl, [["__scopeId", "data-v-9add1270"]]), $l = /* @__PURE__ */ V({
671
709
  __name: "CascaderInput",
672
710
  props: {
673
711
  modelValue: {},
@@ -682,25 +720,37 @@ const dl = {
682
720
  emits: ["update:modelValue"],
683
721
  setup(e, { emit: t }) {
684
722
  const l = t;
685
- function a(n) {
686
- l("update:modelValue", n ?? null);
723
+ function a(r) {
724
+ l("update:modelValue", r ?? null);
687
725
  }
688
- return (n, r) => {
689
- var o, i, d, u;
690
- return p(), k(h(Oe), {
726
+ return (r, i) => {
727
+ var o, s, u, d;
728
+ return c(), w(h(Xe), {
691
729
  "model-value": e.modelValue ?? void 0,
692
730
  options: e.options,
693
731
  placeholder: ((o = e.node.props) == null ? void 0 : o.placeholder) ?? "请选择",
694
- "allow-search": ((i = e.node.props) == null ? void 0 : i.allowSearch) === !0,
695
- "change-on-select": ((d = e.node.props) == null ? void 0 : d.changeOnSelect) === !0,
732
+ "allow-search": ((s = e.node.props) == null ? void 0 : s.allowSearch) === !0,
733
+ "change-on-select": ((u = e.node.props) == null ? void 0 : u.changeOnSelect) === !0,
696
734
  disabled: e.disabled || e.readonly,
697
735
  size: e.size,
698
- "allow-clear": ((u = e.node.props) == null ? void 0 : u.allowClear) !== !1,
736
+ "allow-clear": ((d = e.node.props) == null ? void 0 : d.allowClear) !== !1,
699
737
  onChange: a
700
738
  }, null, 8, ["model-value", "options", "placeholder", "allow-search", "change-on-select", "disabled", "size", "allow-clear"]);
701
739
  };
702
740
  }
703
- }), bl = /* @__PURE__ */ x({
741
+ });
742
+ function Dl(e) {
743
+ return typeof e == "boolean" ? String(e) : e;
744
+ }
745
+ function Ve(e = []) {
746
+ return e.map((t) => ({
747
+ key: Dl(t.value),
748
+ title: String(t.label),
749
+ disabled: t.disabled,
750
+ children: Array.isArray(t.children) ? Ve(t.children) : void 0
751
+ }));
752
+ }
753
+ const Al = /* @__PURE__ */ V({
704
754
  __name: "TreeSelectInput",
705
755
  props: {
706
756
  modelValue: {},
@@ -714,34 +764,25 @@ const dl = {
714
764
  },
715
765
  emits: ["update:modelValue"],
716
766
  setup(e, { emit: t }) {
717
- const l = e, a = t;
718
- function n(i) {
719
- return i.map((d) => ({
720
- title: String(d.label),
721
- value: d.value,
722
- disabled: d.disabled,
723
- children: Array.isArray(d.children) ? n(d.children) : void 0
724
- }));
767
+ const l = e, a = t, r = p(() => Ve(l.options ?? []));
768
+ function i(o) {
769
+ a("update:modelValue", o ?? null);
725
770
  }
726
- const r = m(() => n(l.options ?? []));
727
- function o(i) {
728
- a("update:modelValue", i ?? null);
729
- }
730
- return (i, d) => {
731
- var u, v, f;
732
- return p(), k(h(je), {
771
+ return (o, s) => {
772
+ var u, d, f;
773
+ return c(), w(h(Ze), {
733
774
  data: r.value,
734
775
  "model-value": e.modelValue ?? void 0,
735
776
  placeholder: ((u = e.node.props) == null ? void 0 : u.placeholder) ?? "请选择",
736
- "allow-search": ((v = e.node.props) == null ? void 0 : v.allowSearch) === !0,
777
+ "allow-search": ((d = e.node.props) == null ? void 0 : d.allowSearch) === !0,
737
778
  disabled: e.disabled || e.readonly,
738
779
  size: e.size,
739
780
  "allow-clear": ((f = e.node.props) == null ? void 0 : f.allowClear) !== !1,
740
- onChange: o
781
+ onChange: i
741
782
  }, null, 8, ["data", "model-value", "placeholder", "allow-search", "disabled", "size", "allow-clear"]);
742
783
  };
743
784
  }
744
- }), hl = /* @__PURE__ */ x({
785
+ }), Fl = /* @__PURE__ */ V({
745
786
  __name: "ColorInput",
746
787
  props: {
747
788
  modelValue: {},
@@ -756,18 +797,18 @@ const dl = {
756
797
  emits: ["update:modelValue"],
757
798
  setup(e, { emit: t }) {
758
799
  const l = t;
759
- return (a, n) => {
760
- var r;
761
- return p(), k(h(We), {
800
+ return (a, r) => {
801
+ var i;
802
+ return c(), w(h(_e), {
762
803
  "model-value": e.modelValue === null || e.modelValue === void 0 ? "" : String(e.modelValue),
763
- "disabled-alpha": ((r = e.node.props) == null ? void 0 : r.disabledAlpha) === !0,
804
+ "disabled-alpha": ((i = e.node.props) == null ? void 0 : i.disabledAlpha) === !0,
764
805
  disabled: e.disabled || e.readonly,
765
806
  size: e.size,
766
- onChange: n[0] || (n[0] = (o) => l("update:modelValue", o ?? ""))
807
+ onChange: r[0] || (r[0] = (o) => l("update:modelValue", o ?? ""))
767
808
  }, null, 8, ["model-value", "disabled-alpha", "disabled", "size"]);
768
809
  };
769
810
  }
770
- }), vl = /* @__PURE__ */ x({
811
+ }), Nl = /* @__PURE__ */ V({
771
812
  __name: "StaticText",
772
813
  props: {
773
814
  modelValue: {},
@@ -780,22 +821,22 @@ const dl = {
780
821
  error: {}
781
822
  },
782
823
  setup(e) {
783
- const t = e, l = m(() => {
824
+ const t = e, l = p(() => {
784
825
  var o;
785
- const r = (o = t.node.props) == null ? void 0 : o.content;
786
- return r == null ? "" : String(r);
787
- }), a = m(() => t.mode === "design"), n = m(() => a.value && !l.value ? "静态文本内容(请在右侧属性面板填写)" : "");
788
- return (r, o) => {
789
- var i;
790
- return p(), I("div", {
791
- class: E(["fm-static-text", [
792
- (i = e.node.props) != null && i.type ? `fm-static-text--${String(e.node.props.type)}` : void 0,
793
- { "fm-static-text--empty": !!n.value }
826
+ const i = (o = t.node.props) == null ? void 0 : o.content;
827
+ return i == null ? "" : String(i);
828
+ }), a = p(() => t.mode === "design"), r = p(() => a.value && !l.value ? "静态文本内容(请在右侧属性面板填写)" : "");
829
+ return (i, o) => {
830
+ var s;
831
+ return c(), z("div", {
832
+ class: X(["fm-static-text", [
833
+ (s = e.node.props) != null && s.type ? `fm-static-text--${String(e.node.props.type)}` : void 0,
834
+ { "fm-static-text--empty": !!r.value }
794
835
  ]])
795
- }, U(l.value || n.value), 3);
836
+ }, B(l.value || r.value), 3);
796
837
  };
797
838
  }
798
- }), gl = /* @__PURE__ */ x({
839
+ }), Pl = /* @__PURE__ */ V({
799
840
  __name: "ArcoFormItem",
800
841
  props: {
801
842
  node: {},
@@ -809,15 +850,15 @@ const dl = {
809
850
  reserveMessage: { type: Boolean, default: !0 }
810
851
  },
811
852
  setup(e) {
812
- const t = e, l = m(() => {
853
+ const t = e, l = p(() => {
813
854
  var d;
814
855
  return ((d = t.node.layout) == null ? void 0 : d.hideLabel) === !0;
815
- }), a = m(() => t.node.label || t.node.name || t.node.type), r = ie(ae, null) !== null;
816
- r || we(
817
- ae,
818
- se({
819
- layout: m(() => t.vertical ? "vertical" : "horizontal"),
820
- labelAlign: m(() => t.labelAlign === "left" ? "left" : "right"),
856
+ }), a = p(() => t.node.label || t.node.name || t.node.type), i = he(fe, null) !== null;
857
+ i || De(
858
+ fe,
859
+ ke({
860
+ layout: p(() => t.vertical ? "vertical" : "horizontal"),
861
+ labelAlign: p(() => t.labelAlign === "left" ? "left" : "right"),
821
862
  autoLabelWidth: !1,
822
863
  maxLabelWidth: 0,
823
864
  setLabelWidth: () => {
@@ -826,16 +867,30 @@ const dl = {
826
867
  }
827
868
  })
828
869
  );
829
- const o = m(() => {
870
+ const o = p(() => {
830
871
  if (t.vertical || l.value) return;
831
872
  const d = t.labelWidth;
832
- return typeof d == "number" ? `${d}px` : typeof d == "string" && d && d !== "auto" ? d : r ? void 0 : "108px";
833
- }), i = m(() => t.vertical ? { div: !0 } : { div: !1, wrap: !1 });
834
- return (d, u) => (p(), k(h(Ee), {
835
- class: E(["fm-arco-form-item", {
873
+ if (typeof d == "number") return `${d}px`;
874
+ if (typeof d == "string") {
875
+ const f = d.trim();
876
+ return !f || f === "auto" ? i ? void 0 : "108px" : /^\d+(\.\d+)?$/.test(f) ? `${f}px` : f;
877
+ }
878
+ return i ? void 0 : "108px";
879
+ }), s = p(() => {
880
+ const d = t.labelWidth;
881
+ if (typeof d == "number") return Number.isFinite(d);
882
+ if (typeof d == "string") {
883
+ const f = d.trim();
884
+ return !!f && f !== "auto";
885
+ }
886
+ return !1;
887
+ }), u = p(() => t.vertical ? { div: !0 } : { div: !1, wrap: !1 });
888
+ return (d, f) => (c(), w(h(el), {
889
+ class: X(["fm-arco-form-item", {
836
890
  "fm-arco-form-item--vertical": e.vertical,
837
891
  "fm-arco-form-item--label-left": e.labelAlign === "left",
838
892
  "fm-arco-form-item--view": e.view,
893
+ "fm-arco-form-item--label-width": s.value,
839
894
  "fm-arco-form-item--no-message-space": !e.reserveMessage
840
895
  }]),
841
896
  label: l.value ? void 0 : a.value,
@@ -846,15 +901,15 @@ const dl = {
846
901
  "validate-status": e.error ? "error" : void 0,
847
902
  disabled: e.disabled,
848
903
  "label-col-flex": o.value,
849
- "row-props": i.value
904
+ "row-props": u.value
850
905
  }, {
851
- default: A(() => [
852
- Y(d.$slots, "default")
906
+ default: I(() => [
907
+ Z(d.$slots, "default")
853
908
  ]),
854
909
  _: 3
855
910
  }, 8, ["class", "label", "hide-label", "required", "tooltip", "help", "validate-status", "disabled", "label-col-flex", "row-props"]));
856
911
  }
857
- }), wl = /* @__PURE__ */ x({
912
+ }), Ul = /* @__PURE__ */ V({
858
913
  __name: "ArcoFormShell",
859
914
  props: {
860
915
  layout: {},
@@ -868,48 +923,48 @@ const dl = {
868
923
  },
869
924
  emits: ["submit"],
870
925
  setup(e, { expose: t, emit: l }) {
871
- const a = e, n = l, r = se({}), o = j(null), i = j(0), d = m(() => a.autoLabelWidth !== !1 && a.layout !== "vertical"), u = m(
872
- () => d.value && i.value > 0 ? { "--fm-label-col-width": `${i.value}px` } : {}
926
+ const a = e, r = l, i = ke({}), o = Y(null), s = Y(0), u = p(() => a.autoLabelWidth !== !1 && a.layout !== "vertical"), d = p(
927
+ () => u.value && s.value > 0 ? { "--fm-label-col-width": `${s.value}px` } : {}
873
928
  );
874
- function v() {
875
- var C;
876
- const g = (C = o.value) == null ? void 0 : C.$el;
877
- if (!d.value || !g || !g.querySelector(".fm-node")) return;
878
- let w = 0;
879
- g.querySelectorAll(".arco-form-item-label").forEach((z) => {
880
- const T = Math.ceil(z.scrollWidth || 0);
881
- T > w && (w = T);
882
- }), w > 0 && w !== i.value && (i.value = w);
929
+ function f() {
930
+ var T;
931
+ const g = (T = o.value) == null ? void 0 : T.$el;
932
+ if (!u.value || !g || !g.querySelector(".fm-node")) return;
933
+ let v = 0;
934
+ g.querySelectorAll(".arco-form-item-label").forEach((C) => {
935
+ const L = Math.ceil(C.scrollWidth || 0);
936
+ L > v && (v = L);
937
+ }), v > 0 && v !== s.value && (s.value = v);
883
938
  }
884
- let f = null, y = null;
885
- function $() {
886
- y && clearTimeout(y), y = setTimeout(() => {
887
- y = null, le(v);
939
+ let y = null, b = null;
940
+ function S() {
941
+ b && clearTimeout(b), b = setTimeout(() => {
942
+ b = null, me(f);
888
943
  }, 30);
889
944
  }
890
- ke(() => {
891
- var w, C;
892
- le(v), typeof document < "u" && ((w = document.fonts) != null && w.ready) && document.fonts.ready.then($);
893
- const g = (C = o.value) == null ? void 0 : C.$el;
894
- !g || typeof MutationObserver > "u" || (f = new MutationObserver((z) => {
895
- z.some((S) => {
896
- var R;
897
- return S.type === "childList" ? !0 : !!((R = S.target.parentElement) != null && R.closest(".arco-form-item-label"));
898
- }) && $();
899
- }), f.observe(g, { childList: !0, subtree: !0, characterData: !0 }));
900
- }), de(() => {
901
- y && clearTimeout(y), f == null || f.disconnect(), f = null;
945
+ ge(() => {
946
+ var v, T;
947
+ me(f), typeof document < "u" && ((v = document.fonts) != null && v.ready) && document.fonts.ready.then(S);
948
+ const g = (T = o.value) == null ? void 0 : T.$el;
949
+ !g || typeof MutationObserver > "u" || (y = new MutationObserver((C) => {
950
+ C.some(($) => {
951
+ var P;
952
+ return $.type === "childList" ? !0 : !!((P = $.target.parentElement) != null && P.closest(".arco-form-item-label"));
953
+ }) && S();
954
+ }), y.observe(g, { childList: !0, subtree: !0, characterData: !0 }));
955
+ }), we(() => {
956
+ b && clearTimeout(b), y == null || y.disconnect(), y = null;
902
957
  });
903
958
  function F() {
904
- var g, w;
905
- return (w = (g = o.value) == null ? void 0 : g.validate) == null ? void 0 : w.call(g);
959
+ var g, v;
960
+ return (v = (g = o.value) == null ? void 0 : g.validate) == null ? void 0 : v.call(g);
906
961
  }
907
- return t({ validate: F }), (g, w) => (p(), k(h(Ye), {
962
+ return t({ validate: F }), (g, v) => (c(), w(h(ll), {
908
963
  ref_key: "formRef",
909
964
  ref: o,
910
- model: a.model ?? r,
911
- class: E(["fm-arco-form", { "fm-arco-form--label-synced": d.value && i.value > 0 }]),
912
- style: Ve(u.value),
965
+ model: a.model ?? i,
966
+ class: X(["fm-arco-form", { "fm-arco-form--label-synced": u.value && s.value > 0 }]),
967
+ style: Ae(d.value),
913
968
  layout: a.layout ?? "horizontal",
914
969
  "label-align": a.labelAlign ?? "right",
915
970
  "auto-label-width": a.autoLabelWidth !== !1,
@@ -917,15 +972,15 @@ const dl = {
917
972
  size: a.size,
918
973
  rules: a.rules,
919
974
  "scroll-to-first-error": a.scrollToFirstError === !0,
920
- onSubmit: w[0] || (w[0] = (C, z) => n("submit", z))
975
+ onSubmit: v[0] || (v[0] = (T, C) => r("submit", C))
921
976
  }, {
922
- default: A(() => [
923
- Y(g.$slots, "default")
977
+ default: I(() => [
978
+ Z(g.$slots, "default")
924
979
  ]),
925
980
  _: 3
926
981
  }, 8, ["model", "class", "style", "layout", "label-align", "auto-label-width", "disabled", "size", "rules", "scroll-to-first-error"]));
927
982
  }
928
- }), kl = /* @__PURE__ */ x({
983
+ }), Ml = /* @__PURE__ */ V({
929
984
  __name: "CardContainer",
930
985
  props: {
931
986
  modelValue: {},
@@ -939,27 +994,27 @@ const dl = {
939
994
  },
940
995
  setup(e) {
941
996
  return (t, l) => {
942
- var a, n;
943
- return p(), k(h(He), {
997
+ var a, r;
998
+ return c(), w(h(tl), {
944
999
  class: "fm-arco-card",
945
1000
  title: e.node.label,
946
1001
  bordered: ((a = e.node.props) == null ? void 0 : a.bordered) !== !1,
947
- "header-style": (n = e.node.props) == null ? void 0 : n.headerStyle
1002
+ "header-style": (r = e.node.props) == null ? void 0 : r.headerStyle
948
1003
  }, {
949
- default: A(() => [
950
- Y(t.$slots, "default")
1004
+ default: I(() => [
1005
+ Z(t.$slots, "default")
951
1006
  ]),
952
1007
  _: 3
953
1008
  }, 8, ["title", "bordered", "header-style"]);
954
1009
  };
955
1010
  }
956
- }), Vl = {
1011
+ }), El = {
957
1012
  key: 0,
958
1013
  class: "fm-arco-section__header"
959
- }, xl = { class: "fm-arco-section__title" }, zl = {
1014
+ }, Rl = { class: "fm-arco-section__title" }, Wl = {
960
1015
  key: 1,
961
1016
  class: "fm-arco-section__desc"
962
- }, Tl = { class: "fm-arco-section__content" }, Cl = /* @__PURE__ */ x({
1017
+ }, Ol = { class: "fm-arco-section__content" }, jl = /* @__PURE__ */ V({
963
1018
  __name: "SectionContainer",
964
1019
  props: {
965
1020
  modelValue: {},
@@ -972,35 +1027,35 @@ const dl = {
972
1027
  error: {}
973
1028
  },
974
1029
  setup(e) {
975
- const t = e, l = m(() => {
1030
+ const t = e, l = p(() => {
976
1031
  var a;
977
1032
  return (((a = t.node.children) == null ? void 0 : a.length) ?? 0) > 0;
978
1033
  });
979
- return (a, n) => {
980
- var r, o;
981
- return p(), I("section", {
982
- class: E(["fm-arco-section", {
983
- "fm-arco-section--plain": ((r = e.node.props) == null ? void 0 : r.plain) === !0,
1034
+ return (a, r) => {
1035
+ var i, o;
1036
+ return c(), z("section", {
1037
+ class: X(["fm-arco-section", {
1038
+ "fm-arco-section--plain": ((i = e.node.props) == null ? void 0 : i.plain) === !0,
984
1039
  "fm-arco-section--empty": !l.value
985
1040
  }])
986
1041
  }, [
987
- e.node.label || e.node.help ? (p(), I("header", Vl, [
988
- ((o = e.node.props) == null ? void 0 : o.icon) !== !1 ? (p(), k(h(Ge), {
1042
+ e.node.label || e.node.help ? (c(), z("header", El, [
1043
+ ((o = e.node.props) == null ? void 0 : o.icon) !== !1 ? (c(), w(h(rl), {
989
1044
  key: 0,
990
1045
  class: "fm-arco-section__icon",
991
1046
  size: 18,
992
1047
  "aria-hidden": "true"
993
- })) : q("", !0),
994
- te("span", xl, U(e.node.label), 1),
995
- e.node.help ? (p(), I("span", zl, U(e.node.help), 1)) : q("", !0)
996
- ])) : q("", !0),
997
- te("div", Tl, [
998
- Y(a.$slots, "default")
1048
+ })) : W("", !0),
1049
+ pe("span", Rl, B(e.node.label), 1),
1050
+ e.node.help ? (c(), z("span", Wl, B(e.node.help), 1)) : W("", !0)
1051
+ ])) : W("", !0),
1052
+ pe("div", Ol, [
1053
+ Z(a.$slots, "default")
999
1054
  ])
1000
1055
  ], 2);
1001
1056
  };
1002
1057
  }
1003
- }), Sl = /* @__PURE__ */ x({
1058
+ }), Yl = /* @__PURE__ */ V({
1004
1059
  __name: "DividerContainer",
1005
1060
  props: {
1006
1061
  modelValue: {},
@@ -1014,76 +1069,76 @@ const dl = {
1014
1069
  },
1015
1070
  setup(e) {
1016
1071
  return (t, l) => {
1017
- var a, n;
1018
- return p(), k(h(qe), {
1072
+ var a, r;
1073
+ return c(), w(h(al), {
1019
1074
  orientation: ((a = e.node.props) == null ? void 0 : a.orientation) ?? "center",
1020
- type: ((n = e.node.props) == null ? void 0 : n.dividerType) === "dashed" ? "dashed" : "solid"
1075
+ type: ((r = e.node.props) == null ? void 0 : r.dividerType) === "dashed" ? "dashed" : "solid"
1021
1076
  }, {
1022
- default: A(() => [
1023
- W(U(e.node.label), 1)
1077
+ default: I(() => [
1078
+ H(B(e.node.label), 1)
1024
1079
  ]),
1025
1080
  _: 1
1026
1081
  }, 8, ["orientation", "type"]);
1027
1082
  };
1028
1083
  }
1029
- }), G = [
1084
+ }), ee = [
1030
1085
  { key: "placeholder", label: "占位提示", control: "text" },
1031
1086
  { key: "allowClear", label: "允许清空", control: "switch" },
1032
1087
  { key: "maxLength", label: "最大长度", control: "number", min: 1 }
1033
- ], Q = [
1088
+ ], te = [
1034
1089
  { key: "placeholder", label: "占位提示", control: "text" },
1035
1090
  { key: "allowSearch", label: "允许搜索", control: "switch" },
1036
1091
  { key: "allowClear", label: "允许清空", control: "switch" },
1037
1092
  { key: "maxTagCount", label: "最多展示标签", control: "number", min: 1 }
1038
- ], Ll = Q.filter((e) => e.key !== "maxTagCount"), Bl = [
1039
- V({
1093
+ ], Hl = te.filter((e) => e.key !== "maxTagCount"), Kl = [
1094
+ k({
1040
1095
  type: "input",
1041
1096
  label: "单行文本",
1042
1097
  category: "基础字段",
1043
1098
  kind: "field",
1044
1099
  valueType: "string",
1045
1100
  aliases: ["text", "text-input", "string"],
1046
- widget: K,
1101
+ widget: _,
1047
1102
  defaultLayout: { span: 12 },
1048
1103
  defaultProps: { placeholder: "请输入" },
1049
- inspector: G
1104
+ inspector: ee
1050
1105
  }),
1051
- V({
1106
+ k({
1052
1107
  type: "textarea",
1053
1108
  label: "多行文本",
1054
1109
  category: "基础字段",
1055
1110
  kind: "field",
1056
1111
  valueType: "string",
1057
1112
  aliases: ["text-area"],
1058
- widget: K,
1113
+ widget: _,
1059
1114
  defaultLayout: { span: 24 },
1060
1115
  defaultProps: { placeholder: "请输入", rows: 4 },
1061
1116
  inspector: [
1062
- ...G,
1117
+ ...ee,
1063
1118
  { key: "rows", label: "行数", control: "number", min: 2, max: 20 },
1064
1119
  { key: "autoSize", label: "自适应高度", control: "switch" },
1065
1120
  { key: "showWordLimit", label: "显示字数", control: "switch" }
1066
1121
  ]
1067
1122
  }),
1068
- V({
1123
+ k({
1069
1124
  type: "password",
1070
1125
  label: "密码输入",
1071
1126
  category: "基础字段",
1072
1127
  kind: "field",
1073
1128
  valueType: "string",
1074
- widget: K,
1129
+ widget: _,
1075
1130
  defaultLayout: { span: 12 },
1076
1131
  defaultProps: { placeholder: "请输入密码" },
1077
- inspector: G
1132
+ inspector: ee
1078
1133
  }),
1079
- V({
1134
+ k({
1080
1135
  type: "number",
1081
1136
  label: "数字输入",
1082
1137
  category: "基础字段",
1083
1138
  kind: "field",
1084
1139
  valueType: "number",
1085
1140
  aliases: ["input-number", "inputnumber"],
1086
- widget: Je,
1141
+ widget: il,
1087
1142
  defaultLayout: { span: 12 },
1088
1143
  defaultProps: { placeholder: "请输入数字" },
1089
1144
  inspector: [
@@ -1094,7 +1149,7 @@ const dl = {
1094
1149
  { key: "precision", label: "精度", control: "number", min: 0, max: 10 }
1095
1150
  ]
1096
1151
  }),
1097
- V({
1152
+ k({
1098
1153
  type: "select",
1099
1154
  label: "下拉选择",
1100
1155
  category: "选择字段",
@@ -1102,12 +1157,12 @@ const dl = {
1102
1157
  valueType: "string",
1103
1158
  aliases: ["dropdown"],
1104
1159
  supportsOptions: !0,
1105
- widget: oe,
1160
+ widget: ye,
1106
1161
  defaultLayout: { span: 12 },
1107
1162
  defaultProps: { placeholder: "请选择", allowClear: !0 },
1108
- inspector: Q
1163
+ inspector: te
1109
1164
  }),
1110
- V({
1165
+ k({
1111
1166
  type: "multi-select",
1112
1167
  label: "多选下拉",
1113
1168
  category: "选择字段",
@@ -1115,19 +1170,19 @@ const dl = {
1115
1170
  valueType: "string[]",
1116
1171
  aliases: ["multiselect", "multiple-select", "multi"],
1117
1172
  supportsOptions: !0,
1118
- widget: oe,
1173
+ widget: ye,
1119
1174
  defaultLayout: { span: 12 },
1120
1175
  defaultProps: { placeholder: "请选择", allowClear: !0 },
1121
- inspector: Q
1176
+ inspector: te
1122
1177
  }),
1123
- V({
1178
+ k({
1124
1179
  type: "radio",
1125
1180
  label: "单选框",
1126
1181
  category: "选择字段",
1127
1182
  kind: "field",
1128
1183
  valueType: "string",
1129
1184
  supportsOptions: !0,
1130
- widget: Qe,
1185
+ widget: dl,
1131
1186
  defaultLayout: { span: 12 },
1132
1187
  inspector: [
1133
1188
  {
@@ -1141,14 +1196,14 @@ const dl = {
1141
1196
  }
1142
1197
  ]
1143
1198
  }),
1144
- V({
1199
+ k({
1145
1200
  type: "checkbox",
1146
1201
  label: "复选框",
1147
1202
  category: "选择字段",
1148
1203
  kind: "field",
1149
1204
  valueType: "string[]",
1150
1205
  supportsOptions: !0,
1151
- widget: Xe,
1206
+ widget: sl,
1152
1207
  defaultLayout: { span: 12 },
1153
1208
  inspector: [
1154
1209
  {
@@ -1162,26 +1217,26 @@ const dl = {
1162
1217
  }
1163
1218
  ]
1164
1219
  }),
1165
- V({
1220
+ k({
1166
1221
  type: "switch",
1167
1222
  label: "开关",
1168
1223
  category: "选择字段",
1169
1224
  kind: "field",
1170
1225
  valueType: "boolean",
1171
- widget: Ze,
1226
+ widget: ul,
1172
1227
  defaultLayout: { span: 8 },
1173
1228
  inspector: [
1174
1229
  { key: "checkedText", label: "开启文案", control: "text" },
1175
1230
  { key: "uncheckedText", label: "关闭文案", control: "text" }
1176
1231
  ]
1177
1232
  }),
1178
- V({
1233
+ k({
1179
1234
  type: "slider",
1180
1235
  label: "滑动条",
1181
1236
  category: "选择字段",
1182
1237
  kind: "field",
1183
1238
  valueType: "number",
1184
- widget: _e,
1239
+ widget: cl,
1185
1240
  defaultLayout: { span: 12 },
1186
1241
  inspector: [
1187
1242
  { key: "min", label: "最小值", control: "number" },
@@ -1190,27 +1245,27 @@ const dl = {
1190
1245
  { key: "showInput", label: "显示输入框", control: "switch" }
1191
1246
  ]
1192
1247
  }),
1193
- V({
1248
+ k({
1194
1249
  type: "rate",
1195
1250
  label: "评分",
1196
1251
  category: "选择字段",
1197
1252
  kind: "field",
1198
1253
  valueType: "number",
1199
- widget: el,
1254
+ widget: ml,
1200
1255
  defaultLayout: { span: 8 },
1201
1256
  inspector: [
1202
1257
  { key: "count", label: "星星数量", control: "number", min: 1, max: 10 },
1203
1258
  { key: "allowHalf", label: "允许半星", control: "switch" }
1204
1259
  ]
1205
1260
  }),
1206
- V({
1261
+ k({
1207
1262
  type: "date",
1208
1263
  label: "日期",
1209
1264
  category: "日期时间",
1210
1265
  kind: "field",
1211
1266
  valueType: "timestamp",
1212
1267
  aliases: ["datepicker", "date-picker"],
1213
- widget: ne,
1268
+ widget: be,
1214
1269
  defaultLayout: { span: 12 },
1215
1270
  defaultProps: { placeholder: "请选择日期" },
1216
1271
  inspector: [
@@ -1219,14 +1274,14 @@ const dl = {
1219
1274
  { key: "allowClear", label: "允许清空", control: "switch" }
1220
1275
  ]
1221
1276
  }),
1222
- V({
1277
+ k({
1223
1278
  type: "date-range",
1224
1279
  label: "日期范围",
1225
1280
  category: "日期时间",
1226
1281
  kind: "field",
1227
1282
  valueType: "timestamp[]",
1228
1283
  aliases: ["daterange", "date-picker-range", "rangepicker"],
1229
- widget: ne,
1284
+ widget: be,
1230
1285
  defaultLayout: { span: 12 },
1231
1286
  defaultProps: { placeholder: ["开始日期", "结束日期"] },
1232
1287
  inspector: [
@@ -1235,14 +1290,14 @@ const dl = {
1235
1290
  { key: "allowClear", label: "允许清空", control: "switch" }
1236
1291
  ]
1237
1292
  }),
1238
- V({
1293
+ k({
1239
1294
  type: "time",
1240
1295
  label: "时间",
1241
1296
  category: "日期时间",
1242
1297
  kind: "field",
1243
1298
  valueType: "string",
1244
1299
  aliases: ["timepicker", "time-picker"],
1245
- widget: al,
1300
+ widget: yl,
1246
1301
  defaultLayout: { span: 12 },
1247
1302
  defaultProps: { placeholder: "请选择时间" },
1248
1303
  inspector: [
@@ -1250,19 +1305,20 @@ const dl = {
1250
1305
  { key: "allowClear", label: "允许清空", control: "switch" }
1251
1306
  ]
1252
1307
  }),
1253
- V({
1308
+ k({
1254
1309
  type: "upload",
1255
1310
  label: "文件上传",
1256
1311
  category: "高级字段",
1257
1312
  kind: "field",
1258
1313
  valueType: "file[]",
1259
1314
  aliases: ["file", "file-upload"],
1260
- widget: re,
1261
- viewWidget: re,
1315
+ widget: ve,
1316
+ viewWidget: ve,
1262
1317
  defaultLayout: { span: 24 },
1263
- defaultProps: { autoUpload: !1 },
1318
+ defaultProps: { autoUpload: !1, showFileList: !0 },
1264
1319
  inspector: [
1265
1320
  { key: "accept", label: "文件类型", control: "text", placeholder: ".pdf,.png" },
1321
+ { key: "maxSize", label: "大小上限 (MB)", control: "number", min: 0, placeholder: "例如 10" },
1266
1322
  { key: "action", label: "上传地址", control: "text", placeholder: "https://api.example.com/upload" },
1267
1323
  { key: "autoUpload", label: "自动上传", control: "switch" },
1268
1324
  { key: "limit", label: "数量限制", control: "number", min: 1 },
@@ -1270,14 +1326,14 @@ const dl = {
1270
1326
  { key: "showFileList", label: "显示文件列表", control: "switch" }
1271
1327
  ]
1272
1328
  }),
1273
- V({
1329
+ k({
1274
1330
  type: "cascader",
1275
1331
  label: "级联选择",
1276
1332
  category: "高级字段",
1277
1333
  kind: "field",
1278
1334
  valueType: "string[]",
1279
1335
  supportsOptions: !0,
1280
- widget: yl,
1336
+ widget: $l,
1281
1337
  defaultLayout: { span: 12 },
1282
1338
  defaultProps: { placeholder: "请选择", allowClear: !0 },
1283
1339
  inspector: [
@@ -1287,7 +1343,7 @@ const dl = {
1287
1343
  { key: "changeOnSelect", label: "选择即变化", control: "switch" }
1288
1344
  ]
1289
1345
  }),
1290
- V({
1346
+ k({
1291
1347
  type: "tree-select",
1292
1348
  label: "树选择",
1293
1349
  category: "高级字段",
@@ -1295,29 +1351,29 @@ const dl = {
1295
1351
  valueType: "string",
1296
1352
  aliases: ["treeselect"],
1297
1353
  supportsOptions: !0,
1298
- widget: bl,
1354
+ widget: Al,
1299
1355
  defaultLayout: { span: 12 },
1300
1356
  defaultProps: { placeholder: "请选择", allowClear: !0 },
1301
- inspector: Ll
1357
+ inspector: Hl
1302
1358
  }),
1303
- V({
1359
+ k({
1304
1360
  type: "color",
1305
1361
  label: "颜色选择",
1306
1362
  category: "高级字段",
1307
1363
  kind: "field",
1308
1364
  valueType: "string",
1309
- widget: hl,
1365
+ widget: Fl,
1310
1366
  defaultLayout: { span: 8 },
1311
1367
  inspector: [{ key: "disabledAlpha", label: "禁用透明度", control: "switch" }]
1312
1368
  }),
1313
- V({
1369
+ k({
1314
1370
  type: "static-text",
1315
1371
  label: "静态文本",
1316
1372
  category: "展示组件",
1317
1373
  kind: "display",
1318
1374
  valueType: "void",
1319
1375
  aliases: ["static", "statictext"],
1320
- widget: vl,
1376
+ widget: Nl,
1321
1377
  defaultLayout: { span: 24, hideLabel: !0 },
1322
1378
  defaultProps: { content: "静态文本内容", type: "default" },
1323
1379
  inspector: [
@@ -1336,25 +1392,25 @@ const dl = {
1336
1392
  }
1337
1393
  ]
1338
1394
  }),
1339
- V({
1395
+ k({
1340
1396
  type: "card",
1341
1397
  label: "卡片容器",
1342
1398
  category: "布局容器",
1343
1399
  kind: "container",
1344
1400
  isContainer: !0,
1345
1401
  valueType: "void",
1346
- widget: kl,
1402
+ widget: Ml,
1347
1403
  defaultLayout: { span: 24 },
1348
1404
  inspector: [{ key: "bordered", label: "显示边框", control: "switch" }]
1349
1405
  }),
1350
- V({
1406
+ k({
1351
1407
  type: "section",
1352
1408
  label: "分组区块",
1353
1409
  category: "布局容器",
1354
1410
  kind: "container",
1355
1411
  isContainer: !0,
1356
1412
  valueType: "void",
1357
- widget: Cl,
1413
+ widget: jl,
1358
1414
  defaultLayout: { span: 24 },
1359
1415
  defaultProps: { icon: !0, plain: !1 },
1360
1416
  inspector: [
@@ -1362,14 +1418,14 @@ const dl = {
1362
1418
  { key: "plain", label: "无背景", control: "switch" }
1363
1419
  ]
1364
1420
  }),
1365
- V({
1421
+ k({
1366
1422
  type: "divider",
1367
1423
  label: "分割线",
1368
1424
  category: "布局容器",
1369
1425
  kind: "display",
1370
1426
  valueType: "void",
1371
1427
  aliases: ["line"],
1372
- widget: Sl,
1428
+ widget: Yl,
1373
1429
  defaultLayout: { span: 24, hideLabel: !0 },
1374
1430
  defaultProps: { orientation: "center", dividerType: "solid" },
1375
1431
  inspector: [
@@ -1394,45 +1450,45 @@ const dl = {
1394
1450
  }
1395
1451
  ]
1396
1452
  })
1397
- ], Il = Bl.map(
1398
- (e) => e.kind === "container" ? e : { ...e, fieldWrapper: gl }
1453
+ ], ql = Kl.map(
1454
+ (e) => e.kind === "container" ? e : { ...e, fieldWrapper: Pl }
1399
1455
  );
1400
- function $l(e = {}) {
1401
- return ge({
1456
+ function Gl(e = {}) {
1457
+ return $e({
1402
1458
  name: e.name ?? "@fishbelly/form-morph-arco",
1403
- version: "0.1.0",
1459
+ version: "0.1.2",
1404
1460
  apiVersion: 1,
1405
1461
  contributes: {
1406
- fieldTypes: Il,
1407
- formShell: wl
1462
+ fieldTypes: ql,
1463
+ formShell: Ul
1408
1464
  }
1409
1465
  });
1410
1466
  }
1411
- const Ml = $l();
1467
+ const et = Gl();
1412
1468
  export {
1413
- gl as ArcoFormItem,
1414
- wl as ArcoFormShell,
1415
- kl as CardContainer,
1416
- yl as CascaderInput,
1417
- Xe as CheckboxInput,
1418
- hl as ColorInput,
1419
- ne as DateInput,
1420
- Sl as DividerContainer,
1421
- Je as NumberInput,
1422
- Qe as RadioInput,
1423
- el as RateInput,
1424
- Cl as SectionContainer,
1425
- oe as SelectInput,
1426
- _e as SliderInput,
1427
- vl as StaticText,
1428
- Ze as SwitchInput,
1429
- K as TextInput,
1430
- al as TimeInput,
1431
- bl as TreeSelectInput,
1432
- re as UploadInput,
1433
- Il as arcoFieldTypes,
1434
- Ml as arcoPack,
1435
- $l as createArcoPack,
1436
- Ml as default
1469
+ Pl as ArcoFormItem,
1470
+ Ul as ArcoFormShell,
1471
+ Ml as CardContainer,
1472
+ $l as CascaderInput,
1473
+ sl as CheckboxInput,
1474
+ Fl as ColorInput,
1475
+ be as DateInput,
1476
+ Yl as DividerContainer,
1477
+ il as NumberInput,
1478
+ dl as RadioInput,
1479
+ ml as RateInput,
1480
+ jl as SectionContainer,
1481
+ ye as SelectInput,
1482
+ cl as SliderInput,
1483
+ Nl as StaticText,
1484
+ ul as SwitchInput,
1485
+ _ as TextInput,
1486
+ yl as TimeInput,
1487
+ Al as TreeSelectInput,
1488
+ ve as UploadInput,
1489
+ ql as arcoFieldTypes,
1490
+ et as arcoPack,
1491
+ Gl as createArcoPack,
1492
+ et as default
1437
1493
  };
1438
1494
  //# sourceMappingURL=index.js.map