orion-design 0.1.14 → 0.1.16

Sign up to get free protection for your applications and to get access to all the features.
Files changed (80) hide show
  1. package/dist/components/Form/FileInput/FileInput.vue.d.ts +2 -2
  2. package/dist/components/Form/LovInput/LovInput.d.ts +2 -0
  3. package/dist/components/Form/LovInput/LovInput.js.map +1 -1
  4. package/dist/components/Form/index.js +320 -318
  5. package/dist/components/Form/index.js.map +1 -1
  6. package/dist/components/LovTable/LovPagetable.vue.d.ts +16 -0
  7. package/dist/components/LovTable/LovQuerytable.vue.d.ts +16 -0
  8. package/dist/components/LovTable/index.d.ts +35 -3
  9. package/dist/components/LovTable/index.js +40 -42
  10. package/dist/components/LovTable/index.js.map +1 -1
  11. package/dist/components/Tabs/constants.d.ts +19 -0
  12. package/dist/components/Tabs/constants.js +5 -0
  13. package/dist/components/Tabs/constants.js.map +1 -0
  14. package/dist/components/Tabs/index.d.ts +74 -0
  15. package/dist/components/Tabs/index.js +367 -0
  16. package/dist/components/Tabs/index.js.map +1 -0
  17. package/dist/components/Tabs/tab-bar.d.ts +59 -0
  18. package/dist/components/Tabs/tab-bar.js +15 -0
  19. package/dist/components/Tabs/tab-bar.js.map +1 -0
  20. package/dist/components/Tabs/tab-bar.vue.d.ts +131 -0
  21. package/dist/components/Tabs/tab-nav.d.ts +237 -0
  22. package/dist/components/Tabs/tab-pane.d.ts +16 -0
  23. package/dist/components/Tabs/tab-pane.js +35 -0
  24. package/dist/components/Tabs/tab-pane.js.map +1 -0
  25. package/dist/components/Tabs/tab-pane.vue.d.ts +43 -0
  26. package/dist/components/Tabs/tabs.d.ts +101 -0
  27. package/dist/components/_constants/aria.d.ts +17 -0
  28. package/dist/components/_constants/aria.js +25 -0
  29. package/dist/components/_constants/aria.js.map +1 -0
  30. package/dist/components/_constants/event.d.ts +3 -0
  31. package/dist/components/_constants/event.js +7 -0
  32. package/dist/components/_constants/event.js.map +1 -0
  33. package/dist/components/_constants/index.d.ts +2 -0
  34. package/dist/components/_constants/index.js +9 -0
  35. package/dist/components/_constants/index.js.map +1 -0
  36. package/dist/components/_hooks/index.d.ts +2 -0
  37. package/dist/components/_hooks/index.js +10 -0
  38. package/dist/components/_hooks/index.js.map +1 -0
  39. package/dist/components/_hooks/use-namespace/index.d.ts +23 -0
  40. package/dist/components/_hooks/use-namespace/index.js +46 -0
  41. package/dist/components/_hooks/use-namespace/index.js.map +1 -0
  42. package/dist/components/_hooks/use-ordered-children/index.d.ts +8 -0
  43. package/dist/components/_hooks/use-ordered-children/index.js +27 -0
  44. package/dist/components/_hooks/use-ordered-children/index.js.map +1 -0
  45. package/dist/components/_util/browser.js +2 -2
  46. package/dist/components/_util/dom/element.js +1 -1
  47. package/dist/components/_util/dom/position.js +1 -1
  48. package/dist/components/_util/dom/scroll.js +1 -1
  49. package/dist/components/_util/dom/style.js +1 -1
  50. package/dist/components/_util/index.js +1 -1
  51. package/dist/components/_util/raf.js +1 -1
  52. package/dist/components/_util/vue/global-node.js +1 -1
  53. package/dist/components/_util/vue/icon.js +24 -146
  54. package/dist/components/_util/vue/icon.js.map +1 -1
  55. package/dist/components/components.d.ts +2 -2
  56. package/dist/components/components.js +16 -22
  57. package/dist/components/components.js.map +1 -1
  58. package/dist/components/index.d.ts +2 -0
  59. package/dist/components/index.js +29 -27
  60. package/dist/components/index.js.map +1 -1
  61. package/dist/components-0PErqPHo.js +72 -0
  62. package/dist/{components-1bMIJYPN.js.map → components-0PErqPHo.js.map} +1 -1
  63. package/dist/index-BwWeqwHB.js +164 -0
  64. package/dist/index-BwWeqwHB.js.map +1 -0
  65. package/dist/index-DG_8kbAs.js +45 -0
  66. package/dist/{index-C8JNJPWW.js.map → index-DG_8kbAs.js.map} +1 -1
  67. package/dist/index-DLvlyWAh.js +127 -0
  68. package/dist/index-DLvlyWAh.js.map +1 -0
  69. package/dist/index.css +1 -1
  70. package/dist/index.js +21 -19
  71. package/dist/index.js.map +1 -1
  72. package/dist/version/version.d.ts +1 -1
  73. package/dist/version/version.js +1 -1
  74. package/dist/version/version.js.map +1 -1
  75. package/global.d.ts +6 -1
  76. package/package.json +3 -1
  77. package/dist/components/LovTable/LovPagetable.d.ts +0 -2
  78. package/dist/components/LovTable/LovQuerytable.d.ts +0 -2
  79. package/dist/components-1bMIJYPN.js +0 -78
  80. package/dist/index-C8JNJPWW.js +0 -8
