orion-design 0.1.28 → 0.1.29

Sign up to get free protection for your applications and to get access to all the features.
Files changed (30) hide show
  1. package/dist/components/Form/index.js +308 -306
  2. package/dist/components/Form/index.js.map +1 -1
  3. package/dist/components/LovTable/LovPagetable.vue.d.ts +16 -0
  4. package/dist/components/LovTable/index.d.ts +8 -0
  5. package/dist/components/Pagetable/Pagetable.d.ts +7 -0
  6. package/dist/components/Pagetable/columns/PagetableColumnLink.d.ts +75 -0
  7. package/dist/components/Pagetable/hooks/useColumns.js +6 -6
  8. package/dist/components/Pagetable/hooks/useColumns.js.map +1 -1
  9. package/dist/components/Pagetable/index.d.ts +7 -0
  10. package/dist/components/Pagetable/index.js +297 -243
  11. package/dist/components/Pagetable/index.js.map +1 -1
  12. package/dist/components/Pagetable/interface.d.ts +1 -0
  13. package/dist/components/Querytable/columns/QuerytableColumnLink.d.ts +75 -0
  14. package/dist/components/Querytable/hooks/useColumns.js +6 -6
  15. package/dist/components/Querytable/hooks/useColumns.js.map +1 -1
  16. package/dist/components/Querytable/index.d.ts +2 -0
  17. package/dist/components/Querytable/index.js +227 -180
  18. package/dist/components/Querytable/index.js.map +1 -1
  19. package/dist/components/components.js +1 -1
  20. package/dist/components/index.js +2 -2
  21. package/dist/components-J6-qau6Y.js +73 -0
  22. package/dist/components-J6-qau6Y.js.map +1 -0
  23. package/dist/index.css +1 -1
  24. package/dist/index.js +1 -1
  25. package/dist/version/version.d.ts +1 -1
  26. package/dist/version/version.js +1 -1
  27. package/dist/version/version.js.map +1 -1
  28. package/package.json +1 -1
  29. package/dist/components-0PErqPHo.js +0 -72
  30. package/dist/components-0PErqPHo.js.map +0 -1
@@ -1,16 +1,16 @@
1
- import { difference as ae, isEmpty as oe, isDate as re, isString as A, isNumber as te, toNumber as ne } from "lodash-es";
2
- import { defineComponent as c, useTemplateRef as Y, provide as L, reactive as j, toRef as R, openBlock as p, createBlock as f, unref as e, withCtx as d, createVNode as b, renderSlot as $, isRef as S, computed as F, createElementBlock as D, Fragment as E, renderList as I, createTextVNode as de, toDisplayString as ue, watch as ie, ref as P, onMounted as se, normalizeStyle as pe } from "vue";
3
- import { withInstall as me } from "../_util/vue/install.js";
4
- import { ElForm as be, ElRow as fe, ElCol as y, ElFormItem as g, ElInput as O, ElSelect as H, ElOption as K, ElRadioGroup as he, ElRadio as ce, ElCheckboxGroup as ye, ElCheckbox as J, ElSwitch as ve, dayjs as G, ElTimePicker as ge, ElDatePicker as we, ElDropdown as Ve, ElInputNumber as Se } from "element-plus";
5
- import { formContextKey as qe } from "./Form.js";
6
- import C from "../../error/OrionError.js";
7
- import { useFormItemSpan as v, useFormItemRules as V, useFormItemStringModel as z, useFormItemDisabled as Q, useFormItemCode as U, useFormItemMultiModel as X, useFormContext as T, useFormItemBooleanModel as Z } from "./hooks/index.js";
8
- import { getSingleCodeContent as Be, getMultiCodeContent as Me } from "./utils/index.js";
1
+ import { difference as oe, isEmpty as re, isDate as te, isString as A, isNumber as ne, toNumber as de } from "lodash-es";
2
+ import { defineComponent as y, useTemplateRef as Y, provide as L, reactive as j, toRef as R, openBlock as p, createBlock as h, unref as e, withCtx as d, createVNode as f, renderSlot as $, isRef as q, useAttrs as H, computed as F, createElementBlock as D, Fragment as E, renderList as I, createTextVNode as ue, toDisplayString as se, watch as ie, ref as P, onMounted as pe, normalizeStyle as me } from "vue";
3
+ import { withInstall as be } from "../_util/vue/install.js";
4
+ import { ElForm as fe, ElRow as he, ElCol as g, ElFormItem as w, ElInput as O, ElSelect as K, ElOption as J, ElRadioGroup as ce, ElRadio as ye, ElCheckboxGroup as ge, ElCheckbox as Q, ElSwitch as ve, dayjs as G, ElTimePicker as we, ElDatePicker as Ve, ElDropdown as Se, ElInputNumber as qe } from "element-plus";
5
+ import { formContextKey as Be } from "./Form.js";
6
+ import W from "../../error/OrionError.js";
7
+ import { useFormItemSpan as v, useFormItemRules as V, useFormItemStringModel as z, useFormItemDisabled as X, useFormItemCode as U, useFormItemMultiModel as Z, useFormContext as T, useFormItemBooleanModel as x } from "./hooks/index.js";
8
+ import { getSingleCodeContent as Me, getMultiCodeContent as Ce } from "./utils/index.js";
9
9
  import { S as Fe } from "../../index-BbsXWo7C.js";
10
10
  import { g as Oe } from "../../index-C6P_0wAy.js";
11
11
  import { lovContextKey as ze } from "./LovInput/LovInput.js";
