orion-design 0.1.27 → 0.1.29

Sign up to get free protection for your applications and to get access to all the features.
Files changed (31) hide show
  1. package/dist/components/Form/MultiSelect/MultiSelect.d.ts +2 -0
  2. package/dist/components/Form/index.js +255 -249
  3. package/dist/components/Form/index.js.map +1 -1
  4. package/dist/components/LovTable/LovPagetable.vue.d.ts +16 -0
  5. package/dist/components/LovTable/index.d.ts +8 -0
  6. package/dist/components/Pagetable/Pagetable.d.ts +7 -0
  7. package/dist/components/Pagetable/columns/PagetableColumnLink.d.ts +75 -0
  8. package/dist/components/Pagetable/hooks/useColumns.js +6 -6
  9. package/dist/components/Pagetable/hooks/useColumns.js.map +1 -1
  10. package/dist/components/Pagetable/index.d.ts +7 -0
  11. package/dist/components/Pagetable/index.js +297 -243
  12. package/dist/components/Pagetable/index.js.map +1 -1
  13. package/dist/components/Pagetable/interface.d.ts +1 -0
  14. package/dist/components/Querytable/columns/QuerytableColumnLink.d.ts +75 -0
  15. package/dist/components/Querytable/hooks/useColumns.js +6 -6
  16. package/dist/components/Querytable/hooks/useColumns.js.map +1 -1
  17. package/dist/components/Querytable/index.d.ts +2 -0
  18. package/dist/components/Querytable/index.js +227 -180
  19. package/dist/components/Querytable/index.js.map +1 -1
  20. package/dist/components/components.js +1 -1
  21. package/dist/components/index.js +2 -2
  22. package/dist/components-J6-qau6Y.js +73 -0
  23. package/dist/components-J6-qau6Y.js.map +1 -0
  24. package/dist/index.css +1 -1
  25. package/dist/index.js +1 -1
  26. package/dist/version/version.d.ts +1 -1
  27. package/dist/version/version.js +1 -1
  28. package/dist/version/version.js.map +1 -1
  29. package/package.json +1 -1
  30. package/dist/components-0PErqPHo.js +0 -72
  31. 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 G, provide as T, 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 Y, 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 w, 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 L, ElTimePicker as we, ElDatePicker as ge, 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 N, useFormItemBooleanModel as Z } from "./hooks/index.js";
