orion-design 0.1.32 → 0.1.33

Sign up to get free protection for your applications and to get access to all the features.
Files changed (85) hide show
  1. package/dist/Throne/hooks/use-throne-context.d.ts +5 -0
  2. package/dist/Throne/hooks/use-throne-context.js +15 -0
  3. package/dist/Throne/hooks/use-throne-context.js.map +1 -0
  4. package/dist/Throne/index.d.ts +1 -1
  5. package/dist/Throne/index.js +3 -3
  6. package/dist/Throne/index.js.map +1 -1
  7. package/dist/components/Button/ButtonGroup/ButtonGroup.d.ts +2 -0
  8. package/dist/components/Button/index.js +19 -17
  9. package/dist/components/Button/index.js.map +1 -1
  10. package/dist/components/Form/FileInput/FileInput.vue.d.ts +4 -4
  11. package/dist/components/Form/LovInput/LovInput.vue.d.ts +894 -0
  12. package/dist/components/Form/MultiTableSelect/MultiTableSelect.d.ts +26 -0
  13. package/dist/components/Form/MultiTableSelect/MultiTableSelect.js +5 -0
  14. package/dist/components/Form/MultiTableSelect/MultiTableSelect.js.map +1 -0
  15. package/dist/components/Form/MultiTableSelect/MultiTableSelect.vue.d.ts +6249 -0
  16. package/dist/components/Form/MultiTableSelect/hooks/useMultiTableSelect.d.ts +1 -0
  17. package/dist/components/Form/MultiTableSelect/hooks/useMultiTableSelect.js +9 -0
  18. package/dist/components/Form/MultiTableSelect/hooks/useMultiTableSelect.js.map +1 -0
  19. package/dist/components/Form/MultiTableSelect/index.d.ts +2 -0
  20. package/dist/components/Form/MultiTableSelect/index.js +7 -0
  21. package/dist/components/Form/MultiTableSelect/index.js.map +1 -0
  22. package/dist/components/Form/hooks/index.js +46 -45
  23. package/dist/components/Form/hooks/index.js.map +1 -1
  24. package/dist/components/Form/index.d.ts +3 -0
  25. package/dist/components/Form/index.js +542 -401
  26. package/dist/components/Form/index.js.map +1 -1
  27. package/dist/components/LovTable/LovPagetable.vue.d.ts +18 -6
  28. package/dist/components/LovTable/LovQuerytable.vue.d.ts +468 -4
  29. package/dist/components/LovTable/index.d.ts +243 -5
  30. package/dist/components/LovTable/index.js +11 -13
  31. package/dist/components/LovTable/index.js.map +1 -1
  32. package/dist/components/MultiTableSelectPagetable/MultiTableSelectPagetable.vue.d.ts +880 -0
  33. package/dist/components/MultiTableSelectPagetable/index.d.ts +462 -0
  34. package/dist/components/MultiTableSelectPagetable/index.js +164 -0
  35. package/dist/components/MultiTableSelectPagetable/index.js.map +1 -0
  36. package/dist/components/Pagetable/Pagetable.d.ts +4 -2
  37. package/dist/components/Pagetable/columns/PagetableColumnButtongroup.d.ts +1 -1
  38. package/dist/components/Pagetable/columns/PagetableColumnDate.d.ts +1 -1
  39. package/dist/components/Pagetable/columns/PagetableColumnDiy.d.ts +1 -1
  40. package/dist/components/Pagetable/columns/PagetableColumnLink.d.ts +1 -1
  41. package/dist/components/Pagetable/columns/PagetableColumnMultiselect.d.ts +1 -1
  42. package/dist/components/Pagetable/columns/PagetableColumnNumber.d.ts +1 -1
  43. package/dist/components/Pagetable/columns/PagetableColumnSingleselect.d.ts +1 -1
  44. package/dist/components/Pagetable/columns/PagetableColumnString.d.ts +1 -1
  45. package/dist/components/Pagetable/hooks/useCode.d.ts +2 -0
  46. package/dist/components/Pagetable/hooks/useCode.js +24 -0
  47. package/dist/components/Pagetable/hooks/useCode.js.map +1 -0
  48. package/dist/components/Pagetable/index.d.ts +4 -2
  49. package/dist/components/Pagetable/index.js +338 -334
  50. package/dist/components/Pagetable/index.js.map +1 -1
  51. package/dist/components/Querytable/Querytable.d.ts +80 -2
  52. package/dist/components/Querytable/columns/QuerytableColumnButtongroup.d.ts +14 -1
  53. package/dist/components/Querytable/columns/QuerytableColumnDate.d.ts +14 -1
  54. package/dist/components/Querytable/columns/QuerytableColumnDiy.d.ts +1 -1
  55. package/dist/components/Querytable/columns/QuerytableColumnLink.d.ts +14 -1
  56. package/dist/components/Querytable/columns/QuerytableColumnMultiselect.d.ts +14 -1
  57. package/dist/components/Querytable/columns/QuerytableColumnNumber.d.ts +14 -1
  58. package/dist/components/Querytable/columns/QuerytableColumnSingleselect.d.ts +14 -1
  59. package/dist/components/Querytable/columns/QuerytableColumnString.d.ts +14 -1
  60. package/dist/components/Querytable/hooks/useColumns.js +16 -11
  61. package/dist/components/Querytable/hooks/useColumns.js.map +1 -1
  62. package/dist/components/Querytable/index.d.ts +147 -1
  63. package/dist/components/Querytable/index.js +404 -347
  64. package/dist/components/Querytable/index.js.map +1 -1
  65. package/dist/components/Tabs/index.js +1 -1
  66. package/dist/components/Throne/ThroneContextProvider.d.ts +25 -0
  67. package/dist/components/_util/vue/icon.js +1 -1
  68. package/dist/components/components.d.ts +2 -0
  69. package/dist/components/components.js +22 -18
  70. package/dist/components/components.js.map +1 -1
  71. package/dist/components/index.js +41 -33
  72. package/dist/components/index.js.map +1 -1
  73. package/dist/components-DP9bnDLm.js +48 -0
  74. package/dist/components-DP9bnDLm.js.map +1 -0
  75. package/dist/{index-C6P_0wAy.js → index-ChkLOmNK.js} +76 -46
  76. package/dist/{index-C6P_0wAy.js.map → index-ChkLOmNK.js.map} +1 -1
  77. package/dist/index.d.ts +1 -0
  78. package/dist/index.js +41 -31
  79. package/dist/index.js.map +1 -1
  80. package/dist/version/version.d.ts +1 -1
  81. package/dist/version/version.js +1 -1
  82. package/dist/version/version.js.map +1 -1
  83. package/package.json +1 -1
  84. package/dist/components-8oZ2kpUC.js +0 -27
  85. package/dist/components-8oZ2kpUC.js.map +0 -1
