orion-design 0.1.38 → 0.1.40

Sign up to get free protection for your applications and to get access to all the features.
Files changed (34) hide show
  1. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +10 -0
  2. package/dist/_plugin-vue_export-helper-CHgC5LLL.js.map +1 -0
  3. package/dist/components/Card/Card.vue.d.ts +22 -0
  4. package/dist/components/Card/index.d.ts +28 -0
  5. package/dist/components/Card/index.js +38 -0
  6. package/dist/components/Card/index.js.map +1 -0
  7. package/dist/components/Form/StringInput/StringInput.vue.d.ts +18 -1
  8. package/dist/components/Form/index.js +450 -421
  9. package/dist/components/Form/index.js.map +1 -1
  10. package/dist/components/Icon/Icon.vue.d.ts +6 -0
  11. package/dist/components/Icon/index.d.ts +6 -0
  12. package/dist/components/Icon/index.js +34 -0
  13. package/dist/components/Icon/index.js.map +1 -0
  14. package/dist/components/Modal/index.js +40 -44
  15. package/dist/components/Modal/index.js.map +1 -1
  16. package/dist/components/Tree/index.d.ts +1 -0
  17. package/dist/components/Tree/index.js +2 -0
  18. package/dist/components/Tree/index.js.map +1 -0
  19. package/dist/components/components.d.ts +2 -0
  20. package/dist/components/components.js +20 -16
  21. package/dist/components/components.js.map +1 -1
  22. package/dist/components/index.js +30 -26
  23. package/dist/components/index.js.map +1 -1
  24. package/dist/components-Pdc4XEej.js +52 -0
  25. package/dist/{components-BJrXhY2G.js.map → components-Pdc4XEej.js.map} +1 -1
  26. package/dist/index.css +1 -1
  27. package/dist/index.js +27 -23
  28. package/dist/index.js.map +1 -1
  29. package/dist/version/version.d.ts +1 -1
  30. package/dist/version/version.js +1 -1
  31. package/dist/version/version.js.map +1 -1
  32. package/global.d.ts +5 -0
  33. package/package.json +1 -1
  34. package/dist/components-BJrXhY2G.js +0 -48
@@ -1,18 +1,18 @@
1
1
  import { difference as fe, isEmpty as be, isDate as he, isString as L, isNumber as ce, toNumber as ye, isArray as ve, pick as ge } from "lodash-es";
2
- import { defineComponent as v, useTemplateRef as A, provide as Z, reactive as x, toRef as G, openBlock as m, createBlock as c, unref as e, withCtx as d, createVNode as b, renderSlot as T, isRef as C, useAttrs as le, computed as O, createElementBlock as E, Fragment as U, renderList as N, createTextVNode as ae, toDisplayString as oe, watch as te, ref as k, onMounted as ne, normalizeStyle as we, resolveComponent as Ve, createElementVNode as Be, createCommentVNode as Se } from "vue";
3
- import { withInstall as qe } from "../_util/vue/install.js";
4
- import { ElForm as Me, ElRow as Ce, ElCol as g, ElFormItem as B, ElInput as z, ElSelect as re, ElOption as de, ElRadioGroup as Oe, ElRadio as Fe, ElCheckboxGroup as ke, ElCheckbox as ue, ElSwitch as ze, dayjs as ee, ElTimePicker as We, ElDatePicker as Re, ElDropdown as se, ElInputNumber as Ae, ElTag as Ee } from "element-plus";
5
- import { formContextKey as De } from "./Form.js";
2
+ import { defineComponent as v, useTemplateRef as $, provide as Z, reactive as x, toRef as G, openBlock as f, createBlock as c, unref as e, withCtx as r, createVNode as b, renderSlot as k, useSlots as we, isRef as C, createSlots as Ve, useAttrs as le, computed as O, createElementBlock as E, Fragment as U, renderList as N, createTextVNode as ae, toDisplayString as oe, watch as ne, ref as z, onMounted as te, normalizeStyle as Se, resolveComponent as Be, createElementVNode as qe, createCommentVNode as Me } from "vue";
3
+ import { withInstall as Ce } from "../_util/vue/install.js";
4
+ import { ElForm as ke, ElRow as Oe, ElCol as g, ElFormItem as S, ElInput as W, ElSelect as re, ElOption as de, ElRadioGroup as Fe, ElRadio as ze, ElCheckboxGroup as We, ElCheckbox as se, ElSwitch as Re, dayjs as ee, ElTimePicker as Ae, ElDatePicker as $e, ElDropdown as ue, ElInputNumber as Ee, ElTag as De } from "element-plus";
5
+ import { formContextKey as Ie } from "./Form.js";
6
6
  import D from "../../error/OrionError.js";