@@ -1,15 +1,15 @@
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";
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";
5
- import { formContextKey as fe } from "./Form.js";
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";
8
- import { getSingleCodeContent as he, getMultiCodeContent as ce } from "./utils/index.js";
9
- import { S as ye } from "../../index-BbsXWo7C.js";
10
- import { lovContextKey as ve } from "./LovInput/LovInput.js";
11
- import { default as Ke } from "./LovInput/hooks/useLov.js";
12
- const Ve = /* @__PURE__ */ c({
1
+ import { difference as x, isEmpty as _, isDate as ee, isString as I } from "lodash-es";
2
+ import { defineComponent as c, useTemplateRef as U, provide as L, reactive as T, toRef as W, openBlock as m, createBlock as p, unref as e, withCtx as n, createVNode as b, renderSlot as R, isRef as S, computed as B, createElementBlock as $, Fragment as A, renderList as D, createTextVNode as le, toDisplayString as ae, watch as oe, ref as re, onMounted as te, normalizeStyle as ne } from "vue";
3
+ import { withInstall as de } from "../_util/vue/install.js";
4
+ import { ElForm as ue, ElRow as ie, ElCol as y, ElFormItem as w, ElInput as F, ElSelect as j, ElOption as P, ElRadioGroup as se, ElRadio as me, ElCheckboxGroup as pe, ElCheckbox as H, ElSwitch as be, dayjs as G, ElTimePicker as fe, ElDatePicker as he, ElDropdown as ce } from "element-plus";
5
+ import { formContextKey as ye } from "./Form.js";
6
+ import C from "../../error/OrionError.js";
7
+ import { useFormItemSpan as v, useFormItemRules as g, useFormItemStringModel as z, useFormItemDisabled as K, useFormItemCode as E, useFormItemMultiModel as N, useFormContext as Y, useFormItemBooleanModel as J } from "./hooks/index.js";
8
+ import { getSingleCodeContent as ve, getMultiCodeContent as we } from "./utils/index.js";
9
+ import { S as Ve } from "../../index-BbsXWo7C.js";
10
+ import { lovContextKey as ge } from "./LovInput/LovInput.js";
11
+ import { default as Xe } from "./LovInput/hooks/useLov.js";
12
+ const Se = /* @__PURE__ */ c({
13
13
  name: "OForm",
14
14
  inheritAttrs: !1,
15
15
  __name: "Form",
@@ -21,40 +21,40 @@ const Ve = /* @__PURE__ */ c({
21
21
  modelValue: {}
22
22
  },
23
23
  emits: ["update:modelValue"],
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");
35
- return m({
24
+ setup(r, { expose: s, emit: i }) {
25
+ const o = i, l = (a, h) => {
26
+ if (!Object.keys(r.modelValue).includes(a))
27
+ throw new C(`modelValue中不存在[${a}]`);
28
+ o("update:modelValue", { ...r.modelValue, [a]: h });
29
+ }, t = (a) => {
30
+ const h = Object.keys(r.modelValue), V = Object.keys(a), f = x(V, h);
31
+ if (!_(f))
32
+ throw new C(`modelValue中不存在[${f.join(",")}]`);
33
+ o("update:modelValue", { ...r.modelValue, ...a });
34
+ }, u = U("form");
35
+ return s({
36
36
  validate: async () => await u.value.validate()
37
- }), U(
38
- fe,
37
+ }), L(
38
+ ye,
39
39
  T({
40
- modelValue: z(() => r.modelValue),
40
+ modelValue: W(() => r.modelValue),
41
41
  updateModelValue: l,
42
- updateModelValueMulti: n,
43
- rules: z(() => r.rules),
44
- itemSpan: z(() => r.itemSpan),
45
- disabled: z(() => r.disabled)
42
+ updateModelValueMulti: t,
43
+ rules: W(() => r.rules),
44
+ itemSpan: W(() => r.itemSpan),
45
+ disabled: W(() => r.disabled)
46
46
  })
47
- ), (t, o) => (p(), b(e(te), {
47
+ ), (a, h) => (m(), p(e(ue), {
48
48
  ref: "form",
49
- model: t.modelValue,
50
- rules: t.rules,
51
- "label-width": t.itemLabelWidth,
52
- disabled: t.disabled
49
+ model: a.modelValue,
50
+ rules: a.rules,
51
+ "label-width": a.itemLabelWidth,
52
+ disabled: a.disabled
53
53
  }, {
54
- default: d(() => [
55
- f(e(ne), { gutter: 16 }, {
56
- default: d(() => [
57
- O(t.$slots, "default")
54
+ default: n(() => [
55
+ b(e(ie), { gutter: 16 }, {
56
+ default: n(() => [
57
+ R(a.$slots, "default")
58
58
  ]),
59
59
  _: 3
60
60
  })
@@ -62,7 +62,7 @@ const Ve = /* @__PURE__ */ c({
62
62
  _: 3
63
63
  }, 8, ["model", "rules", "label-width", "disabled"]));
64
64
  }
65
- }), ge = /* @__PURE__ */ c({
65
+ }), qe = /* @__PURE__ */ c({
66
66
  name: "OFormString",
67
67
  inheritAttrs: !1,
68
68
  __name: "StringInput",
@@ -79,20 +79,20 @@ 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(() => [
85
- f(e(V), {
82
+ const s = v(), i = g(), o = z();
83
+ return (l, t) => (m(), p(e(y), { span: e(s) }, {
84
+ default: n(() => [
85
+ b(e(w), {
86
86
  prop: l.name,
87
87
  label: l.label,
88
88
  "label-width": l.labelWidth,
89
89
  required: l.required,
90
90
  rules: e(i)
91
91
  }, {
92
- default: d(() => [
93
- f(e(M), {
94
- modelValue: e(a),
95
- "onUpdate:modelValue": n[0] || (n[0] = (u) => S(a) ? a.value = u : null),
92
+ default: n(() => [
93
+ b(e(F), {
94
+ modelValue: e(o),
95
+ "onUpdate:modelValue": t[0] || (t[0] = (u) => S(o) ? o.value = u : null),
96
96
  maxlength: l.maxlength,
97
97
  placeholder: l.placeholder,
98
98
  disabled: l.disabled,
@@ -105,7 +105,7 @@ const Ve = /* @__PURE__ */ c({
105
105
  _: 1
106
106
  }, 8, ["span"]));
107
107
  }
108
- }), we = /* @__PURE__ */ c({
108
+ }), Me = /* @__PURE__ */ c({
109
109
  name: "OFormPassword",
110
110
  inheritAttrs: !1,
111
111
  __name: "PasswordInput",
@@ -122,20 +122,20 @@ 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(() => [
128
- f(e(V), {
125
+ const s = v(), i = g(), o = z();
126
+ return (l, t) => (m(), p(e(y), { span: e(s) }, {
127
+ default: n(() => [
128
+ b(e(w), {
129
129
  prop: l.name,
130
130
  label: l.label,
131
131
  "label-width": l.labelWidth,
132
132
  required: l.required,
133
133
  rules: e(i)
134
134
  }, {
135
- default: d(() => [
136
- f(e(M), {
137
- modelValue: e(a),
138
- "onUpdate:modelValue": n[0] || (n[0] = (u) => S(a) ? a.value = u : null),
135
+ default: n(() => [
136
+ b(e(F), {
137
+ modelValue: e(o),
138
+ "onUpdate:modelValue": t[0] || (t[0] = (u) => S(o) ? o.value = u : null),
139
139
  maxlength: l.maxlength,
140
140
  placeholder: l.placeholder,
141
141
  disabled: l.disabled,
@@ -149,7 +149,7 @@ const Ve = /* @__PURE__ */ c({
149
149
  _: 1
150
150
  }, 8, ["span"]));
151
151
  }
152
- }), Se = /* @__PURE__ */ c({
152
+ }), Be = /* @__PURE__ */ c({
153
153
  name: "OFormTextarea",
154
154
  inheritAttrs: !1,
155
155
  __name: "Textarea",
@@ -167,20 +167,20 @@ 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(() => [
173
- f(e(V), {
170
+ const s = v(), i = g(), o = z();
171
+ return (l, t) => (m(), p(e(y), { span: e(s) }, {
172
+ default: n(() => [
173
+ b(e(w), {
174
174
  prop: l.name,
175
175
  label: l.label,
176
176
  "label-width": l.labelWidth,
177
177
  required: l.required,
178
178
  rules: e(i)
179
179
  }, {
180
- default: d(() => [
181
- f(e(M), {
182
- modelValue: e(a),
183
- "onUpdate:modelValue": n[0] || (n[0] = (u) => S(a) ? a.value = u : null),
180
+ default: n(() => [
181
+ b(e(F), {
182
+ modelValue: e(o),
183
+ "onUpdate:modelValue": t[0] || (t[0] = (u) => S(o) ? o.value = u : null),
184
184
  maxlength: l.maxlength,
185
185
  placeholder: l.placeholder,
186
186
  disabled: l.disabled,
@@ -196,7 +196,7 @@ const Ve = /* @__PURE__ */ c({
196
196
  _: 1
197
197
  }, 8, ["span"]));
198
198
  }
199
- }), qe = /* @__PURE__ */ c({
199
+ }), Fe = /* @__PURE__ */ c({
200
200
  name: "OFormSingleselect",
201
201
  inheritAttrs: !1,
202
202
  __name: "SingleSelect",
@@ -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(() => [
220
- f(e(V), {
221
- prop: s.name,
222
- label: s.label,
223
- "label-width": s.labelWidth,
224
- required: s.required,
217
+ const s = v(), i = g(), o = K(), l = E(), t = z(), u = B(() => ve(l.value, t.value));
218
+ return (d, a) => (m(), p(e(y), { span: e(s) }, {
219
+ default: n(() => [
220
+ b(e(w), {
221
+ prop: d.name,
222
+ label: d.label,
223
+ "label-width": d.labelWidth,
224
+ required: d.required,
225
225
  rules: e(i)
226
226
  }, {
227
- default: d(() => [
228
- e(a) ? (p(), b(e(M), {
227
+ default: n(() => [
228
+ e(o) ? (m(), p(e(F), {
229
229
  key: 0,
230
230
  "model-value": u.value,
231
- placeholder: s.placeholder,
231
+ placeholder: d.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"])) : (m(), p(e(j), {
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": a[0] || (a[0] = (h) => S(t) ? t.value = h : null),
238
+ placeholder: d.placeholder,
239
+ clearable: d.clearable,
240
+ filterable: d.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
+ (m(!0), $(A, null, D(e(l), (h) => (m(), p(e(P), {
244
+ key: h.value,
245
+ label: h.content,
246
+ value: h.value
247
247
  }, null, 8, ["label", "value"]))), 128))
248
248
  ]),
249
249
  _: 1
@@ -255,7 +255,7 @@ const Ve = /* @__PURE__ */ c({
255
255
  _: 1
256
256
  }, 8, ["span"]));
257
257
  }
258
- }), Me = /* @__PURE__ */ c({
258
+ }), ze = /* @__PURE__ */ c({
259
259
  name: "OFormMultiselect",
260
260
  inheritAttrs: !1,
261
261
  __name: "MultiSelect",
@@ -271,35 +271,35 @@ 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(() => [
277
- f(e(V), {
278
- prop: t.name,
279
- label: t.label,
280
- "label-width": t.labelWidth,
281
- required: t.required,
274
+ const s = v(), i = g(), o = K(), l = E(), t = N(), u = Y(), d = B(() => we(l.value, u.modelValue[r.name]));
275
+ return (a, h) => (m(), p(e(y), { span: e(s) }, {
276
+ default: n(() => [
277
+ b(e(w), {
278
+ prop: a.name,
279
+ label: a.label,
280
+ "label-width": a.labelWidth,
281
+ required: a.required,
282
282
  rules: e(i)
283
283
  }, {
284
- default: d(() => [
285
- e(a) ? (p(), b(e(M), {
284
+ default: n(() => [
285
+ e(o) ? (m(), p(e(F), {
286
286
  key: 0,
287
- "model-value": s.value,
288
- placeholder: t.placeholder,
287
+ "model-value": d.value,
288
+ placeholder: a.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"])) : (m(), p(e(j), {
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": h[0] || (h[0] = (V) => S(t) ? t.value = V : null),
295
+ placeholder: a.placeholder,
296
296
  multiple: ""
297
297
  }, {
298
- default: d(() => [
299
- (p(!0), W(C, null, R(e(l), (h) => (p(), b(e(G), {
300
- key: h.value,
301
- label: h.content,
302
- value: h.value
298
+ default: n(() => [
299
+ (m(!0), $(A, null, D(e(l), (V) => (m(), p(e(P), {
300
+ key: V.value,
301
+ label: V.content,
302
+ value: V.value
303
303
  }, null, 8, ["label", "value"]))), 128))
304
304
  ]),
305
305
  _: 1
@@ -311,7 +311,7 @@ const Ve = /* @__PURE__ */ c({
311
311
  _: 1
312
312
  }, 8, ["span"]));
313
313
  }
314
- }), Be = /* @__PURE__ */ c({
314
+ }), ke = /* @__PURE__ */ c({
315
315
  name: "OFormRadiogroup",
316
316
  inheritAttrs: !1,
317
317
  __name: "RadioGroup",
@@ -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(() => [
332
- f(e(V), {
333
- prop: n.name,
334
- label: n.label,
335
- "label-width": n.labelWidth,
336
- required: n.required,
329
+ const s = v(), i = g(), o = E(), l = z();
330
+ return (t, u) => (m(), p(e(y), { span: e(s) }, {
331
+ default: n(() => [
332
+ b(e(w), {
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(() => [
340
- f(e(de), {
339
+ default: n(() => [
340
+ b(e(se), {
341
341
  modelValue: e(l),
342
- "onUpdate:modelValue": u[0] || (u[0] = (s) => S(l) ? l.value = s : null),
343
- disabled: n.disabled
342
+ "onUpdate:modelValue": u[0] || (u[0] = (d) => S(l) ? l.value = d : 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
+ (m(!0), $(A, null, D(e(o), (d) => (m(), p(e(me), {
347
+ key: d.value,
348
+ value: d.value
349
349
  }, {
350
- default: d(() => [
351
- x(_(s.content), 1)
350
+ default: n(() => [
351
+ le(ae(d.content), 1)
352
352
  ]),
353
353
  _: 2
354
354
  }, 1032, ["value"]))), 128))
@@ -362,7 +362,7 @@ const Ve = /* @__PURE__ */ c({
362
362
  _: 1
363
363
  }, 8, ["span"]));
364
364
  }
365
- }), Fe = /* @__PURE__ */ c({
365
+ }), Oe = /* @__PURE__ */ c({
366
366
  name: "OFormCheckboxgroup",
367
367
  inheritAttrs: !1,
368
368
  __name: "CheckboxGroup",
@@ -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(() => [
383
- f(e(V), {
384
- prop: n.name,
385
- label: n.label,
386
- "label-width": n.labelWidth,
387
- required: n.required,
380
+ const s = v(), i = g(), o = E(), l = N();
381
+ return (t, u) => (m(), p(e(y), { span: e(s) }, {
382
+ default: n(() => [
383
+ b(e(w), {
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(() => [
391
- f(e(ie), {
390
+ default: n(() => [
391
+ b(e(pe), {
392
392
  modelValue: e(l),
393
- "onUpdate:modelValue": u[0] || (u[0] = (s) => S(l) ? l.value = s : null),
394
- disabled: n.disabled
393
+ "onUpdate:modelValue": u[0] || (u[0] = (d) => S(l) ? l.value = d : 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
+ (m(!0), $(A, null, D(e(o), (d) => (m(), p(e(H), {
398
+ key: d.value,
399
+ label: d.content,
400
+ value: d.value
401
401
  }, null, 8, ["label", "value"]))), 128))
402
402
  ]),
403
403
  _: 1
@@ -409,7 +409,7 @@ const Ve = /* @__PURE__ */ c({
409
409
  _: 1
410
410
  }, 8, ["span"]));
411
411
  }
412
- }), ze = /* @__PURE__ */ c({
412
+ }), We = /* @__PURE__ */ c({
413
413
  name: "OFormCheckbox",
414
414
  inheritAttrs: !1,
415
415
  __name: "Checkbox",
@@ -422,20 +422,20 @@ const Ve = /* @__PURE__ */ c({
422
422
  disabled: { type: Boolean }
423
423
  },
424
424
  setup(r) {
425
- const m = v(), i = N();
426
- return (a, l) => (p(), b(e(y), { span: e(m) }, {
427
- default: d(() => [
428
- f(e(V), {
429
- prop: a.name,
430
- label: a.label,
431
- "label-width": a.labelWidth,
432
- rules: a.rules
425
+ const s = v(), i = J();
426
+ return (o, l) => (m(), p(e(y), { span: e(s) }, {
427
+ default: n(() => [
428
+ b(e(w), {
429
+ prop: o.name,
430
+ label: o.label,
431
+ "label-width": o.labelWidth,
432
+ rules: o.rules
433
433
  }, {
434
- default: d(() => [
435
- f(e(j), {
434
+ default: n(() => [
435
+ b(e(H), {
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": l[0] || (l[0] = (t) => S(i) ? i.value = t : null),
438
+ disabled: o.disabled
439
439
  }, null, 8, ["modelValue", "disabled"])
440
440
  ]),
441
441
  _: 1
@@ -444,7 +444,7 @@ const Ve = /* @__PURE__ */ c({
444
444
  _: 1
445
445
  }, 8, ["span"]));
446
446
  }
447
- }), ke = /* @__PURE__ */ c({
447
+ }), Ce = /* @__PURE__ */ c({
448
448
  name: "OFormSwitch",
449
449
  inheritAttrs: !1,
450
450
  __name: "Switch",
@@ -457,20 +457,20 @@ const Ve = /* @__PURE__ */ c({
457
457
  disabled: { type: Boolean }
458
458
  },
459
459
  setup(r) {
460
- const m = v(), i = N();
461
- return (a, l) => (p(), b(e(y), { span: e(m) }, {
462
- default: d(() => [
463
- f(e(V), {
464
- prop: a.name,
465
- label: a.label,
466
- "label-width": a.labelWidth,
467
- rules: a.rules
460
+ const s = v(), i = J();
461
+ return (o, l) => (m(), p(e(y), { span: e(s) }, {
462
+ default: n(() => [
463
+ b(e(w), {
464
+ prop: o.name,
465
+ label: o.label,
466
+ "label-width": o.labelWidth,
467
+ rules: o.rules
468
468
  }, {
469
- default: d(() => [
470
- f(e(se), {
469
+ default: n(() => [
470
+ b(e(be), {
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": l[0] || (l[0] = (t) => S(i) ? i.value = t : null),
473
+ disabled: o.disabled
474
474
  }, null, 8, ["modelValue", "disabled"])
475
475
  ]),
476
476
  _: 1
@@ -479,7 +479,7 @@ const Ve = /* @__PURE__ */ c({
479
479
  _: 1
480
480
  }, 8, ["span"]));
481
481
  }
482
- }), Oe = /* @__PURE__ */ c({
482
+ }), Re = /* @__PURE__ */ c({
483
483
  name: "OFormDate",
484
484
  inheritAttrs: !1,
485
485
  __name: "DateInput",
@@ -500,66 +500,60 @@ 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 s = v(), i = g(), o = B(() => r.format.startsWith("H") || r.format.startsWith("h") || r.format.startsWith("m") || r.format.startsWith("s")), l = B(() => r.sourceFormat ? r.sourceFormat : o.value ? "HH:mm:ss" : "YYYY-MM-DD"), t = B(() => {
504
+ let a = "date";
505
+ return (r.format.indexOf("y") > -1 || r.format.indexOf("Y") > -1) && (a = "year"), r.format.indexOf("M") > -1 && (a = "month"), (r.format.indexOf("d") > -1 || r.format.indexOf("D") > -1) && (a = "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) && (a = "datetime"), a;
506
+ }), u = Y(), d = B({
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);
508
+ const a = u.modelValue[r.name];
509
+ if (a) {
510
+ if (ee(a))
511
+ return a;
512
+ if (I(a)) {
513
+ const h = G(a, l.value, !0);
521
514
  if (!h.isValid())
522
- throw new k(`日期输入框的值无效,不符合${l.value}格式`);
515
+ throw new C(`日期输入框的值无效,不符合${l.value}格式`);
523
516
  return h.toDate();
524
- }
517
+ } else
518
+ throw new C("日期输入框的值只能为字符串或日期类型");
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: (a) => {
522
+ r.sourceFormat ? a ? u.updateModelValue(r.name, G(a).format(l.value)) : u.updateModelValue(r.name, "") : a ? u.updateModelValue(r.name, a) : u.updateModelValue(r.name, void 0);
529
523
  }
530
524
  });
531
- return (o, h) => (p(), b(e(y), { span: e(m) }, {
532
- default: d(() => [
533
- f(e(V), {
534
- prop: o.name,
535
- label: o.label,
536
- "label-width": o.labelWidth,
537
- required: o.required,
525
+ return (a, h) => (m(), p(e(y), { span: e(s) }, {
526
+ default: n(() => [
527
+ b(e(w), {
528
+ prop: a.name,
529
+ label: a.label,
530
+ "label-width": a.labelWidth,
531
+ required: a.required,
538
532
  rules: e(i)
539
533
  }, {
540
- default: d(() => [
541
- a.value ? (p(), b(e(me), {
534
+ default: n(() => [
535
+ o.value ? (m(), p(e(fe), {
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,
537
+ modelValue: d.value,
538
+ "onUpdate:modelValue": h[0] || (h[0] = (V) => d.value = V),
539
+ placeholder: a.placeholder,
540
+ disabled: a.disabled,
541
+ readonly: a.readonly,
542
+ editable: a.editable,
543
+ clearable: a.clearable,
550
544
  format: l.value,
551
545
  "arrow-control": "",
552
546
  style: { width: "100%" }
553
- }, null, 8, ["modelValue", "placeholder", "disabled", "readonly", "editable", "clearable", "format"])) : (p(), b(e(pe), {
547
+ }, null, 8, ["modelValue", "placeholder", "disabled", "readonly", "editable", "clearable", "format"])) : (m(), p(e(he), {
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,
549
+ modelValue: d.value,
550
+ "onUpdate:modelValue": h[1] || (h[1] = (V) => d.value = V),
551
+ placeholder: a.placeholder,
552
+ disabled: a.disabled,
553
+ readonly: a.readonly,
554
+ editable: a.editable,
555
+ clearable: a.clearable,
556
+ type: t.value,
563
557
  format: l.value,
564
558
  style: { width: "100%" }
565
559
  }, null, 8, ["modelValue", "placeholder", "disabled", "readonly", "editable", "clearable", "type", "format"]))
@@ -570,7 +564,7 @@ const Ve = /* @__PURE__ */ c({
570
564
  _: 1
571
565
  }, 8, ["span"]));
572
566
  }
573
- }), We = /* @__PURE__ */ c({
567
+ }), $e = /* @__PURE__ */ c({
574
568
  name: "OFormFile",
575
569
  inheritAttrs: !1,
576
570
  __name: "FileInput",
@@ -584,30 +578,30 @@ 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 s = v(), i = g(), o = z();
582
+ oe(o, () => {
583
+ o.value || (l.value = "");
590
584
  });
591
- const l = le(""), n = E("inputRef");
592
- 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];
585
+ const l = re(""), t = U("inputRef");
586
+ return te(() => {
587
+ t.value.input.onchange = (u) => {
588
+ var d;
589
+ o.value = (d = u == null ? void 0 : u.target) == null ? void 0 : d.files[0];
596
590
  }, l.value = "";
597
- }), (u, s) => (p(), b(e(y), { span: e(m) }, {
598
- default: d(() => [
599
- f(e(V), {
591
+ }), (u, d) => (m(), p(e(y), { span: e(s) }, {
592
+ default: n(() => [
593
+ b(e(w), {
600
594
  prop: u.name,
601
595
  label: u.label,
602
596
  "label-width": u.labelWidth,
603
597
  required: u.required,
604
598
  rules: e(i)
605
599
  }, {
606
- default: d(() => [
607
- f(e(M), {
600
+ default: n(() => [
601
+ b(e(F), {
608
602
  ref: "inputRef",
609
603
  modelValue: l.value,
610
- "onUpdate:modelValue": s[0] || (s[0] = (t) => l.value = t),
604
+ "onUpdate:modelValue": d[0] || (d[0] = (a) => l.value = a),
611
605
  disabled: u.disabled,
612
606
  type: "file",
613
607
  "validate-event": !1
@@ -619,7 +613,7 @@ const Ve = /* @__PURE__ */ c({
619
613
  _: 1
620
614
  }, 8, ["span"]));
621
615
  }
622
- }), Ce = /* @__PURE__ */ c({
616
+ }), Ae = /* @__PURE__ */ c({
623
617
  name: "OFormButtongroup",
624
618
  inheritAttrs: !1,
625
619
  __name: "ButtonGroup",
@@ -629,20 +623,20 @@ const Ve = /* @__PURE__ */ c({
629
623
  align: { default: "right" }
630
624
  },
631
625
  setup(r) {
632
- const m = q(() => ({
626
+ const s = B(() => ({
633
627
  textAlign: r.align
634
628
  })), i = v();
635
- return (a, l) => (p(), b(e(y), {
629
+ return (o, l) => (m(), p(e(y), {
636
630
  span: e(i),
637
- style: oe(m.value)
631
+ style: ne(s.value)
638
632
  }, {
639
- default: d(() => [
640
- f(e(ye), {
641
- gutter: a.gutter,
633
+ default: n(() => [
634
+ b(e(Ve), {
635
+ gutter: o.gutter,
642
636
  style: { "margin-bottom": "18px" }
643
637
  }, {
644
- default: d(() => [
645
- O(a.$slots, "default")
638
+ default: n(() => [
639
+ R(o.$slots, "default")
646
640
  ]),
647
641
  _: 3
648
642
  }, 8, ["gutter"])
@@ -650,7 +644,7 @@ const Ve = /* @__PURE__ */ c({
650
644
  _: 3
651
645
  }, 8, ["span", "style"]));
652
646
  }
653
- }), Re = /* @__PURE__ */ c({
647
+ }), De = /* @__PURE__ */ c({
654
648
  name: "OFormDiy",
655
649
  inheritAttrs: !1,
656
650
  __name: "DiyItem",
@@ -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(() => [
669
- f(e(V), {
670
- prop: a.name,
671
- label: a.label,
672
- "label-width": a.labelWidth,
673
- required: a.required,
660
+ const s = v(), i = g();
661
+ return (o, l) => (m(), p(e(y), { span: e(s) }, {
662
+ default: n(() => [
663
+ b(e(w), {
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
+ R(o.$slots, "default")
678
672
  ]),
679
673
  _: 3
680
674
  }, 8, ["prop", "label", "label-width", "required", "rules"])
@@ -682,7 +676,7 @@ const Ve = /* @__PURE__ */ c({
682
676
  _: 3
683
677
  }, 8, ["span"]));
684
678
  }
685
- }), $e = /* @__PURE__ */ c({
679
+ }), Ee = /* @__PURE__ */ c({
686
680
  name: "OFormLov",
687
681
  inheritAttrs: !1,
688
682
  __name: "LovInput",
@@ -700,60 +694,68 @@ 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 = () => {
704
- 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;
697
+ const s = v(), i = g(), o = z(), l = Y();
698
+ let t;
699
+ const u = (f) => {
700
+ t = f;
701
+ }, d = (f) => {
702
+ ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight", "Enter", "Space"].indexOf(f.code) > -1 && (t && t(f.code), f.stopPropagation());
703
+ }, a = () => {
704
+ if (I(r.fillMapping)) {
705
+ const f = {}, q = r.fillMapping.split(",");
706
+ for (let M = 0; M < q.length; M++) {
707
+ const k = q[M].split(":")[0].trim();
708
+ f[k] = void 0;
709
709
  }
710
- l.updateModelValueMulti(t);
710
+ l.updateModelValueMulti(f);
711
711
  }
712
- }, u = E("dropdown");
713
- return U(
714
- ve,
712
+ }, h = U("dropdown");
713
+ return L(
714
+ ge,
715
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];
723
- h[H] = J;
716
+ lovValue: o,
717
+ backfill: (f) => {
718
+ var q;
719
+ if ((q = h.value) == null || q.handleClose(), I(r.fillMapping)) {
720
+ const M = {}, k = r.fillMapping.split(",");
721
+ for (let O = 0; O < k.length; O++) {
722
+ const Q = k[O].split(":")[0].trim(), X = k[O].split(":")[1].trim(), Z = f[X];
723
+ M[Q] = Z;
724
724
  }
725
- l.updateModelValueMulti(h);
725
+ l.updateModelValueMulti(M);
726
726
  } else
727
- r.fillMapping && r.fillMapping(t);
728
- }
727
+ r.fillMapping && r.fillMapping(f);
728
+ },
729
+ registerKeydownHandler: u
729
730
  })
730
- ), (t, o) => (p(), b(e(y), { span: e(m) }, {
731
- default: d(() => [
732
- f(e(V), {
733
- prop: t.name,
734
- label: t.label,
735
- "label-width": t.labelWidth,
736
- required: t.required,
731
+ ), (f, q) => (m(), p(e(y), { span: e(s) }, {
732
+ default: n(() => [
733
+ b(e(w), {
734
+ prop: f.name,
735
+ label: f.label,
736
+ "label-width": f.labelWidth,
737
+ required: f.required,
737
738
  rules: e(i)
738
739
  }, {
739
- default: d(() => [
740
- f(e(be), {
740
+ default: n(() => [
741
+ b(e(ce), {
741
742
  ref: "dropdown",
742
743
  trigger: "click",
743
744
  style: { width: "100%" }
744
745
  }, {
745
- dropdown: d(() => [
746
- O(t.$slots, "default")
746
+ dropdown: n(() => [
747
+ R(f.$slots, "default")
747
748
  ]),
748
- default: d(() => [
749
- 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
749
+ default: n(() => [
750
+ b(e(F), {
751
+ modelValue: e(o),
752
+ "onUpdate:modelValue": q[0] || (q[0] = (M) => S(o) ? o.value = M : null),
753
+ maxlength: f.maxlength,
754
+ placeholder: f.placeholder,
755
+ disabled: f.disabled,
756
+ readonly: f.readonly,
757
+ onKeydown: d,
758
+ onChange: a
757
759
  }, null, 8, ["modelValue", "maxlength", "placeholder", "disabled", "readonly"])
758
760
  ]),
759
761
  _: 3
@@ -765,26 +767,26 @@ const Ve = /* @__PURE__ */ c({
765
767
  _: 3
766
768
  }, 8, ["span"]));
767
769
  }
768
- }), Pe = re(Ve, {
769
- StringInput: ge,
770
- PasswordInput: we,
771
- Textarea: Se,
772
- SingleSelect: qe,
773
- MultiSelect: Me,
774
- RadioGroup: Be,
775
- CheckboxGroup: Fe,
776
- Checkbox: ze,
777
- Switch: ke,
778
- DateInput: Oe,
779
- FileInput: We,
780
- ButtonGroup: Ce,
781
- DiyItem: Re,
782
- LovInput: $e
770
+ }), Ne = de(Se, {
771
+ StringInput: qe,
772
+ PasswordInput: Me,
773
+ Textarea: Be,
774
+ SingleSelect: Fe,
775
+ MultiSelect: ze,
776
+ RadioGroup: ke,
777
+ CheckboxGroup: Oe,
778
+ Checkbox: We,
779
+ Switch: Ce,
780
+ DateInput: Re,
781
+ FileInput: $e,
782
+ ButtonGroup: Ae,
783
+ DiyItem: De,
784
+ LovInput: Ee
783
785
  });
784
786
  export {
785
- Pe as default,
786
- fe as formContextKey,
787
- ve as lovContextKey,
788
- Ke as useLov
787
+ Ne as default,
788
+ ye as formContextKey,
789
+ ge as lovContextKey,
790
+ Xe as useLov
789
791
  };
790
792
  //# sourceMappingURL=index.js.map