orion-design 0.1.14 → 0.1.15

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. package/README.md +5 -5
  2. package/dist/components/Form/index.js +267 -273
  3. package/dist/components/Form/index.js.map +1 -1
  4. package/dist/components/LovTable/index.d.ts +3 -3
  5. package/dist/components/LovTable/index.js +24 -16
  6. package/dist/components/LovTable/index.js.map +1 -1
  7. package/dist/components/_util/arrays.js.map +1 -1
  8. package/dist/components/_util/browser.js.map +1 -1
  9. package/dist/components/_util/dom/aria.js.map +1 -1
  10. package/dist/components/_util/dom/element.js.map +1 -1
  11. package/dist/components/_util/dom/event.js.map +1 -1
  12. package/dist/components/_util/dom/position.js.map +1 -1
  13. package/dist/components/_util/dom/scroll.js.map +1 -1
  14. package/dist/components/_util/dom/style.js.map +1 -1
  15. package/dist/components/_util/easings.js.map +1 -1
  16. package/dist/components/_util/error.js.map +1 -1
  17. package/dist/components/_util/i18n.js.map +1 -1
  18. package/dist/components/_util/objects.js.map +1 -1
  19. package/dist/components/_util/raf.js.map +1 -1
  20. package/dist/components/_util/rand.js.map +1 -1
  21. package/dist/components/_util/strings.js.map +1 -1
  22. package/dist/components/_util/throttleByRaf.js.map +1 -1
  23. package/dist/components/_util/types.js.map +1 -1
  24. package/dist/components/_util/typescript.js.map +1 -1
  25. package/dist/components/_util/vue/global-node.js.map +1 -1
  26. package/dist/components/_util/vue/icon.js.map +1 -1
  27. package/dist/components/_util/vue/install.js.map +1 -1
  28. package/dist/components/_util/vue/props/runtime.js.map +1 -1
  29. package/dist/components/_util/vue/refs.js.map +1 -1
  30. package/dist/components/_util/vue/size.js.map +1 -1
  31. package/dist/components/_util/vue/validator.js.map +1 -1
  32. package/dist/components/_util/vue/vnode.js.map +1 -1
  33. package/dist/components/components.d.ts +0 -2
  34. package/dist/components/components.js +10 -18
  35. package/dist/components/components.js.map +1 -1
  36. package/dist/components/index.d.ts +2 -0
  37. package/dist/components/index.js +18 -18
  38. package/dist/components/index.js.map +1 -1
  39. package/dist/components-DXZmD0GT.js +70 -0
  40. package/dist/{components-1bMIJYPN.js.map → components-DXZmD0GT.js.map} +1 -1
  41. package/dist/index.js +1 -1
  42. package/dist/version/version.d.ts +1 -1
  43. package/dist/version/version.js +1 -1
  44. package/dist/version/version.js.map +1 -1
  45. package/package.json +1 -1
  46. package/dist/components-1bMIJYPN.js +0 -78
@@ -1,10 +1,10 @@
1
- import { difference as Q, isEmpty as X, isString as D, isDate as Z } from "lodash-es";
2
- import { defineComponent as c, useTemplateRef as E, provide as U, reactive as T, toRef as z, openBlock as p, createBlock as b, unref as e, withCtx as d, createVNode as f, renderSlot as O, isRef as S, computed as q, createElementBlock as W, Fragment as C, renderList as R, createTextVNode as x, toDisplayString as _, watch as ee, ref as le, onMounted as ae, normalizeStyle as oe } from "vue";
1
+ import { difference as Q, isEmpty as X, isDate as Z, isString as D } from "lodash-es";
2
+ import { defineComponent as c, useTemplateRef as E, provide as U, reactive as Y, toRef as z, openBlock as p, createBlock as b, unref as e, withCtx as n, createVNode as f, renderSlot as O, isRef as w, computed as q, createElementBlock as W, Fragment as C, renderList as R, createTextVNode as x, toDisplayString as _, watch as ee, ref as le, onMounted as ae, normalizeStyle as oe } from "vue";
3
3
  import { withInstall as re } from "../_util/vue/install.js";
4
- import { ElForm as te, ElRow as ne, ElCol as y, ElFormItem as V, ElInput as M, ElSelect as Y, ElOption as G, ElRadioGroup as de, ElRadio as ue, ElCheckboxGroup as ie, ElCheckbox as j, ElSwitch as se, dayjs as I, ElTimePicker as me, ElDatePicker as pe, ElDropdown as be } from "element-plus";
4
+ import { ElForm as te, ElRow as ne, ElCol as y, ElFormItem as V, ElInput as M, ElSelect as G, ElOption as T, ElRadioGroup as de, ElRadio as ue, ElCheckboxGroup as ie, ElCheckbox as j, ElSwitch as se, dayjs as I, ElTimePicker as me, ElDatePicker as pe, ElDropdown as be } from "element-plus";
5
5
  import { formContextKey as fe } from "./Form.js";