7
- import { useFormItemSpan as w, useFormItemRules as S, useFormItemStringModel as R, useFormItemDisabled as ie, useFormItemCode as K, useFormItemMultiModel as pe, useFormContext as P, useFormItemBooleanModel as me } from "./hooks/index.js";
8
- import { getSingleCodeContent as $e, getMultiCodeContent as Ie } from "./utils/index.js";
9
- import { S as Te } from "../../index-BbsXWo7C.js";
10
- import { g as Ue, h as Ne, j as Pe } from "../../index-Bm0F5NQQ.js";
11
- import { lovContextKey as Ye } from "./LovInput/LovInput.js";
12
- import { tableSelectContext as je } from "./TableSelect/TableSelect.js";
13
- import { default as Sl } from "./LovInput/hooks/useLov.js";
14
- import { default as Ml } from "./TableSelect/hooks/useTableSelect.js";
15
- const Ge = /* @__PURE__ */ v({
7
+ import { useFormItemSpan as w, useFormItemRules as B, useFormItemStringModel as A, useFormItemDisabled as ie, useFormItemCode as K, useFormItemMultiModel as pe, useFormContext as P, useFormItemBooleanModel as me } from "./hooks/index.js";
8
+ import { getSingleCodeContent as Te, getMultiCodeContent as Ue } from "./utils/index.js";
9
+ import { S as Ne } from "../../index-BbsXWo7C.js";
10
+ import { g as Pe, h as Ye, j as je } from "../../index-Bm0F5NQQ.js";
11
+ import { lovContextKey as Ge } from "./LovInput/LovInput.js";
12
+ import { tableSelectContext as Le } from "./TableSelect/TableSelect.js";
13
+ import { default as Ml } from "./LovInput/hooks/useLov.js";
14
+ import { default as kl } from "./TableSelect/hooks/useTableSelect.js";
15
+ const Ke = /* @__PURE__ */ v({
16
16
  name: "OForm",
17
17
  inheritAttrs: !1,
18
18
  __name: "Form",
@@ -24,41 +24,41 @@ const Ge = /* @__PURE__ */ v({
24
24
  modelValue: {}
25
25
  },
26
26
  emits: ["update:modelValue"],
27
- setup(o, { expose: f, emit: i }) {
28
- const n = i, a = (t, p) => {
29
- if (!Object.keys(o.modelValue).includes(t))
30
- throw new D(`modelValue中不存在[${t}]`);
31
- n("update:modelValue", { ...o.modelValue, [t]: p });
32
- }, l = (t) => {
33
- const p = Object.keys(o.modelValue), y = Object.keys(t), q = fe(y, p);
27
+ setup(a, { expose: p, emit: i }) {
28
+ const t = i, n = (o, m) => {
29
+ if (!Object.keys(a.modelValue).includes(o))
30
+ throw new D(`modelValue中不存在[${o}]`);
31
+ t("update:modelValue", { ...a.modelValue, [o]: m });
32
+ }, l = (o) => {
33
+ const m = Object.keys(a.modelValue), y = Object.keys(o), q = fe(y, m);
34
34
  if (!be(q))
35
35
  throw new D(`modelValue中不存在[${q.join(",")}]`);
36
- n("update:modelValue", { ...o.modelValue, ...t });
37
- }, r = A("form");
38
- return f({
39
- validate: async () => await r.value.validate()
36
+ t("update:modelValue", { ...a.modelValue, ...o });
37
+ }, d = $("form");
38
+ return p({
39
+ validate: async () => await d.value.validate()
40
40
  }), Z(
41
- De,
41
+ Ie,
42
42
  x({
43
- modelValue: G(() => o.modelValue),
44
- updateModelValue: a,
43
+ modelValue: G(() => a.modelValue),
44
+ updateModelValue: n,
45
45
  updateModelValueMulti: l,
46
- rules: G(() => o.rules),
47
- itemSpan: G(() => o.itemSpan),
48
- disabled: G(() => o.disabled)
46
+ rules: G(() => a.rules),
47
+ itemSpan: G(() => a.itemSpan),
48
+ disabled: G(() => a.disabled)
49
49
  })
50
- ), (t, p) => (m(), c(e(Me), {
50
+ ), (o, m) => (f(), c(e(ke), {
51
51
  ref: "form",
52
- model: t.modelValue,
53
- rules: t.rules,
54
- "label-width": t.itemLabelWidth,
55
- disabled: t.disabled,
52
+ model: o.modelValue,
53
+ rules: o.rules,
54
+ "label-width": o.itemLabelWidth,
55
+ disabled: o.disabled,
56
56
  class: "orion-form"
57
57
  }, {
58
- default: d(() => [
59
- b(e(Ce), { gutter: 16 }, {
60
- default: d(() => [
61
- T(t.$slots, "default")
58
+ default: r(() => [
59
+ b(e(Oe), { gutter: 16 }, {
60
+ default: r(() => [
61
+ k(o.$slots, "default")
62
62
  ]),
63
63
  _: 3
64
64
  })
@@ -66,7 +66,7 @@ const Ge = /* @__PURE__ */ v({
66
66
  _: 3
67
67
  }, 8, ["model", "rules", "label-width", "disabled"]));
68
68
  }
69
- }), Le = /* @__PURE__ */ v({
69
+ }), He = /* @__PURE__ */ v({
70
70
  name: "OFormString",
71
71
  inheritAttrs: !1,
72
72
  __name: "StringInput",
@@ -82,34 +82,63 @@ const Ge = /* @__PURE__ */ v({
82
82
  disabled: { type: Boolean },
83
83
  readonly: { type: Boolean }
84
84
  },
85
- setup(o) {
86
- const f = w(), i = S(), n = R();
87
- return (a, l) => (m(), c(e(g), { span: e(f) }, {
88
- default: d(() => [
89
- b(e(B), {
90
- prop: a.name,
91
- label: a.label,
92
- "label-width": a.labelWidth,
93
- required: a.required,
94
- rules: e(i)
85
+ setup(a) {
86
+ const p = we(), i = w(), t = B(), n = A();
87
+ return (l, d) => (f(), c(e(g), { span: e(i) }, {
88
+ default: r(() => [
89
+ b(e(S), {
90
+ prop: l.name,
91
+ label: l.label,
92
+ "label-width": l.labelWidth,
93
+ required: l.required,
94
+ rules: e(t)
95
95
  }, {
96
- default: d(() => [
97
- b(e(z), {
96
+ default: r(() => [
97
+ b(e(W), {
98
98
  modelValue: e(n),
99
- "onUpdate:modelValue": l[0] || (l[0] = (r) => C(n) ? n.value = r : null),
100
- maxlength: a.maxlength,
101
- placeholder: a.placeholder,
102
- disabled: a.disabled,
103
- readonly: a.readonly
104
- }, null, 8, ["modelValue", "maxlength", "placeholder", "disabled", "readonly"])
99
+ "onUpdate:modelValue": d[0] || (d[0] = (s) => C(n) ? n.value = s : null),
100
+ maxlength: l.maxlength,
101
+ placeholder: l.placeholder,
102
+ disabled: l.disabled,
103
+ readonly: l.readonly
104
+ }, Ve({ _: 2 }, [
105
+ e(p).prefix ? {
106
+ name: "prefix",
107
+ fn: r(() => [
108
+ k(l.$slots, "prefix")
109
+ ]),
110
+ key: "0"
111
+ } : void 0,
112
+ e(p).suffix ? {
113
+ name: "suffix",
114
+ fn: r(() => [
115
+ k(l.$slots, "suffix")
116
+ ]),
117
+ key: "1"
118
+ } : void 0,
119
+ e(p).prepend ? {
120
+ name: "prepend",
121
+ fn: r(() => [
122
+ k(l.$slots, "prepend")
123
+ ]),
124
+ key: "2"
125
+ } : void 0,
126
+ e(p).append ? {
127
+ name: "append",
128
+ fn: r(() => [
129
+ k(l.$slots, "append")
130
+ ]),
131
+ key: "3"
132
+ } : void 0
133
+ ]), 1032, ["modelValue", "maxlength", "placeholder", "disabled", "readonly"])
105
134
  ]),
106
- _: 1
135
+ _: 3
107
136
  }, 8, ["prop", "label", "label-width", "required", "rules"])
108
137
  ]),
109
- _: 1
138
+ _: 3
110
139
  }, 8, ["span"]));
111
140
  }
112
- }), Ke = /* @__PURE__ */ v({
141
+ }), Je = /* @__PURE__ */ v({
113
142
  name: "OFormPassword",
114
143
  inheritAttrs: !1,
115
144
  __name: "PasswordInput",
@@ -125,25 +154,25 @@ const Ge = /* @__PURE__ */ v({
125
154
  disabled: { type: Boolean },
126
155
  readonly: { type: Boolean }
127
156
  },
128
- setup(o) {
129
- const f = w(), i = S(), n = R();
130
- return (a, l) => (m(), c(e(g), { span: e(f) }, {
131
- default: d(() => [
132
- b(e(B), {
133
- prop: a.name,
134
- label: a.label,
135
- "label-width": a.labelWidth,
136
- required: a.required,
157
+ setup(a) {
158
+ const p = w(), i = B(), t = A();
159
+ return (n, l) => (f(), c(e(g), { span: e(p) }, {
160
+ default: r(() => [
161
+ b(e(S), {
162
+ prop: n.name,
163
+ label: n.label,
164
+ "label-width": n.labelWidth,
165
+ required: n.required,
137
166
  rules: e(i)
138
167
  }, {
139
- default: d(() => [
140
- b(e(z), {
141
- modelValue: e(n),
142
- "onUpdate:modelValue": l[0] || (l[0] = (r) => C(n) ? n.value = r : null),
143
- maxlength: a.maxlength,
144
- placeholder: a.placeholder,
145
- disabled: a.disabled,
146
- readonly: a.readonly,
168
+ default: r(() => [
169
+ b(e(W), {
170
+ modelValue: e(t),
171
+ "onUpdate:modelValue": l[0] || (l[0] = (d) => C(t) ? t.value = d : null),
172
+ maxlength: n.maxlength,
173
+ placeholder: n.placeholder,
174
+ disabled: n.disabled,
175
+ readonly: n.readonly,
147
176
  type: "password"
148
177
  }, null, 8, ["modelValue", "maxlength", "placeholder", "disabled", "readonly"])
149
178
  ]),
@@ -153,7 +182,7 @@ const Ge = /* @__PURE__ */ v({
153
182
  _: 1
154
183
  }, 8, ["span"]));
155
184
  }
156
- }), He = /* @__PURE__ */ v({
185
+ }), Qe = /* @__PURE__ */ v({
157
186
  name: "OFormTextarea",
158
187
  inheritAttrs: !1,
159
188
  __name: "Textarea",
@@ -170,27 +199,27 @@ const Ge = /* @__PURE__ */ v({
170
199
  readonly: { type: Boolean },
171
200
  rows: {}
172
201
  },
173
- setup(o) {
174
- const f = w(), i = S(), n = R();
175
- return (a, l) => (m(), c(e(g), { span: e(f) }, {
176
- default: d(() => [
177
- b(e(B), {
178
- prop: a.name,
179
- label: a.label,
180
- "label-width": a.labelWidth,
181
- required: a.required,
202
+ setup(a) {
203
+ const p = w(), i = B(), t = A();
204
+ return (n, l) => (f(), c(e(g), { span: e(p) }, {
205
+ default: r(() => [
206
+ b(e(S), {
207
+ prop: n.name,
208
+ label: n.label,
209
+ "label-width": n.labelWidth,
210
+ required: n.required,
182
211
  rules: e(i)
183
212
  }, {
184
- default: d(() => [
185
- b(e(z), {
186
- modelValue: e(n),
187
- "onUpdate:modelValue": l[0] || (l[0] = (r) => C(n) ? n.value = r : null),
188
- maxlength: a.maxlength,
189
- placeholder: a.placeholder,
190
- disabled: a.disabled,
191
- readonly: a.readonly,
213
+ default: r(() => [
214
+ b(e(W), {
215
+ modelValue: e(t),
216
+ "onUpdate:modelValue": l[0] || (l[0] = (d) => C(t) ? t.value = d : null),
217
+ maxlength: n.maxlength,
218
+ placeholder: n.placeholder,
219
+ disabled: n.disabled,
220
+ readonly: n.readonly,
192
221
  type: "textarea",
193
- rows: a.rows,
222
+ rows: n.rows,
194
223
  resize: "none"
195
224
  }, null, 8, ["modelValue", "maxlength", "placeholder", "disabled", "readonly", "rows"])
196
225
  ]),
@@ -200,7 +229,7 @@ const Ge = /* @__PURE__ */ v({
200
229
  _: 1
201
230
  }, 8, ["span"]));
202
231
  }
203
- }), Je = /* @__PURE__ */ v({
232
+ }), Xe = /* @__PURE__ */ v({
204
233
  name: "OFormSingleselect",
205
234
  inheritAttrs: !1,
206
235
  __name: "SingleSelect",
@@ -217,35 +246,35 @@ const Ge = /* @__PURE__ */ v({
217
246
  clearable: { type: Boolean },
218
247
  filterable: { type: Boolean }
219
248
  },
220
- setup(o) {
221
- const f = le(), i = w(), n = S(), a = ie(), l = K(), r = R(), u = O(() => $e(l.value, r.value));
222
- return (t, p) => (m(), c(e(g), { span: e(i) }, {
223
- default: d(() => [
224
- b(e(B), {
225
- prop: t.name,
226
- label: t.label,
227
- "label-width": t.labelWidth,
228
- required: t.required,
229
- rules: e(n)
249
+ setup(a) {
250
+ const p = le(), i = w(), t = B(), n = ie(), l = K(), d = A(), s = O(() => Te(l.value, d.value));
251
+ return (o, m) => (f(), c(e(g), { span: e(i) }, {
252
+ default: r(() => [
253
+ b(e(S), {
254
+ prop: o.name,
255
+ label: o.label,
256
+ "label-width": o.labelWidth,
257
+ required: o.required,
258
+ rules: e(t)
230
259
  }, {
231
- default: d(() => [
232
- e(a) ? (m(), c(e(z), {
260
+ default: r(() => [
261
+ e(n) ? (f(), c(e(W), {
233
262
  key: 0,
234
- "model-value": u.value,
235
- placeholder: t.placeholder,
263
+ "model-value": s.value,
264
+ placeholder: o.placeholder,
236
265
  disabled: !0,
237
266
  readonly: !0
238
- }, null, 8, ["model-value", "placeholder"])) : (m(), c(e(re), {
267
+ }, null, 8, ["model-value", "placeholder"])) : (f(), c(e(re), {
239
268
  key: 1,
240
- modelValue: e(r),
241
- "onUpdate:modelValue": p[0] || (p[0] = (y) => C(r) ? r.value = y : null),
242
- placeholder: t.placeholder,
243
- clearable: t.clearable,
244
- filterable: t.filterable,
245
- onChange: e(f).onChange
269
+ modelValue: e(d),
270
+ "onUpdate:modelValue": m[0] || (m[0] = (y) => C(d) ? d.value = y : null),
271
+ placeholder: o.placeholder,
272
+ clearable: o.clearable,
273
+ filterable: o.filterable,
274
+ onChange: e(p).onChange
246
275
  }, {
247
- default: d(() => [
248
- (m(!0), E(U, null, N(e(l), (y) => (m(), c(e(de), {
276
+ default: r(() => [
277
+ (f(!0), E(U, null, N(e(l), (y) => (f(), c(e(de), {
249
278
  key: y.value,
250
279
  label: y.content,
251
280
  value: y.value
@@ -260,7 +289,7 @@ const Ge = /* @__PURE__ */ v({
260
289
  _: 1
261
290
  }, 8, ["span"]));
262
291
  }
263
- }), Qe = /* @__PURE__ */ v({
292
+ }), Ze = /* @__PURE__ */ v({
264
293
  name: "OFormMultiselect",
265
294
  inheritAttrs: !1,
266
295
  __name: "MultiSelect",
@@ -277,36 +306,36 @@ const Ge = /* @__PURE__ */ v({
277
306
  collapseTags: { type: Boolean },
278
307
  collapseTagsTooltip: { type: Boolean }
279
308
  },
280
- setup(o) {
281
- const f = le(), i = w(), n = S(), a = ie(), l = K(), r = pe(), u = P(), t = O(() => Ie(l.value, u.modelValue[o.name]));
282
- return (p, y) => (m(), c(e(g), { span: e(i) }, {
283
- default: d(() => [
284
- b(e(B), {
285
- prop: p.name,
286
- label: p.label,
287
- "label-width": p.labelWidth,
288
- required: p.required,
289
- rules: e(n)
309
+ setup(a) {
310
+ const p = le(), i = w(), t = B(), n = ie(), l = K(), d = pe(), s = P(), o = O(() => Ue(l.value, s.modelValue[a.name]));
311
+ return (m, y) => (f(), c(e(g), { span: e(i) }, {
312
+ default: r(() => [
313
+ b(e(S), {
314
+ prop: m.name,
315
+ label: m.label,
316
+ "label-width": m.labelWidth,
317
+ required: m.required,
318
+ rules: e(t)
290
319
  }, {
291
- default: d(() => [
292
- e(a) ? (m(), c(e(z), {
320
+ default: r(() => [
321
+ e(n) ? (f(), c(e(W), {
293
322
  key: 0,
294
- "model-value": t.value,
295
- placeholder: p.placeholder,
323
+ "model-value": o.value,
324
+ placeholder: m.placeholder,
296
325
  disabled: !0,
297
326
  readonly: !0
298
- }, null, 8, ["model-value", "placeholder"])) : (m(), c(e(re), {
327
+ }, null, 8, ["model-value", "placeholder"])) : (f(), c(e(re), {
299
328
  key: 1,
300
- modelValue: e(r),
301
- "onUpdate:modelValue": y[0] || (y[0] = (q) => C(r) ? r.value = q : null),
302
- placeholder: p.placeholder,
329
+ modelValue: e(d),
330
+ "onUpdate:modelValue": y[0] || (y[0] = (q) => C(d) ? d.value = q : null),
331
+ placeholder: m.placeholder,
303
332
  multiple: "",
304
- "collapse-tags": p.collapseTags,
305
- "collapse-tags-tooltip": p.collapseTagsTooltip,
306
- onChange: e(f).onChange
333
+ "collapse-tags": m.collapseTags,
334
+ "collapse-tags-tooltip": m.collapseTagsTooltip,
335
+ onChange: e(p).onChange
307
336
  }, {
308
- default: d(() => [
309
- (m(!0), E(U, null, N(e(l), (q) => (m(), c(e(de), {
337
+ default: r(() => [
338
+ (f(!0), E(U, null, N(e(l), (q) => (f(), c(e(de), {
310
339
  key: q.value,
311
340
  label: q.content,
312
341
  value: q.value
@@ -321,7 +350,7 @@ const Ge = /* @__PURE__ */ v({
321
350
  _: 1
322
351
  }, 8, ["span"]));
323
352
  }
324
- }), Xe = /* @__PURE__ */ v({
353
+ }), xe = /* @__PURE__ */ v({
325
354
  name: "OFormRadiogroup",
326
355
  inheritAttrs: !1,
327
356
  __name: "RadioGroup",
@@ -335,30 +364,30 @@ const Ge = /* @__PURE__ */ v({
335
364
  disabled: { type: Boolean },
336
365
  code: {}
337
366
  },
338
- setup(o) {
339
- const f = w(), i = S(), n = K(), a = R();
340
- return (l, r) => (m(), c(e(g), { span: e(f) }, {
341
- default: d(() => [
342
- b(e(B), {
367
+ setup(a) {
368
+ const p = w(), i = B(), t = K(), n = A();
369
+ return (l, d) => (f(), c(e(g), { span: e(p) }, {
370
+ default: r(() => [
371
+ b(e(S), {
343
372
  prop: l.name,
344
373
  label: l.label,
345
374
  "label-width": l.labelWidth,
346
375
  required: l.required,
347
376
  rules: e(i)
348
377
  }, {
349
- default: d(() => [
350
- b(e(Oe), {
351
- modelValue: e(a),
352
- "onUpdate:modelValue": r[0] || (r[0] = (u) => C(a) ? a.value = u : null),
378
+ default: r(() => [
379
+ b(e(Fe), {
380
+ modelValue: e(n),
381
+ "onUpdate:modelValue": d[0] || (d[0] = (s) => C(n) ? n.value = s : null),
353
382
  disabled: l.disabled
354
383
  }, {
355
- default: d(() => [
356
- (m(!0), E(U, null, N(e(n), (u) => (m(), c(e(Fe), {
357
- key: u.value,
358
- value: u.value
384
+ default: r(() => [
385
+ (f(!0), E(U, null, N(e(t), (s) => (f(), c(e(ze), {
386
+ key: s.value,
387
+ value: s.value
359
388
  }, {
360
- default: d(() => [
361
- ae(oe(u.content), 1)
389
+ default: r(() => [
390
+ ae(oe(s.content), 1)
362
391
  ]),
363
392
  _: 2
364
393
  }, 1032, ["value"]))), 128))
@@ -372,7 +401,7 @@ const Ge = /* @__PURE__ */ v({
372
401
  _: 1
373
402
  }, 8, ["span"]));
374
403
  }
375
- }), Ze = /* @__PURE__ */ v({
404
+ }), _e = /* @__PURE__ */ v({
376
405
  name: "OFormCheckboxgroup",
377
406
  inheritAttrs: !1,
378
407
  __name: "CheckboxGroup",
@@ -386,28 +415,28 @@ const Ge = /* @__PURE__ */ v({
386
415
  disabled: { type: Boolean },
387
416
  code: {}
388
417
  },
389
- setup(o) {
390
- const f = w(), i = S(), n = K(), a = pe();
391
- return (l, r) => (m(), c(e(g), { span: e(f) }, {
392
- default: d(() => [
393
- b(e(B), {
418
+ setup(a) {
419
+ const p = w(), i = B(), t = K(), n = pe();
420
+ return (l, d) => (f(), c(e(g), { span: e(p) }, {
421
+ default: r(() => [
422
+ b(e(S), {
394
423
  prop: l.name,
395
424
  label: l.label,
396
425
  "label-width": l.labelWidth,
397
426
  required: l.required,
398
427
  rules: e(i)
399
428
  }, {
400
- default: d(() => [
401
- b(e(ke), {
402
- modelValue: e(a),
403
- "onUpdate:modelValue": r[0] || (r[0] = (u) => C(a) ? a.value = u : null),
429
+ default: r(() => [
430
+ b(e(We), {
431
+ modelValue: e(n),
432
+ "onUpdate:modelValue": d[0] || (d[0] = (s) => C(n) ? n.value = s : null),
404
433
  disabled: l.disabled
405
434
  }, {
406
- default: d(() => [
407
- (m(!0), E(U, null, N(e(n), (u) => (m(), c(e(ue), {
408
- key: u.value,
409
- label: u.content,
410
- value: u.value
435
+ default: r(() => [
436
+ (f(!0), E(U, null, N(e(t), (s) => (f(), c(e(se), {
437
+ key: s.value,
438
+ label: s.content,
439
+ value: s.value
411
440
  }, null, 8, ["label", "value"]))), 128))
412
441
  ]),
413
442
  _: 1
@@ -419,7 +448,7 @@ const Ge = /* @__PURE__ */ v({
419
448
  _: 1
420
449
  }, 8, ["span"]));
421
450
  }
422
- }), xe = /* @__PURE__ */ v({
451
+ }), el = /* @__PURE__ */ v({
423
452
  name: "OFormCheckbox",
424
453
  inheritAttrs: !1,
425
454
  __name: "Checkbox",
@@ -431,21 +460,21 @@ const Ge = /* @__PURE__ */ v({
431
460
  rules: {},
432
461
  disabled: { type: Boolean }
433
462
  },
434
- setup(o) {
435
- const f = w(), i = me();
436
- return (n, a) => (m(), c(e(g), { span: e(f) }, {
437
- default: d(() => [
438
- b(e(B), {
439
- prop: n.name,
440
- label: n.label,
441
- "label-width": n.labelWidth,
442
- rules: n.rules
463
+ setup(a) {
464
+ const p = w(), i = me();
465
+ return (t, n) => (f(), c(e(g), { span: e(p) }, {
466
+ default: r(() => [
467
+ b(e(S), {
468
+ prop: t.name,
469
+ label: t.label,
470
+ "label-width": t.labelWidth,
471
+ rules: t.rules
443
472
  }, {
444
- default: d(() => [
445
- b(e(ue), {
473
+ default: r(() => [
474
+ b(e(se), {
446
475
  modelValue: e(i),
447
- "onUpdate:modelValue": a[0] || (a[0] = (l) => C(i) ? i.value = l : null),
448
- disabled: n.disabled
476
+ "onUpdate:modelValue": n[0] || (n[0] = (l) => C(i) ? i.value = l : null),
477
+ disabled: t.disabled
449
478
  }, null, 8, ["modelValue", "disabled"])
450
479
  ]),
451
480
  _: 1
@@ -454,7 +483,7 @@ const Ge = /* @__PURE__ */ v({
454
483
  _: 1
455
484
  }, 8, ["span"]));
456
485
  }
457
- }), _e = /* @__PURE__ */ v({
486
+ }), ll = /* @__PURE__ */ v({
458
487
  name: "OFormSwitch",
459
488
  inheritAttrs: !1,
460
489
  __name: "Switch",
@@ -466,21 +495,21 @@ const Ge = /* @__PURE__ */ v({
466
495
  rules: {},
467
496
  disabled: { type: Boolean }
468
497
  },
469
- setup(o) {
470
- const f = w(), i = me();
471
- return (n, a) => (m(), c(e(g), { span: e(f) }, {
472
- default: d(() => [
473
- b(e(B), {
474
- prop: n.name,
475
- label: n.label,
476
- "label-width": n.labelWidth,
477
- rules: n.rules
498
+ setup(a) {
499
+ const p = w(), i = me();
500
+ return (t, n) => (f(), c(e(g), { span: e(p) }, {
501
+ default: r(() => [
502
+ b(e(S), {
503
+ prop: t.name,
504
+ label: t.label,
505
+ "label-width": t.labelWidth,
506
+ rules: t.rules
478
507
  }, {
479
- default: d(() => [
480
- b(e(ze), {
508
+ default: r(() => [
509
+ b(e(Re), {
481
510
  modelValue: e(i),
482
- "onUpdate:modelValue": a[0] || (a[0] = (l) => C(i) ? i.value = l : null),
483
- disabled: n.disabled
511
+ "onUpdate:modelValue": n[0] || (n[0] = (l) => C(i) ? i.value = l : null),
512
+ disabled: t.disabled
484
513
  }, null, 8, ["modelValue", "disabled"])
485
514
  ]),
486
515
  _: 1
@@ -489,7 +518,7 @@ const Ge = /* @__PURE__ */ v({
489
518
  _: 1
490
519
  }, 8, ["span"]));
491
520
  }
492
- }), el = /* @__PURE__ */ v({
521
+ }), al = /* @__PURE__ */ v({
493
522
  name: "OFormDate",
494
523
  inheritAttrs: !1,
495
524
  __name: "DateInput",
@@ -509,62 +538,62 @@ const Ge = /* @__PURE__ */ v({
509
538
  format: { default: "YYYY-MM-DD" },
510
539
  sourceFormat: {}
511
540
  },
512
- setup(o) {
513
- const f = w(), i = S(), n = O(() => o.format.startsWith("H") || o.format.startsWith("h") || o.format.startsWith("m") || o.format.startsWith("s")), a = O(() => o.sourceFormat ? o.sourceFormat : n.value ? "HH:mm:ss" : "YYYY-MM-DD"), l = O(() => {
514
- let t = "date";
515
- return (o.format.indexOf("y") > -1 || o.format.indexOf("Y") > -1) && (t = "year"), o.format.indexOf("M") > -1 && (t = "month"), (o.format.indexOf("d") > -1 || o.format.indexOf("D") > -1) && (t = "date"), (o.format.indexOf("H") > -1 || o.format.indexOf("h") > -1 || o.format.indexOf("k") > -1 || o.format.indexOf("m") > -1 || o.format.indexOf("s") > -1 || o.format.indexOf("S") > -1) && (t = "datetime"), t;
516
- }), r = P(), u = O({
541
+ setup(a) {
542
+ const p = w(), i = B(), t = O(() => a.format.startsWith("H") || a.format.startsWith("h") || a.format.startsWith("m") || a.format.startsWith("s")), n = O(() => a.sourceFormat ? a.sourceFormat : t.value ? "HH:mm:ss" : "YYYY-MM-DD"), l = O(() => {
543
+ let o = "date";
544
+ return (a.format.indexOf("y") > -1 || a.format.indexOf("Y") > -1) && (o = "year"), a.format.indexOf("M") > -1 && (o = "month"), (a.format.indexOf("d") > -1 || a.format.indexOf("D") > -1) && (o = "date"), (a.format.indexOf("H") > -1 || a.format.indexOf("h") > -1 || a.format.indexOf("k") > -1 || a.format.indexOf("m") > -1 || a.format.indexOf("s") > -1 || a.format.indexOf("S") > -1) && (o = "datetime"), o;
545
+ }), d = P(), s = O({
517
546
  get: () => {
518
- const t = r.modelValue[o.name];
519
- if (t) {
520
- if (he(t))
521
- return t;
522
- if (L(t)) {
523
- const p = ee(t, a.value, !0);
524
- if (!p.isValid())
525
- throw new D(`日期输入框的值无效,不符合${a.value}格式`);
526
- return p.toDate();
547
+ const o = d.modelValue[a.name];
548
+ if (o) {
549
+ if (he(o))
550
+ return o;
551
+ if (L(o)) {
552
+ const m = ee(o, n.value, !0);
553
+ if (!m.isValid())
554
+ throw new D(`日期输入框的值无效,不符合${n.value}格式`);
555
+ return m.toDate();
527
556
  } else
528
557
  throw new D("日期输入框的值只能为字符串或日期类型");
529
558
  }
530
559
  },
531
- set: (t) => {
532
- o.sourceFormat ? t ? r.updateModelValue(o.name, ee(t).format(a.value)) : r.updateModelValue(o.name, "") : t ? r.updateModelValue(o.name, t) : r.updateModelValue(o.name, void 0);
560
+ set: (o) => {
561
+ a.sourceFormat ? o ? d.updateModelValue(a.name, ee(o).format(n.value)) : d.updateModelValue(a.name, "") : o ? d.updateModelValue(a.name, o) : d.updateModelValue(a.name, void 0);
533
562
  }
534
563
  });
535
- return (t, p) => (m(), c(e(g), { span: e(f) }, {
536
- default: d(() => [
537
- b(e(B), {
538
- prop: t.name,
539
- label: t.label,
540
- "label-width": t.labelWidth,
541
- required: t.required,
564
+ return (o, m) => (f(), c(e(g), { span: e(p) }, {
565
+ default: r(() => [
566
+ b(e(S), {
567
+ prop: o.name,
568
+ label: o.label,
569
+ "label-width": o.labelWidth,
570
+ required: o.required,
542
571
  rules: e(i)
543
572
  }, {
544
- default: d(() => [
545
- n.value ? (m(), c(e(We), {
573
+ default: r(() => [
574
+ t.value ? (f(), c(e(Ae), {
546
575
  key: 0,
547
- modelValue: u.value,
548
- "onUpdate:modelValue": p[0] || (p[0] = (y) => u.value = y),
549
- placeholder: t.placeholder,
550
- disabled: t.disabled,
551
- readonly: t.readonly,
552
- editable: t.editable,
553
- clearable: t.clearable,
554
- format: a.value,
576
+ modelValue: s.value,
577
+ "onUpdate:modelValue": m[0] || (m[0] = (y) => s.value = y),
578
+ placeholder: o.placeholder,
579
+ disabled: o.disabled,
580
+ readonly: o.readonly,
581
+ editable: o.editable,
582
+ clearable: o.clearable,
583
+ format: n.value,
555
584
  "arrow-control": "",
556
585
  style: { width: "100%" }
557
- }, null, 8, ["modelValue", "placeholder", "disabled", "readonly", "editable", "clearable", "format"])) : (m(), c(e(Re), {
586
+ }, null, 8, ["modelValue", "placeholder", "disabled", "readonly", "editable", "clearable", "format"])) : (f(), c(e($e), {
558
587
  key: 1,
559
- modelValue: u.value,
560
- "onUpdate:modelValue": p[1] || (p[1] = (y) => u.value = y),
561
- placeholder: t.placeholder,
562
- disabled: t.disabled,
563
- readonly: t.readonly,
564
- editable: t.editable,
565
- clearable: t.clearable,
588
+ modelValue: s.value,
589
+ "onUpdate:modelValue": m[1] || (m[1] = (y) => s.value = y),
590
+ placeholder: o.placeholder,
591
+ disabled: o.disabled,
592
+ readonly: o.readonly,
593
+ editable: o.editable,
594
+ clearable: o.clearable,
566
595
  type: l.value,
567
- format: a.value,
596
+ format: n.value,
568
597
  style: { width: "100%" }
569
598
  }, null, 8, ["modelValue", "placeholder", "disabled", "readonly", "editable", "clearable", "type", "format"]))
570
599
  ]),
@@ -574,7 +603,7 @@ const Ge = /* @__PURE__ */ v({
574
603
  _: 1
575
604
  }, 8, ["span"]));
576
605
  }
577
- }), ll = /* @__PURE__ */ v({
606
+ }), ol = /* @__PURE__ */ v({
578
607
  name: "OFormFile",
579
608
  inheritAttrs: !1,
580
609
  __name: "FileInput",
@@ -587,32 +616,32 @@ const Ge = /* @__PURE__ */ v({
587
616
  rules: {},
588
617
  disabled: { type: Boolean }
589
618
  },
590
- setup(o) {
591
- const f = w(), i = S(), n = R();
592
- te(n, () => {
593
- n.value || (a.value = "");
619
+ setup(a) {
620
+ const p = w(), i = B(), t = A();
621
+ ne(t, () => {
622
+ t.value || (n.value = "");
594
623
  });
595
- const a = k(""), l = A("inputRef");
596
- return ne(() => {
597
- l.value.input.onchange = (r) => {
598
- var u;
599
- n.value = (u = r == null ? void 0 : r.target) == null ? void 0 : u.files[0];
600
- }, a.value = "";
601
- }), (r, u) => (m(), c(e(g), { span: e(f) }, {
602
- default: d(() => [
603
- b(e(B), {
604
- prop: r.name,
605
- label: r.label,
606
- "label-width": r.labelWidth,
607
- required: r.required,
624
+ const n = z(""), l = $("inputRef");
625
+ return te(() => {
626
+ l.value.input.onchange = (d) => {
627
+ var s;
628
+ t.value = (s = d == null ? void 0 : d.target) == null ? void 0 : s.files[0];
629
+ }, n.value = "";
630
+ }), (d, s) => (f(), c(e(g), { span: e(p) }, {
631
+ default: r(() => [
632
+ b(e(S), {
633
+ prop: d.name,
634
+ label: d.label,
635
+ "label-width": d.labelWidth,
636
+ required: d.required,
608
637
  rules: e(i)
609
638
  }, {
610
- default: d(() => [
611
- b(e(z), {
639
+ default: r(() => [
640
+ b(e(W), {
612
641
  ref: "inputRef",
613
- modelValue: a.value,
614
- "onUpdate:modelValue": u[0] || (u[0] = (t) => a.value = t),
615
- disabled: r.disabled,
642
+ modelValue: n.value,
643
+ "onUpdate:modelValue": s[0] || (s[0] = (o) => n.value = o),
644
+ disabled: d.disabled,
616
645
  type: "file",
617
646
  "validate-event": !1
618
647
  }, null, 8, ["modelValue", "disabled"])
@@ -623,7 +652,7 @@ const Ge = /* @__PURE__ */ v({
623
652
  _: 1
624
653
  }, 8, ["span"]));
625
654
  }
626
- }), al = /* @__PURE__ */ v({
655
+ }), nl = /* @__PURE__ */ v({
627
656
  name: "OFormButtongroup",
628
657
  inheritAttrs: !1,
629
658
  __name: "ButtonGroup",
@@ -632,21 +661,21 @@ const Ge = /* @__PURE__ */ v({
632
661
  gutter: { type: [Boolean, String] },
633
662
  align: { default: "right" }
634
663
  },
635
- setup(o) {
636
- const f = O(() => ({
637
- textAlign: o.align
664
+ setup(a) {
665
+ const p = O(() => ({
666
+ textAlign: a.align
638
667
  })), i = w();
639
- return (n, a) => (m(), c(e(g), {
668
+ return (t, n) => (f(), c(e(g), {
640
669
  span: e(i),
641
- style: we(f.value)
670
+ style: Se(p.value)
642
671
  }, {
643
- default: d(() => [
644
- b(e(Te), {
645
- gutter: n.gutter,
672
+ default: r(() => [
673
+ b(e(Ne), {
674
+ gutter: t.gutter,
646
675
  style: { "margin-bottom": "var(--orion-form-validation-message-height)" }
647
676
  }, {
648
- default: d(() => [
649
- T(n.$slots, "default")
677
+ default: r(() => [
678
+ k(t.$slots, "default")
650
679
  ]),
651
680
  _: 3
652
681
  }, 8, ["gutter"])
@@ -654,7 +683,7 @@ const Ge = /* @__PURE__ */ v({
654
683
  _: 3
655
684
  }, 8, ["span", "style"]));
656
685
  }
657
- }), ol = /* @__PURE__ */ v({
686
+ }), tl = /* @__PURE__ */ v({
658
687
  name: "OFormDiy",
659
688
  inheritAttrs: !1,
660
689
  __name: "DiyItem",
@@ -666,19 +695,19 @@ const Ge = /* @__PURE__ */ v({
666
695
  required: { type: Boolean },
667
696
  rules: {}
668
697
  },
669
- setup(o) {
670
- const f = w(), i = S();
671
- return (n, a) => (m(), c(e(g), { span: e(f) }, {
672
- default: d(() => [
673
- b(e(B), {
674
- prop: n.name,
675
- label: n.label,
676
- "label-width": n.labelWidth,
677
- required: n.required,
698
+ setup(a) {
699
+ const p = w(), i = B();
700
+ return (t, n) => (f(), c(e(g), { span: e(p) }, {
701
+ default: r(() => [
702
+ b(e(S), {
703
+ prop: t.name,
704
+ label: t.label,
705
+ "label-width": t.labelWidth,
706
+ required: t.required,
678
707
  rules: e(i)
679
708
  }, {
680
- default: d(() => [
681
- T(n.$slots, "default")
709
+ default: r(() => [
710
+ k(t.$slots, "default")
682
711
  ]),
683
712
  _: 3
684
713
  }, 8, ["prop", "label", "label-width", "required", "rules"])
@@ -686,7 +715,7 @@ const Ge = /* @__PURE__ */ v({
686
715
  _: 3
687
716
  }, 8, ["span"]));
688
717
  }
689
- }), tl = /* @__PURE__ */ v({
718
+ }), rl = /* @__PURE__ */ v({
690
719
  name: "OFormLov",
691
720
  inheritAttrs: !1,
692
721
  __name: "LovInput",
@@ -703,80 +732,80 @@ const Ge = /* @__PURE__ */ v({
703
732
  readonly: { type: Boolean },
704
733
  fillMapping: { type: [String, Function] }
705
734
  },
706
- setup(o) {
707
- const f = w(), i = S(), n = R(), a = P(), l = k(!1), r = (h) => {
735
+ setup(a) {
736
+ const p = w(), i = B(), t = A(), n = P(), l = z(!1), d = (h) => {
708
737
  l.value = h;
709
- }, u = k(!1), t = () => {
710
- u.value || (u.value = !0), l.value || $.value.handleOpen();
738
+ }, s = z(!1), o = () => {
739
+ s.value || (s.value = !0), l.value || I.value.handleOpen();
711
740
  };
712
- let p;
741
+ let m;
713
742
  const y = (h) => {
714
- p = h;
743
+ m = h;
715
744
  }, q = (h) => {
716
- ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight", "Enter", "Space"].indexOf(h.code) > -1 && (l.value && p && p(h.code), h.stopPropagation()), ["ArrowUp", "ArrowDown"].indexOf(h.code) > -1 && !l.value && $.value.handleOpen();
717
- }, H = A("input"), Y = async (h) => {
745
+ ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight", "Enter", "Space"].indexOf(h.code) > -1 && (l.value && m && m(h.code), h.stopPropagation()), ["ArrowUp", "ArrowDown"].indexOf(h.code) > -1 && !l.value && I.value.handleOpen();
746
+ }, H = $("input"), Y = async (h) => {
718
747
  l.value && H.value.focus();
719
748
  }, J = () => {
720
- if (u.value && L(o.fillMapping)) {
721
- const h = {}, V = o.fillMapping.split(",");
749
+ if (s.value && L(a.fillMapping)) {
750
+ const h = {}, V = a.fillMapping.split(",");
722
751
  for (let M = 0; M < V.length; M++) {
723
752
  const F = V[M].split(":")[0].trim();
724
753
  h[F] = void 0;
725
754
  }
726
- a.updateModelValueMulti(h);
755
+ n.updateModelValueMulti(h);
727
756
  }
728
- }, $ = A("dropdown");
757
+ }, I = $("dropdown");
729
758
  return Z(
730
- Ye,
759
+ Ge,
731
760
  x({
732
- lovValue: n,
761
+ lovValue: t,
733
762
  backfill: (h) => {
734
- if ($.value.handleClose(), L(o.fillMapping)) {
735
- const V = {}, M = o.fillMapping.split(",");
763
+ if (I.value.handleClose(), L(a.fillMapping)) {
764
+ const V = {}, M = a.fillMapping.split(",");
736
765
  for (let F = 0; F < M.length; F++) {
737
- const W = M[F].split(":")[0].trim(), Q = M[F].split(":")[1].trim(), s = h[Q];
738
- V[W] = s;
766
+ const R = M[F].split(":")[0].trim(), Q = M[F].split(":")[1].trim(), u = h[Q];
767
+ V[R] = u;
739
768
  }
740
- a.updateModelValueMulti(V);
769
+ n.updateModelValueMulti(V);
741
770
  } else
742
- o.fillMapping && o.fillMapping(h);
743
- u.value && (u.value = !1);
771
+ a.fillMapping && a.fillMapping(h);
772
+ s.value && (s.value = !1);
744
773
  },
745
774
  registerKeydownHandler: y
746
775
  })
747
- ), (h, V) => (m(), c(e(g), { span: e(f) }, {
748
- default: d(() => [
749
- b(e(B), {
776
+ ), (h, V) => (f(), c(e(g), { span: e(p) }, {
777
+ default: r(() => [
778
+ b(e(S), {
750
779
  prop: h.name,
751
780
  label: h.label,
752
781
  "label-width": h.labelWidth,
753
782
  required: h.required,
754
783
  rules: e(i)
755
784
  }, {
756
- default: d(() => [
757
- b(e(se), {
785
+ default: r(() => [
786
+ b(e(ue), {
758
787
  ref: "dropdown",
759
788
  trigger: "click",
760
- onVisibleChange: r,
789
+ onVisibleChange: d,
761
790
  style: { width: "100%" }
762
791
  }, {
763
- dropdown: d(() => [
764
- T(h.$slots, "default")
792
+ dropdown: r(() => [
793
+ k(h.$slots, "default")
765
794
  ]),
766
- default: d(() => [
767
- b(e(z), {
795
+ default: r(() => [
796
+ b(e(W), {
768
797
  ref: "input",
769
- modelValue: e(n),
770
- "onUpdate:modelValue": V[0] || (V[0] = (M) => C(n) ? n.value = M : null),
798
+ modelValue: e(t),
799
+ "onUpdate:modelValue": V[0] || (V[0] = (M) => C(t) ? t.value = M : null),
771
800
  maxlength: h.maxlength,
772
801
  placeholder: h.placeholder,
773
802
  disabled: h.disabled,
774
803
  readonly: h.readonly,
775
- onInput: t,
804
+ onInput: o,
776
805
  onKeydown: q,
777
806
  onChange: J,
778
807
  onBlur: Y,
779
- "suffix-icon": e(Ue)
808
+ "suffix-icon": e(Pe)
780
809
  }, null, 8, ["modelValue", "maxlength", "placeholder", "disabled", "readonly", "suffix-icon"])
781
810
  ]),
782
811
  _: 3
@@ -788,7 +817,7 @@ const Ge = /* @__PURE__ */ v({
788
817
  _: 3
789
818
  }, 8, ["span"]));
790
819
  }
791
- }), nl = /* @__PURE__ */ v({
820
+ }), dl = /* @__PURE__ */ v({
792
821
  name: "OFormNumber",
793
822
  inheritAttrs: !1,
794
823
  __name: "NumberInput",
@@ -810,10 +839,10 @@ const Ge = /* @__PURE__ */ v({
810
839
  controls: { type: Boolean, default: !0 },
811
840
  controlsPosition: {}
812
841
  },
813
- setup(o) {
814
- const f = w(), i = S(), n = P(), a = O({
842
+ setup(a) {
843
+ const p = w(), i = B(), t = P(), n = O({
815
844
  get: () => {
816
- const l = n.modelValue[o.name];
845
+ const l = t.modelValue[a.name];
817
846
  if (l) {
818
847
  if (ce(l))
819
848
  return l;
@@ -823,22 +852,22 @@ const Ge = /* @__PURE__ */ v({
823
852
  }
824
853
  },
825
854
  set: (l) => {
826
- l ? n.updateModelValue(o.name, l) : n.updateModelValue(o.name, void 0);
855
+ l ? t.updateModelValue(a.name, l) : t.updateModelValue(a.name, void 0);
827
856
  }
828
857
  });
829
- return (l, r) => (m(), c(e(g), { span: e(f) }, {
830
- default: d(() => [
831
- b(e(B), {
858
+ return (l, d) => (f(), c(e(g), { span: e(p) }, {
859
+ default: r(() => [
860
+ b(e(S), {
832
861
  prop: l.name,
833
862
  label: l.label,
834
863
  "label-width": l.labelWidth,
835
864
  required: l.required,
836
865
  rules: e(i)
837
866
  }, {
838
- default: d(() => [
839
- b(e(Ae), {
840
- modelValue: a.value,
841
- "onUpdate:modelValue": r[0] || (r[0] = (u) => a.value = u),
867
+ default: r(() => [
868
+ b(e(Ee), {
869
+ modelValue: n.value,
870
+ "onUpdate:modelValue": d[0] || (d[0] = (s) => n.value = s),
842
871
  placeholder: l.placeholder,
843
872
  disabled: l.disabled,
844
873
  readonly: l.readonly,
@@ -858,10 +887,10 @@ const Ge = /* @__PURE__ */ v({
858
887
  _: 1
859
888
  }, 8, ["span"]));
860
889
  }
861
- }), rl = {
890
+ }), sl = {
862
891
  key: 0,
863
892
  style: { position: "absolute", inset: "4px 30px 4px 4px", overflow: "hidden", pointerEvents: "none" }
864
- }, dl = /* @__PURE__ */ v({
893
+ }, ul = /* @__PURE__ */ v({
865
894
  name: "OFormTableselect",
866
895
  inheritAttrs: !1,
867
896
  __name: "TableSelect",
@@ -880,98 +909,98 @@ const Ge = /* @__PURE__ */ v({
880
909
  tag: { type: Function }
881
910
  },
882
911
  emits: ["change"],
883
- setup(o, { emit: f }) {
884
- const i = f, n = w(), a = S(), l = k(""), r = k(!1), u = P(), t = O({
912
+ setup(a, { emit: p }) {
913
+ const i = p, t = w(), n = B(), l = z(""), d = z(!1), s = P(), o = O({
885
914
  get: () => {
886
- const s = u.modelValue[o.name];
887
- if (s) {
888
- if (!ve(s))
915
+ const u = s.modelValue[a.name];
916
+ if (u) {
917
+ if (!ve(u))
889
918
  throw new D("表格下拉框的值只能为数组类型");
890
- return s;
919
+ return u;
891
920
  }
892
921
  },
893
- set: (s) => {
894
- r.value = !1, s ? u.updateModelValue(o.name, s) : u.updateModelValue(o.name, void 0);
922
+ set: (u) => {
923
+ d.value = !1, u ? s.updateModelValue(a.name, u) : s.updateModelValue(a.name, void 0);
895
924
  }
896
- }), p = k([]);
897
- ne(async () => {
898
- W && (p.value = await W(t.value), p.value && (h.value = p.value.map((s) => o.tag(s))));
899
- }), te(t, async () => {
900
- r.value ? W && (p.value = await W(t.value), p.value && (h.value = p.value.map((s) => o.tag(s)))) : r.value = !0;
925
+ }), m = z([]);
926
+ te(async () => {
927
+ R && (m.value = await R(o.value), m.value && (h.value = m.value.map((u) => a.tag(u))));
928
+ }), ne(o, async () => {
929
+ d.value ? R && (m.value = await R(o.value), m.value && (h.value = m.value.map((u) => a.tag(u)))) : d.value = !0;
901
930
  });
902
- const y = k(!1), q = (s) => {
903
- y.value = s;
931
+ const y = z(!1), q = (u) => {
932
+ y.value = u;
904
933
  }, H = () => {
905
934
  y.value || V.value.handleOpen();
906
- }, Y = A("input"), J = () => {
935
+ }, Y = $("input"), J = () => {
907
936
  Y.value.focus();
908
- }, $ = (s) => {
909
- y.value ? ["Enter", "Escape"].indexOf(s.code) > -1 ? V.value.handleClose() : s.code == "ArrowDown" ? s.stopPropagation() : s.code == "Tab" && (y.value = !1, V.value.handleClose()) : ["ArrowUp", "ArrowDown"].indexOf(s.code) > -1 && (V.value.handleOpen(), s.stopPropagation());
910
- }, _ = async (s) => {
937
+ }, I = (u) => {
938
+ y.value ? ["Enter", "Escape"].indexOf(u.code) > -1 ? V.value.handleClose() : u.code == "ArrowDown" ? u.stopPropagation() : u.code == "Tab" && (y.value = !1, V.value.handleClose()) : ["ArrowUp", "ArrowDown"].indexOf(u.code) > -1 && (V.value.handleOpen(), u.stopPropagation());
939
+ }, _ = async (u) => {
911
940
  y.value ? Y.value.focus() : l.value = "";
912
- }, h = k([]), V = A("dropdown"), M = (s, j) => {
913
- t.value = s.map((I) => ge(I, o.pick)), h.value = s.map((I) => o.tag(I)), j && (l.value = ""), i("change", s);
941
+ }, h = z([]), V = $("dropdown"), M = (u, j) => {
942
+ o.value = u.map((T) => ge(T, a.pick)), h.value = u.map((T) => a.tag(T)), j && (l.value = ""), i("change", u);
914
943
  }, F = () => {
915
944
  V.value.handleClose();
916
945
  };
917
- let W;
918
- const Q = (s) => {
919
- W = s;
946
+ let R;
947
+ const Q = (u) => {
948
+ R = u;
920
949
  };
921
950
  return Z(
922
- je,
951
+ Le,
923
952
  x({
924
953
  inputValue: l,
925
- selection: p,
954
+ selection: m,
926
955
  onSelect: M,
927
956
  selectDone: F,
928
- tag: o.tag,
957
+ tag: a.tag,
929
958
  registerRowCompletionProvider: Q
930
959
  })
931
- ), (s, j) => {
932
- const I = Ve("o-space");
933
- return m(), c(e(g), { span: e(n) }, {
934
- default: d(() => [
935
- b(e(B), {
936
- prop: s.name,
937
- label: s.label,
938
- "label-width": s.labelWidth,
939
- required: s.required,
940
- rules: e(a)
960
+ ), (u, j) => {
961
+ const T = Be("o-space");
962
+ return f(), c(e(g), { span: e(t) }, {
963
+ default: r(() => [
964
+ b(e(S), {
965
+ prop: u.name,
966
+ label: u.label,
967
+ "label-width": u.labelWidth,
968
+ required: u.required,
969
+ rules: e(n)
941
970
  }, {
942
- default: d(() => [
943
- b(e(se), {
971
+ default: r(() => [
972
+ b(e(ue), {
944
973
  ref: "dropdown",
945
974
  trigger: "click",
946
975
  onVisibleChange: q,
947
976
  style: { width: "100%" }
948
977
  }, {
949
- dropdown: d(() => [
950
- T(s.$slots, "default")
978
+ dropdown: r(() => [
979
+ k(u.$slots, "default")
951
980
  ]),
952
- default: d(() => [
953
- Be("div", {
981
+ default: r(() => [
982
+ qe("div", {
954
983
  onFocus: J,
955
984
  style: { position: "relative", width: "100%", height: "100%" }
956
985
  }, [
957
- b(e(z), {
986
+ b(e(W), {
958
987
  ref: "input",
959
988
  modelValue: l.value,
960
989
  "onUpdate:modelValue": j[0] || (j[0] = (X) => l.value = X),
961
- maxlength: s.maxlength,
962
- placeholder: s.placeholder,
963
- disabled: s.disabled,
964
- readonly: s.readonly,
990
+ maxlength: u.maxlength,
991
+ placeholder: u.placeholder,
992
+ disabled: u.disabled,
993
+ readonly: u.readonly,
965
994
  onInput: H,
966
- onKeydown: $,
995
+ onKeydown: I,
967
996
  onBlur: _,
968
- "suffix-icon": y.value ? e(Ne) : e(Pe)
997
+ "suffix-icon": y.value ? e(Ye) : e(je)
969
998
  }, null, 8, ["modelValue", "maxlength", "placeholder", "disabled", "readonly", "suffix-icon"]),
970
- y.value ? Se("", !0) : (m(), E("div", rl, [
971
- b(I, null, {
972
- default: d(() => [
973
- (m(!0), E(U, null, N(h.value, (X) => (m(), c(e(Ee), { type: "info" }, {
974
- default: d(() => [
999
+ y.value ? Me("", !0) : (f(), E("div", sl, [
1000
+ b(T, null, {
1001
+ default: r(() => [
1002
+ (f(!0), E(U, null, N(h.value, (X) => (f(), c(e(De), { type: "info" }, {
1003
+ default: r(() => [
975
1004
  ae(oe(X), 1)
976
1005
  ]),
977
1006
  _: 2
@@ -992,30 +1021,30 @@ const Ge = /* @__PURE__ */ v({
992
1021
  }, 8, ["span"]);
993
1022
  };
994
1023
  }
995
- }), wl = qe(Ge, {
996
- StringInput: Le,
997
- PasswordInput: Ke,
998
- Textarea: He,
999
- SingleSelect: Je,
1000
- MultiSelect: Qe,
1001
- RadioGroup: Xe,
1002
- CheckboxGroup: Ze,
1003
- Checkbox: xe,
1004
- Switch: _e,
1005
- DateInput: el,
1006
- FileInput: ll,
1007
- ButtonGroup: al,
1008
- DiyItem: ol,
1009
- LovInput: tl,
1010
- NumberInput: nl,
1011
- TableSelect: dl
1024
+ }), Sl = Ce(Ke, {
1025
+ StringInput: He,
1026
+ PasswordInput: Je,
1027
+ Textarea: Qe,
1028
+ SingleSelect: Xe,
1029
+ MultiSelect: Ze,
1030
+ RadioGroup: xe,
1031
+ CheckboxGroup: _e,
1032
+ Checkbox: el,
1033
+ Switch: ll,
1034
+ DateInput: al,
1035
+ FileInput: ol,
1036
+ ButtonGroup: nl,
1037
+ DiyItem: tl,
1038
+ LovInput: rl,
1039
+ NumberInput: dl,
1040
+ TableSelect: ul
1012
1041
  });
1013
1042
  export {
1014
- wl as default,
1015
- De as formContextKey,
1016
- Ye as lovContextKey,
1017
- je as tableSelectContext,
1018
- Sl as useLov,
1019
- Ml as useTableselect
1043
+ Sl as default,
1044
+ Ie as formContextKey,
1045
+ Ge as lovContextKey,
1046
+ Le as tableSelectContext,
1047
+ Ml as useLov,
1048
+ kl as useTableselect
1020
1049
  };
1021
1050
  //# sourceMappingURL=index.js.map