8
- import { getSingleCodeContent as Me, getMultiCodeContent as Be } 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 o = i, l = (r, h) => {
25
+ setup(t, { expose: i, emit: u }) {
26
+ const o = u, l = (r, m) => {
27
27
  if (!Object.keys(t.modelValue).includes(r))
28
- throw new C(`modelValue中不存在[${r}]`);
29
- o("update:modelValue", { ...t.modelValue, [r]: h });
28
+ throw new W(`modelValue中不存在[${r}]`);
29
+ o("update:modelValue", { ...t.modelValue, [r]: m });
30
30
  }, a = (r) => {
31
- const h = Object.keys(t.modelValue), g = Object.keys(r), W = ae(g, h);
32
- if (!oe(W))
33
- throw new C(`modelValue中不存在[${W.join(",")}]`);
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
34
  o("update:modelValue", { ...t.modelValue, ...r });
35
- }, u = G("form");
36
- return s({
37
- validate: async () => await u.value.validate()
38
- }), T(
39
- qe,
35
+ }, n = Y("form");
36
+ return i({
37
+ validate: async () => await n.value.validate()
38
+ }), L(
39
+ Be,
40
40
  j({
41
41
  modelValue: R(() => t.modelValue),
42
42
  updateModelValue: l,
@@ -45,7 +45,7 @@ const Ce = /* @__PURE__ */ c({
45
45
  itemSpan: R(() => t.itemSpan),
46
46
  disabled: R(() => t.disabled)
47
47
  })
48
- ), (r, h) => (p(), f(e(be), {
48
+ ), (r, m) => (p(), h(e(fe), {
49
49
  ref: "form",
50
50
  model: r.modelValue,
51
51
  rules: r.rules,
@@ -53,7 +53,7 @@ const Ce = /* @__PURE__ */ c({
53
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
58
  $(r.$slots, "default")
59
59
  ]),
@@ -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(), o = 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(w), {
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), {
94
+ f(e(O), {
95
95
  modelValue: e(o),
96
- "onUpdate:modelValue": a[0] || (a[0] = (u) => S(o) ? o.value = u : null),
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(), o = 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(w), {
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), {
137
+ f(e(O), {
138
138
  modelValue: e(o),
139
- "onUpdate:modelValue": a[0] || (a[0] = (u) => S(o) ? o.value = u : null),
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(), o = 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(w), {
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), {
182
+ f(e(O), {
183
183
  modelValue: e(o),
184
- "onUpdate:modelValue": a[0] || (a[0] = (u) => S(o) ? o.value = u : null),
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(), o = Q(), l = U(), a = z(), u = F(() => Me(l.value, a.value));
219
- return (n, r) => (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(w), {
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(o) ? (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": r[0] || (r[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",
@@ -269,42 +270,47 @@ const Ce = /* @__PURE__ */ c({
269
270
  rules: {},
270
271
  placeholder: {},
271
272
  disabled: { type: Boolean },
272
- code: {}
273
+ code: {},
274
+ collapseTags: { type: Boolean },
275
+ collapseTagsTooltip: { type: Boolean }
273
276
  },
274
277
  setup(t) {
275
- const s = v(), i = V(), o = Q(), l = U(), a = X(), u = N(), n = F(() => Be(l.value, u.modelValue[t.name]));
276
- return (r, 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) }, {
277
280
  default: d(() => [
278
- b(e(w), {
279
- prop: r.name,
280
- label: r.label,
281
- "label-width": r.labelWidth,
282
- required: r.required,
283
- 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)
284
287
  }, {
285
288
  default: d(() => [
286
- e(o) ? (p(), f(e(O), {
289
+ e(l) ? (p(), h(e(O), {
287
290
  key: 0,
288
- "model-value": n.value,
289
- placeholder: r.placeholder,
291
+ "model-value": r.value,
292
+ placeholder: m.placeholder,
290
293
  disabled: !0,
291
294
  readonly: !0
292
- }, null, 8, ["model-value", "placeholder"])) : (p(), f(e(H), {
295
+ }, null, 8, ["model-value", "placeholder"])) : (p(), h(e(K), {
293
296
  key: 1,
294
- modelValue: e(a),
295
- "onUpdate:modelValue": h[0] || (h[0] = (g) => S(a) ? a.value = g : null),
296
- placeholder: r.placeholder,
297
- multiple: ""
297
+ modelValue: e(n),
298
+ "onUpdate:modelValue": c[0] || (c[0] = (S) => q(n) ? n.value = S : null),
299
+ placeholder: m.placeholder,
300
+ multiple: "",
301
+ "collapse-tags": m.collapseTags,
302
+ "collapse-tags-tooltip": m.collapseTagsTooltip,
303
+ onChange: e(i).onChange
298
304
  }, {
299
305
  default: d(() => [
300
- (p(!0), D(E, null, I(e(l), (g) => (p(), f(e(K), {
301
- key: g.value,
302
- label: g.content,
303
- value: g.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
304
310
  }, null, 8, ["label", "value"]))), 128))
305
311
  ]),
306
312
  _: 1
307
- }, 8, ["modelValue", "placeholder"]))
313
+ }, 8, ["modelValue", "placeholder", "collapse-tags", "collapse-tags-tooltip", "onChange"]))
308
314
  ]),
309
315
  _: 1
310
316
  }, 8, ["prop", "label", "label-width", "required", "rules"])
@@ -312,7 +318,7 @@ const Ce = /* @__PURE__ */ c({
312
318
  _: 1
313
319
  }, 8, ["span"]));
314
320
  }
315
- }), De = /* @__PURE__ */ c({
321
+ }), Ee = /* @__PURE__ */ y({
316
322
  name: "OFormRadiogroup",
317
323
  inheritAttrs: !1,
318
324
  __name: "RadioGroup",
@@ -327,29 +333,29 @@ const Ce = /* @__PURE__ */ c({
327
333
  code: {}
328
334
  },
329
335
  setup(t) {
330
- const s = v(), i = V(), o = U(), l = z();
331
- 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) }, {
332
338
  default: d(() => [
333
- b(e(w), {
339
+ f(e(w), {
334
340
  prop: a.name,
335
341
  label: a.label,
336
342
  "label-width": a.labelWidth,
337
343
  required: a.required,
338
- rules: e(i)
344
+ rules: e(u)
339
345
  }, {
340
346
  default: d(() => [
341
- b(e(he), {
347
+ f(e(ce), {
342
348
  modelValue: e(l),
343
- "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),
344
350
  disabled: a.disabled
345
351
  }, {
346
352
  default: d(() => [
347
- (p(!0), D(E, null, I(e(o), (n) => (p(), f(e(ce), {
348
- key: n.value,
349
- 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
350
356
  }, {
351
357
  default: d(() => [
352
- de(ue(n.content), 1)
358
+ ue(se(s.content), 1)
353
359
  ]),
354
360
  _: 2
355
361
  }, 1032, ["value"]))), 128))
@@ -363,7 +369,7 @@ const Ce = /* @__PURE__ */ c({
363
369
  _: 1
364
370
  }, 8, ["span"]));
365
371
  }
366
- }), Ee = /* @__PURE__ */ c({
372
+ }), Ie = /* @__PURE__ */ y({
367
373
  name: "OFormCheckboxgroup",
368
374
  inheritAttrs: !1,
369
375
  __name: "CheckboxGroup",
@@ -378,27 +384,27 @@ const Ce = /* @__PURE__ */ c({
378
384
  code: {}
379
385
  },
380
386
  setup(t) {
381
- const s = v(), i = V(), o = U(), l = X();
382
- 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) }, {
383
389
  default: d(() => [
384
- b(e(w), {
390
+ f(e(w), {
385
391
  prop: a.name,
386
392
  label: a.label,
387
393
  "label-width": a.labelWidth,
388
394
  required: a.required,
389
- rules: e(i)
395
+ rules: e(u)
390
396
  }, {
391
397
  default: d(() => [
392
- b(e(ye), {
398
+ f(e(ge), {
393
399
  modelValue: e(l),
394
- "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),
395
401
  disabled: a.disabled
396
402
  }, {
397
403
  default: d(() => [
398
- (p(!0), D(E, null, I(e(o), (n) => (p(), f(e(J), {
399
- key: n.value,
400
- label: n.content,
401
- 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
402
408
  }, null, 8, ["label", "value"]))), 128))
403
409
  ]),
404
410
  _: 1
@@ -410,7 +416,7 @@ const Ce = /* @__PURE__ */ c({
410
416
  _: 1
411
417
  }, 8, ["span"]));
412
418
  }
413
- }), Ie = /* @__PURE__ */ c({
419
+ }), Ue = /* @__PURE__ */ y({
414
420
  name: "OFormCheckbox",
415
421
  inheritAttrs: !1,
416
422
  __name: "Checkbox",
@@ -423,19 +429,19 @@ const Ce = /* @__PURE__ */ c({
423
429
  disabled: { type: Boolean }
424
430
  },
425
431
  setup(t) {
426
- const s = v(), i = Z();
427
- return (o, 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) }, {
428
434
  default: d(() => [
429
- b(e(w), {
435
+ f(e(w), {
430
436
  prop: o.name,
431
437
  label: o.label,
432
438
  "label-width": o.labelWidth,
433
439
  rules: o.rules
434
440
  }, {
435
441
  default: d(() => [
436
- b(e(J), {
437
- modelValue: e(i),
438
- "onUpdate:modelValue": l[0] || (l[0] = (a) => S(i) ? i.value = a : null),
442
+ f(e(Q), {
443
+ modelValue: e(u),
444
+ "onUpdate:modelValue": l[0] || (l[0] = (a) => q(u) ? u.value = a : null),
439
445
  disabled: o.disabled
440
446
  }, null, 8, ["modelValue", "disabled"])
441
447
  ]),
@@ -445,7 +451,7 @@ const Ce = /* @__PURE__ */ c({
445
451
  _: 1
446
452
  }, 8, ["span"]));
447
453
  }
448
- }), Ue = /* @__PURE__ */ c({
454
+ }), Te = /* @__PURE__ */ y({
449
455
  name: "OFormSwitch",
450
456
  inheritAttrs: !1,
451
457
  __name: "Switch",
@@ -458,19 +464,19 @@ const Ce = /* @__PURE__ */ c({
458
464
  disabled: { type: Boolean }
459
465
  },
460
466
  setup(t) {
461
- const s = v(), i = Z();
462
- return (o, 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) }, {
463
469
  default: d(() => [
464
- b(e(w), {
470
+ f(e(w), {
465
471
  prop: o.name,
466
472
  label: o.label,
467
473
  "label-width": o.labelWidth,
468
474
  rules: o.rules
469
475
  }, {
470
476
  default: d(() => [
471
- b(e(ve), {
472
- modelValue: e(i),
473
- "onUpdate:modelValue": l[0] || (l[0] = (a) => S(i) ? i.value = a : null),
477
+ f(e(ve), {
478
+ modelValue: e(u),
479
+ "onUpdate:modelValue": l[0] || (l[0] = (a) => q(u) ? u.value = a : null),
474
480
  disabled: o.disabled
475
481
  }, null, 8, ["modelValue", "disabled"])
476
482
  ]),
@@ -480,7 +486,7 @@ const Ce = /* @__PURE__ */ c({
480
486
  _: 1
481
487
  }, 8, ["span"]));
482
488
  }
483
- }), Ne = /* @__PURE__ */ c({
489
+ }), Ne = /* @__PURE__ */ y({
484
490
  name: "OFormDate",
485
491
  inheritAttrs: !1,
486
492
  __name: "DateInput",
@@ -501,42 +507,42 @@ const Ce = /* @__PURE__ */ c({
501
507
  sourceFormat: {}
502
508
  },
503
509
  setup(t) {
504
- const s = v(), i = 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(() => {
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(() => {
505
511
  let r = "date";
506
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;
507
- }), u = N(), n = F({
513
+ }), n = T(), s = F({
508
514
  get: () => {
509
- const r = u.modelValue[t.name];
515
+ const r = n.modelValue[t.name];
510
516
  if (r) {
511
- if (re(r))
517
+ if (te(r))
512
518
  return r;
513
519
  if (A(r)) {
514
- const h = L(r, l.value, !0);
515
- if (!h.isValid())
516
- throw new C(`日期输入框的值无效,不符合${l.value}格式`);
517
- return h.toDate();
520
+ const m = G(r, l.value, !0);
521
+ if (!m.isValid())
522
+ throw new W(`日期输入框的值无效,不符合${l.value}格式`);
523
+ return m.toDate();
518
524
  } else
519
- throw new C("日期输入框的值只能为字符串或日期类型");
525
+ throw new W("日期输入框的值只能为字符串或日期类型");
520
526
  }
521
527
  },
522
528
  set: (r) => {
523
- t.sourceFormat ? r ? u.updateModelValue(t.name, L(r).format(l.value)) : u.updateModelValue(t.name, "") : r ? u.updateModelValue(t.name, r) : u.updateModelValue(t.name, void 0);
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);
524
530
  }
525
531
  });
526
- return (r, h) => (p(), f(e(y), { span: e(s) }, {
532
+ return (r, m) => (p(), h(e(g), { span: e(i) }, {
527
533
  default: d(() => [
528
- b(e(w), {
534
+ f(e(w), {
529
535
  prop: r.name,
530
536
  label: r.label,
531
537
  "label-width": r.labelWidth,
532
538
  required: r.required,
533
- rules: e(i)
539
+ rules: e(u)
534
540
  }, {
535
541
  default: d(() => [
536
- o.value ? (p(), f(e(we), {
542
+ o.value ? (p(), h(e(we), {
537
543
  key: 0,
538
- modelValue: n.value,
539
- "onUpdate:modelValue": h[0] || (h[0] = (g) => n.value = g),
544
+ modelValue: s.value,
545
+ "onUpdate:modelValue": m[0] || (m[0] = (c) => s.value = c),
540
546
  placeholder: r.placeholder,
541
547
  disabled: r.disabled,
542
548
  readonly: r.readonly,
@@ -545,10 +551,10 @@ const Ce = /* @__PURE__ */ c({
545
551
  format: l.value,
546
552
  "arrow-control": "",
547
553
  style: { width: "100%" }
548
- }, null, 8, ["modelValue", "placeholder", "disabled", "readonly", "editable", "clearable", "format"])) : (p(), f(e(ge), {
554
+ }, null, 8, ["modelValue", "placeholder", "disabled", "readonly", "editable", "clearable", "format"])) : (p(), h(e(Ve), {
549
555
  key: 1,
550
- modelValue: n.value,
551
- "onUpdate:modelValue": h[1] || (h[1] = (g) => n.value = g),
556
+ modelValue: s.value,
557
+ "onUpdate:modelValue": m[1] || (m[1] = (c) => s.value = c),
552
558
  placeholder: r.placeholder,
553
559
  disabled: r.disabled,
554
560
  readonly: r.readonly,
@@ -565,7 +571,7 @@ const Ce = /* @__PURE__ */ c({
565
571
  _: 1
566
572
  }, 8, ["span"]));
567
573
  }
568
- }), Pe = /* @__PURE__ */ c({
574
+ }), Pe = /* @__PURE__ */ y({
569
575
  name: "OFormFile",
570
576
  inheritAttrs: !1,
571
577
  __name: "FileInput",
@@ -579,31 +585,31 @@ const Ce = /* @__PURE__ */ c({
579
585
  disabled: { type: Boolean }
580
586
  },
581
587
  setup(t) {
582
- const s = v(), i = V(), o = z();
588
+ const i = v(), u = V(), o = z();
583
589
  ie(o, () => {
584
590
  o.value || (l.value = "");
585
591
  });
586
- const l = Y(""), a = G("inputRef");
587
- return se(() => {
588
- a.value.input.onchange = (u) => {
589
- var n;
590
- o.value = (n = u == null ? void 0 : u.target) == null ? void 0 : n.files[0];
592
+ const l = P(""), a = Y("inputRef");
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];
591
597
  }, l.value = "";
592
- }), (u, n) => (p(), f(e(y), { span: e(s) }, {
598
+ }), (n, s) => (p(), h(e(g), { span: e(i) }, {
593
599
  default: d(() => [
594
- b(e(w), {
595
- prop: u.name,
596
- label: u.label,
597
- "label-width": u.labelWidth,
598
- required: u.required,
599
- 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)
600
606
  }, {
601
607
  default: d(() => [
602
- b(e(O), {
608
+ f(e(O), {
603
609
  ref: "inputRef",
604
610
  modelValue: l.value,
605
- "onUpdate:modelValue": n[0] || (n[0] = (r) => l.value = r),
606
- disabled: u.disabled,
611
+ "onUpdate:modelValue": s[0] || (s[0] = (r) => l.value = r),
612
+ disabled: n.disabled,
607
613
  type: "file",
608
614
  "validate-event": !1
609
615
  }, null, 8, ["modelValue", "disabled"])
@@ -614,7 +620,7 @@ const Ce = /* @__PURE__ */ c({
614
620
  _: 1
615
621
  }, 8, ["span"]));
616
622
  }
617
- }), Ye = /* @__PURE__ */ c({
623
+ }), Ye = /* @__PURE__ */ y({
618
624
  name: "OFormButtongroup",
619
625
  inheritAttrs: !1,
620
626
  __name: "ButtonGroup",
@@ -624,15 +630,15 @@ const Ce = /* @__PURE__ */ c({
624
630
  align: { default: "right" }
625
631
  },
626
632
  setup(t) {
627
- const s = F(() => ({
633
+ const i = F(() => ({
628
634
  textAlign: t.align
629
- })), i = v();
630
- return (o, l) => (p(), f(e(y), {
631
- span: e(i),
632
- style: pe(s.value)
635
+ })), u = v();
636
+ return (o, l) => (p(), h(e(g), {
637
+ span: e(u),
638
+ style: me(i.value)
633
639
  }, {
634
640
  default: d(() => [
635
- b(e(Fe), {
641
+ f(e(Fe), {
636
642
  gutter: o.gutter,
637
643
  style: { "margin-bottom": "18px" }
638
644
  }, {
@@ -645,7 +651,7 @@ const Ce = /* @__PURE__ */ c({
645
651
  _: 3
646
652
  }, 8, ["span", "style"]));
647
653
  }
648
- }), Ge = /* @__PURE__ */ c({
654
+ }), Ge = /* @__PURE__ */ y({
649
655
  name: "OFormDiy",
650
656
  inheritAttrs: !1,
651
657
  __name: "DiyItem",
@@ -658,15 +664,15 @@ const Ce = /* @__PURE__ */ c({
658
664
  rules: {}
659
665
  },
660
666
  setup(t) {
661
- const s = v(), i = V();
662
- return (o, 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) }, {
663
669
  default: d(() => [
664
- b(e(w), {
670
+ f(e(w), {
665
671
  prop: o.name,
666
672
  label: o.label,
667
673
  "label-width": o.labelWidth,
668
674
  required: o.required,
669
- rules: e(i)
675
+ rules: e(u)
670
676
  }, {
671
677
  default: d(() => [
672
678
  $(o.$slots, "default")
@@ -677,7 +683,7 @@ const Ce = /* @__PURE__ */ c({
677
683
  _: 3
678
684
  }, 8, ["span"]));
679
685
  }
680
- }), Le = /* @__PURE__ */ c({
686
+ }), Le = /* @__PURE__ */ y({
681
687
  name: "OFormLov",
682
688
  inheritAttrs: !1,
683
689
  __name: "LovInput",
@@ -695,77 +701,77 @@ const Ce = /* @__PURE__ */ c({
695
701
  fillMapping: { type: [String, Function] }
696
702
  },
697
703
  setup(t) {
698
- const s = v(), i = V(), o = z(), l = N(), a = Y(!1), u = (m) => {
699
- a.value = m;
700
- }, n = Y(!1), r = () => {
701
- var m;
702
- n.value || (n.value = !0), a.value || (m = P.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();
703
709
  };
704
- let h;
705
- const g = (m) => {
706
- h = m;
707
- }, W = (m) => {
708
- var B;
709
- ["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 && ((B = P.value) == null || B.handleOpen());
710
- }, x = () => {
711
- if (n.value && A(t.fillMapping)) {
712
- const m = {}, q = t.fillMapping.split(",");
713
- for (let M = 0; M < q.length; M++) {
714
- const B = q[M].split(":")[0].trim();
715
- m[B] = 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;
716
722
  }
717
- l.updateModelValueMulti(m);
723
+ l.updateModelValueMulti(b);
718
724
  }
719
- }, P = G("dropdown");
720
- return T(
725
+ }, N = Y("dropdown");
726
+ return L(
721
727
  ze,
722
728
  j({
723
729
  lovValue: o,
724
- backfill: (m) => {
725
- var q;
726
- if ((q = P.value) == null || q.handleClose(), A(t.fillMapping)) {
727
- const M = {}, B = t.fillMapping.split(",");
728
- for (let k = 0; k < B.length; k++) {
729
- const _ = B[k].split(":")[0].trim(), ee = B[k].split(":")[1].trim(), le = m[ee];
730
- M[_] = le;
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;
731
737
  }
732
738
  l.updateModelValueMulti(M);
733
739
  } else
734
- t.fillMapping && t.fillMapping(m);
735
- n.value && (n.value = !1);
740
+ t.fillMapping && t.fillMapping(b);
741
+ s.value && (s.value = !1);
736
742
  },
737
- registerKeydownHandler: g
743
+ registerKeydownHandler: c
738
744
  })
739
- ), (m, q) => (p(), f(e(y), { span: e(s) }, {
745
+ ), (b, B) => (p(), h(e(g), { span: e(i) }, {
740
746
  default: d(() => [
741
- b(e(w), {
742
- prop: m.name,
743
- label: m.label,
744
- "label-width": m.labelWidth,
745
- required: m.required,
746
- 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)
747
753
  }, {
748
754
  default: d(() => [
749
- b(e(Ve), {
755
+ f(e(Se), {
750
756
  ref: "dropdown",
751
757
  trigger: "click",
752
- onVisibleChange: u,
758
+ onVisibleChange: n,
753
759
  style: { width: "100%" }
754
760
  }, {
755
761
  dropdown: d(() => [
756
- $(m.$slots, "default")
762
+ $(b.$slots, "default")
757
763
  ]),
758
764
  default: d(() => [
759
- b(e(O), {
765
+ f(e(O), {
760
766
  modelValue: e(o),
761
- "onUpdate:modelValue": q[0] || (q[0] = (M) => S(o) ? o.value = M : null),
762
- maxlength: m.maxlength,
763
- placeholder: m.placeholder,
764
- disabled: m.disabled,
765
- readonly: m.readonly,
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,
766
772
  onInput: r,
767
- onKeydown: W,
768
- onChange: x,
773
+ onKeydown: S,
774
+ onChange: _,
769
775
  "suffix-icon": e(Oe)
770
776
  }, null, 8, ["modelValue", "maxlength", "placeholder", "disabled", "readonly", "suffix-icon"])
771
777
  ]),
@@ -778,7 +784,7 @@ const Ce = /* @__PURE__ */ c({
778
784
  _: 3
779
785
  }, 8, ["span"]));
780
786
  }
781
- }), Te = /* @__PURE__ */ c({
787
+ }), je = /* @__PURE__ */ y({
782
788
  name: "OFormNumber",
783
789
  inheritAttrs: !1,
784
790
  __name: "NumberInput",
@@ -801,34 +807,34 @@ const Ce = /* @__PURE__ */ c({
801
807
  controlsPosition: {}
802
808
  },
803
809
  setup(t) {
804
- const s = v(), i = V(), o = N(), l = F({
810
+ const i = v(), u = V(), o = T(), l = F({
805
811
  get: () => {
806
812
  const a = o.modelValue[t.name];
807
813
  if (a) {
808
- if (te(a))
814
+ if (ne(a))
809
815
  return a;
810
816
  if (A(a))
811
- return ne(a);
812
- throw new C("数字输入框的值只能为字符串或数字类型");
817
+ return de(a);
818
+ throw new W("数字输入框的值只能为字符串或数字类型");
813
819
  }
814
820
  },
815
821
  set: (a) => {
816
822
  a ? o.updateModelValue(t.name, a) : o.updateModelValue(t.name, void 0);
817
823
  }
818
824
  });
819
- return (a, u) => (p(), f(e(y), { span: e(s) }, {
825
+ return (a, n) => (p(), h(e(g), { span: e(i) }, {
820
826
  default: d(() => [
821
- b(e(w), {
827
+ f(e(w), {
822
828
  prop: a.name,
823
829
  label: a.label,
824
830
  "label-width": a.labelWidth,
825
831
  required: a.required,
826
- rules: e(i)
832
+ rules: e(u)
827
833
  }, {
828
834
  default: d(() => [
829
- b(e(Se), {
835
+ f(e(qe), {
830
836
  modelValue: l.value,
831
- "onUpdate:modelValue": u[0] || (u[0] = (n) => l.value = n),
837
+ "onUpdate:modelValue": n[0] || (n[0] = (s) => l.value = s),
832
838
  placeholder: a.placeholder,
833
839
  disabled: a.disabled,
834
840
  readonly: a.readonly,
@@ -848,27 +854,27 @@ const Ce = /* @__PURE__ */ c({
848
854
  _: 1
849
855
  }, 8, ["span"]));
850
856
  }
851
- }), ol = me(Ce, {
852
- StringInput: We,
853
- PasswordInput: ke,
854
- Textarea: Re,
855
- SingleSelect: Ae,
856
- MultiSelect: $e,
857
- RadioGroup: De,
858
- CheckboxGroup: Ee,
859
- Checkbox: Ie,
860
- Switch: Ue,
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,
861
867
  DateInput: Ne,
862
868
  FileInput: Pe,
863
869
  ButtonGroup: Ye,
864
870
  DiyItem: Ge,
865
871
  LovInput: Le,
866
- NumberInput: Te
872
+ NumberInput: je
867
873
  });
868
874
  export {
869
- ol as default,
870
- qe as formContextKey,
875
+ rl as default,
876
+ Be as formContextKey,
871
877
  ze as lovContextKey,
872
- nl as useLov
878
+ dl as useLov
873
879
  };
874
880
  //# sourceMappingURL=index.js.map