6
6
  import k from "../../error/OrionError.js";
7
- import { useFormItemSpan as v, useFormItemRules as w, useFormItemStringModel as B, useFormItemDisabled as L, useFormItemCode as $, useFormItemMultiModel as P, useFormContext as A, useFormItemBooleanModel as N } from "./hooks/index.js";
7
+ import { useFormItemSpan as v, useFormItemRules as g, useFormItemStringModel as B, useFormItemDisabled as L, useFormItemCode as $, useFormItemMultiModel as P, useFormContext as A, useFormItemBooleanModel as N } from "./hooks/index.js";
8
8
  import { getSingleCodeContent as he, getMultiCodeContent as ce } from "./utils/index.js";
9
9
  import { S as ye } from "../../index-BbsXWo7C.js";
10
10
  import { lovContextKey as ve } from "./LovInput/LovInput.js";
@@ -22,39 +22,39 @@ const Ve = /* @__PURE__ */ c({
22
22
  },
23
23
  emits: ["update:modelValue"],
24
24
  setup(r, { expose: m, emit: i }) {
25
- const a = i, l = (t, o) => {
26
- if (!Object.keys(r.modelValue).includes(t))
27
- throw new k(`modelValue中不存在[${t}]`);
28
- a("update:modelValue", { ...r.modelValue, [t]: o });
29
- }, n = (t) => {
30
- const o = Object.keys(r.modelValue), h = Object.keys(t), g = Q(h, o);
31
- if (!X(g))
32
- throw new k(`modelValue中不存在[${g.join(",")}]`);
33
- a("update:modelValue", { ...r.modelValue, ...t });
34
- }, u = E("form");
25
+ const o = i, a = (l, s) => {
26
+ if (!Object.keys(r.modelValue).includes(l))
27
+ throw new k(`modelValue中不存在[${l}]`);
28
+ o("update:modelValue", { ...r.modelValue, [l]: s });
29
+ }, t = (l) => {
30
+ const s = Object.keys(r.modelValue), h = Object.keys(l), S = Q(h, s);
31
+ if (!X(S))
32
+ throw new k(`modelValue中不存在[${S.join(",")}]`);
33
+ o("update:modelValue", { ...r.modelValue, ...l });
34
+ }, d = E("form");
35
35
  return m({
36
- validate: async () => await u.value.validate()
36
+ validate: async () => await d.value.validate()
37
37
  }), U(
38
38
  fe,
39
- T({
39
+ Y({
40
40
  modelValue: z(() => r.modelValue),
41
- updateModelValue: l,
42
- updateModelValueMulti: n,
41
+ updateModelValue: a,
42
+ updateModelValueMulti: t,
43
43
  rules: z(() => r.rules),
44
44
  itemSpan: z(() => r.itemSpan),
45
45
  disabled: z(() => r.disabled)
46
46
  })
47
- ), (t, o) => (p(), b(e(te), {
47
+ ), (l, s) => (p(), b(e(te), {
48
48
  ref: "form",
49
- model: t.modelValue,
50
- rules: t.rules,
51
- "label-width": t.itemLabelWidth,
52
- disabled: t.disabled
49
+ model: l.modelValue,
50
+ rules: l.rules,
51
+ "label-width": l.itemLabelWidth,
52
+ disabled: l.disabled
53
53
  }, {
54
- default: d(() => [
54
+ default: n(() => [
55
55
  f(e(ne), { gutter: 16 }, {
56
- default: d(() => [
57
- O(t.$slots, "default")
56
+ default: n(() => [
57
+ O(l.$slots, "default")
58
58
  ]),
59
59
  _: 3
60
60
  })
@@ -79,24 +79,24 @@ const Ve = /* @__PURE__ */ c({
79
79
  readonly: { type: Boolean }
80
80
  },
81
81
  setup(r) {
82
- const m = v(), i = w(), a = B();
83
- return (l, n) => (p(), b(e(y), { span: e(m) }, {
84
- default: d(() => [
82
+ const m = v(), i = g(), o = B();
83
+ return (a, t) => (p(), b(e(y), { span: e(m) }, {
84
+ default: n(() => [
85
85
  f(e(V), {
86
- prop: l.name,
87
- label: l.label,
88
- "label-width": l.labelWidth,
89
- required: l.required,
86
+ prop: a.name,
87
+ label: a.label,
88
+ "label-width": a.labelWidth,
89
+ required: a.required,
90
90
  rules: e(i)
91
91
  }, {
92
- default: d(() => [
92
+ default: n(() => [
93
93
  f(e(M), {
94
- modelValue: e(a),
95
- "onUpdate:modelValue": n[0] || (n[0] = (u) => S(a) ? a.value = u : null),
96
- maxlength: l.maxlength,
97
- placeholder: l.placeholder,
98
- disabled: l.disabled,
99
- readonly: l.readonly
94
+ modelValue: e(o),
95
+ "onUpdate:modelValue": t[0] || (t[0] = (d) => w(o) ? o.value = d : null),
96
+ maxlength: a.maxlength,
97
+ placeholder: a.placeholder,
98
+ disabled: a.disabled,
99
+ readonly: a.readonly
100
100
  }, null, 8, ["modelValue", "maxlength", "placeholder", "disabled", "readonly"])
101
101
  ]),
102
102
  _: 1
@@ -122,24 +122,24 @@ const Ve = /* @__PURE__ */ c({
122
122
  readonly: { type: Boolean }
123
123
  },
124
124
  setup(r) {
125
- const m = v(), i = w(), a = B();
126
- return (l, n) => (p(), b(e(y), { span: e(m) }, {
127
- default: d(() => [
125
+ const m = v(), i = g(), o = B();
126
+ return (a, t) => (p(), b(e(y), { span: e(m) }, {
127
+ default: n(() => [
128
128
  f(e(V), {
129
- prop: l.name,
130
- label: l.label,
131
- "label-width": l.labelWidth,
132
- required: l.required,
129
+ prop: a.name,
130
+ label: a.label,
131
+ "label-width": a.labelWidth,
132
+ required: a.required,
133
133
  rules: e(i)
134
134
  }, {
135
- default: d(() => [
135
+ default: n(() => [
136
136
  f(e(M), {
137
- modelValue: e(a),
138
- "onUpdate:modelValue": n[0] || (n[0] = (u) => S(a) ? a.value = u : null),
139
- maxlength: l.maxlength,
140
- placeholder: l.placeholder,
141
- disabled: l.disabled,
142
- readonly: l.readonly,
137
+ modelValue: e(o),
138
+ "onUpdate:modelValue": t[0] || (t[0] = (d) => w(o) ? o.value = d : null),
139
+ maxlength: a.maxlength,
140
+ placeholder: a.placeholder,
141
+ disabled: a.disabled,
142
+ readonly: a.readonly,
143
143
  type: "password"
144
144
  }, null, 8, ["modelValue", "maxlength", "placeholder", "disabled", "readonly"])
145
145
  ]),
@@ -167,26 +167,26 @@ const Ve = /* @__PURE__ */ c({
167
167
  rows: {}
168
168
  },
169
169
  setup(r) {
170
- const m = v(), i = w(), a = B();
171
- return (l, n) => (p(), b(e(y), { span: e(m) }, {
172
- default: d(() => [
170
+ const m = v(), i = g(), o = B();
171
+ return (a, t) => (p(), b(e(y), { span: e(m) }, {
172
+ default: n(() => [
173
173
  f(e(V), {
174
- prop: l.name,
175
- label: l.label,
176
- "label-width": l.labelWidth,
177
- required: l.required,
174
+ prop: a.name,
175
+ label: a.label,
176
+ "label-width": a.labelWidth,
177
+ required: a.required,
178
178
  rules: e(i)
179
179
  }, {
180
- default: d(() => [
180
+ default: n(() => [
181
181
  f(e(M), {
182
- modelValue: e(a),
183
- "onUpdate:modelValue": n[0] || (n[0] = (u) => S(a) ? a.value = u : null),
184
- maxlength: l.maxlength,
185
- placeholder: l.placeholder,
186
- disabled: l.disabled,
187
- readonly: l.readonly,
182
+ modelValue: e(o),
183
+ "onUpdate:modelValue": t[0] || (t[0] = (d) => w(o) ? o.value = d : null),
184
+ maxlength: a.maxlength,
185
+ placeholder: a.placeholder,
186
+ disabled: a.disabled,
187
+ readonly: a.readonly,
188
188
  type: "textarea",
189
- rows: l.rows,
189
+ rows: a.rows,
190
190
  resize: "none"
191
191
  }, null, 8, ["modelValue", "maxlength", "placeholder", "disabled", "readonly", "rows"])
192
192
  ]),
@@ -214,36 +214,36 @@ const Ve = /* @__PURE__ */ c({
214
214
  filterable: { type: Boolean }
215
215
  },
216
216
  setup(r) {
217
- const m = v(), i = w(), a = L(), l = $(), n = B(), u = q(() => he(l.value, n.value));
218
- return (s, t) => (p(), b(e(y), { span: e(m) }, {
219
- default: d(() => [
217
+ const m = v(), i = g(), o = L(), a = $(), t = B(), d = q(() => he(a.value, t.value));
218
+ return (u, l) => (p(), b(e(y), { span: e(m) }, {
219
+ default: n(() => [
220
220
  f(e(V), {
221
- prop: s.name,
222
- label: s.label,
223
- "label-width": s.labelWidth,
224
- required: s.required,
221
+ prop: u.name,
222
+ label: u.label,
223
+ "label-width": u.labelWidth,
224
+ required: u.required,
225
225
  rules: e(i)
226
226
  }, {
227
- default: d(() => [
228
- e(a) ? (p(), b(e(M), {
227
+ default: n(() => [
228
+ e(o) ? (p(), b(e(M), {
229
229
  key: 0,
230
- "model-value": u.value,
231
- placeholder: s.placeholder,
230
+ "model-value": d.value,
231
+ placeholder: u.placeholder,
232
232
  disabled: !0,
233
233
  readonly: !0
234
- }, null, 8, ["model-value", "placeholder"])) : (p(), b(e(Y), {
234
+ }, null, 8, ["model-value", "placeholder"])) : (p(), b(e(G), {
235
235
  key: 1,
236
- modelValue: e(n),
237
- "onUpdate:modelValue": t[0] || (t[0] = (o) => S(n) ? n.value = o : null),
238
- placeholder: s.placeholder,
239
- clearable: s.clearable,
240
- filterable: s.filterable
236
+ modelValue: e(t),
237
+ "onUpdate:modelValue": l[0] || (l[0] = (s) => w(t) ? t.value = s : null),
238
+ placeholder: u.placeholder,
239
+ clearable: u.clearable,
240
+ filterable: u.filterable
241
241
  }, {
242
- default: d(() => [
243
- (p(!0), W(C, null, R(e(l), (o) => (p(), b(e(G), {
244
- key: o.value,
245
- label: o.content,
246
- value: o.value
242
+ default: n(() => [
243
+ (p(!0), W(C, null, R(e(a), (s) => (p(), b(e(T), {
244
+ key: s.value,
245
+ label: s.content,
246
+ value: s.value
247
247
  }, null, 8, ["label", "value"]))), 128))
248
248
  ]),
249
249
  _: 1
@@ -271,32 +271,32 @@ const Ve = /* @__PURE__ */ c({
271
271
  code: {}
272
272
  },
273
273
  setup(r) {
274
- const m = v(), i = w(), a = L(), l = $(), n = P(), u = A(), s = q(() => ce(l.value, u.modelValue[r.name]));
275
- return (t, o) => (p(), b(e(y), { span: e(m) }, {
276
- default: d(() => [
274
+ const m = v(), i = g(), o = L(), a = $(), t = P(), d = A(), u = q(() => ce(a.value, d.modelValue[r.name]));
275
+ return (l, s) => (p(), b(e(y), { span: e(m) }, {
276
+ default: n(() => [
277
277
  f(e(V), {
278
- prop: t.name,
279
- label: t.label,
280
- "label-width": t.labelWidth,
281
- required: t.required,
278
+ prop: l.name,
279
+ label: l.label,
280
+ "label-width": l.labelWidth,
281
+ required: l.required,
282
282
  rules: e(i)
283
283
  }, {
284
- default: d(() => [
285
- e(a) ? (p(), b(e(M), {
284
+ default: n(() => [
285
+ e(o) ? (p(), b(e(M), {
286
286
  key: 0,
287
- "model-value": s.value,
288
- placeholder: t.placeholder,
287
+ "model-value": u.value,
288
+ placeholder: l.placeholder,
289
289
  disabled: !0,
290
290
  readonly: !0
291
- }, null, 8, ["model-value", "placeholder"])) : (p(), b(e(Y), {
291
+ }, null, 8, ["model-value", "placeholder"])) : (p(), b(e(G), {
292
292
  key: 1,
293
- modelValue: e(n),
294
- "onUpdate:modelValue": o[0] || (o[0] = (h) => S(n) ? n.value = h : null),
295
- placeholder: t.placeholder,
293
+ modelValue: e(t),
294
+ "onUpdate:modelValue": s[0] || (s[0] = (h) => w(t) ? t.value = h : null),
295
+ placeholder: l.placeholder,
296
296
  multiple: ""
297
297
  }, {
298
- default: d(() => [
299
- (p(!0), W(C, null, R(e(l), (h) => (p(), b(e(G), {
298
+ default: n(() => [
299
+ (p(!0), W(C, null, R(e(a), (h) => (p(), b(e(T), {
300
300
  key: h.value,
301
301
  label: h.content,
302
302
  value: h.value
@@ -326,29 +326,29 @@ const Ve = /* @__PURE__ */ c({
326
326
  code: {}
327
327
  },
328
328
  setup(r) {
329
- const m = v(), i = w(), a = $(), l = B();
330
- return (n, u) => (p(), b(e(y), { span: e(m) }, {
331
- default: d(() => [
329
+ const m = v(), i = g(), o = $(), a = B();
330
+ return (t, d) => (p(), b(e(y), { span: e(m) }, {
331
+ default: n(() => [
332
332
  f(e(V), {
333
- prop: n.name,
334
- label: n.label,
335
- "label-width": n.labelWidth,
336
- required: n.required,
333
+ prop: t.name,
334
+ label: t.label,
335
+ "label-width": t.labelWidth,
336
+ required: t.required,
337
337
  rules: e(i)
338
338
  }, {
339
- default: d(() => [
339
+ default: n(() => [
340
340
  f(e(de), {
341
- modelValue: e(l),
342
- "onUpdate:modelValue": u[0] || (u[0] = (s) => S(l) ? l.value = s : null),
343
- disabled: n.disabled
341
+ modelValue: e(a),
342
+ "onUpdate:modelValue": d[0] || (d[0] = (u) => w(a) ? a.value = u : null),
343
+ disabled: t.disabled
344
344
  }, {
345
- default: d(() => [
346
- (p(!0), W(C, null, R(e(a), (s) => (p(), b(e(ue), {
347
- key: s.value,
348
- value: s.value
345
+ default: n(() => [
346
+ (p(!0), W(C, null, R(e(o), (u) => (p(), b(e(ue), {
347
+ key: u.value,
348
+ value: u.value
349
349
  }, {
350
- default: d(() => [
351
- x(_(s.content), 1)
350
+ default: n(() => [
351
+ x(_(u.content), 1)
352
352
  ]),
353
353
  _: 2
354
354
  }, 1032, ["value"]))), 128))
@@ -377,27 +377,27 @@ const Ve = /* @__PURE__ */ c({
377
377
  code: {}
378
378
  },
379
379
  setup(r) {
380
- const m = v(), i = w(), a = $(), l = P();
381
- return (n, u) => (p(), b(e(y), { span: e(m) }, {
382
- default: d(() => [
380
+ const m = v(), i = g(), o = $(), a = P();
381
+ return (t, d) => (p(), b(e(y), { span: e(m) }, {
382
+ default: n(() => [
383
383
  f(e(V), {
384
- prop: n.name,
385
- label: n.label,
386
- "label-width": n.labelWidth,
387
- required: n.required,
384
+ prop: t.name,
385
+ label: t.label,
386
+ "label-width": t.labelWidth,
387
+ required: t.required,
388
388
  rules: e(i)
389
389
  }, {
390
- default: d(() => [
390
+ default: n(() => [
391
391
  f(e(ie), {
392
- modelValue: e(l),
393
- "onUpdate:modelValue": u[0] || (u[0] = (s) => S(l) ? l.value = s : null),
394
- disabled: n.disabled
392
+ modelValue: e(a),
393
+ "onUpdate:modelValue": d[0] || (d[0] = (u) => w(a) ? a.value = u : null),
394
+ disabled: t.disabled
395
395
  }, {
396
- default: d(() => [
397
- (p(!0), W(C, null, R(e(a), (s) => (p(), b(e(j), {
398
- key: s.value,
399
- label: s.content,
400
- value: s.value
396
+ default: n(() => [
397
+ (p(!0), W(C, null, R(e(o), (u) => (p(), b(e(j), {
398
+ key: u.value,
399
+ label: u.content,
400
+ value: u.value
401
401
  }, null, 8, ["label", "value"]))), 128))
402
402
  ]),
403
403
  _: 1
@@ -423,19 +423,19 @@ const Ve = /* @__PURE__ */ c({
423
423
  },
424
424
  setup(r) {
425
425
  const m = v(), i = N();
426
- return (a, l) => (p(), b(e(y), { span: e(m) }, {
427
- default: d(() => [
426
+ return (o, a) => (p(), b(e(y), { span: e(m) }, {
427
+ default: n(() => [
428
428
  f(e(V), {
429
- prop: a.name,
430
- label: a.label,
431
- "label-width": a.labelWidth,
432
- rules: a.rules
429
+ prop: o.name,
430
+ label: o.label,
431
+ "label-width": o.labelWidth,
432
+ rules: o.rules
433
433
  }, {
434
- default: d(() => [
434
+ default: n(() => [
435
435
  f(e(j), {
436
436
  modelValue: e(i),
437
- "onUpdate:modelValue": l[0] || (l[0] = (n) => S(i) ? i.value = n : null),
438
- disabled: a.disabled
437
+ "onUpdate:modelValue": a[0] || (a[0] = (t) => w(i) ? i.value = t : null),
438
+ disabled: o.disabled
439
439
  }, null, 8, ["modelValue", "disabled"])
440
440
  ]),
441
441
  _: 1
@@ -458,19 +458,19 @@ const Ve = /* @__PURE__ */ c({
458
458
  },
459
459
  setup(r) {
460
460
  const m = v(), i = N();
461
- return (a, l) => (p(), b(e(y), { span: e(m) }, {
462
- default: d(() => [
461
+ return (o, a) => (p(), b(e(y), { span: e(m) }, {
462
+ default: n(() => [
463
463
  f(e(V), {
464
- prop: a.name,
465
- label: a.label,
466
- "label-width": a.labelWidth,
467
- rules: a.rules
464
+ prop: o.name,
465
+ label: o.label,
466
+ "label-width": o.labelWidth,
467
+ rules: o.rules
468
468
  }, {
469
- default: d(() => [
469
+ default: n(() => [
470
470
  f(e(se), {
471
471
  modelValue: e(i),
472
- "onUpdate:modelValue": l[0] || (l[0] = (n) => S(i) ? i.value = n : null),
473
- disabled: a.disabled
472
+ "onUpdate:modelValue": a[0] || (a[0] = (t) => w(i) ? i.value = t : null),
473
+ disabled: o.disabled
474
474
  }, null, 8, ["modelValue", "disabled"])
475
475
  ]),
476
476
  _: 1
@@ -500,67 +500,61 @@ const Ve = /* @__PURE__ */ c({
500
500
  sourceFormat: {}
501
501
  },
502
502
  setup(r) {
503
- const m = v(), i = w(), a = q(() => r.format.startsWith("H") || r.format.startsWith("h") || r.format.startsWith("m") || r.format.startsWith("s")), l = q(() => r.sourceFormat ? r.sourceFormat : a.value ? "HH:mm:ss" : "YYYY-MM-DD"), n = q(() => {
504
- let o = "date";
505
- return (r.format.indexOf("y") > -1 || r.format.indexOf("Y") > -1) && (o = "year"), r.format.indexOf("M") > -1 && (o = "month"), (r.format.indexOf("d") > -1 || r.format.indexOf("D") > -1) && (o = "date"), (r.format.indexOf("H") > -1 || r.format.indexOf("h") > -1 || r.format.indexOf("k") > -1 || r.format.indexOf("m") > -1 || r.format.indexOf("s") > -1 || r.format.indexOf("S") > -1) && (o = "datetime"), o;
506
- }), u = A(), s = q(() => {
507
- const o = u.modelValue[r.name];
508
- if (D(o))
509
- return "string";
510
- if (Z(o))
511
- return "date";
512
- throw new k("日期输入框的值只能为字符串或日期类型");
513
- }), t = q({
503
+ const m = v(), i = g(), o = q(() => r.format.startsWith("H") || r.format.startsWith("h") || r.format.startsWith("m") || r.format.startsWith("s")), a = q(() => r.sourceFormat ? r.sourceFormat : o.value ? "HH:mm:ss" : "YYYY-MM-DD"), t = q(() => {
504
+ let l = "date";
505
+ return (r.format.indexOf("y") > -1 || r.format.indexOf("Y") > -1) && (l = "year"), r.format.indexOf("M") > -1 && (l = "month"), (r.format.indexOf("d") > -1 || r.format.indexOf("D") > -1) && (l = "date"), (r.format.indexOf("H") > -1 || r.format.indexOf("h") > -1 || r.format.indexOf("k") > -1 || r.format.indexOf("m") > -1 || r.format.indexOf("s") > -1 || r.format.indexOf("S") > -1) && (l = "datetime"), l;
506
+ }), d = A(), u = q({
514
507
  get: () => {
515
- const o = u.modelValue[r.name];
516
- if (o) {
517
- if (s.value == "date")
518
- return o;
519
- {
520
- const h = I(o, l.value, !0);
521
- if (!h.isValid())
522
- throw new k(`日期输入框的值无效,不符合${l.value}格式`);
523
- return h.toDate();
524
- }
508
+ const l = d.modelValue[r.name];
509
+ if (l) {
510
+ if (Z(l))
511
+ return l;
512
+ if (D(l)) {
513
+ const s = I(l, a.value, !0);
514
+ if (!s.isValid())
515
+ throw new k(`日期输入框的值无效,不符合${a.value}格式`);
516
+ return s.toDate();
517
+ } else
518
+ throw new k("日期输入框的值只能为字符串或日期类型");
525
519
  }
526
520
  },
527
- set: (o) => {
528
- s.value == "date" ? o ? u.updateModelValue(r.name, o) : u.updateModelValue(r.name, void 0) : o ? u.updateModelValue(r.name, I(o).format(l.value)) : u.updateModelValue(r.name, "");
521
+ set: (l) => {
522
+ r.sourceFormat ? l ? d.updateModelValue(r.name, I(l).format(a.value)) : d.updateModelValue(r.name, "") : l ? d.updateModelValue(r.name, l) : d.updateModelValue(r.name, void 0);
529
523
  }
530
524
  });
531
- return (o, h) => (p(), b(e(y), { span: e(m) }, {
532
- default: d(() => [
525
+ return (l, s) => (p(), b(e(y), { span: e(m) }, {
526
+ default: n(() => [
533
527
  f(e(V), {
534
- prop: o.name,
535
- label: o.label,
536
- "label-width": o.labelWidth,
537
- required: o.required,
528
+ prop: l.name,
529
+ label: l.label,
530
+ "label-width": l.labelWidth,
531
+ required: l.required,
538
532
  rules: e(i)
539
533
  }, {
540
- default: d(() => [
541
- a.value ? (p(), b(e(me), {
534
+ default: n(() => [
535
+ o.value ? (p(), b(e(me), {
542
536
  key: 0,
543
- modelValue: t.value,
544
- "onUpdate:modelValue": h[0] || (h[0] = (g) => t.value = g),
545
- placeholder: o.placeholder,
546
- disabled: o.disabled,
547
- readonly: o.readonly,
548
- editable: o.editable,
549
- clearable: o.clearable,
550
- format: l.value,
537
+ modelValue: u.value,
538
+ "onUpdate:modelValue": s[0] || (s[0] = (h) => u.value = h),
539
+ placeholder: l.placeholder,
540
+ disabled: l.disabled,
541
+ readonly: l.readonly,
542
+ editable: l.editable,
543
+ clearable: l.clearable,
544
+ format: a.value,
551
545
  "arrow-control": "",
552
546
  style: { width: "100%" }
553
547
  }, null, 8, ["modelValue", "placeholder", "disabled", "readonly", "editable", "clearable", "format"])) : (p(), b(e(pe), {
554
548
  key: 1,
555
- modelValue: t.value,
556
- "onUpdate:modelValue": h[1] || (h[1] = (g) => t.value = g),
557
- placeholder: o.placeholder,
558
- disabled: o.disabled,
559
- readonly: o.readonly,
560
- editable: o.editable,
561
- clearable: o.clearable,
562
- type: n.value,
563
- format: l.value,
549
+ modelValue: u.value,
550
+ "onUpdate:modelValue": s[1] || (s[1] = (h) => u.value = h),
551
+ placeholder: l.placeholder,
552
+ disabled: l.disabled,
553
+ readonly: l.readonly,
554
+ editable: l.editable,
555
+ clearable: l.clearable,
556
+ type: t.value,
557
+ format: a.value,
564
558
  style: { width: "100%" }
565
559
  }, null, 8, ["modelValue", "placeholder", "disabled", "readonly", "editable", "clearable", "type", "format"]))
566
560
  ]),
@@ -584,31 +578,31 @@ const Ve = /* @__PURE__ */ c({
584
578
  disabled: { type: Boolean }
585
579
  },
586
580
  setup(r) {
587
- const m = v(), i = w(), a = B();
588
- ee(a, () => {
589
- a.value || (l.value = "");
581
+ const m = v(), i = g(), o = B();
582
+ ee(o, () => {
583
+ o.value || (a.value = "");
590
584
  });
591
- const l = le(""), n = E("inputRef");
585
+ const a = le(""), t = E("inputRef");
592
586
  return ae(() => {
593
- n.value.input.onchange = (u) => {
594
- var s;
595
- a.value = (s = u == null ? void 0 : u.target) == null ? void 0 : s.files[0];
596
- }, l.value = "";
597
- }), (u, s) => (p(), b(e(y), { span: e(m) }, {
598
- default: d(() => [
587
+ t.value.input.onchange = (d) => {
588
+ var u;
589
+ o.value = (u = d == null ? void 0 : d.target) == null ? void 0 : u.files[0];
590
+ }, a.value = "";
591
+ }), (d, u) => (p(), b(e(y), { span: e(m) }, {
592
+ default: n(() => [
599
593
  f(e(V), {
600
- prop: u.name,
601
- label: u.label,
602
- "label-width": u.labelWidth,
603
- required: u.required,
594
+ prop: d.name,
595
+ label: d.label,
596
+ "label-width": d.labelWidth,
597
+ required: d.required,
604
598
  rules: e(i)
605
599
  }, {
606
- default: d(() => [
600
+ default: n(() => [
607
601
  f(e(M), {
608
602
  ref: "inputRef",
609
- modelValue: l.value,
610
- "onUpdate:modelValue": s[0] || (s[0] = (t) => l.value = t),
611
- disabled: u.disabled,
603
+ modelValue: a.value,
604
+ "onUpdate:modelValue": u[0] || (u[0] = (l) => a.value = l),
605
+ disabled: d.disabled,
612
606
  type: "file",
613
607
  "validate-event": !1
614
608
  }, null, 8, ["modelValue", "disabled"])
@@ -632,17 +626,17 @@ const Ve = /* @__PURE__ */ c({
632
626
  const m = q(() => ({
633
627
  textAlign: r.align
634
628
  })), i = v();
635
- return (a, l) => (p(), b(e(y), {
629
+ return (o, a) => (p(), b(e(y), {
636
630
  span: e(i),
637
631
  style: oe(m.value)
638
632
  }, {
639
- default: d(() => [
633
+ default: n(() => [
640
634
  f(e(ye), {
641
- gutter: a.gutter,
635
+ gutter: o.gutter,
642
636
  style: { "margin-bottom": "18px" }
643
637
  }, {
644
- default: d(() => [
645
- O(a.$slots, "default")
638
+ default: n(() => [
639
+ O(o.$slots, "default")
646
640
  ]),
647
641
  _: 3
648
642
  }, 8, ["gutter"])
@@ -663,18 +657,18 @@ const Ve = /* @__PURE__ */ c({
663
657
  rules: {}
664
658
  },
665
659
  setup(r) {
666
- const m = v(), i = w();
667
- return (a, l) => (p(), b(e(y), { span: e(m) }, {
668
- default: d(() => [
660
+ const m = v(), i = g();
661
+ return (o, a) => (p(), b(e(y), { span: e(m) }, {
662
+ default: n(() => [
669
663
  f(e(V), {
670
- prop: a.name,
671
- label: a.label,
672
- "label-width": a.labelWidth,
673
- required: a.required,
664
+ prop: o.name,
665
+ label: o.label,
666
+ "label-width": o.labelWidth,
667
+ required: o.required,
674
668
  rules: e(i)
675
669
  }, {
676
- default: d(() => [
677
- O(a.$slots, "default")
670
+ default: n(() => [
671
+ O(o.$slots, "default")
678
672
  ]),
679
673
  _: 3
680
674
  }, 8, ["prop", "label", "label-width", "required", "rules"])
@@ -700,60 +694,60 @@ const Ve = /* @__PURE__ */ c({
700
694
  fillMapping: { type: [String, Function] }
701
695
  },
702
696
  setup(r) {
703
- const m = v(), i = w(), a = B(), l = A(), n = () => {
697
+ const m = v(), i = g(), o = B(), a = A(), t = () => {
704
698
  if (D(r.fillMapping)) {
705
- const t = {}, o = r.fillMapping.split(",");
706
- for (let h = 0; h < o.length; h++) {
707
- const g = o[h].split(":")[0].trim();
708
- t[g] = void 0;
699
+ const l = {}, s = r.fillMapping.split(",");
700
+ for (let h = 0; h < s.length; h++) {
701
+ const S = s[h].split(":")[0].trim();
702
+ l[S] = void 0;
709
703
  }
710
- l.updateModelValueMulti(t);
704
+ a.updateModelValueMulti(l);
711
705
  }
712
- }, u = E("dropdown");
706
+ }, d = E("dropdown");
713
707
  return U(
714
708
  ve,
715
- T({
716
- lovValue: a,
717
- backfill: (t) => {
718
- var o;
719
- if ((o = u.value) == null || o.handleClose(), D(r.fillMapping)) {
720
- const h = {}, g = r.fillMapping.split(",");
721
- for (let F = 0; F < g.length; F++) {
722
- const H = g[F].split(":")[0].trim(), K = g[F].split(":")[1].trim(), J = t[K];
709
+ Y({
710
+ lovValue: o,
711
+ backfill: (l) => {
712
+ var s;
713
+ if ((s = d.value) == null || s.handleClose(), D(r.fillMapping)) {
714
+ const h = {}, S = r.fillMapping.split(",");
715
+ for (let F = 0; F < S.length; F++) {
716
+ const H = S[F].split(":")[0].trim(), K = S[F].split(":")[1].trim(), J = l[K];
723
717
  h[H] = J;
724
718
  }
725
- l.updateModelValueMulti(h);
719
+ a.updateModelValueMulti(h);
726
720
  } else
727
- r.fillMapping && r.fillMapping(t);
721
+ r.fillMapping && r.fillMapping(l);
728
722
  }
729
723
  })
730
- ), (t, o) => (p(), b(e(y), { span: e(m) }, {
731
- default: d(() => [
724
+ ), (l, s) => (p(), b(e(y), { span: e(m) }, {
725
+ default: n(() => [
732
726
  f(e(V), {
733
- prop: t.name,
734
- label: t.label,
735
- "label-width": t.labelWidth,
736
- required: t.required,
727
+ prop: l.name,
728
+ label: l.label,
729
+ "label-width": l.labelWidth,
730
+ required: l.required,
737
731
  rules: e(i)
738
732
  }, {
739
- default: d(() => [
733
+ default: n(() => [
740
734
  f(e(be), {
741
735
  ref: "dropdown",
742
736
  trigger: "click",
743
737
  style: { width: "100%" }
744
738
  }, {
745
- dropdown: d(() => [
746
- O(t.$slots, "default")
739
+ dropdown: n(() => [
740
+ O(l.$slots, "default")
747
741
  ]),
748
- default: d(() => [
742
+ default: n(() => [
749
743
  f(e(M), {
750
- modelValue: e(a),
751
- "onUpdate:modelValue": o[0] || (o[0] = (h) => S(a) ? a.value = h : null),
752
- maxlength: t.maxlength,
753
- placeholder: t.placeholder,
754
- disabled: t.disabled,
755
- readonly: t.readonly,
756
- onChange: n
744
+ modelValue: e(o),
745
+ "onUpdate:modelValue": s[0] || (s[0] = (h) => w(o) ? o.value = h : null),
746
+ maxlength: l.maxlength,
747
+ placeholder: l.placeholder,
748
+ disabled: l.disabled,
749
+ readonly: l.readonly,
750
+ onChange: t
757
751
  }, null, 8, ["modelValue", "maxlength", "placeholder", "disabled", "readonly"])
758
752
  ]),
759
753
  _: 3