12
- import { default as nl } from "./LovInput/hooks/useLov.js";
13
- const Ce = /* @__PURE__ */ c({
12
+ import { default as dl } from "./LovInput/hooks/useLov.js";
13
+ const We = /* @__PURE__ */ y({
14
14
  name: "OForm",
15
15
  inheritAttrs: !1,
16
16
  __name: "Form",
@@ -22,21 +22,21 @@ const Ce = /* @__PURE__ */ c({
22
22
  modelValue: {}
23
23
  },
24
24
  emits: ["update:modelValue"],
25
- setup(t, { expose: s, emit: i }) {
26
- const r = i, l = (o, h) => {
27
- if (!Object.keys(t.modelValue).includes(o))
28
- throw new C(`modelValue中不存在[${o}]`);
29
- r("update:modelValue", { ...t.modelValue, [o]: h });
30
- }, a = (o) => {
31
- const h = Object.keys(t.modelValue), w = Object.keys(o), W = ae(w, h);
32
- if (!oe(W))
33
- throw new C(`modelValue中不存在[${W.join(",")}]`);
34
- r("update:modelValue", { ...t.modelValue, ...o });
35
- }, u = Y("form");
36
- return s({
37
- validate: async () => await u.value.validate()
25
+ setup(t, { expose: i, emit: u }) {
26
+ const o = u, l = (r, m) => {
27
+ if (!Object.keys(t.modelValue).includes(r))
28
+ throw new W(`modelValue中不存在[${r}]`);
29
+ o("update:modelValue", { ...t.modelValue, [r]: m });
30
+ }, a = (r) => {
31
+ const m = Object.keys(t.modelValue), c = Object.keys(r), S = oe(c, m);
32
+ if (!re(S))
33
+ throw new W(`modelValue中不存在[${S.join(",")}]`);
34
+ o("update:modelValue", { ...t.modelValue, ...r });
35
+ }, n = Y("form");
36
+ return i({
37
+ validate: async () => await n.value.validate()
38
38
  }), L(
39
- qe,
39
+ Be,
40
40
  j({
41
41
  modelValue: R(() => t.modelValue),
42
42
  updateModelValue: l,
@@ -45,17 +45,17 @@ const Ce = /* @__PURE__ */ c({
45
45
  itemSpan: R(() => t.itemSpan),
46
46
  disabled: R(() => t.disabled)
47
47
  })
48
- ), (o, h) => (p(), f(e(be), {
48
+ ), (r, m) => (p(), h(e(fe), {
49
49
  ref: "form",
50
- model: o.modelValue,
51
- rules: o.rules,
52
- "label-width": o.itemLabelWidth,
53
- disabled: o.disabled
50
+ model: r.modelValue,
51
+ rules: r.rules,
52
+ "label-width": r.itemLabelWidth,
53
+ disabled: r.disabled
54
54
  }, {
55
55
  default: d(() => [
56
- b(e(fe), { gutter: 16 }, {
56
+ f(e(he), { gutter: 16 }, {
57
57
  default: d(() => [
58
- $(o.$slots, "default")
58
+ $(r.$slots, "default")
59
59
  ]),
60
60
  _: 3
61
61
  })
@@ -63,7 +63,7 @@ const Ce = /* @__PURE__ */ c({
63
63
  _: 3
64
64
  }, 8, ["model", "rules", "label-width", "disabled"]));
65
65
  }
66
- }), We = /* @__PURE__ */ c({
66
+ }), ke = /* @__PURE__ */ y({
67
67
  name: "OFormString",
68
68
  inheritAttrs: !1,
69
69
  __name: "StringInput",
@@ -80,20 +80,20 @@ const Ce = /* @__PURE__ */ c({
80
80
  readonly: { type: Boolean }
81
81
  },
82
82
  setup(t) {
83
- const s = v(), i = V(), r = z();
84
- return (l, a) => (p(), f(e(y), { span: e(s) }, {
83
+ const i = v(), u = V(), o = z();
84
+ return (l, a) => (p(), h(e(g), { span: e(i) }, {
85
85
  default: d(() => [
86
- b(e(g), {
86
+ f(e(w), {
87
87
  prop: l.name,
88
88
  label: l.label,
89
89
  "label-width": l.labelWidth,
90
90
  required: l.required,
91
- rules: e(i)
91
+ rules: e(u)
92
92
  }, {
93
93
  default: d(() => [
94
- b(e(O), {
95
- modelValue: e(r),
96
- "onUpdate:modelValue": a[0] || (a[0] = (u) => S(r) ? r.value = u : null),
94
+ f(e(O), {
95
+ modelValue: e(o),
96
+ "onUpdate:modelValue": a[0] || (a[0] = (n) => q(o) ? o.value = n : null),
97
97
  maxlength: l.maxlength,
98
98
  placeholder: l.placeholder,
99
99
  disabled: l.disabled,
@@ -106,7 +106,7 @@ const Ce = /* @__PURE__ */ c({
106
106
  _: 1
107
107
  }, 8, ["span"]));
108
108
  }
109
- }), ke = /* @__PURE__ */ c({
109
+ }), Re = /* @__PURE__ */ y({
110
110
  name: "OFormPassword",
111
111
  inheritAttrs: !1,
112
112
  __name: "PasswordInput",
@@ -123,20 +123,20 @@ const Ce = /* @__PURE__ */ c({
123
123
  readonly: { type: Boolean }
124
124
  },
125
125
  setup(t) {
126
- const s = v(), i = V(), r = z();
127
- return (l, a) => (p(), f(e(y), { span: e(s) }, {
126
+ const i = v(), u = V(), o = z();
127
+ return (l, a) => (p(), h(e(g), { span: e(i) }, {
128
128
  default: d(() => [
129
- b(e(g), {
129
+ f(e(w), {
130
130
  prop: l.name,
131
131
  label: l.label,
132
132
  "label-width": l.labelWidth,
133
133
  required: l.required,
134
- rules: e(i)
134
+ rules: e(u)
135
135
  }, {
136
136
  default: d(() => [
137
- b(e(O), {
138
- modelValue: e(r),
139
- "onUpdate:modelValue": a[0] || (a[0] = (u) => S(r) ? r.value = u : null),
137
+ f(e(O), {
138
+ modelValue: e(o),
139
+ "onUpdate:modelValue": a[0] || (a[0] = (n) => q(o) ? o.value = n : null),
140
140
  maxlength: l.maxlength,
141
141
  placeholder: l.placeholder,
142
142
  disabled: l.disabled,
@@ -150,7 +150,7 @@ const Ce = /* @__PURE__ */ c({
150
150
  _: 1
151
151
  }, 8, ["span"]));
152
152
  }
153
- }), Re = /* @__PURE__ */ c({
153
+ }), Ae = /* @__PURE__ */ y({
154
154
  name: "OFormTextarea",
155
155
  inheritAttrs: !1,
156
156
  __name: "Textarea",
@@ -168,20 +168,20 @@ const Ce = /* @__PURE__ */ c({
168
168
  rows: {}
169
169
  },
170
170
  setup(t) {
171
- const s = v(), i = V(), r = z();
172
- return (l, a) => (p(), f(e(y), { span: e(s) }, {
171
+ const i = v(), u = V(), o = z();
172
+ return (l, a) => (p(), h(e(g), { span: e(i) }, {
173
173
  default: d(() => [
174
- b(e(g), {
174
+ f(e(w), {
175
175
  prop: l.name,
176
176
  label: l.label,
177
177
  "label-width": l.labelWidth,
178
178
  required: l.required,
179
- rules: e(i)
179
+ rules: e(u)
180
180
  }, {
181
181
  default: d(() => [
182
- b(e(O), {
183
- modelValue: e(r),
184
- "onUpdate:modelValue": a[0] || (a[0] = (u) => S(r) ? r.value = u : null),
182
+ f(e(O), {
183
+ modelValue: e(o),
184
+ "onUpdate:modelValue": a[0] || (a[0] = (n) => q(o) ? o.value = n : null),
185
185
  maxlength: l.maxlength,
186
186
  placeholder: l.placeholder,
187
187
  disabled: l.disabled,
@@ -197,7 +197,7 @@ const Ce = /* @__PURE__ */ c({
197
197
  _: 1
198
198
  }, 8, ["span"]));
199
199
  }
200
- }), Ae = /* @__PURE__ */ c({
200
+ }), $e = /* @__PURE__ */ y({
201
201
  name: "OFormSingleselect",
202
202
  inheritAttrs: !1,
203
203
  __name: "SingleSelect",
@@ -215,40 +215,41 @@ const Ce = /* @__PURE__ */ c({
215
215
  filterable: { type: Boolean }
216
216
  },
217
217
  setup(t) {
218
- const s = v(), i = V(), r = Q(), l = U(), a = z(), u = F(() => Be(l.value, a.value));
219
- return (n, o) => (p(), f(e(y), { span: e(s) }, {
218
+ const i = H(), u = v(), o = V(), l = X(), a = U(), n = z(), s = F(() => Me(a.value, n.value));
219
+ return (r, m) => (p(), h(e(g), { span: e(u) }, {
220
220
  default: d(() => [
221
- b(e(g), {
222
- prop: n.name,
223
- label: n.label,
224
- "label-width": n.labelWidth,
225
- required: n.required,
226
- rules: e(i)
221
+ f(e(w), {
222
+ prop: r.name,
223
+ label: r.label,
224
+ "label-width": r.labelWidth,
225
+ required: r.required,
226
+ rules: e(o)
227
227
  }, {
228
228
  default: d(() => [
229
- e(r) ? (p(), f(e(O), {
229
+ e(l) ? (p(), h(e(O), {
230
230
  key: 0,
231
- "model-value": u.value,
232
- placeholder: n.placeholder,
231
+ "model-value": s.value,
232
+ placeholder: r.placeholder,
233
233
  disabled: !0,
234
234
  readonly: !0
235
- }, null, 8, ["model-value", "placeholder"])) : (p(), f(e(H), {
235
+ }, null, 8, ["model-value", "placeholder"])) : (p(), h(e(K), {
236
236
  key: 1,
237
- modelValue: e(a),
238
- "onUpdate:modelValue": o[0] || (o[0] = (h) => S(a) ? a.value = h : null),
239
- placeholder: n.placeholder,
240
- clearable: n.clearable,
241
- filterable: n.filterable
237
+ modelValue: e(n),
238
+ "onUpdate:modelValue": m[0] || (m[0] = (c) => q(n) ? n.value = c : null),
239
+ placeholder: r.placeholder,
240
+ clearable: r.clearable,
241
+ filterable: r.filterable,
242
+ onChange: e(i).onChange
242
243
  }, {
243
244
  default: d(() => [
244
- (p(!0), D(E, null, I(e(l), (h) => (p(), f(e(K), {
245
- key: h.value,
246
- label: h.content,
247
- value: h.value
245
+ (p(!0), D(E, null, I(e(a), (c) => (p(), h(e(J), {
246
+ key: c.value,
247
+ label: c.content,
248
+ value: c.value
248
249
  }, null, 8, ["label", "value"]))), 128))
249
250
  ]),
250
251
  _: 1
251
- }, 8, ["modelValue", "placeholder", "clearable", "filterable"]))
252
+ }, 8, ["modelValue", "placeholder", "clearable", "filterable", "onChange"]))
252
253
  ]),
253
254
  _: 1
254
255
  }, 8, ["prop", "label", "label-width", "required", "rules"])
@@ -256,7 +257,7 @@ const Ce = /* @__PURE__ */ c({
256
257
  _: 1
257
258
  }, 8, ["span"]));
258
259
  }
259
- }), $e = /* @__PURE__ */ c({
260
+ }), De = /* @__PURE__ */ y({
260
261
  name: "OFormMultiselect",
261
262
  inheritAttrs: !1,
262
263
  __name: "MultiSelect",
@@ -274,41 +275,42 @@ const Ce = /* @__PURE__ */ c({
274
275
  collapseTagsTooltip: { type: Boolean }
275
276
  },
276
277
  setup(t) {
277
- const s = v(), i = V(), r = Q(), l = U(), a = X(), u = T(), n = F(() => Me(l.value, u.modelValue[t.name]));
278
- return (o, h) => (p(), f(e(y), { span: e(s) }, {
278
+ const i = H(), u = v(), o = V(), l = X(), a = U(), n = Z(), s = T(), r = F(() => Ce(a.value, s.modelValue[t.name]));
279
+ return (m, c) => (p(), h(e(g), { span: e(u) }, {
279
280
  default: d(() => [
280
- b(e(g), {
281
- prop: o.name,
282
- label: o.label,
283
- "label-width": o.labelWidth,
284
- required: o.required,
285
- rules: e(i)
281
+ f(e(w), {
282
+ prop: m.name,
283
+ label: m.label,
284
+ "label-width": m.labelWidth,
285
+ required: m.required,
286
+ rules: e(o)
286
287
  }, {
287
288
  default: d(() => [
288
- e(r) ? (p(), f(e(O), {
289
+ e(l) ? (p(), h(e(O), {
289
290
  key: 0,
290
- "model-value": n.value,
291
- placeholder: o.placeholder,
291
+ "model-value": r.value,
292
+ placeholder: m.placeholder,
292
293
  disabled: !0,
293
294
  readonly: !0
294
- }, null, 8, ["model-value", "placeholder"])) : (p(), f(e(H), {
295
+ }, null, 8, ["model-value", "placeholder"])) : (p(), h(e(K), {
295
296
  key: 1,
296
- modelValue: e(a),
297
- "onUpdate:modelValue": h[0] || (h[0] = (w) => S(a) ? a.value = w : null),
298
- placeholder: o.placeholder,
297
+ modelValue: e(n),
298
+ "onUpdate:modelValue": c[0] || (c[0] = (S) => q(n) ? n.value = S : null),
299
+ placeholder: m.placeholder,
299
300
  multiple: "",
300
- "collapse-tags": o.collapseTags,
301
- "collapse-tags-tooltip": o.collapseTagsTooltip
301
+ "collapse-tags": m.collapseTags,
302
+ "collapse-tags-tooltip": m.collapseTagsTooltip,
303
+ onChange: e(i).onChange
302
304
  }, {
303
305
  default: d(() => [
304
- (p(!0), D(E, null, I(e(l), (w) => (p(), f(e(K), {
305
- key: w.value,
306
- label: w.content,
307
- value: w.value
306
+ (p(!0), D(E, null, I(e(a), (S) => (p(), h(e(J), {
307
+ key: S.value,
308
+ label: S.content,
309
+ value: S.value
308
310
  }, null, 8, ["label", "value"]))), 128))
309
311
  ]),
310
312
  _: 1
311
- }, 8, ["modelValue", "placeholder", "collapse-tags", "collapse-tags-tooltip"]))
313
+ }, 8, ["modelValue", "placeholder", "collapse-tags", "collapse-tags-tooltip", "onChange"]))
312
314
  ]),
313
315
  _: 1
314
316
  }, 8, ["prop", "label", "label-width", "required", "rules"])
@@ -316,7 +318,7 @@ const Ce = /* @__PURE__ */ c({
316
318
  _: 1
317
319
  }, 8, ["span"]));
318
320
  }
319
- }), De = /* @__PURE__ */ c({
321
+ }), Ee = /* @__PURE__ */ y({
320
322
  name: "OFormRadiogroup",
321
323
  inheritAttrs: !1,
322
324
  __name: "RadioGroup",
@@ -331,29 +333,29 @@ const Ce = /* @__PURE__ */ c({
331
333
  code: {}
332
334
  },
333
335
  setup(t) {
334
- const s = v(), i = V(), r = U(), l = z();
335
- return (a, u) => (p(), f(e(y), { span: e(s) }, {
336
+ const i = v(), u = V(), o = U(), l = z();
337
+ return (a, n) => (p(), h(e(g), { span: e(i) }, {
336
338
  default: d(() => [
337
- b(e(g), {
339
+ f(e(w), {
338
340
  prop: a.name,
339
341
  label: a.label,
340
342
  "label-width": a.labelWidth,
341
343
  required: a.required,
342
- rules: e(i)
344
+ rules: e(u)
343
345
  }, {
344
346
  default: d(() => [
345
- b(e(he), {
347
+ f(e(ce), {
346
348
  modelValue: e(l),
347
- "onUpdate:modelValue": u[0] || (u[0] = (n) => S(l) ? l.value = n : null),
349
+ "onUpdate:modelValue": n[0] || (n[0] = (s) => q(l) ? l.value = s : null),
348
350
  disabled: a.disabled
349
351
  }, {
350
352
  default: d(() => [
351
- (p(!0), D(E, null, I(e(r), (n) => (p(), f(e(ce), {
352
- key: n.value,
353
- value: n.value
353
+ (p(!0), D(E, null, I(e(o), (s) => (p(), h(e(ye), {
354
+ key: s.value,
355
+ value: s.value
354
356
  }, {
355
357
  default: d(() => [
356
- de(ue(n.content), 1)
358
+ ue(se(s.content), 1)
357
359
  ]),
358
360
  _: 2
359
361
  }, 1032, ["value"]))), 128))
@@ -367,7 +369,7 @@ const Ce = /* @__PURE__ */ c({
367
369
  _: 1
368
370
  }, 8, ["span"]));
369
371
  }
370
- }), Ee = /* @__PURE__ */ c({
372
+ }), Ie = /* @__PURE__ */ y({
371
373
  name: "OFormCheckboxgroup",
372
374
  inheritAttrs: !1,
373
375
  __name: "CheckboxGroup",
@@ -382,27 +384,27 @@ const Ce = /* @__PURE__ */ c({
382
384
  code: {}
383
385
  },
384
386
  setup(t) {
385
- const s = v(), i = V(), r = U(), l = X();
386
- return (a, u) => (p(), f(e(y), { span: e(s) }, {
387
+ const i = v(), u = V(), o = U(), l = Z();
388
+ return (a, n) => (p(), h(e(g), { span: e(i) }, {
387
389
  default: d(() => [
388
- b(e(g), {
390
+ f(e(w), {
389
391
  prop: a.name,
390
392
  label: a.label,
391
393
  "label-width": a.labelWidth,
392
394
  required: a.required,
393
- rules: e(i)
395
+ rules: e(u)
394
396
  }, {
395
397
  default: d(() => [
396
- b(e(ye), {
398
+ f(e(ge), {
397
399
  modelValue: e(l),
398
- "onUpdate:modelValue": u[0] || (u[0] = (n) => S(l) ? l.value = n : null),
400
+ "onUpdate:modelValue": n[0] || (n[0] = (s) => q(l) ? l.value = s : null),
399
401
  disabled: a.disabled
400
402
  }, {
401
403
  default: d(() => [
402
- (p(!0), D(E, null, I(e(r), (n) => (p(), f(e(J), {
403
- key: n.value,
404
- label: n.content,
405
- value: n.value
404
+ (p(!0), D(E, null, I(e(o), (s) => (p(), h(e(Q), {
405
+ key: s.value,
406
+ label: s.content,
407
+ value: s.value
406
408
  }, null, 8, ["label", "value"]))), 128))
407
409
  ]),
408
410
  _: 1
@@ -414,7 +416,7 @@ const Ce = /* @__PURE__ */ c({
414
416
  _: 1
415
417
  }, 8, ["span"]));
416
418
  }
417
- }), Ie = /* @__PURE__ */ c({
419
+ }), Ue = /* @__PURE__ */ y({
418
420
  name: "OFormCheckbox",
419
421
  inheritAttrs: !1,
420
422
  __name: "Checkbox",
@@ -427,20 +429,20 @@ const Ce = /* @__PURE__ */ c({
427
429
  disabled: { type: Boolean }
428
430
  },
429
431
  setup(t) {
430
- const s = v(), i = Z();
431
- return (r, l) => (p(), f(e(y), { span: e(s) }, {
432
+ const i = v(), u = x();
433
+ return (o, l) => (p(), h(e(g), { span: e(i) }, {
432
434
  default: d(() => [
433
- b(e(g), {
434
- prop: r.name,
435
- label: r.label,
436
- "label-width": r.labelWidth,
437
- rules: r.rules
435
+ f(e(w), {
436
+ prop: o.name,
437
+ label: o.label,
438
+ "label-width": o.labelWidth,
439
+ rules: o.rules
438
440
  }, {
439
441
  default: d(() => [
440
- b(e(J), {
441
- modelValue: e(i),
442
- "onUpdate:modelValue": l[0] || (l[0] = (a) => S(i) ? i.value = a : null),
443
- disabled: r.disabled
442
+ f(e(Q), {
443
+ modelValue: e(u),
444
+ "onUpdate:modelValue": l[0] || (l[0] = (a) => q(u) ? u.value = a : null),
445
+ disabled: o.disabled
444
446
  }, null, 8, ["modelValue", "disabled"])
445
447
  ]),
446
448
  _: 1
@@ -449,7 +451,7 @@ const Ce = /* @__PURE__ */ c({
449
451
  _: 1
450
452
  }, 8, ["span"]));
451
453
  }
452
- }), Ue = /* @__PURE__ */ c({
454
+ }), Te = /* @__PURE__ */ y({
453
455
  name: "OFormSwitch",
454
456
  inheritAttrs: !1,
455
457
  __name: "Switch",
@@ -462,20 +464,20 @@ const Ce = /* @__PURE__ */ c({
462
464
  disabled: { type: Boolean }
463
465
  },
464
466
  setup(t) {
465
- const s = v(), i = Z();
466
- return (r, l) => (p(), f(e(y), { span: e(s) }, {
467
+ const i = v(), u = x();
468
+ return (o, l) => (p(), h(e(g), { span: e(i) }, {
467
469
  default: d(() => [
468
- b(e(g), {
469
- prop: r.name,
470
- label: r.label,
471
- "label-width": r.labelWidth,
472
- rules: r.rules
470
+ f(e(w), {
471
+ prop: o.name,
472
+ label: o.label,
473
+ "label-width": o.labelWidth,
474
+ rules: o.rules
473
475
  }, {
474
476
  default: d(() => [
475
- b(e(ve), {
476
- modelValue: e(i),
477
- "onUpdate:modelValue": l[0] || (l[0] = (a) => S(i) ? i.value = a : null),
478
- disabled: r.disabled
477
+ f(e(ve), {
478
+ modelValue: e(u),
479
+ "onUpdate:modelValue": l[0] || (l[0] = (a) => q(u) ? u.value = a : null),
480
+ disabled: o.disabled
479
481
  }, null, 8, ["modelValue", "disabled"])
480
482
  ]),
481
483
  _: 1
@@ -484,7 +486,7 @@ const Ce = /* @__PURE__ */ c({
484
486
  _: 1
485
487
  }, 8, ["span"]));
486
488
  }
487
- }), Te = /* @__PURE__ */ c({
489
+ }), Ne = /* @__PURE__ */ y({
488
490
  name: "OFormDate",
489
491
  inheritAttrs: !1,
490
492
  __name: "DateInput",
@@ -505,59 +507,59 @@ const Ce = /* @__PURE__ */ c({
505
507
  sourceFormat: {}
506
508
  },
507
509
  setup(t) {
508
- const s = v(), i = V(), r = F(() => t.format.startsWith("H") || t.format.startsWith("h") || t.format.startsWith("m") || t.format.startsWith("s")), l = F(() => t.sourceFormat ? t.sourceFormat : r.value ? "HH:mm:ss" : "YYYY-MM-DD"), a = F(() => {
509
- let o = "date";
510
- return (t.format.indexOf("y") > -1 || t.format.indexOf("Y") > -1) && (o = "year"), t.format.indexOf("M") > -1 && (o = "month"), (t.format.indexOf("d") > -1 || t.format.indexOf("D") > -1) && (o = "date"), (t.format.indexOf("H") > -1 || t.format.indexOf("h") > -1 || t.format.indexOf("k") > -1 || t.format.indexOf("m") > -1 || t.format.indexOf("s") > -1 || t.format.indexOf("S") > -1) && (o = "datetime"), o;
511
- }), u = T(), n = F({
510
+ const i = v(), u = V(), o = F(() => t.format.startsWith("H") || t.format.startsWith("h") || t.format.startsWith("m") || t.format.startsWith("s")), l = F(() => t.sourceFormat ? t.sourceFormat : o.value ? "HH:mm:ss" : "YYYY-MM-DD"), a = F(() => {
511
+ let r = "date";
512
+ return (t.format.indexOf("y") > -1 || t.format.indexOf("Y") > -1) && (r = "year"), t.format.indexOf("M") > -1 && (r = "month"), (t.format.indexOf("d") > -1 || t.format.indexOf("D") > -1) && (r = "date"), (t.format.indexOf("H") > -1 || t.format.indexOf("h") > -1 || t.format.indexOf("k") > -1 || t.format.indexOf("m") > -1 || t.format.indexOf("s") > -1 || t.format.indexOf("S") > -1) && (r = "datetime"), r;
513
+ }), n = T(), s = F({
512
514
  get: () => {
513
- const o = u.modelValue[t.name];
514
- if (o) {
515
- if (re(o))
516
- return o;
517
- if (A(o)) {
518
- const h = G(o, l.value, !0);
519
- if (!h.isValid())
520
- throw new C(`日期输入框的值无效,不符合${l.value}格式`);
521
- return h.toDate();
515
+ const r = n.modelValue[t.name];
516
+ if (r) {
517
+ if (te(r))
518
+ return r;
519
+ if (A(r)) {
520
+ const m = G(r, l.value, !0);
521
+ if (!m.isValid())
522
+ throw new W(`日期输入框的值无效,不符合${l.value}格式`);
523
+ return m.toDate();
522
524
  } else
523
- throw new C("日期输入框的值只能为字符串或日期类型");
525
+ throw new W("日期输入框的值只能为字符串或日期类型");
524
526
  }
525
527
  },
526
- set: (o) => {
527
- t.sourceFormat ? o ? u.updateModelValue(t.name, G(o).format(l.value)) : u.updateModelValue(t.name, "") : o ? u.updateModelValue(t.name, o) : u.updateModelValue(t.name, void 0);
528
+ set: (r) => {
529
+ t.sourceFormat ? r ? n.updateModelValue(t.name, G(r).format(l.value)) : n.updateModelValue(t.name, "") : r ? n.updateModelValue(t.name, r) : n.updateModelValue(t.name, void 0);
528
530
  }
529
531
  });
530
- return (o, h) => (p(), f(e(y), { span: e(s) }, {
532
+ return (r, m) => (p(), h(e(g), { span: e(i) }, {
531
533
  default: d(() => [
532
- b(e(g), {
533
- prop: o.name,
534
- label: o.label,
535
- "label-width": o.labelWidth,
536
- required: o.required,
537
- rules: e(i)
534
+ f(e(w), {
535
+ prop: r.name,
536
+ label: r.label,
537
+ "label-width": r.labelWidth,
538
+ required: r.required,
539
+ rules: e(u)
538
540
  }, {
539
541
  default: d(() => [
540
- r.value ? (p(), f(e(ge), {
542
+ o.value ? (p(), h(e(we), {
541
543
  key: 0,
542
- modelValue: n.value,
543
- "onUpdate:modelValue": h[0] || (h[0] = (w) => n.value = w),
544
- placeholder: o.placeholder,
545
- disabled: o.disabled,
546
- readonly: o.readonly,
547
- editable: o.editable,
548
- clearable: o.clearable,
544
+ modelValue: s.value,
545
+ "onUpdate:modelValue": m[0] || (m[0] = (c) => s.value = c),
546
+ placeholder: r.placeholder,
547
+ disabled: r.disabled,
548
+ readonly: r.readonly,
549
+ editable: r.editable,
550
+ clearable: r.clearable,
549
551
  format: l.value,
550
552
  "arrow-control": "",
551
553
  style: { width: "100%" }
552
- }, null, 8, ["modelValue", "placeholder", "disabled", "readonly", "editable", "clearable", "format"])) : (p(), f(e(we), {
554
+ }, null, 8, ["modelValue", "placeholder", "disabled", "readonly", "editable", "clearable", "format"])) : (p(), h(e(Ve), {
553
555
  key: 1,
554
- modelValue: n.value,
555
- "onUpdate:modelValue": h[1] || (h[1] = (w) => n.value = w),
556
- placeholder: o.placeholder,
557
- disabled: o.disabled,
558
- readonly: o.readonly,
559
- editable: o.editable,
560
- clearable: o.clearable,
556
+ modelValue: s.value,
557
+ "onUpdate:modelValue": m[1] || (m[1] = (c) => s.value = c),
558
+ placeholder: r.placeholder,
559
+ disabled: r.disabled,
560
+ readonly: r.readonly,
561
+ editable: r.editable,
562
+ clearable: r.clearable,
561
563
  type: a.value,
562
564
  format: l.value,
563
565
  style: { width: "100%" }
@@ -569,7 +571,7 @@ const Ce = /* @__PURE__ */ c({
569
571
  _: 1
570
572
  }, 8, ["span"]));
571
573
  }
572
- }), Ne = /* @__PURE__ */ c({
574
+ }), Pe = /* @__PURE__ */ y({
573
575
  name: "OFormFile",
574
576
  inheritAttrs: !1,
575
577
  __name: "FileInput",
@@ -583,31 +585,31 @@ const Ce = /* @__PURE__ */ c({
583
585
  disabled: { type: Boolean }
584
586
  },
585
587
  setup(t) {
586
- const s = v(), i = V(), r = z();
587
- ie(r, () => {
588
- r.value || (l.value = "");
588
+ const i = v(), u = V(), o = z();
589
+ ie(o, () => {
590
+ o.value || (l.value = "");
589
591
  });
590
592
  const l = P(""), a = Y("inputRef");
591
- return se(() => {
592
- a.value.input.onchange = (u) => {
593
- var n;
594
- r.value = (n = u == null ? void 0 : u.target) == null ? void 0 : n.files[0];
593
+ return pe(() => {
594
+ a.value.input.onchange = (n) => {
595
+ var s;
596
+ o.value = (s = n == null ? void 0 : n.target) == null ? void 0 : s.files[0];
595
597
  }, l.value = "";
596
- }), (u, n) => (p(), f(e(y), { span: e(s) }, {
598
+ }), (n, s) => (p(), h(e(g), { span: e(i) }, {
597
599
  default: d(() => [
598
- b(e(g), {
599
- prop: u.name,
600
- label: u.label,
601
- "label-width": u.labelWidth,
602
- required: u.required,
603
- rules: e(i)
600
+ f(e(w), {
601
+ prop: n.name,
602
+ label: n.label,
603
+ "label-width": n.labelWidth,
604
+ required: n.required,
605
+ rules: e(u)
604
606
  }, {
605
607
  default: d(() => [
606
- b(e(O), {
608
+ f(e(O), {
607
609
  ref: "inputRef",
608
610
  modelValue: l.value,
609
- "onUpdate:modelValue": n[0] || (n[0] = (o) => l.value = o),
610
- disabled: u.disabled,
611
+ "onUpdate:modelValue": s[0] || (s[0] = (r) => l.value = r),
612
+ disabled: n.disabled,
611
613
  type: "file",
612
614
  "validate-event": !1
613
615
  }, null, 8, ["modelValue", "disabled"])
@@ -618,7 +620,7 @@ const Ce = /* @__PURE__ */ c({
618
620
  _: 1
619
621
  }, 8, ["span"]));
620
622
  }
621
- }), Pe = /* @__PURE__ */ c({
623
+ }), Ye = /* @__PURE__ */ y({
622
624
  name: "OFormButtongroup",
623
625
  inheritAttrs: !1,
624
626
  __name: "ButtonGroup",
@@ -628,20 +630,20 @@ const Ce = /* @__PURE__ */ c({
628
630
  align: { default: "right" }
629
631
  },
630
632
  setup(t) {
631
- const s = F(() => ({
633
+ const i = F(() => ({
632
634
  textAlign: t.align
633
- })), i = v();
634
- return (r, l) => (p(), f(e(y), {
635
- span: e(i),
636
- style: pe(s.value)
635
+ })), u = v();
636
+ return (o, l) => (p(), h(e(g), {
637
+ span: e(u),
638
+ style: me(i.value)
637
639
  }, {
638
640
  default: d(() => [
639
- b(e(Fe), {
640
- gutter: r.gutter,
641
+ f(e(Fe), {
642
+ gutter: o.gutter,
641
643
  style: { "margin-bottom": "18px" }
642
644
  }, {
643
645
  default: d(() => [
644
- $(r.$slots, "default")
646
+ $(o.$slots, "default")
645
647
  ]),
646
648
  _: 3
647
649
  }, 8, ["gutter"])
@@ -649,7 +651,7 @@ const Ce = /* @__PURE__ */ c({
649
651
  _: 3
650
652
  }, 8, ["span", "style"]));
651
653
  }
652
- }), Ye = /* @__PURE__ */ c({
654
+ }), Ge = /* @__PURE__ */ y({
653
655
  name: "OFormDiy",
654
656
  inheritAttrs: !1,
655
657
  __name: "DiyItem",
@@ -662,18 +664,18 @@ const Ce = /* @__PURE__ */ c({
662
664
  rules: {}
663
665
  },
664
666
  setup(t) {
665
- const s = v(), i = V();
666
- return (r, l) => (p(), f(e(y), { span: e(s) }, {
667
+ const i = v(), u = V();
668
+ return (o, l) => (p(), h(e(g), { span: e(i) }, {
667
669
  default: d(() => [
668
- b(e(g), {
669
- prop: r.name,
670
- label: r.label,
671
- "label-width": r.labelWidth,
672
- required: r.required,
673
- rules: e(i)
670
+ f(e(w), {
671
+ prop: o.name,
672
+ label: o.label,
673
+ "label-width": o.labelWidth,
674
+ required: o.required,
675
+ rules: e(u)
674
676
  }, {
675
677
  default: d(() => [
676
- $(r.$slots, "default")
678
+ $(o.$slots, "default")
677
679
  ]),
678
680
  _: 3
679
681
  }, 8, ["prop", "label", "label-width", "required", "rules"])
@@ -681,7 +683,7 @@ const Ce = /* @__PURE__ */ c({
681
683
  _: 3
682
684
  }, 8, ["span"]));
683
685
  }
684
- }), Ge = /* @__PURE__ */ c({
686
+ }), Le = /* @__PURE__ */ y({
685
687
  name: "OFormLov",
686
688
  inheritAttrs: !1,
687
689
  __name: "LovInput",
@@ -699,77 +701,77 @@ const Ce = /* @__PURE__ */ c({
699
701
  fillMapping: { type: [String, Function] }
700
702
  },
701
703
  setup(t) {
702
- const s = v(), i = V(), r = z(), l = T(), a = P(!1), u = (m) => {
703
- a.value = m;
704
- }, n = P(!1), o = () => {
705
- var m;
706
- n.value || (n.value = !0), a.value || (m = N.value) == null || m.handleOpen();
704
+ const i = v(), u = V(), o = z(), l = T(), a = P(!1), n = (b) => {
705
+ a.value = b;
706
+ }, s = P(!1), r = () => {
707
+ var b;
708
+ s.value || (s.value = !0), a.value || (b = N.value) == null || b.handleOpen();
707
709
  };
708
- let h;
709
- const w = (m) => {
710
- h = m;
711
- }, W = (m) => {
712
- var M;
713
- ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight", "Enter", "Space"].indexOf(m.code) > -1 && (a.value && h && h(m.code), m.stopPropagation()), ["ArrowUp", "ArrowDown"].indexOf(m.code) > -1 && !a.value && ((M = N.value) == null || M.handleOpen());
714
- }, x = () => {
715
- if (n.value && A(t.fillMapping)) {
716
- const m = {}, q = t.fillMapping.split(",");
717
- for (let B = 0; B < q.length; B++) {
718
- const M = q[B].split(":")[0].trim();
719
- m[M] = void 0;
710
+ let m;
711
+ const c = (b) => {
712
+ m = b;
713
+ }, S = (b) => {
714
+ var C;
715
+ ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight", "Enter", "Space"].indexOf(b.code) > -1 && (a.value && m && m(b.code), b.stopPropagation()), ["ArrowUp", "ArrowDown"].indexOf(b.code) > -1 && !a.value && ((C = N.value) == null || C.handleOpen());
716
+ }, _ = () => {
717
+ if (s.value && A(t.fillMapping)) {
718
+ const b = {}, B = t.fillMapping.split(",");
719
+ for (let M = 0; M < B.length; M++) {
720
+ const C = B[M].split(":")[0].trim();
721
+ b[C] = void 0;
720
722
  }
721
- l.updateModelValueMulti(m);
723
+ l.updateModelValueMulti(b);
722
724
  }
723
725
  }, N = Y("dropdown");
724
726
  return L(
725
727
  ze,
726
728
  j({
727
- lovValue: r,
728
- backfill: (m) => {
729
- var q;
730
- if ((q = N.value) == null || q.handleClose(), A(t.fillMapping)) {
731
- const B = {}, M = t.fillMapping.split(",");
732
- for (let k = 0; k < M.length; k++) {
733
- const _ = M[k].split(":")[0].trim(), ee = M[k].split(":")[1].trim(), le = m[ee];
734
- B[_] = le;
729
+ lovValue: o,
730
+ backfill: (b) => {
731
+ var B;
732
+ if ((B = N.value) == null || B.handleClose(), A(t.fillMapping)) {
733
+ const M = {}, C = t.fillMapping.split(",");
734
+ for (let k = 0; k < C.length; k++) {
735
+ const ee = C[k].split(":")[0].trim(), le = C[k].split(":")[1].trim(), ae = b[le];
736
+ M[ee] = ae;
735
737
  }
736
- l.updateModelValueMulti(B);
738
+ l.updateModelValueMulti(M);
737
739
  } else
738
- t.fillMapping && t.fillMapping(m);
739
- n.value && (n.value = !1);
740
+ t.fillMapping && t.fillMapping(b);
741
+ s.value && (s.value = !1);
740
742
  },
741
- registerKeydownHandler: w
743
+ registerKeydownHandler: c
742
744
  })
743
- ), (m, q) => (p(), f(e(y), { span: e(s) }, {
745
+ ), (b, B) => (p(), h(e(g), { span: e(i) }, {
744
746
  default: d(() => [
745
- b(e(g), {
746
- prop: m.name,
747
- label: m.label,
748
- "label-width": m.labelWidth,
749
- required: m.required,
750
- rules: e(i)
747
+ f(e(w), {
748
+ prop: b.name,
749
+ label: b.label,
750
+ "label-width": b.labelWidth,
751
+ required: b.required,
752
+ rules: e(u)
751
753
  }, {
752
754
  default: d(() => [
753
- b(e(Ve), {
755
+ f(e(Se), {
754
756
  ref: "dropdown",
755
757
  trigger: "click",
756
- onVisibleChange: u,
758
+ onVisibleChange: n,
757
759
  style: { width: "100%" }
758
760
  }, {
759
761
  dropdown: d(() => [
760
- $(m.$slots, "default")
762
+ $(b.$slots, "default")
761
763
  ]),
762
764
  default: d(() => [
763
- b(e(O), {
764
- modelValue: e(r),
765
- "onUpdate:modelValue": q[0] || (q[0] = (B) => S(r) ? r.value = B : null),
766
- maxlength: m.maxlength,
767
- placeholder: m.placeholder,
768
- disabled: m.disabled,
769
- readonly: m.readonly,
770
- onInput: o,
771
- onKeydown: W,
772
- onChange: x,
765
+ f(e(O), {
766
+ modelValue: e(o),
767
+ "onUpdate:modelValue": B[0] || (B[0] = (M) => q(o) ? o.value = M : null),
768
+ maxlength: b.maxlength,
769
+ placeholder: b.placeholder,
770
+ disabled: b.disabled,
771
+ readonly: b.readonly,
772
+ onInput: r,
773
+ onKeydown: S,
774
+ onChange: _,
773
775
  "suffix-icon": e(Oe)
774
776
  }, null, 8, ["modelValue", "maxlength", "placeholder", "disabled", "readonly", "suffix-icon"])
775
777
  ]),
@@ -782,7 +784,7 @@ const Ce = /* @__PURE__ */ c({
782
784
  _: 3
783
785
  }, 8, ["span"]));
784
786
  }
785
- }), Le = /* @__PURE__ */ c({
787
+ }), je = /* @__PURE__ */ y({
786
788
  name: "OFormNumber",
787
789
  inheritAttrs: !1,
788
790
  __name: "NumberInput",
@@ -805,34 +807,34 @@ const Ce = /* @__PURE__ */ c({
805
807
  controlsPosition: {}
806
808
  },
807
809
  setup(t) {
808
- const s = v(), i = V(), r = T(), l = F({
810
+ const i = v(), u = V(), o = T(), l = F({
809
811
  get: () => {
810
- const a = r.modelValue[t.name];
812
+ const a = o.modelValue[t.name];
811
813
  if (a) {
812
- if (te(a))
814
+ if (ne(a))
813
815
  return a;
814
816
  if (A(a))
815
- return ne(a);
816
- throw new C("数字输入框的值只能为字符串或数字类型");
817
+ return de(a);
818
+ throw new W("数字输入框的值只能为字符串或数字类型");
817
819
  }
818
820
  },
819
821
  set: (a) => {
820
- a ? r.updateModelValue(t.name, a) : r.updateModelValue(t.name, void 0);
822
+ a ? o.updateModelValue(t.name, a) : o.updateModelValue(t.name, void 0);
821
823
  }
822
824
  });
823
- return (a, u) => (p(), f(e(y), { span: e(s) }, {
825
+ return (a, n) => (p(), h(e(g), { span: e(i) }, {
824
826
  default: d(() => [
825
- b(e(g), {
827
+ f(e(w), {
826
828
  prop: a.name,
827
829
  label: a.label,
828
830
  "label-width": a.labelWidth,
829
831
  required: a.required,
830
- rules: e(i)
832
+ rules: e(u)
831
833
  }, {
832
834
  default: d(() => [
833
- b(e(Se), {
835
+ f(e(qe), {
834
836
  modelValue: l.value,
835
- "onUpdate:modelValue": u[0] || (u[0] = (n) => l.value = n),
837
+ "onUpdate:modelValue": n[0] || (n[0] = (s) => l.value = s),
836
838
  placeholder: a.placeholder,
837
839
  disabled: a.disabled,
838
840
  readonly: a.readonly,
@@ -852,27 +854,27 @@ const Ce = /* @__PURE__ */ c({
852
854
  _: 1
853
855
  }, 8, ["span"]));
854
856
  }
855
- }), ol = me(Ce, {
856
- StringInput: We,
857
- PasswordInput: ke,
858
- Textarea: Re,
859
- SingleSelect: Ae,
860
- MultiSelect: $e,
861
- RadioGroup: De,
862
- CheckboxGroup: Ee,
863
- Checkbox: Ie,
864
- Switch: Ue,
865
- DateInput: Te,
866
- FileInput: Ne,
867
- ButtonGroup: Pe,
868
- DiyItem: Ye,
869
- LovInput: Ge,
870
- NumberInput: Le
857
+ }), rl = be(We, {
858
+ StringInput: ke,
859
+ PasswordInput: Re,
860
+ Textarea: Ae,
861
+ SingleSelect: $e,
862
+ MultiSelect: De,
863
+ RadioGroup: Ee,
864
+ CheckboxGroup: Ie,
865
+ Checkbox: Ue,
866
+ Switch: Te,
867
+ DateInput: Ne,
868
+ FileInput: Pe,
869
+ ButtonGroup: Ye,
870
+ DiyItem: Ge,
871
+ LovInput: Le,
872
+ NumberInput: je
871
873
  });
872
874
  export {
873
- ol as default,
874
- qe as formContextKey,
875
+ rl as default,
876
+ Be as formContextKey,
875
877
  ze as lovContextKey,
876
- nl as useLov
878
+ dl as useLov
877
879
  };
878
880
  //# sourceMappingURL=index.js.map