@@ -1,16 +1,18 @@
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
- import { S as Fe } from "../../index-BbsXWo7C.js";
10
- import { g as Oe } from "../../index-C6P_0wAy.js";
11
- import { lovContextKey as ze } from "./LovInput/LovInput.js";
12
- import { default as dl } from "./LovInput/hooks/useLov.js";
13
- const We = /* @__PURE__ */ y({
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 I, 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";
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 Te } from "./utils/index.js";
9
+ import { S as Ie } from "../../index-BbsXWo7C.js";
10
+ import { g as Ue, h as Ne, j as Pe } from "../../index-ChkLOmNK.js";
11
+ import { lovContextKey as Ye } from "./LovInput/LovInput.js";
12
+ import { multiTableSelectContext as je } from "./MultiTableSelect/MultiTableSelect.js";
13
+ import { default as Sl } from "./LovInput/hooks/useLov.js";
14
+ import { default as Ml } from "./MultiTableSelect/hooks/useMultiTableSelect.js";
15
+ const Ge = /* @__PURE__ */ v({
14
16
  name: "OForm",
15
17
  inheritAttrs: !1,
16
18
  __name: "Form",
@@ -22,40 +24,40 @@ const We = /* @__PURE__ */ y({
22
24
  modelValue: {}
23
25
  },
24
26
  emits: ["update:modelValue"],
25
- setup(t, { expose: i, emit: u }) {
26
- const o = u, l = (r, m) => {
27
- if (!Object.keys(t.modelValue).includes(r))
28
- throw new W(`modelValue中不存在[${r}]`);
29
- o("update:modelValue", { ...t.modelValue, [r]: m });
30
- }, a = (r) => {
31
- const m = Object.keys(t.modelValue), c = Object.keys(r), S = oe(c, m);
32
- if (!re(S))
33
- throw new W(`modelValue中不存在[${S.join(",")}]`);
34
- o("update:modelValue", { ...t.modelValue, ...r });
35
- }, n = Y("form");
36
- return i({
37
- validate: async () => await n.value.validate()
38
- }), L(
39
- Be,
40
- j({
41
- modelValue: R(() => t.modelValue),
42
- updateModelValue: l,
43
- updateModelValueMulti: a,
44
- rules: R(() => t.rules),
45
- itemSpan: R(() => t.itemSpan),
46
- disabled: R(() => t.disabled)
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);
34
+ if (!be(q))
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()
40
+ }), Z(
41
+ De,
42
+ x({
43
+ modelValue: G(() => o.modelValue),
44
+ updateModelValue: a,
45
+ updateModelValueMulti: l,
46
+ rules: G(() => o.rules),
47
+ itemSpan: G(() => o.itemSpan),
48
+ disabled: G(() => o.disabled)
47
49
  })
48
- ), (r, m) => (p(), h(e(fe), {
50
+ ), (t, p) => (m(), c(e(Me), {
49
51
  ref: "form",
50
- model: r.modelValue,
51
- rules: r.rules,
52
- "label-width": r.itemLabelWidth,
53
- disabled: r.disabled
52
+ model: t.modelValue,
53
+ rules: t.rules,
54
+ "label-width": t.itemLabelWidth,
55
+ disabled: t.disabled
54
56
  }, {
55
57
  default: d(() => [
56
- f(e(he), { gutter: 16 }, {
58
+ b(e(Ce), { gutter: 16 }, {
57
59
  default: d(() => [
58
- $(r.$slots, "default")
60
+ I(t.$slots, "default")
59
61
  ]),
60
62
  _: 3
61
63
  })
@@ -63,7 +65,7 @@ const We = /* @__PURE__ */ y({
63
65
  _: 3
64
66
  }, 8, ["model", "rules", "label-width", "disabled"]));
65
67
  }
66
- }), ke = /* @__PURE__ */ y({
68
+ }), Le = /* @__PURE__ */ v({
67
69
  name: "OFormString",
68
70
  inheritAttrs: !1,
69
71
  __name: "StringInput",
@@ -79,25 +81,25 @@ const We = /* @__PURE__ */ y({
79
81
  disabled: { type: Boolean },
80
82
  readonly: { type: Boolean }
81
83
  },
82
- setup(t) {
83
- const i = v(), u = V(), o = z();
84
- return (l, a) => (p(), h(e(g), { span: e(i) }, {
84
+ setup(o) {
85
+ const f = w(), i = S(), n = R();
86
+ return (a, l) => (m(), c(e(g), { span: e(f) }, {
85
87
  default: d(() => [
86
- f(e(w), {
87
- prop: l.name,
88
- label: l.label,
89
- "label-width": l.labelWidth,
90
- required: l.required,
91
- rules: e(u)
88
+ b(e(B), {
89
+ prop: a.name,
90
+ label: a.label,
91
+ "label-width": a.labelWidth,
92
+ required: a.required,
93
+ rules: e(i)
92
94
  }, {
93
95
  default: d(() => [
94
- f(e(O), {
95
- modelValue: e(o),
96
- "onUpdate:modelValue": a[0] || (a[0] = (n) => q(o) ? o.value = n : null),
97
- maxlength: l.maxlength,
98
- placeholder: l.placeholder,
99
- disabled: l.disabled,
100
- readonly: l.readonly
96
+ b(e(z), {
97
+ modelValue: e(n),
98
+ "onUpdate:modelValue": l[0] || (l[0] = (r) => C(n) ? n.value = r : null),
99
+ maxlength: a.maxlength,
100
+ placeholder: a.placeholder,
101
+ disabled: a.disabled,
102
+ readonly: a.readonly
101
103
  }, null, 8, ["modelValue", "maxlength", "placeholder", "disabled", "readonly"])
102
104
  ]),
103
105
  _: 1
@@ -106,7 +108,7 @@ const We = /* @__PURE__ */ y({
106
108
  _: 1
107
109
  }, 8, ["span"]));
108
110
  }
109
- }), Re = /* @__PURE__ */ y({
111
+ }), Ke = /* @__PURE__ */ v({
110
112
  name: "OFormPassword",
111
113
  inheritAttrs: !1,
112
114
  __name: "PasswordInput",
@@ -122,25 +124,25 @@ const We = /* @__PURE__ */ y({
122
124
  disabled: { type: Boolean },
123
125
  readonly: { type: Boolean }
124
126
  },
125
- setup(t) {
126
- const i = v(), u = V(), o = z();
127
- return (l, a) => (p(), h(e(g), { span: e(i) }, {
127
+ setup(o) {
128
+ const f = w(), i = S(), n = R();
129
+ return (a, l) => (m(), c(e(g), { span: e(f) }, {
128
130
  default: d(() => [
129
- f(e(w), {
130
- prop: l.name,
131
- label: l.label,
132
- "label-width": l.labelWidth,
133
- required: l.required,
134
- rules: e(u)
131
+ b(e(B), {
132
+ prop: a.name,
133
+ label: a.label,
134
+ "label-width": a.labelWidth,
135
+ required: a.required,
136
+ rules: e(i)
135
137
  }, {
136
138
  default: d(() => [
137
- f(e(O), {
138
- modelValue: e(o),
139
- "onUpdate:modelValue": a[0] || (a[0] = (n) => q(o) ? o.value = n : null),
140
- maxlength: l.maxlength,
141
- placeholder: l.placeholder,
142
- disabled: l.disabled,
143
- readonly: l.readonly,
139
+ b(e(z), {
140
+ modelValue: e(n),
141
+ "onUpdate:modelValue": l[0] || (l[0] = (r) => C(n) ? n.value = r : null),
142
+ maxlength: a.maxlength,
143
+ placeholder: a.placeholder,
144
+ disabled: a.disabled,
145
+ readonly: a.readonly,
144
146
  type: "password"
145
147
  }, null, 8, ["modelValue", "maxlength", "placeholder", "disabled", "readonly"])
146
148
  ]),
@@ -150,7 +152,7 @@ const We = /* @__PURE__ */ y({
150
152
  _: 1
151
153
  }, 8, ["span"]));
152
154
  }
153
- }), Ae = /* @__PURE__ */ y({
155
+ }), He = /* @__PURE__ */ v({
154
156
  name: "OFormTextarea",
155
157
  inheritAttrs: !1,
156
158
  __name: "Textarea",
@@ -167,27 +169,27 @@ const We = /* @__PURE__ */ y({
167
169
  readonly: { type: Boolean },
168
170
  rows: {}
169
171
  },
170
- setup(t) {
171
- const i = v(), u = V(), o = z();
172
- return (l, a) => (p(), h(e(g), { span: e(i) }, {
172
+ setup(o) {
173
+ const f = w(), i = S(), n = R();
174
+ return (a, l) => (m(), c(e(g), { span: e(f) }, {
173
175
  default: d(() => [
174
- f(e(w), {
175
- prop: l.name,
176
- label: l.label,
177
- "label-width": l.labelWidth,
178
- required: l.required,
179
- rules: e(u)
176
+ b(e(B), {
177
+ prop: a.name,
178
+ label: a.label,
179
+ "label-width": a.labelWidth,
180
+ required: a.required,
181
+ rules: e(i)
180
182
  }, {
181
183
  default: d(() => [
182
- f(e(O), {
183
- modelValue: e(o),
184
- "onUpdate:modelValue": a[0] || (a[0] = (n) => q(o) ? o.value = n : null),
185
- maxlength: l.maxlength,
186
- placeholder: l.placeholder,
187
- disabled: l.disabled,
188
- readonly: l.readonly,
184
+ b(e(z), {
185
+ modelValue: e(n),
186
+ "onUpdate:modelValue": l[0] || (l[0] = (r) => C(n) ? n.value = r : null),
187
+ maxlength: a.maxlength,
188
+ placeholder: a.placeholder,
189
+ disabled: a.disabled,
190
+ readonly: a.readonly,
189
191
  type: "textarea",
190
- rows: l.rows,
192
+ rows: a.rows,
191
193
  resize: "none"
192
194
  }, null, 8, ["modelValue", "maxlength", "placeholder", "disabled", "readonly", "rows"])
193
195
  ]),
@@ -197,7 +199,7 @@ const We = /* @__PURE__ */ y({
197
199
  _: 1
198
200
  }, 8, ["span"]));
199
201
  }
200
- }), $e = /* @__PURE__ */ y({
202
+ }), Je = /* @__PURE__ */ v({
201
203
  name: "OFormSingleselect",
202
204
  inheritAttrs: !1,
203
205
  __name: "SingleSelect",
@@ -214,38 +216,38 @@ const We = /* @__PURE__ */ y({
214
216
  clearable: { type: Boolean },
215
217
  filterable: { type: Boolean }
216
218
  },
217
- setup(t) {
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) }, {
219
+ setup(o) {
220
+ const f = le(), i = w(), n = S(), a = ie(), l = K(), r = R(), u = O(() => $e(l.value, r.value));
221
+ return (t, p) => (m(), c(e(g), { span: e(i) }, {
220
222
  default: d(() => [
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)
223
+ b(e(B), {
224
+ prop: t.name,
225
+ label: t.label,
226
+ "label-width": t.labelWidth,
227
+ required: t.required,
228
+ rules: e(n)
227
229
  }, {
228
230
  default: d(() => [
229
- e(l) ? (p(), h(e(O), {
231
+ e(a) ? (m(), c(e(z), {
230
232
  key: 0,
231
- "model-value": s.value,
232
- placeholder: r.placeholder,
233
+ "model-value": u.value,
234
+ placeholder: t.placeholder,
233
235
  disabled: !0,
234
236
  readonly: !0
235
- }, null, 8, ["model-value", "placeholder"])) : (p(), h(e(K), {
237
+ }, null, 8, ["model-value", "placeholder"])) : (m(), c(e(re), {
236
238
  key: 1,
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
239
+ modelValue: e(r),
240
+ "onUpdate:modelValue": p[0] || (p[0] = (y) => C(r) ? r.value = y : null),
241
+ placeholder: t.placeholder,
242
+ clearable: t.clearable,
243
+ filterable: t.filterable,
244
+ onChange: e(f).onChange
243
245
  }, {
244
246
  default: d(() => [
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
247
+ (m(!0), E(U, null, N(e(l), (y) => (m(), c(e(de), {
248
+ key: y.value,
249
+ label: y.content,
250
+ value: y.value
249
251
  }, null, 8, ["label", "value"]))), 128))
250
252
  ]),
251
253
  _: 1
@@ -257,7 +259,7 @@ const We = /* @__PURE__ */ y({
257
259
  _: 1
258
260
  }, 8, ["span"]));
259
261
  }
260
- }), De = /* @__PURE__ */ y({
262
+ }), Qe = /* @__PURE__ */ v({
261
263
  name: "OFormMultiselect",
262
264
  inheritAttrs: !1,
263
265
  __name: "MultiSelect",
@@ -274,39 +276,39 @@ const We = /* @__PURE__ */ y({
274
276
  collapseTags: { type: Boolean },
275
277
  collapseTagsTooltip: { type: Boolean }
276
278
  },
277
- setup(t) {
278
- const i = H(), u = v(), o = V(), l = X(), a = U(), n = Z(), s = T(), r = F(() => Ce(a.value, s.modelValue[t.name]));
279
- return (m, c) => (p(), h(e(g), { span: e(u) }, {
279
+ setup(o) {
280
+ const f = le(), i = w(), n = S(), a = ie(), l = K(), r = pe(), u = P(), t = O(() => Te(l.value, u.modelValue[o.name]));
281
+ return (p, y) => (m(), c(e(g), { span: e(i) }, {
280
282
  default: d(() => [
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)
283
+ b(e(B), {
284
+ prop: p.name,
285
+ label: p.label,
286
+ "label-width": p.labelWidth,
287
+ required: p.required,
288
+ rules: e(n)
287
289
  }, {
288
290
  default: d(() => [
289
- e(l) ? (p(), h(e(O), {
291
+ e(a) ? (m(), c(e(z), {
290
292
  key: 0,
291
- "model-value": r.value,
292
- placeholder: m.placeholder,
293
+ "model-value": t.value,
294
+ placeholder: p.placeholder,
293
295
  disabled: !0,
294
296
  readonly: !0
295
- }, null, 8, ["model-value", "placeholder"])) : (p(), h(e(K), {
297
+ }, null, 8, ["model-value", "placeholder"])) : (m(), c(e(re), {
296
298
  key: 1,
297
- modelValue: e(n),
298
- "onUpdate:modelValue": c[0] || (c[0] = (S) => q(n) ? n.value = S : null),
299
- placeholder: m.placeholder,
299
+ modelValue: e(r),
300
+ "onUpdate:modelValue": y[0] || (y[0] = (q) => C(r) ? r.value = q : null),
301
+ placeholder: p.placeholder,
300
302
  multiple: "",
301
- "collapse-tags": m.collapseTags,
302
- "collapse-tags-tooltip": m.collapseTagsTooltip,
303
- onChange: e(i).onChange
303
+ "collapse-tags": p.collapseTags,
304
+ "collapse-tags-tooltip": p.collapseTagsTooltip,
305
+ onChange: e(f).onChange
304
306
  }, {
305
307
  default: d(() => [
306
- (p(!0), D(E, null, I(e(a), (S) => (p(), h(e(J), {
307
- key: S.value,
308
- label: S.content,
309
- value: S.value
308
+ (m(!0), E(U, null, N(e(l), (q) => (m(), c(e(de), {
309
+ key: q.value,
310
+ label: q.content,
311
+ value: q.value
310
312
  }, null, 8, ["label", "value"]))), 128))
311
313
  ]),
312
314
  _: 1
@@ -318,7 +320,7 @@ const We = /* @__PURE__ */ y({
318
320
  _: 1
319
321
  }, 8, ["span"]));
320
322
  }
321
- }), Ee = /* @__PURE__ */ y({
323
+ }), Xe = /* @__PURE__ */ v({
322
324
  name: "OFormRadiogroup",
323
325
  inheritAttrs: !1,
324
326
  __name: "RadioGroup",
@@ -332,30 +334,30 @@ const We = /* @__PURE__ */ y({
332
334
  disabled: { type: Boolean },
333
335
  code: {}
334
336
  },
335
- setup(t) {
336
- const i = v(), u = V(), o = U(), l = z();
337
- return (a, n) => (p(), h(e(g), { span: e(i) }, {
337
+ setup(o) {
338
+ const f = w(), i = S(), n = K(), a = R();
339
+ return (l, r) => (m(), c(e(g), { span: e(f) }, {
338
340
  default: d(() => [
339
- f(e(w), {
340
- prop: a.name,
341
- label: a.label,
342
- "label-width": a.labelWidth,
343
- required: a.required,
344
- rules: e(u)
341
+ b(e(B), {
342
+ prop: l.name,
343
+ label: l.label,
344
+ "label-width": l.labelWidth,
345
+ required: l.required,
346
+ rules: e(i)
345
347
  }, {
346
348
  default: d(() => [
347
- f(e(ce), {
348
- modelValue: e(l),
349
- "onUpdate:modelValue": n[0] || (n[0] = (s) => q(l) ? l.value = s : null),
350
- disabled: a.disabled
349
+ b(e(Oe), {
350
+ modelValue: e(a),
351
+ "onUpdate:modelValue": r[0] || (r[0] = (u) => C(a) ? a.value = u : null),
352
+ disabled: l.disabled
351
353
  }, {
352
354
  default: d(() => [
353
- (p(!0), D(E, null, I(e(o), (s) => (p(), h(e(ye), {
354
- key: s.value,
355
- value: s.value
355
+ (m(!0), E(U, null, N(e(n), (u) => (m(), c(e(Fe), {
356
+ key: u.value,
357
+ value: u.value
356
358
  }, {
357
359
  default: d(() => [
358
- ue(se(s.content), 1)
360
+ ae(oe(u.content), 1)
359
361
  ]),
360
362
  _: 2
361
363
  }, 1032, ["value"]))), 128))
@@ -369,7 +371,7 @@ const We = /* @__PURE__ */ y({
369
371
  _: 1
370
372
  }, 8, ["span"]));
371
373
  }
372
- }), Ie = /* @__PURE__ */ y({
374
+ }), Ze = /* @__PURE__ */ v({
373
375
  name: "OFormCheckboxgroup",
374
376
  inheritAttrs: !1,
375
377
  __name: "CheckboxGroup",
@@ -383,28 +385,28 @@ const We = /* @__PURE__ */ y({
383
385
  disabled: { type: Boolean },
384
386
  code: {}
385
387
  },
386
- setup(t) {
387
- const i = v(), u = V(), o = U(), l = Z();
388
- return (a, n) => (p(), h(e(g), { span: e(i) }, {
388
+ setup(o) {
389
+ const f = w(), i = S(), n = K(), a = pe();
390
+ return (l, r) => (m(), c(e(g), { span: e(f) }, {
389
391
  default: d(() => [
390
- f(e(w), {
391
- prop: a.name,
392
- label: a.label,
393
- "label-width": a.labelWidth,
394
- required: a.required,
395
- rules: e(u)
392
+ b(e(B), {
393
+ prop: l.name,
394
+ label: l.label,
395
+ "label-width": l.labelWidth,
396
+ required: l.required,
397
+ rules: e(i)
396
398
  }, {
397
399
  default: d(() => [
398
- f(e(ge), {
399
- modelValue: e(l),
400
- "onUpdate:modelValue": n[0] || (n[0] = (s) => q(l) ? l.value = s : null),
401
- disabled: a.disabled
400
+ b(e(ke), {
401
+ modelValue: e(a),
402
+ "onUpdate:modelValue": r[0] || (r[0] = (u) => C(a) ? a.value = u : null),
403
+ disabled: l.disabled
402
404
  }, {
403
405
  default: d(() => [
404
- (p(!0), D(E, null, I(e(o), (s) => (p(), h(e(Q), {
405
- key: s.value,
406
- label: s.content,
407
- value: s.value
406
+ (m(!0), E(U, null, N(e(n), (u) => (m(), c(e(ue), {
407
+ key: u.value,
408
+ label: u.content,
409
+ value: u.value
408
410
  }, null, 8, ["label", "value"]))), 128))
409
411
  ]),
410
412
  _: 1
@@ -416,7 +418,7 @@ const We = /* @__PURE__ */ y({
416
418
  _: 1
417
419
  }, 8, ["span"]));
418
420
  }
419
- }), Ue = /* @__PURE__ */ y({
421
+ }), xe = /* @__PURE__ */ v({
420
422
  name: "OFormCheckbox",
421
423
  inheritAttrs: !1,
422
424
  __name: "Checkbox",
@@ -428,21 +430,21 @@ const We = /* @__PURE__ */ y({
428
430
  rules: {},
429
431
  disabled: { type: Boolean }
430
432
  },
431
- setup(t) {
432
- const i = v(), u = x();
433
- return (o, l) => (p(), h(e(g), { span: e(i) }, {
433
+ setup(o) {
434
+ const f = w(), i = me();
435
+ return (n, a) => (m(), c(e(g), { span: e(f) }, {
434
436
  default: d(() => [
435
- f(e(w), {
436
- prop: o.name,
437
- label: o.label,
438
- "label-width": o.labelWidth,
439
- rules: o.rules
437
+ b(e(B), {
438
+ prop: n.name,
439
+ label: n.label,
440
+ "label-width": n.labelWidth,
441
+ rules: n.rules
440
442
  }, {
441
443
  default: d(() => [
442
- f(e(Q), {
443
- modelValue: e(u),
444
- "onUpdate:modelValue": l[0] || (l[0] = (a) => q(u) ? u.value = a : null),
445
- disabled: o.disabled
444
+ b(e(ue), {
445
+ modelValue: e(i),
446
+ "onUpdate:modelValue": a[0] || (a[0] = (l) => C(i) ? i.value = l : null),
447
+ disabled: n.disabled
446
448
  }, null, 8, ["modelValue", "disabled"])
447
449
  ]),
448
450
  _: 1
@@ -451,7 +453,7 @@ const We = /* @__PURE__ */ y({
451
453
  _: 1
452
454
  }, 8, ["span"]));
453
455
  }
454
- }), Te = /* @__PURE__ */ y({
456
+ }), _e = /* @__PURE__ */ v({
455
457
  name: "OFormSwitch",
456
458
  inheritAttrs: !1,
457
459
  __name: "Switch",
@@ -463,21 +465,21 @@ const We = /* @__PURE__ */ y({
463
465
  rules: {},
464
466
  disabled: { type: Boolean }
465
467
  },
466
- setup(t) {
467
- const i = v(), u = x();
468
- return (o, l) => (p(), h(e(g), { span: e(i) }, {
468
+ setup(o) {
469
+ const f = w(), i = me();
470
+ return (n, a) => (m(), c(e(g), { span: e(f) }, {
469
471
  default: d(() => [
470
- f(e(w), {
471
- prop: o.name,
472
- label: o.label,
473
- "label-width": o.labelWidth,
474
- rules: o.rules
472
+ b(e(B), {
473
+ prop: n.name,
474
+ label: n.label,
475
+ "label-width": n.labelWidth,
476
+ rules: n.rules
475
477
  }, {
476
478
  default: d(() => [
477
- f(e(ve), {
478
- modelValue: e(u),
479
- "onUpdate:modelValue": l[0] || (l[0] = (a) => q(u) ? u.value = a : null),
480
- disabled: o.disabled
479
+ b(e(ze), {
480
+ modelValue: e(i),
481
+ "onUpdate:modelValue": a[0] || (a[0] = (l) => C(i) ? i.value = l : null),
482
+ disabled: n.disabled
481
483
  }, null, 8, ["modelValue", "disabled"])
482
484
  ]),
483
485
  _: 1
@@ -486,7 +488,7 @@ const We = /* @__PURE__ */ y({
486
488
  _: 1
487
489
  }, 8, ["span"]));
488
490
  }
489
- }), Ne = /* @__PURE__ */ y({
491
+ }), el = /* @__PURE__ */ v({
490
492
  name: "OFormDate",
491
493
  inheritAttrs: !1,
492
494
  __name: "DateInput",
@@ -506,62 +508,62 @@ const We = /* @__PURE__ */ y({
506
508
  format: { default: "YYYY-MM-DD" },
507
509
  sourceFormat: {}
508
510
  },
509
- setup(t) {
510
- const i = v(), u = V(), o = F(() => t.format.startsWith("H") || t.format.startsWith("h") || t.format.startsWith("m") || t.format.startsWith("s")), l = F(() => t.sourceFormat ? t.sourceFormat : o.value ? "HH:mm:ss" : "YYYY-MM-DD"), a = F(() => {
511
- let r = "date";
512
- return (t.format.indexOf("y") > -1 || t.format.indexOf("Y") > -1) && (r = "year"), t.format.indexOf("M") > -1 && (r = "month"), (t.format.indexOf("d") > -1 || t.format.indexOf("D") > -1) && (r = "date"), (t.format.indexOf("H") > -1 || t.format.indexOf("h") > -1 || t.format.indexOf("k") > -1 || t.format.indexOf("m") > -1 || t.format.indexOf("s") > -1 || t.format.indexOf("S") > -1) && (r = "datetime"), r;
513
- }), n = T(), s = F({
511
+ setup(o) {
512
+ 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(() => {
513
+ let t = "date";
514
+ 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;
515
+ }), r = P(), u = O({
514
516
  get: () => {
515
- const r = n.modelValue[t.name];
516
- if (r) {
517
- if (te(r))
518
- return r;
519
- if (A(r)) {
520
- const m = G(r, l.value, !0);
521
- if (!m.isValid())
522
- throw new W(`日期输入框的值无效,不符合${l.value}格式`);
523
- return m.toDate();
517
+ const t = r.modelValue[o.name];
518
+ if (t) {
519
+ if (he(t))
520
+ return t;
521
+ if (L(t)) {
522
+ const p = ee(t, a.value, !0);
523
+ if (!p.isValid())
524
+ throw new D(`日期输入框的值无效,不符合${a.value}格式`);
525
+ return p.toDate();
524
526
  } else
525
- throw new W("日期输入框的值只能为字符串或日期类型");
527
+ throw new D("日期输入框的值只能为字符串或日期类型");
526
528
  }
527
529
  },
528
- set: (r) => {
529
- t.sourceFormat ? r ? n.updateModelValue(t.name, G(r).format(l.value)) : n.updateModelValue(t.name, "") : r ? n.updateModelValue(t.name, r) : n.updateModelValue(t.name, void 0);
530
+ set: (t) => {
531
+ 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);
530
532
  }
531
533
  });
532
- return (r, m) => (p(), h(e(g), { span: e(i) }, {
534
+ return (t, p) => (m(), c(e(g), { span: e(f) }, {
533
535
  default: d(() => [
534
- f(e(w), {
535
- prop: r.name,
536
- label: r.label,
537
- "label-width": r.labelWidth,
538
- required: r.required,
539
- rules: e(u)
536
+ b(e(B), {
537
+ prop: t.name,
538
+ label: t.label,
539
+ "label-width": t.labelWidth,
540
+ required: t.required,
541
+ rules: e(i)
540
542
  }, {
541
543
  default: d(() => [
542
- o.value ? (p(), h(e(we), {
544
+ n.value ? (m(), c(e(We), {
543
545
  key: 0,
544
- modelValue: s.value,
545
- "onUpdate:modelValue": m[0] || (m[0] = (c) => s.value = c),
546
- placeholder: r.placeholder,
547
- disabled: r.disabled,
548
- readonly: r.readonly,
549
- editable: r.editable,
550
- clearable: r.clearable,
551
- format: l.value,
546
+ modelValue: u.value,
547
+ "onUpdate:modelValue": p[0] || (p[0] = (y) => u.value = y),
548
+ placeholder: t.placeholder,
549
+ disabled: t.disabled,
550
+ readonly: t.readonly,
551
+ editable: t.editable,
552
+ clearable: t.clearable,
553
+ format: a.value,
552
554
  "arrow-control": "",
553
555
  style: { width: "100%" }
554
- }, null, 8, ["modelValue", "placeholder", "disabled", "readonly", "editable", "clearable", "format"])) : (p(), h(e(Ve), {
556
+ }, null, 8, ["modelValue", "placeholder", "disabled", "readonly", "editable", "clearable", "format"])) : (m(), c(e(Re), {
555
557
  key: 1,
556
- modelValue: s.value,
557
- "onUpdate:modelValue": m[1] || (m[1] = (c) => s.value = c),
558
- placeholder: r.placeholder,
559
- disabled: r.disabled,
560
- readonly: r.readonly,
561
- editable: r.editable,
562
- clearable: r.clearable,
563
- type: a.value,
564
- format: l.value,
558
+ modelValue: u.value,
559
+ "onUpdate:modelValue": p[1] || (p[1] = (y) => u.value = y),
560
+ placeholder: t.placeholder,
561
+ disabled: t.disabled,
562
+ readonly: t.readonly,
563
+ editable: t.editable,
564
+ clearable: t.clearable,
565
+ type: l.value,
566
+ format: a.value,
565
567
  style: { width: "100%" }
566
568
  }, null, 8, ["modelValue", "placeholder", "disabled", "readonly", "editable", "clearable", "type", "format"]))
567
569
  ]),
@@ -571,7 +573,7 @@ const We = /* @__PURE__ */ y({
571
573
  _: 1
572
574
  }, 8, ["span"]));
573
575
  }
574
- }), Pe = /* @__PURE__ */ y({
576
+ }), ll = /* @__PURE__ */ v({
575
577
  name: "OFormFile",
576
578
  inheritAttrs: !1,
577
579
  __name: "FileInput",
@@ -584,32 +586,32 @@ const We = /* @__PURE__ */ y({
584
586
  rules: {},
585
587
  disabled: { type: Boolean }
586
588
  },
587
- setup(t) {
588
- const i = v(), u = V(), o = z();
589
- ie(o, () => {
590
- o.value || (l.value = "");
589
+ setup(o) {
590
+ const f = w(), i = S(), n = R();
591
+ te(n, () => {
592
+ n.value || (a.value = "");
591
593
  });
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];
597
- }, l.value = "";
598
- }), (n, s) => (p(), h(e(g), { span: e(i) }, {
594
+ const a = k(""), l = A("inputRef");
595
+ return ne(() => {
596
+ l.value.input.onchange = (r) => {
597
+ var u;
598
+ n.value = (u = r == null ? void 0 : r.target) == null ? void 0 : u.files[0];
599
+ }, a.value = "";
600
+ }), (r, u) => (m(), c(e(g), { span: e(f) }, {
599
601
  default: d(() => [
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)
602
+ b(e(B), {
603
+ prop: r.name,
604
+ label: r.label,
605
+ "label-width": r.labelWidth,
606
+ required: r.required,
607
+ rules: e(i)
606
608
  }, {
607
609
  default: d(() => [
608
- f(e(O), {
610
+ b(e(z), {
609
611
  ref: "inputRef",
610
- modelValue: l.value,
611
- "onUpdate:modelValue": s[0] || (s[0] = (r) => l.value = r),
612
- disabled: n.disabled,
612
+ modelValue: a.value,
613
+ "onUpdate:modelValue": u[0] || (u[0] = (t) => a.value = t),
614
+ disabled: r.disabled,
613
615
  type: "file",
614
616
  "validate-event": !1
615
617
  }, null, 8, ["modelValue", "disabled"])
@@ -620,7 +622,7 @@ const We = /* @__PURE__ */ y({
620
622
  _: 1
621
623
  }, 8, ["span"]));
622
624
  }
623
- }), Ye = /* @__PURE__ */ y({
625
+ }), al = /* @__PURE__ */ v({
624
626
  name: "OFormButtongroup",
625
627
  inheritAttrs: !1,
626
628
  __name: "ButtonGroup",
@@ -629,21 +631,21 @@ const We = /* @__PURE__ */ y({
629
631
  gutter: { type: [Boolean, String] },
630
632
  align: { default: "right" }
631
633
  },
632
- setup(t) {
633
- const i = F(() => ({
634
- textAlign: t.align
635
- })), u = v();
636
- return (o, l) => (p(), h(e(g), {
637
- span: e(u),
638
- style: me(i.value)
634
+ setup(o) {
635
+ const f = O(() => ({
636
+ textAlign: o.align
637
+ })), i = w();
638
+ return (n, a) => (m(), c(e(g), {
639
+ span: e(i),
640
+ style: we(f.value)
639
641
  }, {
640
642
  default: d(() => [
641
- f(e(Fe), {
642
- gutter: o.gutter,
643
+ b(e(Ie), {
644
+ gutter: n.gutter,
643
645
  style: { "margin-bottom": "18px" }
644
646
  }, {
645
647
  default: d(() => [
646
- $(o.$slots, "default")
648
+ I(n.$slots, "default")
647
649
  ]),
648
650
  _: 3
649
651
  }, 8, ["gutter"])
@@ -651,7 +653,7 @@ const We = /* @__PURE__ */ y({
651
653
  _: 3
652
654
  }, 8, ["span", "style"]));
653
655
  }
654
- }), Ge = /* @__PURE__ */ y({
656
+ }), ol = /* @__PURE__ */ v({
655
657
  name: "OFormDiy",
656
658
  inheritAttrs: !1,
657
659
  __name: "DiyItem",
@@ -663,19 +665,19 @@ const We = /* @__PURE__ */ y({
663
665
  required: { type: Boolean },
664
666
  rules: {}
665
667
  },
666
- setup(t) {
667
- const i = v(), u = V();
668
- return (o, l) => (p(), h(e(g), { span: e(i) }, {
668
+ setup(o) {
669
+ const f = w(), i = S();
670
+ return (n, a) => (m(), c(e(g), { span: e(f) }, {
669
671
  default: d(() => [
670
- f(e(w), {
671
- prop: o.name,
672
- label: o.label,
673
- "label-width": o.labelWidth,
674
- required: o.required,
675
- rules: e(u)
672
+ b(e(B), {
673
+ prop: n.name,
674
+ label: n.label,
675
+ "label-width": n.labelWidth,
676
+ required: n.required,
677
+ rules: e(i)
676
678
  }, {
677
679
  default: d(() => [
678
- $(o.$slots, "default")
680
+ I(n.$slots, "default")
679
681
  ]),
680
682
  _: 3
681
683
  }, 8, ["prop", "label", "label-width", "required", "rules"])
@@ -683,7 +685,7 @@ const We = /* @__PURE__ */ y({
683
685
  _: 3
684
686
  }, 8, ["span"]));
685
687
  }
686
- }), Le = /* @__PURE__ */ y({
688
+ }), tl = /* @__PURE__ */ v({
687
689
  name: "OFormLov",
688
690
  inheritAttrs: !1,
689
691
  __name: "LovInput",
@@ -700,79 +702,80 @@ const We = /* @__PURE__ */ y({
700
702
  readonly: { type: Boolean },
701
703
  fillMapping: { type: [String, Function] }
702
704
  },
703
- setup(t) {
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();
705
+ setup(o) {
706
+ const f = w(), i = S(), n = R(), a = P(), l = k(!1), r = (h) => {
707
+ l.value = h;
708
+ }, u = k(!1), t = () => {
709
+ u.value || (u.value = !0), l.value || $.value.handleOpen();
709
710
  };
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;
711
+ let p;
712
+ const y = (h) => {
713
+ p = h;
714
+ }, q = (h) => {
715
+ ["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();
716
+ }, H = A("input"), Y = async (h) => {
717
+ l.value && H.value.focus();
718
+ }, J = () => {
719
+ if (u.value && L(o.fillMapping)) {
720
+ const h = {}, V = o.fillMapping.split(",");
721
+ for (let M = 0; M < V.length; M++) {
722
+ const F = V[M].split(":")[0].trim();
723
+ h[F] = void 0;
722
724
  }
723
- l.updateModelValueMulti(b);
725
+ a.updateModelValueMulti(h);
724
726
  }
725
- }, N = Y("dropdown");
726
- return L(
727
- ze,
728
- j({
729
- lovValue: o,
730
- backfill: (b) => {
731
- var B;
732
- if ((B = N.value) == null || B.handleClose(), A(t.fillMapping)) {
733
- const M = {}, C = t.fillMapping.split(",");
734
- for (let k = 0; k < C.length; k++) {
735
- const ee = C[k].split(":")[0].trim(), le = C[k].split(":")[1].trim(), ae = b[le];
736
- M[ee] = ae;
727
+ }, $ = A("dropdown");
728
+ return Z(
729
+ Ye,
730
+ x({
731
+ lovValue: n,
732
+ backfill: (h) => {
733
+ if ($.value.handleClose(), L(o.fillMapping)) {
734
+ const V = {}, M = o.fillMapping.split(",");
735
+ for (let F = 0; F < M.length; F++) {
736
+ const W = M[F].split(":")[0].trim(), Q = M[F].split(":")[1].trim(), s = h[Q];
737
+ V[W] = s;
737
738
  }
738
- l.updateModelValueMulti(M);
739
+ a.updateModelValueMulti(V);
739
740
  } else
740
- t.fillMapping && t.fillMapping(b);
741
- s.value && (s.value = !1);
741
+ o.fillMapping && o.fillMapping(h);
742
+ u.value && (u.value = !1);
742
743
  },
743
- registerKeydownHandler: c
744
+ registerKeydownHandler: y
744
745
  })
745
- ), (b, B) => (p(), h(e(g), { span: e(i) }, {
746
+ ), (h, V) => (m(), c(e(g), { span: e(f) }, {
746
747
  default: d(() => [
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)
748
+ b(e(B), {
749
+ prop: h.name,
750
+ label: h.label,
751
+ "label-width": h.labelWidth,
752
+ required: h.required,
753
+ rules: e(i)
753
754
  }, {
754
755
  default: d(() => [
755
- f(e(Se), {
756
+ b(e(se), {
756
757
  ref: "dropdown",
757
758
  trigger: "click",
758
- onVisibleChange: n,
759
+ onVisibleChange: r,
759
760
  style: { width: "100%" }
760
761
  }, {
761
762
  dropdown: d(() => [
762
- $(b.$slots, "default")
763
+ I(h.$slots, "default")
763
764
  ]),
764
765
  default: d(() => [
765
- f(e(O), {
766
- modelValue: e(o),
767
- "onUpdate:modelValue": B[0] || (B[0] = (M) => q(o) ? o.value = M : null),
768
- maxlength: b.maxlength,
769
- placeholder: b.placeholder,
770
- disabled: b.disabled,
771
- readonly: b.readonly,
772
- onInput: r,
773
- onKeydown: S,
774
- onChange: _,
775
- "suffix-icon": e(Oe)
766
+ b(e(z), {
767
+ ref: "input",
768
+ modelValue: e(n),
769
+ "onUpdate:modelValue": V[0] || (V[0] = (M) => C(n) ? n.value = M : null),
770
+ maxlength: h.maxlength,
771
+ placeholder: h.placeholder,
772
+ disabled: h.disabled,
773
+ readonly: h.readonly,
774
+ onInput: t,
775
+ onKeydown: q,
776
+ onChange: J,
777
+ onBlur: Y,
778
+ "suffix-icon": e(Ue)
776
779
  }, null, 8, ["modelValue", "maxlength", "placeholder", "disabled", "readonly", "suffix-icon"])
777
780
  ]),
778
781
  _: 3
@@ -784,7 +787,7 @@ const We = /* @__PURE__ */ y({
784
787
  _: 3
785
788
  }, 8, ["span"]));
786
789
  }
787
- }), je = /* @__PURE__ */ y({
790
+ }), nl = /* @__PURE__ */ v({
788
791
  name: "OFormNumber",
789
792
  inheritAttrs: !1,
790
793
  __name: "NumberInput",
@@ -806,45 +809,45 @@ const We = /* @__PURE__ */ y({
806
809
  controls: { type: Boolean, default: !0 },
807
810
  controlsPosition: {}
808
811
  },
809
- setup(t) {
810
- const i = v(), u = V(), o = T(), l = F({
812
+ setup(o) {
813
+ const f = w(), i = S(), n = P(), a = O({
811
814
  get: () => {
812
- const a = o.modelValue[t.name];
813
- if (a) {
814
- if (ne(a))
815
- return a;
816
- if (A(a))
817
- return de(a);
818
- throw new W("数字输入框的值只能为字符串或数字类型");
815
+ const l = n.modelValue[o.name];
816
+ if (l) {
817
+ if (ce(l))
818
+ return l;
819
+ if (L(l))
820
+ return ye(l);
821
+ throw new D("数字输入框的值只能为字符串或数字类型");
819
822
  }
820
823
  },
821
- set: (a) => {
822
- a ? o.updateModelValue(t.name, a) : o.updateModelValue(t.name, void 0);
824
+ set: (l) => {
825
+ l ? n.updateModelValue(o.name, l) : n.updateModelValue(o.name, void 0);
823
826
  }
824
827
  });
825
- return (a, n) => (p(), h(e(g), { span: e(i) }, {
828
+ return (l, r) => (m(), c(e(g), { span: e(f) }, {
826
829
  default: d(() => [
827
- f(e(w), {
828
- prop: a.name,
829
- label: a.label,
830
- "label-width": a.labelWidth,
831
- required: a.required,
832
- rules: e(u)
830
+ b(e(B), {
831
+ prop: l.name,
832
+ label: l.label,
833
+ "label-width": l.labelWidth,
834
+ required: l.required,
835
+ rules: e(i)
833
836
  }, {
834
837
  default: d(() => [
835
- f(e(qe), {
836
- modelValue: l.value,
837
- "onUpdate:modelValue": n[0] || (n[0] = (s) => l.value = s),
838
- placeholder: a.placeholder,
839
- disabled: a.disabled,
840
- readonly: a.readonly,
841
- min: a.min,
842
- max: a.max,
843
- step: a.step,
844
- "step-strictly": a.stepStrictly,
845
- precision: a.precision,
846
- controls: a.controls,
847
- "controls-position": a.controlsPosition,
838
+ b(e(Ae), {
839
+ modelValue: a.value,
840
+ "onUpdate:modelValue": r[0] || (r[0] = (u) => a.value = u),
841
+ placeholder: l.placeholder,
842
+ disabled: l.disabled,
843
+ readonly: l.readonly,
844
+ min: l.min,
845
+ max: l.max,
846
+ step: l.step,
847
+ "step-strictly": l.stepStrictly,
848
+ precision: l.precision,
849
+ controls: l.controls,
850
+ "controls-position": l.controlsPosition,
848
851
  style: { width: "100%" }
849
852
  }, null, 8, ["modelValue", "placeholder", "disabled", "readonly", "min", "max", "step", "step-strictly", "precision", "controls", "controls-position"])
850
853
  ]),
@@ -854,27 +857,165 @@ const We = /* @__PURE__ */ y({
854
857
  _: 1
855
858
  }, 8, ["span"]));
856
859
  }
857
- }), rl = be(We, {
858
- StringInput: ke,
859
- PasswordInput: Re,
860
- Textarea: Ae,
861
- SingleSelect: $e,
862
- MultiSelect: De,
863
- RadioGroup: Ee,
864
- CheckboxGroup: Ie,
865
- Checkbox: Ue,
866
- Switch: Te,
867
- DateInput: Ne,
868
- FileInput: Pe,
869
- ButtonGroup: Ye,
870
- DiyItem: Ge,
871
- LovInput: Le,
872
- NumberInput: je
860
+ }), rl = {
861
+ key: 0,
862
+ style: { position: "absolute", inset: "4px 30px 4px 4px", overflow: "hidden", pointerEvents: "none" }
863
+ }, dl = /* @__PURE__ */ v({
864
+ name: "OFormTableselect",
865
+ inheritAttrs: !1,
866
+ __name: "MultiTableSelect",
867
+ props: {
868
+ name: {},
869
+ label: {},
870
+ span: {},
871
+ labelWidth: {},
872
+ required: { type: Boolean },
873
+ rules: {},
874
+ maxlength: {},
875
+ placeholder: {},
876
+ disabled: { type: Boolean },
877
+ readonly: { type: Boolean },
878
+ pick: {},
879
+ tag: { type: Function }
880
+ },
881
+ emits: ["change"],
882
+ setup(o, { emit: f }) {
883
+ const i = f, n = w(), a = S(), l = k(""), r = k(!1), u = P(), t = O({
884
+ get: () => {
885
+ const s = u.modelValue[o.name];
886
+ if (s) {
887
+ if (!ve(s))
888
+ throw new D("表格下拉框的值只能为数组类型");
889
+ return s;
890
+ }
891
+ },
892
+ set: (s) => {
893
+ r.value = !1, s ? u.updateModelValue(o.name, s) : u.updateModelValue(o.name, void 0);
894
+ }
895
+ }), p = k([]);
896
+ ne(async () => {
897
+ W && (p.value = await W(t.value), p.value && (h.value = p.value.map((s) => o.tag(s))));
898
+ }), te(t, async () => {
899
+ r.value ? W && (p.value = await W(t.value), p.value && (h.value = p.value.map((s) => o.tag(s)))) : r.value = !0;
900
+ });
901
+ const y = k(!1), q = (s) => {
902
+ y.value = s;
903
+ }, H = () => {
904
+ y.value || V.value.handleOpen();
905
+ }, Y = A("input"), J = () => {
906
+ Y.value.focus();
907
+ }, $ = (s) => {
908
+ 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());
909
+ }, _ = async (s) => {
910
+ y.value ? Y.value.focus() : l.value = "";
911
+ }, h = k([]), V = A("dropdown"), M = (s, j) => {
912
+ t.value = s.map((T) => ge(T, o.pick)), h.value = s.map((T) => o.tag(T)), j && (l.value = ""), i("change", s);
913
+ }, F = () => {
914
+ V.value.handleClose();
915
+ };
916
+ let W;
917
+ const Q = (s) => {
918
+ W = s;
919
+ };
920
+ return Z(
921
+ je,
922
+ x({
923
+ inputValue: l,
924
+ selection: p,
925
+ onSelect: M,
926
+ selectDone: F,
927
+ tag: o.tag,
928
+ registerRowCompletionProvider: Q
929
+ })
930
+ ), (s, j) => {
931
+ const T = Ve("o-space");
932
+ return m(), c(e(g), { span: e(n) }, {
933
+ default: d(() => [
934
+ b(e(B), {
935
+ prop: s.name,
936
+ label: s.label,
937
+ "label-width": s.labelWidth,
938
+ required: s.required,
939
+ rules: e(a)
940
+ }, {
941
+ default: d(() => [
942
+ b(e(se), {
943
+ ref: "dropdown",
944
+ trigger: "click",
945
+ onVisibleChange: q,
946
+ style: { width: "100%" },
947
+ "hide-on-click": !1
948
+ }, {
949
+ dropdown: d(() => [
950
+ I(s.$slots, "default")
951
+ ]),
952
+ default: d(() => [
953
+ Be("div", {
954
+ onFocus: J,
955
+ style: { position: "relative", width: "100%", height: "100%" }
956
+ }, [
957
+ b(e(z), {
958
+ ref: "input",
959
+ modelValue: l.value,
960
+ "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,
965
+ onInput: H,
966
+ onKeydown: $,
967
+ onBlur: _,
968
+ "suffix-icon": y.value ? e(Ne) : e(Pe)
969
+ }, null, 8, ["modelValue", "maxlength", "placeholder", "disabled", "readonly", "suffix-icon"]),
970
+ y.value ? Se("", !0) : (m(), E("div", rl, [
971
+ b(T, null, {
972
+ default: d(() => [
973
+ (m(!0), E(U, null, N(h.value, (X) => (m(), c(e(Ee), { type: "info" }, {
974
+ default: d(() => [
975
+ ae(oe(X), 1)
976
+ ]),
977
+ _: 2
978
+ }, 1024))), 256))
979
+ ]),
980
+ _: 1
981
+ })
982
+ ]))
983
+ ], 32)
984
+ ]),
985
+ _: 3
986
+ }, 512)
987
+ ]),
988
+ _: 3
989
+ }, 8, ["prop", "label", "label-width", "required", "rules"])
990
+ ]),
991
+ _: 3
992
+ }, 8, ["span"]);
993
+ };
994
+ }
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
+ MultiTableSelect: dl
873
1012
  });
874
1013
  export {
875
- rl as default,
876
- Be as formContextKey,
877
- ze as lovContextKey,
878
- dl as useLov
1014
+ wl as default,
1015
+ De as formContextKey,
1016
+ Ye as lovContextKey,
1017
+ je as multiTableSelectContext,
1018
+ Sl as useLov,
1019
+ Ml as useTableselect
879
1020
  };
880
1021
  //# sourceMappingURL=index.js.map