orion-design 0.1.43 → 0.1.44

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,20 @@
1
1
  import { NumberInputProps } from './NumberInput';
2
- declare const _default: import('vue').DefineComponent<NumberInputProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<NumberInputProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
2
+ declare function __VLS_template(): {
3
+ slots: {
4
+ "decrease-icon"?(_: {}): any;
5
+ "increase-icon"?(_: {}): any;
6
+ prefix?(_: {}): any;
7
+ suffix?(_: {}): any;
8
+ };
9
+ refs: {};
10
+ attrs: Partial<{}>;
11
+ };
12
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
13
+ declare const __VLS_component: import('vue').DefineComponent<NumberInputProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<NumberInputProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
14
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
3
15
  export default _default;
16
+ type __VLS_WithTemplateSlots<T, S> = T & {
17
+ new (): {
18
+ $slots: S;
19
+ };
20
+ };
@@ -1,10 +1,10 @@
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 $, 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";
1
+ import { difference as ce, isEmpty as he, isDate as ye, isString as L, isNumber as ve, toNumber as ge, isArray as we, pick as Ve } from "lodash-es";
2
+ import { defineComponent as v, useTemplateRef as A, provide as Z, reactive as x, toRef as G, openBlock as f, createBlock as h, unref as e, withCtx as d, createVNode as b, renderSlot as B, useSlots as le, isRef as k, createSlots as ae, useAttrs as oe, computed as O, createElementBlock as E, Fragment as U, renderList as N, createTextVNode as ne, toDisplayString as te, watch as re, ref as z, onMounted as de, normalizeStyle as Se, resolveComponent as Be, createElementVNode as qe, createCommentVNode as Me } from "vue";
3
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";
4
+ import { ElForm as ke, ElRow as Oe, ElCol as g, ElFormItem as S, ElInput as W, ElSelect as se, ElOption as ie, ElRadioGroup as Fe, ElRadio as ze, ElCheckboxGroup as We, ElCheckbox as ue, ElSwitch as Re, dayjs as ee, ElTimePicker as $e, ElDatePicker as Ae, ElDropdown as pe, ElInputNumber as Ee, ElTag as De } from "element-plus";
5
5
  import { formContextKey as Ie } from "./Form.js";
6
6
  import D from "../../error/OrionError.js";
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";
7
+ import { useFormItemSpan as w, useFormItemRules as q, useFormItemStringModel as $, useFormItemDisabled as me, useFormItemCode as K, useFormItemMultiModel as fe, useFormContext as P, useFormItemBooleanModel as be } from "./hooks/index.js";
8
8
  import { getSingleCodeContent as Te, getMultiCodeContent as Ue } from "./utils/index.js";
9
9
  import { S as Ne } from "../../index-BbsXWo7C.js";
10
10
  import { g as Pe, h as Ye, j as je } from "../../index-Bm0F5NQQ.js";
@@ -24,30 +24,30 @@ const Ke = /* @__PURE__ */ v({
24
24
  modelValue: {}
25
25
  },
26
26
  emits: ["update:modelValue"],
27
- setup(a, { expose: p, emit: i }) {
28
- const t = i, n = (o, m) => {
27
+ setup(a, { expose: i, emit: p }) {
28
+ const r = p, n = (o, m) => {
29
29
  if (!Object.keys(a.modelValue).includes(o))
30
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
- if (!be(q))
35
- throw new D(`modelValue中不存在[${q.join(",")}]`);
36
- t("update:modelValue", { ...a.modelValue, ...o });
37
- }, d = $("form");
38
- return p({
39
- validate: async () => await d.value.validate()
31
+ r("update:modelValue", { ...a.modelValue, [o]: m });
32
+ }, t = (o) => {
33
+ const m = Object.keys(a.modelValue), y = Object.keys(o), M = ce(y, m);
34
+ if (!he(M))
35
+ throw new D(`modelValue中不存在[${M.join(",")}]`);
36
+ r("update:modelValue", { ...a.modelValue, ...o });
37
+ }, l = A("form");
38
+ return i({
39
+ validate: async () => await l.value.validate()
40
40
  }), Z(
41
41
  Ie,
42
42
  x({
43
43
  modelValue: G(() => a.modelValue),
44
44
  updateModelValue: n,
45
- updateModelValueMulti: l,
45
+ updateModelValueMulti: t,
46
46
  rules: G(() => a.rules),
47
47
  itemSpan: G(() => a.itemSpan),
48
48
  disabled: G(() => a.disabled)
49
49
  })
50
- ), (o, m) => (f(), c(e(ke), {
50
+ ), (o, m) => (f(), h(e(ke), {
51
51
  ref: "form",
52
52
  model: o.modelValue,
53
53
  rules: o.rules,
@@ -55,10 +55,10 @@ const Ke = /* @__PURE__ */ v({
55
55
  disabled: o.disabled,
56
56
  class: "orion-form"
57
57
  }, {
58
- default: r(() => [
58
+ default: d(() => [
59
59
  b(e(Oe), { gutter: 16 }, {
60
- default: r(() => [
61
- k(o.$slots, "default")
60
+ default: d(() => [
61
+ B(o.$slots, "default")
62
62
  ]),
63
63
  _: 3
64
64
  })
@@ -83,50 +83,50 @@ const Ke = /* @__PURE__ */ v({
83
83
  readonly: { type: Boolean }
84
84
  },
85
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(() => [
86
+ const i = le(), p = w(), r = q(), n = $();
87
+ return (t, l) => (f(), h(e(g), { span: e(p) }, {
88
+ default: d(() => [
89
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)
90
+ prop: t.name,
91
+ label: t.label,
92
+ "label-width": t.labelWidth,
93
+ required: t.required,
94
+ rules: e(r)
95
95
  }, {
96
- default: r(() => [
96
+ default: d(() => [
97
97
  b(e(W), {
98
98
  modelValue: e(n),
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 ? {
99
+ "onUpdate:modelValue": l[0] || (l[0] = (s) => k(n) ? n.value = s : null),
100
+ maxlength: t.maxlength,
101
+ placeholder: t.placeholder,
102
+ disabled: t.disabled,
103
+ readonly: t.readonly
104
+ }, ae({ _: 2 }, [
105
+ e(i).prefix ? {
106
106
  name: "prefix",
107
- fn: r(() => [
108
- k(l.$slots, "prefix")
107
+ fn: d(() => [
108
+ B(t.$slots, "prefix")
109
109
  ]),
110
110
  key: "0"
111
111
  } : void 0,
112
- e(p).suffix ? {
112
+ e(i).suffix ? {
113
113
  name: "suffix",
114
- fn: r(() => [
115
- k(l.$slots, "suffix")
114
+ fn: d(() => [
115
+ B(t.$slots, "suffix")
116
116
  ]),
117
117
  key: "1"
118
118
  } : void 0,
119
- e(p).prepend ? {
119
+ e(i).prepend ? {
120
120
  name: "prepend",
121
- fn: r(() => [
122
- k(l.$slots, "prepend")
121
+ fn: d(() => [
122
+ B(t.$slots, "prepend")
123
123
  ]),
124
124
  key: "2"
125
125
  } : void 0,
126
- e(p).append ? {
126
+ e(i).append ? {
127
127
  name: "append",
128
- fn: r(() => [
129
- k(l.$slots, "append")
128
+ fn: d(() => [
129
+ B(t.$slots, "append")
130
130
  ]),
131
131
  key: "3"
132
132
  } : void 0
@@ -155,20 +155,20 @@ const Ke = /* @__PURE__ */ v({
155
155
  readonly: { type: Boolean }
156
156
  },
157
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(() => [
158
+ const i = w(), p = q(), r = $();
159
+ return (n, t) => (f(), h(e(g), { span: e(i) }, {
160
+ default: d(() => [
161
161
  b(e(S), {
162
162
  prop: n.name,
163
163
  label: n.label,
164
164
  "label-width": n.labelWidth,
165
165
  required: n.required,
166
- rules: e(i)
166
+ rules: e(p)
167
167
  }, {
168
- default: r(() => [
168
+ default: d(() => [
169
169
  b(e(W), {
170
- modelValue: e(t),
171
- "onUpdate:modelValue": l[0] || (l[0] = (d) => C(t) ? t.value = d : null),
170
+ modelValue: e(r),
171
+ "onUpdate:modelValue": t[0] || (t[0] = (l) => k(r) ? r.value = l : null),
172
172
  maxlength: n.maxlength,
173
173
  placeholder: n.placeholder,
174
174
  disabled: n.disabled,
@@ -200,20 +200,20 @@ const Ke = /* @__PURE__ */ v({
200
200
  rows: {}
201
201
  },
202
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(() => [
203
+ const i = w(), p = q(), r = $();
204
+ return (n, t) => (f(), h(e(g), { span: e(i) }, {
205
+ default: d(() => [
206
206
  b(e(S), {
207
207
  prop: n.name,
208
208
  label: n.label,
209
209
  "label-width": n.labelWidth,
210
210
  required: n.required,
211
- rules: e(i)
211
+ rules: e(p)
212
212
  }, {
213
- default: r(() => [
213
+ default: d(() => [
214
214
  b(e(W), {
215
- modelValue: e(t),
216
- "onUpdate:modelValue": l[0] || (l[0] = (d) => C(t) ? t.value = d : null),
215
+ modelValue: e(r),
216
+ "onUpdate:modelValue": t[0] || (t[0] = (l) => k(r) ? r.value = l : null),
217
217
  maxlength: n.maxlength,
218
218
  placeholder: n.placeholder,
219
219
  disabled: n.disabled,
@@ -247,34 +247,34 @@ const Ke = /* @__PURE__ */ v({
247
247
  filterable: { type: Boolean }
248
248
  },
249
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(() => [
250
+ const i = oe(), p = w(), r = q(), n = me(), t = K(), l = $(), s = O(() => Te(t.value, l.value));
251
+ return (o, m) => (f(), h(e(g), { span: e(p) }, {
252
+ default: d(() => [
253
253
  b(e(S), {
254
254
  prop: o.name,
255
255
  label: o.label,
256
256
  "label-width": o.labelWidth,
257
257
  required: o.required,
258
- rules: e(t)
258
+ rules: e(r)
259
259
  }, {
260
- default: r(() => [
261
- e(n) ? (f(), c(e(W), {
260
+ default: d(() => [
261
+ e(n) ? (f(), h(e(W), {
262
262
  key: 0,
263
263
  "model-value": s.value,
264
264
  placeholder: o.placeholder,
265
265
  disabled: !0,
266
266
  readonly: !0
267
- }, null, 8, ["model-value", "placeholder"])) : (f(), c(e(re), {
267
+ }, null, 8, ["model-value", "placeholder"])) : (f(), h(e(se), {
268
268
  key: 1,
269
- modelValue: e(d),
270
- "onUpdate:modelValue": m[0] || (m[0] = (y) => C(d) ? d.value = y : null),
269
+ modelValue: e(l),
270
+ "onUpdate:modelValue": m[0] || (m[0] = (y) => k(l) ? l.value = y : null),
271
271
  placeholder: o.placeholder,
272
272
  clearable: o.clearable,
273
273
  filterable: o.filterable,
274
- onChange: e(p).onChange
274
+ onChange: e(i).onChange
275
275
  }, {
276
- default: r(() => [
277
- (f(!0), E(U, null, N(e(l), (y) => (f(), c(e(de), {
276
+ default: d(() => [
277
+ (f(!0), E(U, null, N(e(t), (y) => (f(), h(e(ie), {
278
278
  key: y.value,
279
279
  label: y.content,
280
280
  value: y.value
@@ -307,38 +307,38 @@ const Ke = /* @__PURE__ */ v({
307
307
  collapseTagsTooltip: { type: Boolean }
308
308
  },
309
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(() => [
310
+ const i = oe(), p = w(), r = q(), n = me(), t = K(), l = fe(), s = P(), o = O(() => Ue(t.value, s.modelValue[a.name]));
311
+ return (m, y) => (f(), h(e(g), { span: e(p) }, {
312
+ default: d(() => [
313
313
  b(e(S), {
314
314
  prop: m.name,
315
315
  label: m.label,
316
316
  "label-width": m.labelWidth,
317
317
  required: m.required,
318
- rules: e(t)
318
+ rules: e(r)
319
319
  }, {
320
- default: r(() => [
321
- e(n) ? (f(), c(e(W), {
320
+ default: d(() => [
321
+ e(n) ? (f(), h(e(W), {
322
322
  key: 0,
323
323
  "model-value": o.value,
324
324
  placeholder: m.placeholder,
325
325
  disabled: !0,
326
326
  readonly: !0
327
- }, null, 8, ["model-value", "placeholder"])) : (f(), c(e(re), {
327
+ }, null, 8, ["model-value", "placeholder"])) : (f(), h(e(se), {
328
328
  key: 1,
329
- modelValue: e(d),
330
- "onUpdate:modelValue": y[0] || (y[0] = (q) => C(d) ? d.value = q : null),
329
+ modelValue: e(l),
330
+ "onUpdate:modelValue": y[0] || (y[0] = (M) => k(l) ? l.value = M : null),
331
331
  placeholder: m.placeholder,
332
332
  multiple: "",
333
333
  "collapse-tags": m.collapseTags,
334
334
  "collapse-tags-tooltip": m.collapseTagsTooltip,
335
- onChange: e(p).onChange
335
+ onChange: e(i).onChange
336
336
  }, {
337
- default: r(() => [
338
- (f(!0), E(U, null, N(e(l), (q) => (f(), c(e(de), {
339
- key: q.value,
340
- label: q.content,
341
- value: q.value
337
+ default: d(() => [
338
+ (f(!0), E(U, null, N(e(t), (M) => (f(), h(e(ie), {
339
+ key: M.value,
340
+ label: M.content,
341
+ value: M.value
342
342
  }, null, 8, ["label", "value"]))), 128))
343
343
  ]),
344
344
  _: 1
@@ -365,29 +365,29 @@ const Ke = /* @__PURE__ */ v({
365
365
  code: {}
366
366
  },
367
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(() => [
368
+ const i = w(), p = q(), r = K(), n = $();
369
+ return (t, l) => (f(), h(e(g), { span: e(i) }, {
370
+ default: d(() => [
371
371
  b(e(S), {
372
- prop: l.name,
373
- label: l.label,
374
- "label-width": l.labelWidth,
375
- required: l.required,
376
- rules: e(i)
372
+ prop: t.name,
373
+ label: t.label,
374
+ "label-width": t.labelWidth,
375
+ required: t.required,
376
+ rules: e(p)
377
377
  }, {
378
- default: r(() => [
378
+ default: d(() => [
379
379
  b(e(Fe), {
380
380
  modelValue: e(n),
381
- "onUpdate:modelValue": d[0] || (d[0] = (s) => C(n) ? n.value = s : null),
382
- disabled: l.disabled
381
+ "onUpdate:modelValue": l[0] || (l[0] = (s) => k(n) ? n.value = s : null),
382
+ disabled: t.disabled
383
383
  }, {
384
- default: r(() => [
385
- (f(!0), E(U, null, N(e(t), (s) => (f(), c(e(ze), {
384
+ default: d(() => [
385
+ (f(!0), E(U, null, N(e(r), (s) => (f(), h(e(ze), {
386
386
  key: s.value,
387
387
  value: s.value
388
388
  }, {
389
- default: r(() => [
390
- ae(oe(s.content), 1)
389
+ default: d(() => [
390
+ ne(te(s.content), 1)
391
391
  ]),
392
392
  _: 2
393
393
  }, 1032, ["value"]))), 128))
@@ -416,24 +416,24 @@ const Ke = /* @__PURE__ */ v({
416
416
  code: {}
417
417
  },
418
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(() => [
419
+ const i = w(), p = q(), r = K(), n = fe();
420
+ return (t, l) => (f(), h(e(g), { span: e(i) }, {
421
+ default: d(() => [
422
422
  b(e(S), {
423
- prop: l.name,
424
- label: l.label,
425
- "label-width": l.labelWidth,
426
- required: l.required,
427
- rules: e(i)
423
+ prop: t.name,
424
+ label: t.label,
425
+ "label-width": t.labelWidth,
426
+ required: t.required,
427
+ rules: e(p)
428
428
  }, {
429
- default: r(() => [
429
+ default: d(() => [
430
430
  b(e(We), {
431
431
  modelValue: e(n),
432
- "onUpdate:modelValue": d[0] || (d[0] = (s) => C(n) ? n.value = s : null),
433
- disabled: l.disabled
432
+ "onUpdate:modelValue": l[0] || (l[0] = (s) => k(n) ? n.value = s : null),
433
+ disabled: t.disabled
434
434
  }, {
435
- default: r(() => [
436
- (f(!0), E(U, null, N(e(t), (s) => (f(), c(e(se), {
435
+ default: d(() => [
436
+ (f(!0), E(U, null, N(e(r), (s) => (f(), h(e(ue), {
437
437
  key: s.value,
438
438
  label: s.content,
439
439
  value: s.value
@@ -461,20 +461,20 @@ const Ke = /* @__PURE__ */ v({
461
461
  disabled: { type: Boolean }
462
462
  },
463
463
  setup(a) {
464
- const p = w(), i = me();
465
- return (t, n) => (f(), c(e(g), { span: e(p) }, {
466
- default: r(() => [
464
+ const i = w(), p = be();
465
+ return (r, n) => (f(), h(e(g), { span: e(i) }, {
466
+ default: d(() => [
467
467
  b(e(S), {
468
- prop: t.name,
469
- label: t.label,
470
- "label-width": t.labelWidth,
471
- rules: t.rules
468
+ prop: r.name,
469
+ label: r.label,
470
+ "label-width": r.labelWidth,
471
+ rules: r.rules
472
472
  }, {
473
- default: r(() => [
474
- b(e(se), {
475
- modelValue: e(i),
476
- "onUpdate:modelValue": n[0] || (n[0] = (l) => C(i) ? i.value = l : null),
477
- disabled: t.disabled
473
+ default: d(() => [
474
+ b(e(ue), {
475
+ modelValue: e(p),
476
+ "onUpdate:modelValue": n[0] || (n[0] = (t) => k(p) ? p.value = t : null),
477
+ disabled: r.disabled
478
478
  }, null, 8, ["modelValue", "disabled"])
479
479
  ]),
480
480
  _: 1
@@ -496,20 +496,20 @@ const Ke = /* @__PURE__ */ v({
496
496
  disabled: { type: Boolean }
497
497
  },
498
498
  setup(a) {
499
- const p = w(), i = me();
500
- return (t, n) => (f(), c(e(g), { span: e(p) }, {
501
- default: r(() => [
499
+ const i = w(), p = be();
500
+ return (r, n) => (f(), h(e(g), { span: e(i) }, {
501
+ default: d(() => [
502
502
  b(e(S), {
503
- prop: t.name,
504
- label: t.label,
505
- "label-width": t.labelWidth,
506
- rules: t.rules
503
+ prop: r.name,
504
+ label: r.label,
505
+ "label-width": r.labelWidth,
506
+ rules: r.rules
507
507
  }, {
508
- default: r(() => [
508
+ default: d(() => [
509
509
  b(e(Re), {
510
- modelValue: e(i),
511
- "onUpdate:modelValue": n[0] || (n[0] = (l) => C(i) ? i.value = l : null),
512
- disabled: t.disabled
510
+ modelValue: e(p),
511
+ "onUpdate:modelValue": n[0] || (n[0] = (t) => k(p) ? p.value = t : null),
512
+ disabled: r.disabled
513
513
  }, null, 8, ["modelValue", "disabled"])
514
514
  ]),
515
515
  _: 1
@@ -539,14 +539,14 @@ const Ke = /* @__PURE__ */ v({
539
539
  sourceFormat: {}
540
540
  },
541
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(() => {
542
+ const i = w(), p = q(), r = O(() => a.format.startsWith("H") || a.format.startsWith("h") || a.format.startsWith("m") || a.format.startsWith("s")), n = O(() => a.sourceFormat ? a.sourceFormat : r.value ? "HH:mm:ss" : "YYYY-MM-DD"), t = O(() => {
543
543
  let o = "date";
544
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({
545
+ }), l = P(), s = O({
546
546
  get: () => {
547
- const o = d.modelValue[a.name];
547
+ const o = l.modelValue[a.name];
548
548
  if (o) {
549
- if (he(o))
549
+ if (ye(o))
550
550
  return o;
551
551
  if (L(o)) {
552
552
  const m = ee(o, n.value, !0);
@@ -558,20 +558,20 @@ const Ke = /* @__PURE__ */ v({
558
558
  }
559
559
  },
560
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);
561
+ a.sourceFormat ? o ? l.updateModelValue(a.name, ee(o).format(n.value)) : l.updateModelValue(a.name, "") : o ? l.updateModelValue(a.name, o) : l.updateModelValue(a.name, void 0);
562
562
  }
563
563
  });
564
- return (o, m) => (f(), c(e(g), { span: e(p) }, {
565
- default: r(() => [
564
+ return (o, m) => (f(), h(e(g), { span: e(i) }, {
565
+ default: d(() => [
566
566
  b(e(S), {
567
567
  prop: o.name,
568
568
  label: o.label,
569
569
  "label-width": o.labelWidth,
570
570
  required: o.required,
571
- rules: e(i)
571
+ rules: e(p)
572
572
  }, {
573
- default: r(() => [
574
- t.value ? (f(), c(e(Ae), {
573
+ default: d(() => [
574
+ r.value ? (f(), h(e($e), {
575
575
  key: 0,
576
576
  modelValue: s.value,
577
577
  "onUpdate:modelValue": m[0] || (m[0] = (y) => s.value = y),
@@ -583,7 +583,7 @@ const Ke = /* @__PURE__ */ v({
583
583
  format: n.value,
584
584
  "arrow-control": "",
585
585
  style: { width: "100%" }
586
- }, null, 8, ["modelValue", "placeholder", "disabled", "readonly", "editable", "clearable", "format"])) : (f(), c(e($e), {
586
+ }, null, 8, ["modelValue", "placeholder", "disabled", "readonly", "editable", "clearable", "format"])) : (f(), h(e(Ae), {
587
587
  key: 1,
588
588
  modelValue: s.value,
589
589
  "onUpdate:modelValue": m[1] || (m[1] = (y) => s.value = y),
@@ -592,7 +592,7 @@ const Ke = /* @__PURE__ */ v({
592
592
  readonly: o.readonly,
593
593
  editable: o.editable,
594
594
  clearable: o.clearable,
595
- type: l.value,
595
+ type: t.value,
596
596
  format: n.value,
597
597
  style: { width: "100%" }
598
598
  }, null, 8, ["modelValue", "placeholder", "disabled", "readonly", "editable", "clearable", "type", "format"]))
@@ -617,31 +617,31 @@ const Ke = /* @__PURE__ */ v({
617
617
  disabled: { type: Boolean }
618
618
  },
619
619
  setup(a) {
620
- const p = w(), i = B(), t = A();
621
- ne(t, () => {
622
- t.value || (n.value = "");
620
+ const i = w(), p = q(), r = $();
621
+ re(r, () => {
622
+ r.value || (n.value = "");
623
623
  });
624
- const n = z(""), l = $("inputRef");
625
- return te(() => {
626
- l.value.input.onchange = (d) => {
624
+ const n = z(""), t = A("inputRef");
625
+ return de(() => {
626
+ t.value.input.onchange = (l) => {
627
627
  var s;
628
- t.value = (s = d == null ? void 0 : d.target) == null ? void 0 : s.files[0];
628
+ r.value = (s = l == null ? void 0 : l.target) == null ? void 0 : s.files[0];
629
629
  }, n.value = "";
630
- }), (d, s) => (f(), c(e(g), { span: e(p) }, {
631
- default: r(() => [
630
+ }), (l, s) => (f(), h(e(g), { span: e(i) }, {
631
+ default: d(() => [
632
632
  b(e(S), {
633
- prop: d.name,
634
- label: d.label,
635
- "label-width": d.labelWidth,
636
- required: d.required,
637
- rules: e(i)
633
+ prop: l.name,
634
+ label: l.label,
635
+ "label-width": l.labelWidth,
636
+ required: l.required,
637
+ rules: e(p)
638
638
  }, {
639
- default: r(() => [
639
+ default: d(() => [
640
640
  b(e(W), {
641
641
  ref: "inputRef",
642
642
  modelValue: n.value,
643
643
  "onUpdate:modelValue": s[0] || (s[0] = (o) => n.value = o),
644
- disabled: d.disabled,
644
+ disabled: l.disabled,
645
645
  type: "file",
646
646
  "validate-event": !1
647
647
  }, null, 8, ["modelValue", "disabled"])
@@ -662,20 +662,20 @@ const Ke = /* @__PURE__ */ v({
662
662
  align: { default: "right" }
663
663
  },
664
664
  setup(a) {
665
- const p = O(() => ({
665
+ const i = O(() => ({
666
666
  textAlign: a.align
667
- })), i = w();
668
- return (t, n) => (f(), c(e(g), {
669
- span: e(i),
670
- style: Se(p.value)
667
+ })), p = w();
668
+ return (r, n) => (f(), h(e(g), {
669
+ span: e(p),
670
+ style: Se(i.value)
671
671
  }, {
672
- default: r(() => [
672
+ default: d(() => [
673
673
  b(e(Ne), {
674
- gutter: t.gutter,
674
+ gutter: r.gutter,
675
675
  style: { "margin-bottom": "var(--orion-form-validation-message-height)" }
676
676
  }, {
677
- default: r(() => [
678
- k(t.$slots, "default")
677
+ default: d(() => [
678
+ B(r.$slots, "default")
679
679
  ]),
680
680
  _: 3
681
681
  }, 8, ["gutter"])
@@ -696,18 +696,18 @@ const Ke = /* @__PURE__ */ v({
696
696
  rules: {}
697
697
  },
698
698
  setup(a) {
699
- const p = w(), i = B();
700
- return (t, n) => (f(), c(e(g), { span: e(p) }, {
701
- default: r(() => [
699
+ const i = w(), p = q();
700
+ return (r, n) => (f(), h(e(g), { span: e(i) }, {
701
+ default: d(() => [
702
702
  b(e(S), {
703
- prop: t.name,
704
- label: t.label,
705
- "label-width": t.labelWidth,
706
- required: t.required,
707
- rules: e(i)
703
+ prop: r.name,
704
+ label: r.label,
705
+ "label-width": r.labelWidth,
706
+ required: r.required,
707
+ rules: e(p)
708
708
  }, {
709
- default: r(() => [
710
- k(t.$slots, "default")
709
+ default: d(() => [
710
+ B(r.$slots, "default")
711
711
  ]),
712
712
  _: 3
713
713
  }, 8, ["prop", "label", "label-width", "required", "rules"])
@@ -733,76 +733,76 @@ const Ke = /* @__PURE__ */ v({
733
733
  fillMapping: { type: [String, Function] }
734
734
  },
735
735
  setup(a) {
736
- const p = w(), i = B(), t = A(), n = P(), l = z(!1), d = (h) => {
737
- l.value = h;
736
+ const i = w(), p = q(), r = $(), n = P(), t = z(!1), l = (c) => {
737
+ t.value = c;
738
738
  }, s = z(!1), o = () => {
739
- s.value || (s.value = !0), l.value || I.value.handleOpen();
739
+ s.value || (s.value = !0), t.value || I.value.handleOpen();
740
740
  };
741
741
  let m;
742
- const y = (h) => {
743
- m = h;
744
- }, q = (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) => {
747
- l.value && H.value.focus();
742
+ const y = (c) => {
743
+ m = c;
744
+ }, M = (c) => {
745
+ ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight", "Enter", "Space"].indexOf(c.code) > -1 && (t.value && m && m(c.code), c.stopPropagation()), ["ArrowUp", "ArrowDown"].indexOf(c.code) > -1 && !t.value && I.value.handleOpen();
746
+ }, H = A("input"), Y = async (c) => {
747
+ t.value && H.value.focus();
748
748
  }, J = () => {
749
749
  if (s.value && L(a.fillMapping)) {
750
- const h = {}, V = a.fillMapping.split(",");
751
- for (let M = 0; M < V.length; M++) {
752
- const F = V[M].split(":")[0].trim();
753
- h[F] = void 0;
750
+ const c = {}, V = a.fillMapping.split(",");
751
+ for (let C = 0; C < V.length; C++) {
752
+ const F = V[C].split(":")[0].trim();
753
+ c[F] = void 0;
754
754
  }
755
- n.updateModelValueMulti(h);
755
+ n.updateModelValueMulti(c);
756
756
  }
757
- }, I = $("dropdown");
757
+ }, I = A("dropdown");
758
758
  return Z(
759
759
  Ge,
760
760
  x({
761
- lovValue: t,
762
- backfill: (h) => {
761
+ lovValue: r,
762
+ backfill: (c) => {
763
763
  if (I.value.handleClose(), L(a.fillMapping)) {
764
- const V = {}, M = a.fillMapping.split(",");
765
- for (let F = 0; F < M.length; F++) {
766
- const R = M[F].split(":")[0].trim(), Q = M[F].split(":")[1].trim(), u = h[Q];
764
+ const V = {}, C = a.fillMapping.split(",");
765
+ for (let F = 0; F < C.length; F++) {
766
+ const R = C[F].split(":")[0].trim(), Q = C[F].split(":")[1].trim(), u = c[Q];
767
767
  V[R] = u;
768
768
  }
769
769
  n.updateModelValueMulti(V);
770
770
  } else
771
- a.fillMapping && a.fillMapping(h);
771
+ a.fillMapping && a.fillMapping(c);
772
772
  s.value && (s.value = !1);
773
773
  },
774
774
  registerKeydownHandler: y
775
775
  })
776
- ), (h, V) => (f(), c(e(g), { span: e(p) }, {
777
- default: r(() => [
776
+ ), (c, V) => (f(), h(e(g), { span: e(i) }, {
777
+ default: d(() => [
778
778
  b(e(S), {
779
- prop: h.name,
780
- label: h.label,
781
- "label-width": h.labelWidth,
782
- required: h.required,
783
- rules: e(i)
779
+ prop: c.name,
780
+ label: c.label,
781
+ "label-width": c.labelWidth,
782
+ required: c.required,
783
+ rules: e(p)
784
784
  }, {
785
- default: r(() => [
786
- b(e(ue), {
785
+ default: d(() => [
786
+ b(e(pe), {
787
787
  ref: "dropdown",
788
788
  trigger: "click",
789
- onVisibleChange: d,
789
+ onVisibleChange: l,
790
790
  style: { width: "100%" }
791
791
  }, {
792
- dropdown: r(() => [
793
- k(h.$slots, "default")
792
+ dropdown: d(() => [
793
+ B(c.$slots, "default")
794
794
  ]),
795
- default: r(() => [
795
+ default: d(() => [
796
796
  b(e(W), {
797
797
  ref: "input",
798
- modelValue: e(t),
799
- "onUpdate:modelValue": V[0] || (V[0] = (M) => C(t) ? t.value = M : null),
800
- maxlength: h.maxlength,
801
- placeholder: h.placeholder,
802
- disabled: h.disabled,
803
- readonly: h.readonly,
798
+ modelValue: e(r),
799
+ "onUpdate:modelValue": V[0] || (V[0] = (C) => k(r) ? r.value = C : null),
800
+ maxlength: c.maxlength,
801
+ placeholder: c.placeholder,
802
+ disabled: c.disabled,
803
+ readonly: c.readonly,
804
804
  onInput: o,
805
- onKeydown: q,
805
+ onKeydown: M,
806
806
  onChange: J,
807
807
  onBlur: Y,
808
808
  "suffix-icon": e(Pe)
@@ -840,34 +840,34 @@ const Ke = /* @__PURE__ */ v({
840
840
  controlsPosition: {}
841
841
  },
842
842
  setup(a) {
843
- const p = w(), i = B(), t = P(), n = O({
843
+ const i = le(), p = w(), r = q(), n = P(), t = O({
844
844
  get: () => {
845
- const l = t.modelValue[a.name];
845
+ const l = n.modelValue[a.name];
846
846
  if (l) {
847
- if (ce(l))
847
+ if (ve(l))
848
848
  return l;
849
849
  if (L(l))
850
- return ye(l);
850
+ return ge(l);
851
851
  throw new D("数字输入框的值只能为字符串或数字类型");
852
852
  }
853
853
  },
854
854
  set: (l) => {
855
- l ? t.updateModelValue(a.name, l) : t.updateModelValue(a.name, void 0);
855
+ l ? n.updateModelValue(a.name, l) : n.updateModelValue(a.name, void 0);
856
856
  }
857
857
  });
858
- return (l, d) => (f(), c(e(g), { span: e(p) }, {
859
- default: r(() => [
858
+ return (l, s) => (f(), h(e(g), { span: e(p) }, {
859
+ default: d(() => [
860
860
  b(e(S), {
861
861
  prop: l.name,
862
862
  label: l.label,
863
863
  "label-width": l.labelWidth,
864
864
  required: l.required,
865
- rules: e(i)
866
- }, {
867
- default: r(() => [
865
+ rules: e(r)
866
+ }, ae({
867
+ default: d(() => [
868
868
  b(e(Ee), {
869
- modelValue: n.value,
870
- "onUpdate:modelValue": d[0] || (d[0] = (s) => n.value = s),
869
+ modelValue: t.value,
870
+ "onUpdate:modelValue": s[0] || (s[0] = (o) => t.value = o),
871
871
  placeholder: l.placeholder,
872
872
  disabled: l.disabled,
873
873
  readonly: l.readonly,
@@ -881,16 +881,45 @@ const Ke = /* @__PURE__ */ v({
881
881
  style: { width: "100%" }
882
882
  }, null, 8, ["modelValue", "placeholder", "disabled", "readonly", "min", "max", "step", "step-strictly", "precision", "controls", "controls-position"])
883
883
  ]),
884
- _: 1
885
- }, 8, ["prop", "label", "label-width", "required", "rules"])
884
+ _: 2
885
+ }, [
886
+ e(i)["decrease-icon"] ? {
887
+ name: "decrease-icon",
888
+ fn: d(() => [
889
+ B(l.$slots, "decrease-icon")
890
+ ]),
891
+ key: "0"
892
+ } : void 0,
893
+ e(i)["increase-icon"] ? {
894
+ name: "increase-icon",
895
+ fn: d(() => [
896
+ B(l.$slots, "increase-icon")
897
+ ]),
898
+ key: "1"
899
+ } : void 0,
900
+ e(i).prefix ? {
901
+ name: "prefix",
902
+ fn: d(() => [
903
+ B(l.$slots, "prefix")
904
+ ]),
905
+ key: "2"
906
+ } : void 0,
907
+ e(i).suffix ? {
908
+ name: "suffix",
909
+ fn: d(() => [
910
+ B(l.$slots, "suffix")
911
+ ]),
912
+ key: "3"
913
+ } : void 0
914
+ ]), 1032, ["prop", "label", "label-width", "required", "rules"])
886
915
  ]),
887
- _: 1
916
+ _: 3
888
917
  }, 8, ["span"]));
889
918
  }
890
919
  }), sl = {
891
920
  key: 0,
892
921
  style: { position: "absolute", inset: "4px 30px 4px 4px", overflow: "hidden", pointerEvents: "none" }
893
- }, ul = /* @__PURE__ */ v({
922
+ }, il = /* @__PURE__ */ v({
894
923
  name: "OFormTableselect",
895
924
  inheritAttrs: !1,
896
925
  __name: "TableSelect",
@@ -909,37 +938,37 @@ const Ke = /* @__PURE__ */ v({
909
938
  tag: { type: Function }
910
939
  },
911
940
  emits: ["change"],
912
- setup(a, { emit: p }) {
913
- const i = p, t = w(), n = B(), l = z(""), d = z(!1), s = P(), o = O({
941
+ setup(a, { emit: i }) {
942
+ const p = i, r = w(), n = q(), t = z(""), l = z(!1), s = P(), o = O({
914
943
  get: () => {
915
944
  const u = s.modelValue[a.name];
916
945
  if (u) {
917
- if (!ve(u))
946
+ if (!we(u))
918
947
  throw new D("表格下拉框的值只能为数组类型");
919
948
  return u;
920
949
  }
921
950
  },
922
951
  set: (u) => {
923
- d.value = !1, u ? s.updateModelValue(a.name, u) : s.updateModelValue(a.name, void 0);
952
+ l.value = !1, u ? s.updateModelValue(a.name, u) : s.updateModelValue(a.name, void 0);
924
953
  }
925
954
  }), 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;
955
+ de(async () => {
956
+ R && (m.value = await R(o.value), m.value && (c.value = m.value.map((u) => a.tag(u))));
957
+ }), re(o, async () => {
958
+ l.value ? R && (m.value = await R(o.value), m.value && (c.value = m.value.map((u) => a.tag(u)))) : l.value = !0;
930
959
  });
931
- const y = z(!1), q = (u) => {
960
+ const y = z(!1), M = (u) => {
932
961
  y.value = u;
933
962
  }, H = () => {
934
963
  y.value || V.value.handleOpen();
935
- }, Y = $("input"), J = () => {
964
+ }, Y = A("input"), J = () => {
936
965
  Y.value.focus();
937
966
  }, I = (u) => {
938
967
  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
968
  }, _ = async (u) => {
940
- y.value ? Y.value.focus() : l.value = "";
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);
969
+ y.value ? Y.value.focus() : t.value = "";
970
+ }, c = z([]), V = A("dropdown"), C = (u, j) => {
971
+ o.value = u.map((T) => Ve(T, a.pick)), c.value = u.map((T) => a.tag(T)), j && (t.value = ""), p("change", u);
943
972
  }, F = () => {
944
973
  V.value.handleClose();
945
974
  };
@@ -950,17 +979,17 @@ const Ke = /* @__PURE__ */ v({
950
979
  return Z(
951
980
  Le,
952
981
  x({
953
- inputValue: l,
982
+ inputValue: t,
954
983
  selection: m,
955
- onSelect: M,
984
+ onSelect: C,
956
985
  selectDone: F,
957
986
  tag: a.tag,
958
987
  registerRowCompletionProvider: Q
959
988
  })
960
989
  ), (u, j) => {
961
990
  const T = Be("o-space");
962
- return f(), c(e(g), { span: e(t) }, {
963
- default: r(() => [
991
+ return f(), h(e(g), { span: e(r) }, {
992
+ default: d(() => [
964
993
  b(e(S), {
965
994
  prop: u.name,
966
995
  label: u.label,
@@ -968,25 +997,25 @@ const Ke = /* @__PURE__ */ v({
968
997
  required: u.required,
969
998
  rules: e(n)
970
999
  }, {
971
- default: r(() => [
972
- b(e(ue), {
1000
+ default: d(() => [
1001
+ b(e(pe), {
973
1002
  ref: "dropdown",
974
1003
  trigger: "click",
975
- onVisibleChange: q,
1004
+ onVisibleChange: M,
976
1005
  style: { width: "100%" }
977
1006
  }, {
978
- dropdown: r(() => [
979
- k(u.$slots, "default")
1007
+ dropdown: d(() => [
1008
+ B(u.$slots, "default")
980
1009
  ]),
981
- default: r(() => [
1010
+ default: d(() => [
982
1011
  qe("div", {
983
1012
  onFocus: J,
984
1013
  style: { position: "relative", width: "100%", height: "100%" }
985
1014
  }, [
986
1015
  b(e(W), {
987
1016
  ref: "input",
988
- modelValue: l.value,
989
- "onUpdate:modelValue": j[0] || (j[0] = (X) => l.value = X),
1017
+ modelValue: t.value,
1018
+ "onUpdate:modelValue": j[0] || (j[0] = (X) => t.value = X),
990
1019
  maxlength: u.maxlength,
991
1020
  placeholder: u.placeholder,
992
1021
  disabled: u.disabled,
@@ -998,10 +1027,10 @@ const Ke = /* @__PURE__ */ v({
998
1027
  }, null, 8, ["modelValue", "maxlength", "placeholder", "disabled", "readonly", "suffix-icon"]),
999
1028
  y.value ? Me("", !0) : (f(), E("div", sl, [
1000
1029
  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(() => [
1004
- ae(oe(X), 1)
1030
+ default: d(() => [
1031
+ (f(!0), E(U, null, N(c.value, (X) => (f(), h(e(De), { type: "info" }, {
1032
+ default: d(() => [
1033
+ ne(te(X), 1)
1005
1034
  ]),
1006
1035
  _: 2
1007
1036
  }, 1024))), 256))
@@ -1037,7 +1066,7 @@ const Ke = /* @__PURE__ */ v({
1037
1066
  DiyItem: tl,
1038
1067
  LovInput: rl,
1039
1068
  NumberInput: dl,
1040
- TableSelect: ul
1069
+ TableSelect: il
1041
1070
  });
1042
1071
  export {
1043
1072
  Sl as default,
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/Form/Form.vue","../../../src/components/Form/StringInput/StringInput.vue","../../../src/components/Form/PasswordInput/PasswordInput.vue","../../../src/components/Form/Textarea/Textarea.vue","../../../src/components/Form/SingleSelect/SingleSelect.vue","../../../src/components/Form/MultiSelect/MultiSelect.vue","../../../src/components/Form/RadioGroup/RadioGroup.vue","../../../src/components/Form/CheckboxGroup/CheckboxGroup.vue","../../../src/components/Form/Checkbox/Checkbox.vue","../../../src/components/Form/Switch/Switch.vue","../../../src/components/Form/DateInput/DateInput.vue","../../../src/components/Form/FileInput/FileInput.vue","../../../src/components/Form/ButtonGroup/ButtonGroup.vue","../../../src/components/Form/DiyItem/DiyItem.vue","../../../src/components/Form/LovInput/LovInput.vue","../../../src/components/Form/NumberInput/NumberInput.vue","../../../src/components/Form/TableSelect/TableSelect.vue","../../../src/components/Form/index.ts"],"sourcesContent":["<template>\r\n <el-form ref=\"form\" :model=\"modelValue\" :rules=\"rules\" :label-width=\"itemLabelWidth\" :disabled=\"disabled\" class=\"orion-form\">\r\n <el-row :gutter=\"16\">\r\n <slot></slot>\r\n </el-row>\r\n </el-form>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { provide, reactive, toRef, useTemplateRef } from 'vue'\r\nimport { ElForm, ElRow } from 'element-plus'\r\nimport { type FormProps, type FormExpose, formContextKey } from './Form'\r\nimport OrionError from '../../error/OrionError'\r\nimport { difference, isEmpty } from 'lodash-es'\r\n\r\ndefineOptions({ name: 'OForm', inheritAttrs: false })\r\n\r\nconst { rules, itemSpan = 6, itemLabelWidth = 'auto', disabled = false, modelValue } = defineProps<FormProps>()\r\n\r\nconst emit = defineEmits(['update:modelValue'])\r\n\r\nconst updateModelValue = (name: string, value: any) => {\r\n if (!Object.keys(modelValue).includes(name)) {\r\n throw new OrionError(`modelValue中不存在[${name}]`)\r\n }\r\n emit('update:modelValue', { ...modelValue, [name]: value })\r\n}\r\n\r\nconst updateModelValueMulti = (data: Record<string, any>) => {\r\n const modelKeys = Object.keys(modelValue)\r\n const dataKeys = Object.keys(data)\r\n const diff = difference(dataKeys, modelKeys)\r\n if (!isEmpty(diff)) {\r\n throw new OrionError(`modelValue中不存在[${diff.join(',')}]`)\r\n }\r\n emit('update:modelValue', { ...modelValue, ...data })\r\n}\r\n\r\nconst formRef = useTemplateRef('form')\r\n\r\nconst validate: FormExpose['validate'] = async () => {\r\n return await formRef.value!.validate()\r\n}\r\n\r\ndefineExpose({\r\n validate,\r\n})\r\n\r\nprovide(\r\n formContextKey,\r\n reactive({\r\n modelValue: toRef(() => modelValue),\r\n updateModelValue,\r\n updateModelValueMulti,\r\n rules: toRef(() => rules),\r\n itemSpan: toRef(() => itemSpan),\r\n disabled: toRef(() => disabled),\r\n })\r\n)\r\n</script>\r\n","<template>\r\n <el-col :span=\"normalizedSpan\">\r\n <el-form-item :prop=\"name\" :label=\"label\" :label-width=\"labelWidth\" :required=\"required\" :rules=\"normalizedRules\">\r\n <el-input v-model=\"elModel\" :maxlength=\"maxlength\" :placeholder=\"placeholder\" :disabled=\"disabled\"\r\n :readonly=\"readonly\">\r\n <template v-if=\"slots.prefix\" #prefix>\r\n <slot name=\"prefix\"></slot>\r\n </template>\r\n <template v-if=\"slots.suffix\" #suffix>\r\n <slot name=\"suffix\"></slot>\r\n </template>\r\n <template v-if=\"slots.prepend\" #prepend>\r\n <slot name=\"prepend\"></slot>\r\n </template>\r\n <template v-if=\"slots.append\" #append>\r\n <slot name=\"append\"></slot>\r\n </template>\r\n </el-input>\r\n </el-form-item>\r\n </el-col>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { ElCol, ElFormItem, ElInput } from 'element-plus'\r\nimport type { StringInputProps } from './StringInput'\r\nimport { useFormItemSpan, useFormItemRules, useFormItemStringModel } from '../hooks'\r\nimport { useSlots } from 'vue';\r\n\r\ndefineOptions({ name: 'OFormString', inheritAttrs: false })\r\nconst slots = useSlots()\r\n\r\nconst { name, label, labelWidth, required, maxlength, placeholder, disabled, readonly } = defineProps<StringInputProps>()\r\nconst normalizedSpan = useFormItemSpan()\r\nconst normalizedRules = useFormItemRules()\r\nconst elModel = useFormItemStringModel()\r\n</script>\r\n","<template>\r\n <el-col :span=\"normalizedSpan\">\r\n <el-form-item :prop=\"name\" :label=\"label\" :label-width=\"labelWidth\" :required=\"required\" :rules=\"normalizedRules\">\r\n <el-input v-model=\"elModel\" :maxlength=\"maxlength\" :placeholder=\"placeholder\" :disabled=\"disabled\" :readonly=\"readonly\" type=\"password\" />\r\n </el-form-item>\r\n </el-col>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { ElCol, ElFormItem, ElInput } from 'element-plus'\r\nimport type { PasswordInputProps } from './PasswordInput'\r\nimport { useFormItemSpan, useFormItemRules, useFormItemStringModel } from '../hooks'\r\n\r\ndefineOptions({ name: 'OFormPassword', inheritAttrs: false })\r\n\r\nconst { name, label, labelWidth, required, maxlength, placeholder, disabled, readonly } = defineProps<PasswordInputProps>()\r\nconst normalizedSpan = useFormItemSpan()\r\nconst normalizedRules = useFormItemRules()\r\nconst elModel = useFormItemStringModel()\r\n</script>\r\n","<template>\r\n <el-col :span=\"normalizedSpan\">\r\n <el-form-item :prop=\"name\" :label=\"label\" :label-width=\"labelWidth\" :required=\"required\" :rules=\"normalizedRules\">\r\n <el-input\r\n v-model=\"elModel\"\r\n :maxlength=\"maxlength\"\r\n :placeholder=\"placeholder\"\r\n :disabled=\"disabled\"\r\n :readonly=\"readonly\"\r\n type=\"textarea\"\r\n :rows=\"rows\"\r\n :resize=\"'none'\"\r\n />\r\n </el-form-item>\r\n </el-col>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { ElCol, ElFormItem, ElInput } from 'element-plus'\r\nimport type { TextareaProps } from './Textarea'\r\nimport { useFormItemSpan, useFormItemRules, useFormItemStringModel } from '../hooks'\r\n\r\ndefineOptions({ name: 'OFormTextarea', inheritAttrs: false })\r\n\r\nconst { name, label, labelWidth, required, maxlength, placeholder, disabled, readonly, rows } = defineProps<TextareaProps>()\r\nconst normalizedSpan = useFormItemSpan()\r\nconst normalizedRules = useFormItemRules()\r\nconst elModel = useFormItemStringModel()\r\n</script>\r\n","<template>\r\n <el-col :span=\"normalizedSpan\">\r\n <el-form-item :prop=\"name\" :label=\"label\" :label-width=\"labelWidth\" :required=\"required\" :rules=\"normalizedRules\">\r\n <el-input v-if=\"normalizedDisabled\" :model-value=\"content\" :placeholder=\"placeholder\" :disabled=\"true\" :readonly=\"true\" />\r\n <el-select v-else v-model=\"elModel\" :placeholder=\"placeholder\" :clearable=\"clearable\" :filterable=\"filterable\" @change=\"attrs.onChange as any\">\r\n <el-option v-for=\"codeItem in normalizedCode\" :key=\"codeItem.value\" :label=\"codeItem.content\" :value=\"codeItem.value\" />\r\n </el-select>\r\n </el-form-item>\r\n </el-col>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { computed, useAttrs } from 'vue'\r\nimport { ElCol, ElFormItem, ElInput, ElSelect, ElOption } from 'element-plus'\r\nimport type { SingleSelectProps } from './SingleSelect'\r\nimport { useFormItemSpan, useFormItemRules, useFormItemDisabled, useFormItemCode, useFormItemStringModel } from '../hooks'\r\nimport { getSingleCodeContent } from '../utils'\r\n\r\ndefineOptions({ name: 'OFormSingleselect', inheritAttrs: false })\r\nconst attrs = useAttrs()\r\n\r\nconst { name, label, labelWidth, required, placeholder, clearable, filterable } = defineProps<SingleSelectProps>()\r\nconst normalizedSpan = useFormItemSpan()\r\nconst normalizedRules = useFormItemRules()\r\nconst normalizedDisabled = useFormItemDisabled()\r\nconst normalizedCode = useFormItemCode()\r\nconst elModel = useFormItemStringModel()\r\nconst content = computed(() => getSingleCodeContent(normalizedCode.value, elModel.value))\r\n</script>\r\n","<template>\r\n <el-col :span=\"normalizedSpan\">\r\n <el-form-item :prop=\"name\" :label=\"label\" :label-width=\"labelWidth\" :required=\"required\" :rules=\"normalizedRules\">\r\n <el-input v-if=\"normalizedDisabled\" :model-value=\"content\" :placeholder=\"placeholder\" :disabled=\"true\" :readonly=\"true\" />\r\n <el-select\r\n v-else\r\n v-model=\"elModel\"\r\n :placeholder=\"placeholder\"\r\n multiple\r\n :collapse-tags=\"collapseTags\"\r\n :collapse-tags-tooltip=\"collapseTagsTooltip\"\r\n @change=\"attrs.onChange as any\"\r\n >\r\n <el-option v-for=\"codeItem in normalizedCode\" :key=\"codeItem.value\" :label=\"codeItem.content\" :value=\"codeItem.value\" />\r\n </el-select>\r\n </el-form-item>\r\n </el-col>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { computed, useAttrs } from 'vue'\r\nimport { ElCol, ElFormItem, ElInput, ElSelect, ElOption } from 'element-plus'\r\nimport type { MultiSelectProps } from './MultiSelect'\r\nimport { useFormContext, useFormItemSpan, useFormItemRules, useFormItemDisabled, useFormItemCode, useFormItemMultiModel } from '../hooks'\r\nimport { getMultiCodeContent } from '../utils'\r\n\r\ndefineOptions({ name: 'OFormMultiselect', inheritAttrs: false })\r\nconst attrs = useAttrs()\r\n\r\nconst { name, label, labelWidth, required, placeholder, collapseTags, collapseTagsTooltip } = defineProps<MultiSelectProps>()\r\nconst normalizedSpan = useFormItemSpan()\r\nconst normalizedRules = useFormItemRules()\r\nconst normalizedDisabled = useFormItemDisabled()\r\nconst normalizedCode = useFormItemCode()\r\nconst elModel = useFormItemMultiModel()\r\nconst formContext = useFormContext()!\r\nconst content = computed(() => getMultiCodeContent(normalizedCode.value, formContext.modelValue[name]))\r\n</script>\r\n","<template>\r\n <el-col :span=\"normalizedSpan\">\r\n <el-form-item :prop=\"name\" :label=\"label\" :label-width=\"labelWidth\" :required=\"required\" :rules=\"normalizedRules\">\r\n <el-radio-group v-model=\"elModel\" :disabled=\"disabled\">\r\n <el-radio v-for=\"codeItem in normalizedCode\" :key=\"codeItem.value\" :value=\"codeItem.value\">\r\n {{ codeItem.content }}\r\n </el-radio>\r\n </el-radio-group>\r\n </el-form-item>\r\n </el-col>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { ElCol, ElFormItem, ElRadioGroup, ElRadio } from 'element-plus'\r\nimport type { RadioGroupProps } from './RadioGroup'\r\nimport { useFormItemSpan, useFormItemRules, useFormItemCode, useFormItemStringModel } from '../hooks'\r\n\r\ndefineOptions({ name: 'OFormRadiogroup', inheritAttrs: false })\r\n\r\nconst { name, label, labelWidth, required, disabled } = defineProps<RadioGroupProps>()\r\nconst normalizedSpan = useFormItemSpan()\r\nconst normalizedRules = useFormItemRules()\r\nconst normalizedCode = useFormItemCode()\r\nconst elModel = useFormItemStringModel()\r\n</script>\r\n","<template>\r\n <el-col :span=\"normalizedSpan\">\r\n <el-form-item :prop=\"name\" :label=\"label\" :label-width=\"labelWidth\" :required=\"required\" :rules=\"normalizedRules\">\r\n <el-checkbox-group v-model=\"elModel\" :disabled=\"disabled\">\r\n <el-checkbox v-for=\"codeItem in normalizedCode\" :key=\"codeItem.value\" :label=\"codeItem.content\" :value=\"codeItem.value\" />\r\n </el-checkbox-group>\r\n </el-form-item>\r\n </el-col>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { ElCol, ElFormItem, ElCheckboxGroup, ElCheckbox } from 'element-plus'\r\nimport type { CheckboxGroupProps } from './CheckboxGroup'\r\nimport { useFormItemSpan, useFormItemRules, useFormItemCode, useFormItemMultiModel } from '../hooks'\r\n\r\ndefineOptions({ name: 'OFormCheckboxgroup', inheritAttrs: false })\r\n\r\nconst { name, label, labelWidth, required, disabled } = defineProps<CheckboxGroupProps>()\r\nconst normalizedSpan = useFormItemSpan()\r\nconst normalizedRules = useFormItemRules()\r\nconst normalizedCode = useFormItemCode()\r\nconst elModel = useFormItemMultiModel()\r\n</script>\r\n","<template>\r\n <el-col :span=\"normalizedSpan\">\r\n <el-form-item :prop=\"name\" :label=\"label\" :label-width=\"labelWidth\" :rules=\"rules\">\r\n <el-checkbox v-model=\"elModel\" :disabled=\"disabled\"></el-checkbox>\r\n </el-form-item>\r\n </el-col>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { ElCol, ElFormItem, ElCheckbox } from 'element-plus'\r\nimport type { CheckboxProps } from './Checkbox'\r\nimport { useFormItemBooleanModel, useFormItemSpan } from '../hooks'\r\n\r\ndefineOptions({ name: 'OFormCheckbox', inheritAttrs: false })\r\n\r\nconst { name, label, labelWidth, rules, disabled } = defineProps<CheckboxProps>()\r\nconst normalizedSpan = useFormItemSpan()\r\nconst elModel = useFormItemBooleanModel()\r\n</script>\r\n","<template>\r\n <el-col :span=\"normalizedSpan\">\r\n <el-form-item :prop=\"name\" :label=\"label\" :label-width=\"labelWidth\" :rules=\"rules\">\r\n <el-switch v-model=\"elModel\" :disabled=\"disabled\" />\r\n </el-form-item>\r\n </el-col>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { ElCol, ElFormItem, ElSwitch } from 'element-plus'\r\nimport type { SwitchProps } from './Switch'\r\nimport { useFormItemBooleanModel, useFormItemSpan } from '../hooks'\r\n\r\ndefineOptions({ name: 'OFormSwitch', inheritAttrs: false })\r\n\r\nconst { name, label, labelWidth, rules, disabled } = defineProps<SwitchProps>()\r\nconst normalizedSpan = useFormItemSpan()\r\nconst elModel = useFormItemBooleanModel()\r\n</script>\r\n","<template>\r\n <el-col :span=\"normalizedSpan\">\r\n <el-form-item :prop=\"name\" :label=\"label\" :label-width=\"labelWidth\" :required=\"required\" :rules=\"normalizedRules\">\r\n <el-time-picker\r\n v-if=\"isTimePicker\"\r\n v-model=\"elModel\"\r\n :placeholder=\"placeholder\"\r\n :disabled=\"disabled\"\r\n :readonly=\"readonly\"\r\n :editable=\"editable\"\r\n :clearable=\"clearable\"\r\n :format=\"normalizedSourceFormat\"\r\n arrow-control\r\n style=\"width: 100%\"\r\n />\r\n <el-date-picker\r\n v-else\r\n v-model=\"elModel\"\r\n :placeholder=\"placeholder\"\r\n :disabled=\"disabled\"\r\n :readonly=\"readonly\"\r\n :editable=\"editable\"\r\n :clearable=\"clearable\"\r\n :type=\"dateType\"\r\n :format=\"normalizedSourceFormat\"\r\n style=\"width: 100%\"\r\n />\r\n </el-form-item>\r\n </el-col>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { computed } from 'vue'\r\nimport { ElCol, ElFormItem, ElDatePicker, ElTimePicker, dayjs } from 'element-plus'\r\nimport type { DateInputProps } from './DateInput'\r\nimport { useFormContext, useFormItemSpan, useFormItemRules } from '../hooks'\r\nimport { isDate, isString } from 'lodash-es'\r\nimport OrionError from '../../../error/OrionError'\r\n\r\ndefineOptions({ name: 'OFormDate', inheritAttrs: false })\r\n\r\nconst {\r\n name,\r\n label,\r\n labelWidth,\r\n required,\r\n placeholder,\r\n disabled,\r\n readonly,\r\n editable = true,\r\n clearable = true,\r\n format = 'YYYY-MM-DD',\r\n sourceFormat,\r\n} = defineProps<DateInputProps>()\r\nconst normalizedSpan = useFormItemSpan()\r\nconst normalizedRules = useFormItemRules()\r\n\r\nconst isTimePicker = computed(() => format.startsWith('H') || format.startsWith('h') || format.startsWith('m') || format.startsWith('s'))\r\n\r\nconst normalizedSourceFormat = computed(() => {\r\n if (sourceFormat) {\r\n return sourceFormat\r\n }\r\n if (isTimePicker.value) {\r\n return 'HH:mm:ss'\r\n } else {\r\n return 'YYYY-MM-DD'\r\n }\r\n})\r\n\r\nconst dateType = computed(() => {\r\n let picker: 'date' | 'year' | 'month' | 'datetime' = 'date'\r\n\r\n // 配置年 yyyy指年 YYYY指周年,年末年初的值可能有所变化\r\n if (format.indexOf('y') > -1 || format.indexOf('Y') > -1) {\r\n picker = 'year'\r\n }\r\n\r\n // 配置月,M指月份,m指分钟\r\n if (format.indexOf('M') > -1) {\r\n picker = 'month'\r\n }\r\n\r\n // 配置日,d指星期,D指月的天,DDD指年的天\r\n if (format.indexOf('d') > -1 || format.indexOf('D') > -1) {\r\n picker = 'date'\r\n }\r\n\r\n // 配置小时,H指24小时制(0~23),k指24小时制(1~24),h指12小时制,m指分钟,s指秒,S指小数秒\r\n if (\r\n format.indexOf('H') > -1 ||\r\n format.indexOf('h') > -1 ||\r\n format.indexOf('k') > -1 ||\r\n format.indexOf('m') > -1 ||\r\n format.indexOf('s') > -1 ||\r\n format.indexOf('S') > -1\r\n ) {\r\n picker = 'datetime'\r\n }\r\n\r\n return picker\r\n})\r\n\r\nconst formContext = useFormContext()!\r\nconst elModel = computed<Date | undefined>({\r\n get: () => {\r\n const value = formContext.modelValue[name]\r\n if (!value) {\r\n return undefined\r\n }\r\n if (isDate(value)) {\r\n return value as Date\r\n } else if (isString(value)) {\r\n const dayjsObj = dayjs(value, normalizedSourceFormat.value, true)\r\n if (!dayjsObj.isValid()) {\r\n throw new OrionError(`日期输入框的值无效,不符合${normalizedSourceFormat.value}格式`)\r\n }\r\n return dayjsObj.toDate()\r\n } else {\r\n throw new OrionError('日期输入框的值只能为字符串或日期类型')\r\n }\r\n },\r\n set: (newValue) => {\r\n if (sourceFormat) {\r\n if (!newValue) {\r\n formContext.updateModelValue(name, '')\r\n } else {\r\n formContext.updateModelValue(name, dayjs(newValue).format(normalizedSourceFormat.value))\r\n }\r\n } else {\r\n if (!newValue) {\r\n formContext.updateModelValue(name, undefined)\r\n } else {\r\n formContext.updateModelValue(name, newValue)\r\n }\r\n }\r\n },\r\n})\r\n</script>\r\n","<template>\r\n <el-col :span=\"normalizedSpan\">\r\n <el-form-item :prop=\"name\" :label=\"label\" :label-width=\"labelWidth\" :required=\"required\" :rules=\"normalizedRules\">\r\n <el-input ref=\"inputRef\" v-model=\"file\" :disabled=\"disabled\" type=\"file\" :validate-event=\"false\" />\r\n </el-form-item>\r\n </el-col>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { onMounted, ref, useTemplateRef, watch } from 'vue'\r\nimport { ElCol, ElFormItem, ElInput } from 'element-plus'\r\nimport type { FileInputProps } from './FileInput'\r\nimport { useFormItemSpan, useFormItemRules, useFormItemStringModel } from '../hooks'\r\n\r\ndefineOptions({ name: 'OFormFile', inheritAttrs: false })\r\n\r\nconst { name, label, labelWidth, required, disabled } = defineProps<FileInputProps>()\r\nconst normalizedSpan = useFormItemSpan()\r\nconst normalizedRules = useFormItemRules()\r\nconst elModel = useFormItemStringModel()\r\nwatch(elModel, () => {\r\n if (!elModel.value) {\r\n file.value = ''\r\n }\r\n})\r\n\r\nconst file = ref('')\r\nconst fileRef = useTemplateRef('inputRef')\r\nonMounted(() => {\r\n fileRef.value!.input!.onchange = (event) => {\r\n //@ts-ignore\r\n elModel.value = event?.target?.files[0]\r\n }\r\n file.value = ''\r\n})\r\n</script>\r\n","<template>\r\n <el-col :span=\"normalizedSpan\" :style=\"style\">\r\n <space :gutter=\"gutter\" style=\"margin-bottom: var(--orion-form-validation-message-height)\"> <slot></slot> </space>\r\n </el-col>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { ElCol } from 'element-plus'\r\nimport type { ButtonGroupProps } from './ButtonGroup'\r\nimport Space from '../../Space'\r\nimport { useFormItemSpan } from '../hooks'\r\nimport { computed, CSSProperties } from 'vue'\r\n\r\ndefineOptions({ name: 'OFormButtongroup', inheritAttrs: false })\r\n\r\nconst { gutter, align = 'right' } = defineProps<ButtonGroupProps>()\r\nconst style = computed<CSSProperties>(() => {\r\n return {\r\n textAlign: align,\r\n }\r\n})\r\n\r\nconst normalizedSpan = useFormItemSpan()\r\n</script>\r\n","<template>\r\n <el-col :span=\"normalizedSpan\">\r\n <el-form-item :prop=\"name\" :label=\"label\" :label-width=\"labelWidth\" :required=\"required\" :rules=\"normalizedRules\">\r\n <slot></slot>\r\n </el-form-item>\r\n </el-col>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { ElCol, ElFormItem } from 'element-plus'\r\nimport type { DiyItemProps } from './DiyItem'\r\nimport { useFormItemSpan, useFormItemRules } from '../hooks'\r\n\r\ndefineOptions({ name: 'OFormDiy', inheritAttrs: false })\r\n\r\nconst { name, label, labelWidth, required } = defineProps<DiyItemProps>()\r\nconst normalizedSpan = useFormItemSpan()\r\nconst normalizedRules = useFormItemRules()\r\n</script>\r\n","<template>\r\n <el-col :span=\"normalizedSpan\">\r\n <el-form-item :prop=\"name\" :label=\"label\" :label-width=\"labelWidth\" :required=\"required\" :rules=\"normalizedRules\">\r\n <el-dropdown ref=\"dropdown\" :trigger=\"'click'\" @visible-change=\"onVisibleChange\" style=\"width: 100%\">\r\n <el-input ref=\"input\" v-model=\"elModel\" :maxlength=\"maxlength\" :placeholder=\"placeholder\" :disabled=\"disabled\"\r\n :readonly=\"readonly\" @input=\"onInput\" @keydown=\"onKeydown\" @change=\"onChange\" @blur=\"onBlur\"\r\n :suffix-icon=\"Search\" />\r\n <template #dropdown>\r\n <slot></slot>\r\n </template>\r\n </el-dropdown>\r\n </el-form-item>\r\n </el-col>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { ElCol, ElFormItem, ElInput, ElDropdown } from 'element-plus'\r\nimport { Search } from '@element-plus/icons-vue'\r\nimport { KeydownHandler, LovContext, lovContextKey, type LovInputProps } from './LovInput'\r\nimport { useFormItemSpan, useFormItemRules, useFormItemStringModel, useFormContext } from '../hooks'\r\nimport { provide, reactive, ref, useTemplateRef } from 'vue'\r\nimport { isString } from 'lodash-es'\r\n\r\ndefineOptions({ name: 'OFormLov', inheritAttrs: false })\r\n\r\nconst { name, label, labelWidth, required, maxlength, placeholder, disabled, readonly, fillMapping } = defineProps<LovInputProps>()\r\nconst normalizedSpan = useFormItemSpan()\r\nconst normalizedRules = useFormItemRules()\r\nconst elModel = useFormItemStringModel()\r\nconst formContext = useFormContext()!\r\n\r\nconst visible = ref(false)\r\nconst onVisibleChange = (val: boolean) => {\r\n visible.value = val\r\n}\r\n\r\nconst changed = ref(false)\r\nconst onInput = () => {\r\n if (!changed.value) {\r\n changed.value = true\r\n }\r\n\r\n if (!visible.value) {\r\n dropdownRef.value!.handleOpen()\r\n }\r\n}\r\n\r\nlet keydownHandler: KeydownHandler | undefined\r\nconst registerKeydownHandler: LovContext['registerKeydownHandler'] = (handler) => {\r\n keydownHandler = handler\r\n}\r\n\r\nconst onKeydown = (e: any) => {\r\n const fallthroughCodes = ['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight', 'Enter', 'Space']\r\n\r\n if (fallthroughCodes.indexOf(e.code) > -1) {\r\n if (visible.value) {\r\n keydownHandler && keydownHandler(e.code)\r\n }\r\n e.stopPropagation()\r\n }\r\n\r\n const triggerCodes = ['ArrowUp', 'ArrowDown']\r\n if (triggerCodes.indexOf(e.code) > -1 && !visible.value) {\r\n dropdownRef.value!.handleOpen()\r\n }\r\n}\r\n\r\nconst inputRef = useTemplateRef('input')\r\nconst onBlur = async (e: any) => {\r\n if (visible.value) {\r\n inputRef.value!.focus()\r\n }\r\n}\r\n\r\nconst onChange = () => {\r\n if (!changed.value) {\r\n return\r\n }\r\n\r\n if (isString(fillMapping)) {\r\n const data: Record<string, any> = {}\r\n\r\n const pairs = fillMapping.split(',')\r\n for (let i = 0; i < pairs.length; i++) {\r\n const dstName = pairs[i].split(':')[0].trim()\r\n data[dstName] = undefined\r\n }\r\n\r\n formContext.updateModelValueMulti(data)\r\n }\r\n}\r\n\r\nconst dropdownRef = useTemplateRef('dropdown')\r\nconst backfill: LovContext['backfill'] = (params) => {\r\n dropdownRef.value!.handleClose()\r\n\r\n if (isString(fillMapping)) {\r\n const data: Record<string, any> = {}\r\n\r\n const pairs = fillMapping.split(',')\r\n for (let i = 0; i < pairs.length; i++) {\r\n const dstName = pairs[i].split(':')[0].trim()\r\n const srcName = pairs[i].split(':')[1].trim()\r\n const srcValue = params[srcName]\r\n data[dstName] = srcValue\r\n }\r\n\r\n formContext.updateModelValueMulti(data)\r\n } else {\r\n fillMapping && fillMapping(params)\r\n }\r\n\r\n if (changed.value) {\r\n changed.value = false\r\n }\r\n}\r\n\r\nprovide(\r\n lovContextKey,\r\n reactive({\r\n lovValue: elModel,\r\n backfill,\r\n registerKeydownHandler,\r\n })\r\n)\r\n</script>\r\n","<template>\r\n <el-col :span=\"normalizedSpan\">\r\n <el-form-item :prop=\"name\" :label=\"label\" :label-width=\"labelWidth\" :required=\"required\" :rules=\"normalizedRules\">\r\n <el-input-number\r\n v-model=\"elModel\"\r\n :placeholder=\"placeholder\"\r\n :disabled=\"disabled\"\r\n :readonly=\"readonly\"\r\n :min=\"min\"\r\n :max=\"max\"\r\n :step=\"step\"\r\n :step-strictly=\"stepStrictly\"\r\n :precision=\"precision\"\r\n :controls=\"controls\"\r\n :controls-position=\"controlsPosition\"\r\n style=\"width: 100%\"\r\n />\r\n </el-form-item>\r\n </el-col>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { ElCol, ElFormItem, ElInputNumber } from 'element-plus'\r\nimport type { NumberInputProps } from './NumberInput'\r\nimport { useFormItemSpan, useFormItemRules, useFormContext } from '../hooks'\r\nimport { computed } from 'vue'\r\nimport { isNumber, isString, toNumber } from 'lodash-es'\r\nimport OrionError from '../../../error/OrionError'\r\n\r\ndefineOptions({ name: 'OFormNumber', inheritAttrs: false })\r\n\r\nconst {\r\n name,\r\n label,\r\n labelWidth,\r\n required,\r\n placeholder,\r\n disabled,\r\n readonly,\r\n min,\r\n max,\r\n step,\r\n stepStrictly,\r\n precision,\r\n controls = true,\r\n controlsPosition,\r\n} = defineProps<NumberInputProps>()\r\nconst normalizedSpan = useFormItemSpan()\r\nconst normalizedRules = useFormItemRules()\r\n\r\nconst formContext = useFormContext()!\r\nconst elModel = computed<number | undefined>({\r\n get: () => {\r\n const value = formContext.modelValue[name]\r\n if (!value) {\r\n return undefined\r\n }\r\n if (isNumber(value)) {\r\n return value\r\n } else if (isString(value)) {\r\n return toNumber(value)\r\n } else {\r\n throw new OrionError('数字输入框的值只能为字符串或数字类型')\r\n }\r\n },\r\n set: (newValue) => {\r\n if (!newValue) {\r\n formContext.updateModelValue(name, undefined)\r\n } else {\r\n formContext.updateModelValue(name, newValue)\r\n }\r\n },\r\n})\r\n</script>\r\n","<template>\r\n <el-col :span=\"normalizedSpan\">\r\n <el-form-item :prop=\"name\" :label=\"label\" :label-width=\"labelWidth\" :required=\"required\" :rules=\"normalizedRules\">\r\n <el-dropdown ref=\"dropdown\" :trigger=\"'click'\" @visible-change=\"onVisibleChange\" style=\"width: 100%;\">\r\n <div @focus=\"onFocus\" :style=\"{ position: 'relative', width: '100%', height: '100%' }\">\r\n <el-input ref=\"input\" v-model=\"inputValue\" :maxlength=\"maxlength\" :placeholder=\"placeholder\"\r\n :disabled=\"disabled\" :readonly=\"readonly\" @input=\"onInput\" @keydown=\"onKeydown\" @blur=\"onBlur\"\r\n :suffix-icon=\"visible ? ArrowUp : ArrowDown\" />\r\n <div v-if=\"!visible\"\r\n :style=\"{ position: 'absolute', inset: '4px 30px 4px 4px', overflow: 'hidden', pointerEvents: 'none' }\">\r\n <o-space>\r\n <el-tag v-for=\"tag in tags\" type=\"info\">{{ tag }}</el-tag>\r\n </o-space>\r\n </div>\r\n </div>\r\n <template #dropdown>\r\n <slot></slot>\r\n </template>\r\n </el-dropdown>\r\n </el-form-item>\r\n </el-col>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { ElCol, ElFormItem, ElInput, ElDropdown, ElTag } from 'element-plus'\r\nimport { ArrowDown, ArrowUp } from '@element-plus/icons-vue'\r\nimport { RowCompletionProvider, TableSelectContext, tableSelectContext, type TableSelectProps } from './TableSelect'\r\nimport { useFormItemSpan, useFormItemRules, useFormContext } from '../hooks'\r\nimport { computed, onMounted, provide, reactive, ref, useTemplateRef, watch } from 'vue'\r\nimport { isArray, pick } from 'lodash-es'\r\nimport OrionError from '../../../error/OrionError'\r\n\r\ndefineOptions({ name: 'OFormTableselect', inheritAttrs: false })\r\n\r\nconst emit = defineEmits(['change'])\r\nconst { name, label, labelWidth, required, maxlength, placeholder, disabled, readonly, pick: pickup, tag } = defineProps<TableSelectProps>()\r\nconst normalizedSpan = useFormItemSpan()\r\nconst normalizedRules = useFormItemRules()\r\n\r\nconst inputValue = ref('')\r\nconst modifyByForm = ref(false)\r\nconst formContext = useFormContext()!\r\nconst elModel = computed<any[] | undefined>({\r\n get: () => {\r\n const value = formContext.modelValue[name]\r\n if (!value) {\r\n return undefined\r\n }\r\n if (!isArray(value)) {\r\n throw new OrionError('表格下拉框的值只能为数组类型')\r\n }\r\n return value\r\n },\r\n set: (newValue) => {\r\n modifyByForm.value = false\r\n if (!newValue) {\r\n formContext.updateModelValue(name, undefined)\r\n } else {\r\n formContext.updateModelValue(name, newValue)\r\n }\r\n },\r\n})\r\n\r\nconst selection = ref<any[] | undefined>([])\r\nonMounted(async () => {\r\n if (completionItemProvider) {\r\n selection.value = await completionItemProvider(elModel.value)\r\n if (selection.value) {\r\n tags.value = selection.value.map((item) => tag(item))\r\n }\r\n }\r\n})\r\nwatch(elModel, async () => {\r\n if (modifyByForm.value) {\r\n if (completionItemProvider) {\r\n selection.value = await completionItemProvider(elModel.value)\r\n if (selection.value) {\r\n tags.value = selection.value.map((item) => tag(item))\r\n }\r\n }\r\n } else {\r\n modifyByForm.value = true\r\n }\r\n})\r\n\r\nconst visible = ref(false)\r\nconst onVisibleChange = (val: boolean) => {\r\n visible.value = val\r\n}\r\nconst onInput = () => {\r\n if (!visible.value) {\r\n dropdownRef.value!.handleOpen()\r\n }\r\n}\r\n\r\nconst inputRef = useTemplateRef('input')\r\nconst onFocus = () => {\r\n inputRef.value!.focus()\r\n}\r\n\r\nconst onKeydown = (e: any) => {\r\n if (visible.value) {\r\n if (['Enter', 'Escape'].indexOf(e.code) > -1) {\r\n dropdownRef.value!.handleClose()\r\n } else if ('ArrowDown' == e.code) {\r\n e.stopPropagation()\r\n } else if ('Tab' == e.code) {\r\n visible.value = false\r\n dropdownRef.value!.handleClose()\r\n }\r\n } else {\r\n if (['ArrowUp', 'ArrowDown'].indexOf(e.code) > -1) {\r\n dropdownRef.value!.handleOpen()\r\n e.stopPropagation()\r\n }\r\n }\r\n}\r\n\r\nconst onBlur = async (e: any) => {\r\n if (visible.value) {\r\n inputRef.value!.focus()\r\n } else {\r\n inputValue.value = ''\r\n }\r\n}\r\n\r\nconst tags = ref<string[]>([])\r\nconst dropdownRef = useTemplateRef('dropdown')\r\nconst onSelect: TableSelectContext['onSelect'] = (selection, clear) => {\r\n elModel.value = selection.map((item) => pick(item, pickup))\r\n tags.value = selection.map((item) => tag(item))\r\n if (clear) {\r\n inputValue.value = ''\r\n }\r\n emit('change', selection)\r\n}\r\nconst selectDone: TableSelectContext['selectDone'] = () => {\r\n dropdownRef.value!.handleClose()\r\n}\r\n\r\nlet completionItemProvider: RowCompletionProvider | undefined\r\nconst registerRowCompletionProvider: TableSelectContext['registerRowCompletionProvider'] = (provider) => {\r\n completionItemProvider = provider\r\n}\r\n\r\nprovide(\r\n tableSelectContext,\r\n reactive({\r\n inputValue,\r\n selection,\r\n onSelect,\r\n selectDone,\r\n tag,\r\n registerRowCompletionProvider\r\n })\r\n)\r\n</script>","import { withInstall } from '../_util'\r\n\r\nimport Form from './Form.vue'\r\nimport StringInput from './StringInput/StringInput.vue'\r\nimport PasswordInput from './PasswordInput/PasswordInput.vue'\r\nimport Textarea from './Textarea/Textarea.vue'\r\nimport SingleSelect from './SingleSelect/SingleSelect.vue'\r\nimport MultiSelect from './MultiSelect/MultiSelect.vue'\r\nimport RadioGroup from './RadioGroup/RadioGroup.vue'\r\nimport CheckboxGroup from './CheckboxGroup/CheckboxGroup.vue'\r\nimport Checkbox from './Checkbox/Checkbox.vue'\r\nimport Switch from './Switch/Switch.vue'\r\nimport DateInput from './DateInput/DateInput.vue'\r\nimport FileInput from './FileInput/FileInput.vue'\r\nimport ButtonGroup from './ButtonGroup/ButtonGroup.vue'\r\nimport DiyItem from './DiyItem/DiyItem.vue'\r\nimport LovInput from './LovInput/LovInput.vue'\r\nimport NumberInput from './NumberInput/NumberInput.vue'\r\nimport TableSelect from './TableSelect/TableSelect.vue'\r\n\r\nexport default withInstall<\r\n typeof Form,\r\n {\r\n StringInput: typeof StringInput\r\n PasswordInput: typeof PasswordInput\r\n Textarea: typeof Textarea\r\n SingleSelect: typeof SingleSelect\r\n MultiSelect: typeof MultiSelect\r\n RadioGroup: typeof RadioGroup\r\n CheckboxGroup: typeof CheckboxGroup\r\n Checkbox: typeof Checkbox\r\n Switch: typeof Switch\r\n DateInput: typeof DateInput\r\n FileInput: typeof FileInput\r\n ButtonGroup: typeof ButtonGroup\r\n DiyItem: typeof DiyItem\r\n LovInput: typeof LovInput\r\n NumberInput: typeof NumberInput\r\n TableSelect: typeof TableSelect\r\n }\r\n>(Form, {\r\n StringInput,\r\n PasswordInput,\r\n Textarea,\r\n SingleSelect,\r\n MultiSelect,\r\n RadioGroup,\r\n CheckboxGroup,\r\n Checkbox,\r\n Switch,\r\n DateInput,\r\n FileInput,\r\n ButtonGroup,\r\n DiyItem,\r\n LovInput,\r\n NumberInput,\r\n TableSelect,\r\n})\r\n\r\nexport * from './Form'\r\nexport * from './StringInput'\r\nexport * from './PasswordInput'\r\nexport * from './Textarea'\r\nexport * from './SingleSelect'\r\nexport * from './MultiSelect'\r\nexport * from './RadioGroup'\r\nexport * from './CheckboxGroup'\r\nexport * from './Checkbox'\r\nexport * from './Switch'\r\nexport * from './DateInput'\r\nexport * from './FileInput'\r\nexport * from './ButtonGroup'\r\nexport * from './DiyItem'\r\nexport * from './LovInput'\r\nexport * from './NumberInput'\r\nexport * from './TableSelect'\r\n"],"names":["emit","__emit","updateModelValue","name","value","__props","OrionError","updateModelValueMulti","data","modelKeys","dataKeys","diff","difference","isEmpty","formRef","useTemplateRef","__expose","provide","formContextKey","reactive","toRef","slots","useSlots","normalizedSpan","useFormItemSpan","normalizedRules","useFormItemRules","elModel","useFormItemStringModel","attrs","useAttrs","normalizedDisabled","useFormItemDisabled","normalizedCode","useFormItemCode","content","computed","getSingleCodeContent","useFormItemMultiModel","formContext","useFormContext","getMultiCodeContent","useFormItemBooleanModel","isTimePicker","normalizedSourceFormat","dateType","picker","isDate","isString","dayjsObj","dayjs","newValue","watch","file","ref","fileRef","onMounted","event","_a","style","visible","onVisibleChange","val","changed","onInput","dropdownRef","keydownHandler","registerKeydownHandler","handler","onKeydown","e","inputRef","onBlur","onChange","pairs","i","dstName","lovContextKey","params","srcName","srcValue","isNumber","toNumber","inputValue","modifyByForm","isArray","selection","completionItemProvider","tags","item","onFocus","onSelect","clear","pick","selectDone","registerRowCompletionProvider","provider","tableSelectContext","index","withInstall","Form","StringInput","PasswordInput","Textarea","SingleSelect","MultiSelect","RadioGroup","CheckboxGroup","Checkbox","Switch","DateInput","FileInput","ButtonGroup","DiyItem","LovInput","NumberInput","TableSelect"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAmBA,UAAMA,IAAOC,GAEPC,IAAmB,CAACC,GAAcC,MAAe;AACjD,UAAA,CAAC,OAAO,KAAKC,EAAA,UAAU,EAAE,SAASF,CAAI;AACxC,cAAM,IAAIG,EAAW,kBAAkBH,CAAI,GAAG;AAE3C,MAAAH,EAAA,qBAAqB,EAAE,GAAGK,cAAY,CAACF,CAAI,GAAGC,EAAA,CAAO;AAAA,IAAA,GAGtDG,IAAwB,CAACC,MAA8B;AAC3D,YAAMC,IAAY,OAAO,KAAKJ,EAAA,UAAU,GAClCK,IAAW,OAAO,KAAKF,CAAI,GAC3BG,IAAOC,GAAWF,GAAUD,CAAS;AACvC,UAAA,CAACI,GAAQF,CAAI;AACf,cAAM,IAAIL,EAAW,kBAAkBK,EAAK,KAAK,GAAG,CAAC,GAAG;AAE1D,MAAAX,EAAK,qBAAqB,EAAE,GAAGK,EAAU,YAAE,GAAGG,GAAM;AAAA,IAAA,GAGhDM,IAAUC,EAAe,MAAM;AAMxB,WAAAC,EAAA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AAAA,MACA9E,EAAS;AAAA,QACP,YAAAgE;AAAA,QACA,WAAAG;AAAA,QACA,UAAAK;AAAA,QACA,YAAAG;AAAA,QACA,KAAEzF,EAAA;AAAA,QACF,+BAAA0F;AAAA,MAAA,CACD;AAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ICtIYG,KAAAC,GAoBbC,IAAM;AAAA,EAAA,aACNC;AAAAA,EAAA,eACAC;AAAAA,EAAA,UACAC;AAAAA,EAAA,cACAC;AAAAA,EAAA,aACAC;AAAAA,EAAA,YACAC;AAAAA,EAAA,eACAC;AAAAA,EAAA,UACAC;AAAAA,EAAA,QACAC;AAAAA,EAAA,WACAC;AAAAA,EAAA,WACAC;AAAAA,EAAA,aACAC;AAAAA,EAAA,SACAC;AAAAA,EAAA,UACAC;AAAAA,EAAA,aACAC;AAAAA,EAAA,aACAC;AACF,CAAC;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/Form/Form.vue","../../../src/components/Form/StringInput/StringInput.vue","../../../src/components/Form/PasswordInput/PasswordInput.vue","../../../src/components/Form/Textarea/Textarea.vue","../../../src/components/Form/SingleSelect/SingleSelect.vue","../../../src/components/Form/MultiSelect/MultiSelect.vue","../../../src/components/Form/RadioGroup/RadioGroup.vue","../../../src/components/Form/CheckboxGroup/CheckboxGroup.vue","../../../src/components/Form/Checkbox/Checkbox.vue","../../../src/components/Form/Switch/Switch.vue","../../../src/components/Form/DateInput/DateInput.vue","../../../src/components/Form/FileInput/FileInput.vue","../../../src/components/Form/ButtonGroup/ButtonGroup.vue","../../../src/components/Form/DiyItem/DiyItem.vue","../../../src/components/Form/LovInput/LovInput.vue","../../../src/components/Form/NumberInput/NumberInput.vue","../../../src/components/Form/TableSelect/TableSelect.vue","../../../src/components/Form/index.ts"],"sourcesContent":["<template>\r\n <el-form ref=\"form\" :model=\"modelValue\" :rules=\"rules\" :label-width=\"itemLabelWidth\" :disabled=\"disabled\" class=\"orion-form\">\r\n <el-row :gutter=\"16\">\r\n <slot></slot>\r\n </el-row>\r\n </el-form>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { provide, reactive, toRef, useTemplateRef } from 'vue'\r\nimport { ElForm, ElRow } from 'element-plus'\r\nimport { type FormProps, type FormExpose, formContextKey } from './Form'\r\nimport OrionError from '../../error/OrionError'\r\nimport { difference, isEmpty } from 'lodash-es'\r\n\r\ndefineOptions({ name: 'OForm', inheritAttrs: false })\r\n\r\nconst { rules, itemSpan = 6, itemLabelWidth = 'auto', disabled = false, modelValue } = defineProps<FormProps>()\r\n\r\nconst emit = defineEmits(['update:modelValue'])\r\n\r\nconst updateModelValue = (name: string, value: any) => {\r\n if (!Object.keys(modelValue).includes(name)) {\r\n throw new OrionError(`modelValue中不存在[${name}]`)\r\n }\r\n emit('update:modelValue', { ...modelValue, [name]: value })\r\n}\r\n\r\nconst updateModelValueMulti = (data: Record<string, any>) => {\r\n const modelKeys = Object.keys(modelValue)\r\n const dataKeys = Object.keys(data)\r\n const diff = difference(dataKeys, modelKeys)\r\n if (!isEmpty(diff)) {\r\n throw new OrionError(`modelValue中不存在[${diff.join(',')}]`)\r\n }\r\n emit('update:modelValue', { ...modelValue, ...data })\r\n}\r\n\r\nconst formRef = useTemplateRef('form')\r\n\r\nconst validate: FormExpose['validate'] = async () => {\r\n return await formRef.value!.validate()\r\n}\r\n\r\ndefineExpose({\r\n validate,\r\n})\r\n\r\nprovide(\r\n formContextKey,\r\n reactive({\r\n modelValue: toRef(() => modelValue),\r\n updateModelValue,\r\n updateModelValueMulti,\r\n rules: toRef(() => rules),\r\n itemSpan: toRef(() => itemSpan),\r\n disabled: toRef(() => disabled),\r\n })\r\n)\r\n</script>\r\n","<template>\r\n <el-col :span=\"normalizedSpan\">\r\n <el-form-item :prop=\"name\" :label=\"label\" :label-width=\"labelWidth\" :required=\"required\" :rules=\"normalizedRules\">\r\n <el-input v-model=\"elModel\" :maxlength=\"maxlength\" :placeholder=\"placeholder\" :disabled=\"disabled\"\r\n :readonly=\"readonly\">\r\n <template v-if=\"slots.prefix\" #prefix>\r\n <slot name=\"prefix\"></slot>\r\n </template>\r\n <template v-if=\"slots.suffix\" #suffix>\r\n <slot name=\"suffix\"></slot>\r\n </template>\r\n <template v-if=\"slots.prepend\" #prepend>\r\n <slot name=\"prepend\"></slot>\r\n </template>\r\n <template v-if=\"slots.append\" #append>\r\n <slot name=\"append\"></slot>\r\n </template>\r\n </el-input>\r\n </el-form-item>\r\n </el-col>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { ElCol, ElFormItem, ElInput } from 'element-plus'\r\nimport type { StringInputProps } from './StringInput'\r\nimport { useFormItemSpan, useFormItemRules, useFormItemStringModel } from '../hooks'\r\nimport { useSlots } from 'vue';\r\n\r\ndefineOptions({ name: 'OFormString', inheritAttrs: false })\r\nconst slots = useSlots()\r\n\r\nconst { name, label, labelWidth, required, maxlength, placeholder, disabled, readonly } = defineProps<StringInputProps>()\r\nconst normalizedSpan = useFormItemSpan()\r\nconst normalizedRules = useFormItemRules()\r\nconst elModel = useFormItemStringModel()\r\n</script>\r\n","<template>\r\n <el-col :span=\"normalizedSpan\">\r\n <el-form-item :prop=\"name\" :label=\"label\" :label-width=\"labelWidth\" :required=\"required\" :rules=\"normalizedRules\">\r\n <el-input v-model=\"elModel\" :maxlength=\"maxlength\" :placeholder=\"placeholder\" :disabled=\"disabled\" :readonly=\"readonly\" type=\"password\" />\r\n </el-form-item>\r\n </el-col>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { ElCol, ElFormItem, ElInput } from 'element-plus'\r\nimport type { PasswordInputProps } from './PasswordInput'\r\nimport { useFormItemSpan, useFormItemRules, useFormItemStringModel } from '../hooks'\r\n\r\ndefineOptions({ name: 'OFormPassword', inheritAttrs: false })\r\n\r\nconst { name, label, labelWidth, required, maxlength, placeholder, disabled, readonly } = defineProps<PasswordInputProps>()\r\nconst normalizedSpan = useFormItemSpan()\r\nconst normalizedRules = useFormItemRules()\r\nconst elModel = useFormItemStringModel()\r\n</script>\r\n","<template>\r\n <el-col :span=\"normalizedSpan\">\r\n <el-form-item :prop=\"name\" :label=\"label\" :label-width=\"labelWidth\" :required=\"required\" :rules=\"normalizedRules\">\r\n <el-input\r\n v-model=\"elModel\"\r\n :maxlength=\"maxlength\"\r\n :placeholder=\"placeholder\"\r\n :disabled=\"disabled\"\r\n :readonly=\"readonly\"\r\n type=\"textarea\"\r\n :rows=\"rows\"\r\n :resize=\"'none'\"\r\n />\r\n </el-form-item>\r\n </el-col>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { ElCol, ElFormItem, ElInput } from 'element-plus'\r\nimport type { TextareaProps } from './Textarea'\r\nimport { useFormItemSpan, useFormItemRules, useFormItemStringModel } from '../hooks'\r\n\r\ndefineOptions({ name: 'OFormTextarea', inheritAttrs: false })\r\n\r\nconst { name, label, labelWidth, required, maxlength, placeholder, disabled, readonly, rows } = defineProps<TextareaProps>()\r\nconst normalizedSpan = useFormItemSpan()\r\nconst normalizedRules = useFormItemRules()\r\nconst elModel = useFormItemStringModel()\r\n</script>\r\n","<template>\r\n <el-col :span=\"normalizedSpan\">\r\n <el-form-item :prop=\"name\" :label=\"label\" :label-width=\"labelWidth\" :required=\"required\" :rules=\"normalizedRules\">\r\n <el-input v-if=\"normalizedDisabled\" :model-value=\"content\" :placeholder=\"placeholder\" :disabled=\"true\" :readonly=\"true\" />\r\n <el-select v-else v-model=\"elModel\" :placeholder=\"placeholder\" :clearable=\"clearable\" :filterable=\"filterable\" @change=\"attrs.onChange as any\">\r\n <el-option v-for=\"codeItem in normalizedCode\" :key=\"codeItem.value\" :label=\"codeItem.content\" :value=\"codeItem.value\" />\r\n </el-select>\r\n </el-form-item>\r\n </el-col>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { computed, useAttrs } from 'vue'\r\nimport { ElCol, ElFormItem, ElInput, ElSelect, ElOption } from 'element-plus'\r\nimport type { SingleSelectProps } from './SingleSelect'\r\nimport { useFormItemSpan, useFormItemRules, useFormItemDisabled, useFormItemCode, useFormItemStringModel } from '../hooks'\r\nimport { getSingleCodeContent } from '../utils'\r\n\r\ndefineOptions({ name: 'OFormSingleselect', inheritAttrs: false })\r\nconst attrs = useAttrs()\r\n\r\nconst { name, label, labelWidth, required, placeholder, clearable, filterable } = defineProps<SingleSelectProps>()\r\nconst normalizedSpan = useFormItemSpan()\r\nconst normalizedRules = useFormItemRules()\r\nconst normalizedDisabled = useFormItemDisabled()\r\nconst normalizedCode = useFormItemCode()\r\nconst elModel = useFormItemStringModel()\r\nconst content = computed(() => getSingleCodeContent(normalizedCode.value, elModel.value))\r\n</script>\r\n","<template>\r\n <el-col :span=\"normalizedSpan\">\r\n <el-form-item :prop=\"name\" :label=\"label\" :label-width=\"labelWidth\" :required=\"required\" :rules=\"normalizedRules\">\r\n <el-input v-if=\"normalizedDisabled\" :model-value=\"content\" :placeholder=\"placeholder\" :disabled=\"true\" :readonly=\"true\" />\r\n <el-select\r\n v-else\r\n v-model=\"elModel\"\r\n :placeholder=\"placeholder\"\r\n multiple\r\n :collapse-tags=\"collapseTags\"\r\n :collapse-tags-tooltip=\"collapseTagsTooltip\"\r\n @change=\"attrs.onChange as any\"\r\n >\r\n <el-option v-for=\"codeItem in normalizedCode\" :key=\"codeItem.value\" :label=\"codeItem.content\" :value=\"codeItem.value\" />\r\n </el-select>\r\n </el-form-item>\r\n </el-col>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { computed, useAttrs } from 'vue'\r\nimport { ElCol, ElFormItem, ElInput, ElSelect, ElOption } from 'element-plus'\r\nimport type { MultiSelectProps } from './MultiSelect'\r\nimport { useFormContext, useFormItemSpan, useFormItemRules, useFormItemDisabled, useFormItemCode, useFormItemMultiModel } from '../hooks'\r\nimport { getMultiCodeContent } from '../utils'\r\n\r\ndefineOptions({ name: 'OFormMultiselect', inheritAttrs: false })\r\nconst attrs = useAttrs()\r\n\r\nconst { name, label, labelWidth, required, placeholder, collapseTags, collapseTagsTooltip } = defineProps<MultiSelectProps>()\r\nconst normalizedSpan = useFormItemSpan()\r\nconst normalizedRules = useFormItemRules()\r\nconst normalizedDisabled = useFormItemDisabled()\r\nconst normalizedCode = useFormItemCode()\r\nconst elModel = useFormItemMultiModel()\r\nconst formContext = useFormContext()!\r\nconst content = computed(() => getMultiCodeContent(normalizedCode.value, formContext.modelValue[name]))\r\n</script>\r\n","<template>\r\n <el-col :span=\"normalizedSpan\">\r\n <el-form-item :prop=\"name\" :label=\"label\" :label-width=\"labelWidth\" :required=\"required\" :rules=\"normalizedRules\">\r\n <el-radio-group v-model=\"elModel\" :disabled=\"disabled\">\r\n <el-radio v-for=\"codeItem in normalizedCode\" :key=\"codeItem.value\" :value=\"codeItem.value\">\r\n {{ codeItem.content }}\r\n </el-radio>\r\n </el-radio-group>\r\n </el-form-item>\r\n </el-col>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { ElCol, ElFormItem, ElRadioGroup, ElRadio } from 'element-plus'\r\nimport type { RadioGroupProps } from './RadioGroup'\r\nimport { useFormItemSpan, useFormItemRules, useFormItemCode, useFormItemStringModel } from '../hooks'\r\n\r\ndefineOptions({ name: 'OFormRadiogroup', inheritAttrs: false })\r\n\r\nconst { name, label, labelWidth, required, disabled } = defineProps<RadioGroupProps>()\r\nconst normalizedSpan = useFormItemSpan()\r\nconst normalizedRules = useFormItemRules()\r\nconst normalizedCode = useFormItemCode()\r\nconst elModel = useFormItemStringModel()\r\n</script>\r\n","<template>\r\n <el-col :span=\"normalizedSpan\">\r\n <el-form-item :prop=\"name\" :label=\"label\" :label-width=\"labelWidth\" :required=\"required\" :rules=\"normalizedRules\">\r\n <el-checkbox-group v-model=\"elModel\" :disabled=\"disabled\">\r\n <el-checkbox v-for=\"codeItem in normalizedCode\" :key=\"codeItem.value\" :label=\"codeItem.content\" :value=\"codeItem.value\" />\r\n </el-checkbox-group>\r\n </el-form-item>\r\n </el-col>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { ElCol, ElFormItem, ElCheckboxGroup, ElCheckbox } from 'element-plus'\r\nimport type { CheckboxGroupProps } from './CheckboxGroup'\r\nimport { useFormItemSpan, useFormItemRules, useFormItemCode, useFormItemMultiModel } from '../hooks'\r\n\r\ndefineOptions({ name: 'OFormCheckboxgroup', inheritAttrs: false })\r\n\r\nconst { name, label, labelWidth, required, disabled } = defineProps<CheckboxGroupProps>()\r\nconst normalizedSpan = useFormItemSpan()\r\nconst normalizedRules = useFormItemRules()\r\nconst normalizedCode = useFormItemCode()\r\nconst elModel = useFormItemMultiModel()\r\n</script>\r\n","<template>\r\n <el-col :span=\"normalizedSpan\">\r\n <el-form-item :prop=\"name\" :label=\"label\" :label-width=\"labelWidth\" :rules=\"rules\">\r\n <el-checkbox v-model=\"elModel\" :disabled=\"disabled\"></el-checkbox>\r\n </el-form-item>\r\n </el-col>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { ElCol, ElFormItem, ElCheckbox } from 'element-plus'\r\nimport type { CheckboxProps } from './Checkbox'\r\nimport { useFormItemBooleanModel, useFormItemSpan } from '../hooks'\r\n\r\ndefineOptions({ name: 'OFormCheckbox', inheritAttrs: false })\r\n\r\nconst { name, label, labelWidth, rules, disabled } = defineProps<CheckboxProps>()\r\nconst normalizedSpan = useFormItemSpan()\r\nconst elModel = useFormItemBooleanModel()\r\n</script>\r\n","<template>\r\n <el-col :span=\"normalizedSpan\">\r\n <el-form-item :prop=\"name\" :label=\"label\" :label-width=\"labelWidth\" :rules=\"rules\">\r\n <el-switch v-model=\"elModel\" :disabled=\"disabled\" />\r\n </el-form-item>\r\n </el-col>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { ElCol, ElFormItem, ElSwitch } from 'element-plus'\r\nimport type { SwitchProps } from './Switch'\r\nimport { useFormItemBooleanModel, useFormItemSpan } from '../hooks'\r\n\r\ndefineOptions({ name: 'OFormSwitch', inheritAttrs: false })\r\n\r\nconst { name, label, labelWidth, rules, disabled } = defineProps<SwitchProps>()\r\nconst normalizedSpan = useFormItemSpan()\r\nconst elModel = useFormItemBooleanModel()\r\n</script>\r\n","<template>\r\n <el-col :span=\"normalizedSpan\">\r\n <el-form-item :prop=\"name\" :label=\"label\" :label-width=\"labelWidth\" :required=\"required\" :rules=\"normalizedRules\">\r\n <el-time-picker\r\n v-if=\"isTimePicker\"\r\n v-model=\"elModel\"\r\n :placeholder=\"placeholder\"\r\n :disabled=\"disabled\"\r\n :readonly=\"readonly\"\r\n :editable=\"editable\"\r\n :clearable=\"clearable\"\r\n :format=\"normalizedSourceFormat\"\r\n arrow-control\r\n style=\"width: 100%\"\r\n />\r\n <el-date-picker\r\n v-else\r\n v-model=\"elModel\"\r\n :placeholder=\"placeholder\"\r\n :disabled=\"disabled\"\r\n :readonly=\"readonly\"\r\n :editable=\"editable\"\r\n :clearable=\"clearable\"\r\n :type=\"dateType\"\r\n :format=\"normalizedSourceFormat\"\r\n style=\"width: 100%\"\r\n />\r\n </el-form-item>\r\n </el-col>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { computed } from 'vue'\r\nimport { ElCol, ElFormItem, ElDatePicker, ElTimePicker, dayjs } from 'element-plus'\r\nimport type { DateInputProps } from './DateInput'\r\nimport { useFormContext, useFormItemSpan, useFormItemRules } from '../hooks'\r\nimport { isDate, isString } from 'lodash-es'\r\nimport OrionError from '../../../error/OrionError'\r\n\r\ndefineOptions({ name: 'OFormDate', inheritAttrs: false })\r\n\r\nconst {\r\n name,\r\n label,\r\n labelWidth,\r\n required,\r\n placeholder,\r\n disabled,\r\n readonly,\r\n editable = true,\r\n clearable = true,\r\n format = 'YYYY-MM-DD',\r\n sourceFormat,\r\n} = defineProps<DateInputProps>()\r\nconst normalizedSpan = useFormItemSpan()\r\nconst normalizedRules = useFormItemRules()\r\n\r\nconst isTimePicker = computed(() => format.startsWith('H') || format.startsWith('h') || format.startsWith('m') || format.startsWith('s'))\r\n\r\nconst normalizedSourceFormat = computed(() => {\r\n if (sourceFormat) {\r\n return sourceFormat\r\n }\r\n if (isTimePicker.value) {\r\n return 'HH:mm:ss'\r\n } else {\r\n return 'YYYY-MM-DD'\r\n }\r\n})\r\n\r\nconst dateType = computed(() => {\r\n let picker: 'date' | 'year' | 'month' | 'datetime' = 'date'\r\n\r\n // 配置年 yyyy指年 YYYY指周年,年末年初的值可能有所变化\r\n if (format.indexOf('y') > -1 || format.indexOf('Y') > -1) {\r\n picker = 'year'\r\n }\r\n\r\n // 配置月,M指月份,m指分钟\r\n if (format.indexOf('M') > -1) {\r\n picker = 'month'\r\n }\r\n\r\n // 配置日,d指星期,D指月的天,DDD指年的天\r\n if (format.indexOf('d') > -1 || format.indexOf('D') > -1) {\r\n picker = 'date'\r\n }\r\n\r\n // 配置小时,H指24小时制(0~23),k指24小时制(1~24),h指12小时制,m指分钟,s指秒,S指小数秒\r\n if (\r\n format.indexOf('H') > -1 ||\r\n format.indexOf('h') > -1 ||\r\n format.indexOf('k') > -1 ||\r\n format.indexOf('m') > -1 ||\r\n format.indexOf('s') > -1 ||\r\n format.indexOf('S') > -1\r\n ) {\r\n picker = 'datetime'\r\n }\r\n\r\n return picker\r\n})\r\n\r\nconst formContext = useFormContext()!\r\nconst elModel = computed<Date | undefined>({\r\n get: () => {\r\n const value = formContext.modelValue[name]\r\n if (!value) {\r\n return undefined\r\n }\r\n if (isDate(value)) {\r\n return value as Date\r\n } else if (isString(value)) {\r\n const dayjsObj = dayjs(value, normalizedSourceFormat.value, true)\r\n if (!dayjsObj.isValid()) {\r\n throw new OrionError(`日期输入框的值无效,不符合${normalizedSourceFormat.value}格式`)\r\n }\r\n return dayjsObj.toDate()\r\n } else {\r\n throw new OrionError('日期输入框的值只能为字符串或日期类型')\r\n }\r\n },\r\n set: (newValue) => {\r\n if (sourceFormat) {\r\n if (!newValue) {\r\n formContext.updateModelValue(name, '')\r\n } else {\r\n formContext.updateModelValue(name, dayjs(newValue).format(normalizedSourceFormat.value))\r\n }\r\n } else {\r\n if (!newValue) {\r\n formContext.updateModelValue(name, undefined)\r\n } else {\r\n formContext.updateModelValue(name, newValue)\r\n }\r\n }\r\n },\r\n})\r\n</script>\r\n","<template>\r\n <el-col :span=\"normalizedSpan\">\r\n <el-form-item :prop=\"name\" :label=\"label\" :label-width=\"labelWidth\" :required=\"required\" :rules=\"normalizedRules\">\r\n <el-input ref=\"inputRef\" v-model=\"file\" :disabled=\"disabled\" type=\"file\" :validate-event=\"false\" />\r\n </el-form-item>\r\n </el-col>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { onMounted, ref, useTemplateRef, watch } from 'vue'\r\nimport { ElCol, ElFormItem, ElInput } from 'element-plus'\r\nimport type { FileInputProps } from './FileInput'\r\nimport { useFormItemSpan, useFormItemRules, useFormItemStringModel } from '../hooks'\r\n\r\ndefineOptions({ name: 'OFormFile', inheritAttrs: false })\r\n\r\nconst { name, label, labelWidth, required, disabled } = defineProps<FileInputProps>()\r\nconst normalizedSpan = useFormItemSpan()\r\nconst normalizedRules = useFormItemRules()\r\nconst elModel = useFormItemStringModel()\r\nwatch(elModel, () => {\r\n if (!elModel.value) {\r\n file.value = ''\r\n }\r\n})\r\n\r\nconst file = ref('')\r\nconst fileRef = useTemplateRef('inputRef')\r\nonMounted(() => {\r\n fileRef.value!.input!.onchange = (event) => {\r\n //@ts-ignore\r\n elModel.value = event?.target?.files[0]\r\n }\r\n file.value = ''\r\n})\r\n</script>\r\n","<template>\r\n <el-col :span=\"normalizedSpan\" :style=\"style\">\r\n <space :gutter=\"gutter\" style=\"margin-bottom: var(--orion-form-validation-message-height)\"> <slot></slot> </space>\r\n </el-col>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { ElCol } from 'element-plus'\r\nimport type { ButtonGroupProps } from './ButtonGroup'\r\nimport Space from '../../Space'\r\nimport { useFormItemSpan } from '../hooks'\r\nimport { computed, CSSProperties } from 'vue'\r\n\r\ndefineOptions({ name: 'OFormButtongroup', inheritAttrs: false })\r\n\r\nconst { gutter, align = 'right' } = defineProps<ButtonGroupProps>()\r\nconst style = computed<CSSProperties>(() => {\r\n return {\r\n textAlign: align,\r\n }\r\n})\r\n\r\nconst normalizedSpan = useFormItemSpan()\r\n</script>\r\n","<template>\r\n <el-col :span=\"normalizedSpan\">\r\n <el-form-item :prop=\"name\" :label=\"label\" :label-width=\"labelWidth\" :required=\"required\" :rules=\"normalizedRules\">\r\n <slot></slot>\r\n </el-form-item>\r\n </el-col>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { ElCol, ElFormItem } from 'element-plus'\r\nimport type { DiyItemProps } from './DiyItem'\r\nimport { useFormItemSpan, useFormItemRules } from '../hooks'\r\n\r\ndefineOptions({ name: 'OFormDiy', inheritAttrs: false })\r\n\r\nconst { name, label, labelWidth, required } = defineProps<DiyItemProps>()\r\nconst normalizedSpan = useFormItemSpan()\r\nconst normalizedRules = useFormItemRules()\r\n</script>\r\n","<template>\r\n <el-col :span=\"normalizedSpan\">\r\n <el-form-item :prop=\"name\" :label=\"label\" :label-width=\"labelWidth\" :required=\"required\" :rules=\"normalizedRules\">\r\n <el-dropdown ref=\"dropdown\" :trigger=\"'click'\" @visible-change=\"onVisibleChange\" style=\"width: 100%\">\r\n <el-input ref=\"input\" v-model=\"elModel\" :maxlength=\"maxlength\" :placeholder=\"placeholder\" :disabled=\"disabled\"\r\n :readonly=\"readonly\" @input=\"onInput\" @keydown=\"onKeydown\" @change=\"onChange\" @blur=\"onBlur\"\r\n :suffix-icon=\"Search\" />\r\n <template #dropdown>\r\n <slot></slot>\r\n </template>\r\n </el-dropdown>\r\n </el-form-item>\r\n </el-col>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { ElCol, ElFormItem, ElInput, ElDropdown } from 'element-plus'\r\nimport { Search } from '@element-plus/icons-vue'\r\nimport { KeydownHandler, LovContext, lovContextKey, type LovInputProps } from './LovInput'\r\nimport { useFormItemSpan, useFormItemRules, useFormItemStringModel, useFormContext } from '../hooks'\r\nimport { provide, reactive, ref, useTemplateRef } from 'vue'\r\nimport { isString } from 'lodash-es'\r\n\r\ndefineOptions({ name: 'OFormLov', inheritAttrs: false })\r\n\r\nconst { name, label, labelWidth, required, maxlength, placeholder, disabled, readonly, fillMapping } = defineProps<LovInputProps>()\r\nconst normalizedSpan = useFormItemSpan()\r\nconst normalizedRules = useFormItemRules()\r\nconst elModel = useFormItemStringModel()\r\nconst formContext = useFormContext()!\r\n\r\nconst visible = ref(false)\r\nconst onVisibleChange = (val: boolean) => {\r\n visible.value = val\r\n}\r\n\r\nconst changed = ref(false)\r\nconst onInput = () => {\r\n if (!changed.value) {\r\n changed.value = true\r\n }\r\n\r\n if (!visible.value) {\r\n dropdownRef.value!.handleOpen()\r\n }\r\n}\r\n\r\nlet keydownHandler: KeydownHandler | undefined\r\nconst registerKeydownHandler: LovContext['registerKeydownHandler'] = (handler) => {\r\n keydownHandler = handler\r\n}\r\n\r\nconst onKeydown = (e: any) => {\r\n const fallthroughCodes = ['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight', 'Enter', 'Space']\r\n\r\n if (fallthroughCodes.indexOf(e.code) > -1) {\r\n if (visible.value) {\r\n keydownHandler && keydownHandler(e.code)\r\n }\r\n e.stopPropagation()\r\n }\r\n\r\n const triggerCodes = ['ArrowUp', 'ArrowDown']\r\n if (triggerCodes.indexOf(e.code) > -1 && !visible.value) {\r\n dropdownRef.value!.handleOpen()\r\n }\r\n}\r\n\r\nconst inputRef = useTemplateRef('input')\r\nconst onBlur = async (e: any) => {\r\n if (visible.value) {\r\n inputRef.value!.focus()\r\n }\r\n}\r\n\r\nconst onChange = () => {\r\n if (!changed.value) {\r\n return\r\n }\r\n\r\n if (isString(fillMapping)) {\r\n const data: Record<string, any> = {}\r\n\r\n const pairs = fillMapping.split(',')\r\n for (let i = 0; i < pairs.length; i++) {\r\n const dstName = pairs[i].split(':')[0].trim()\r\n data[dstName] = undefined\r\n }\r\n\r\n formContext.updateModelValueMulti(data)\r\n }\r\n}\r\n\r\nconst dropdownRef = useTemplateRef('dropdown')\r\nconst backfill: LovContext['backfill'] = (params) => {\r\n dropdownRef.value!.handleClose()\r\n\r\n if (isString(fillMapping)) {\r\n const data: Record<string, any> = {}\r\n\r\n const pairs = fillMapping.split(',')\r\n for (let i = 0; i < pairs.length; i++) {\r\n const dstName = pairs[i].split(':')[0].trim()\r\n const srcName = pairs[i].split(':')[1].trim()\r\n const srcValue = params[srcName]\r\n data[dstName] = srcValue\r\n }\r\n\r\n formContext.updateModelValueMulti(data)\r\n } else {\r\n fillMapping && fillMapping(params)\r\n }\r\n\r\n if (changed.value) {\r\n changed.value = false\r\n }\r\n}\r\n\r\nprovide(\r\n lovContextKey,\r\n reactive({\r\n lovValue: elModel,\r\n backfill,\r\n registerKeydownHandler,\r\n })\r\n)\r\n</script>\r\n","<template>\r\n <el-col :span=\"normalizedSpan\">\r\n <el-form-item :prop=\"name\" :label=\"label\" :label-width=\"labelWidth\" :required=\"required\" :rules=\"normalizedRules\">\r\n <el-input-number\r\n v-model=\"elModel\"\r\n :placeholder=\"placeholder\"\r\n :disabled=\"disabled\"\r\n :readonly=\"readonly\"\r\n :min=\"min\"\r\n :max=\"max\"\r\n :step=\"step\"\r\n :step-strictly=\"stepStrictly\"\r\n :precision=\"precision\"\r\n :controls=\"controls\"\r\n :controls-position=\"controlsPosition\"\r\n style=\"width: 100%\"\r\n />\r\n <template v-if=\"slots['decrease-icon']\" #decrease-icon>\r\n <slot name=\"decrease-icon\"></slot>\r\n </template>\r\n <template v-if=\"slots['increase-icon']\" #increase-icon>\r\n <slot name=\"increase-icon\"></slot>\r\n </template>\r\n <template v-if=\"slots['prefix']\" #prefix>\r\n <slot name=\"prefix\"></slot>\r\n </template>\r\n <template v-if=\"slots['suffix']\" #suffix>\r\n <slot name=\"suffix\"></slot>\r\n </template>\r\n\r\n </el-form-item>\r\n </el-col>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { ElCol, ElFormItem, ElInputNumber } from 'element-plus'\r\nimport type { NumberInputProps } from './NumberInput'\r\nimport { useFormItemSpan, useFormItemRules, useFormContext } from '../hooks'\r\nimport { computed, useSlots } from 'vue'\r\nimport { isNumber, isString, toNumber } from 'lodash-es'\r\nimport OrionError from '../../../error/OrionError'\r\n\r\ndefineOptions({ name: 'OFormNumber', inheritAttrs: false })\r\nconst slots = useSlots()\r\n\r\nconst {\r\n name,\r\n label,\r\n labelWidth,\r\n required,\r\n placeholder,\r\n disabled,\r\n readonly,\r\n min,\r\n max,\r\n step,\r\n stepStrictly,\r\n precision,\r\n controls = true,\r\n controlsPosition,\r\n} = defineProps<NumberInputProps>()\r\nconst normalizedSpan = useFormItemSpan()\r\nconst normalizedRules = useFormItemRules()\r\n\r\nconst formContext = useFormContext()!\r\nconst elModel = computed<number | undefined>({\r\n get: () => {\r\n const value = formContext.modelValue[name]\r\n if (!value) {\r\n return undefined\r\n }\r\n if (isNumber(value)) {\r\n return value\r\n } else if (isString(value)) {\r\n return toNumber(value)\r\n } else {\r\n throw new OrionError('数字输入框的值只能为字符串或数字类型')\r\n }\r\n },\r\n set: (newValue) => {\r\n if (!newValue) {\r\n formContext.updateModelValue(name, undefined)\r\n } else {\r\n formContext.updateModelValue(name, newValue)\r\n }\r\n },\r\n})\r\n</script>\r\n","<template>\r\n <el-col :span=\"normalizedSpan\">\r\n <el-form-item :prop=\"name\" :label=\"label\" :label-width=\"labelWidth\" :required=\"required\" :rules=\"normalizedRules\">\r\n <el-dropdown ref=\"dropdown\" :trigger=\"'click'\" @visible-change=\"onVisibleChange\" style=\"width: 100%;\">\r\n <div @focus=\"onFocus\" :style=\"{ position: 'relative', width: '100%', height: '100%' }\">\r\n <el-input ref=\"input\" v-model=\"inputValue\" :maxlength=\"maxlength\" :placeholder=\"placeholder\"\r\n :disabled=\"disabled\" :readonly=\"readonly\" @input=\"onInput\" @keydown=\"onKeydown\" @blur=\"onBlur\"\r\n :suffix-icon=\"visible ? ArrowUp : ArrowDown\" />\r\n <div v-if=\"!visible\"\r\n :style=\"{ position: 'absolute', inset: '4px 30px 4px 4px', overflow: 'hidden', pointerEvents: 'none' }\">\r\n <o-space>\r\n <el-tag v-for=\"tag in tags\" type=\"info\">{{ tag }}</el-tag>\r\n </o-space>\r\n </div>\r\n </div>\r\n <template #dropdown>\r\n <slot></slot>\r\n </template>\r\n </el-dropdown>\r\n </el-form-item>\r\n </el-col>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { ElCol, ElFormItem, ElInput, ElDropdown, ElTag } from 'element-plus'\r\nimport { ArrowDown, ArrowUp } from '@element-plus/icons-vue'\r\nimport { RowCompletionProvider, TableSelectContext, tableSelectContext, type TableSelectProps } from './TableSelect'\r\nimport { useFormItemSpan, useFormItemRules, useFormContext } from '../hooks'\r\nimport { computed, onMounted, provide, reactive, ref, useTemplateRef, watch } from 'vue'\r\nimport { isArray, pick } from 'lodash-es'\r\nimport OrionError from '../../../error/OrionError'\r\n\r\ndefineOptions({ name: 'OFormTableselect', inheritAttrs: false })\r\n\r\nconst emit = defineEmits(['change'])\r\nconst { name, label, labelWidth, required, maxlength, placeholder, disabled, readonly, pick: pickup, tag } = defineProps<TableSelectProps>()\r\nconst normalizedSpan = useFormItemSpan()\r\nconst normalizedRules = useFormItemRules()\r\n\r\nconst inputValue = ref('')\r\nconst modifyByForm = ref(false)\r\nconst formContext = useFormContext()!\r\nconst elModel = computed<any[] | undefined>({\r\n get: () => {\r\n const value = formContext.modelValue[name]\r\n if (!value) {\r\n return undefined\r\n }\r\n if (!isArray(value)) {\r\n throw new OrionError('表格下拉框的值只能为数组类型')\r\n }\r\n return value\r\n },\r\n set: (newValue) => {\r\n modifyByForm.value = false\r\n if (!newValue) {\r\n formContext.updateModelValue(name, undefined)\r\n } else {\r\n formContext.updateModelValue(name, newValue)\r\n }\r\n },\r\n})\r\n\r\nconst selection = ref<any[] | undefined>([])\r\nonMounted(async () => {\r\n if (completionItemProvider) {\r\n selection.value = await completionItemProvider(elModel.value)\r\n if (selection.value) {\r\n tags.value = selection.value.map((item) => tag(item))\r\n }\r\n }\r\n})\r\nwatch(elModel, async () => {\r\n if (modifyByForm.value) {\r\n if (completionItemProvider) {\r\n selection.value = await completionItemProvider(elModel.value)\r\n if (selection.value) {\r\n tags.value = selection.value.map((item) => tag(item))\r\n }\r\n }\r\n } else {\r\n modifyByForm.value = true\r\n }\r\n})\r\n\r\nconst visible = ref(false)\r\nconst onVisibleChange = (val: boolean) => {\r\n visible.value = val\r\n}\r\nconst onInput = () => {\r\n if (!visible.value) {\r\n dropdownRef.value!.handleOpen()\r\n }\r\n}\r\n\r\nconst inputRef = useTemplateRef('input')\r\nconst onFocus = () => {\r\n inputRef.value!.focus()\r\n}\r\n\r\nconst onKeydown = (e: any) => {\r\n if (visible.value) {\r\n if (['Enter', 'Escape'].indexOf(e.code) > -1) {\r\n dropdownRef.value!.handleClose()\r\n } else if ('ArrowDown' == e.code) {\r\n e.stopPropagation()\r\n } else if ('Tab' == e.code) {\r\n visible.value = false\r\n dropdownRef.value!.handleClose()\r\n }\r\n } else {\r\n if (['ArrowUp', 'ArrowDown'].indexOf(e.code) > -1) {\r\n dropdownRef.value!.handleOpen()\r\n e.stopPropagation()\r\n }\r\n }\r\n}\r\n\r\nconst onBlur = async (e: any) => {\r\n if (visible.value) {\r\n inputRef.value!.focus()\r\n } else {\r\n inputValue.value = ''\r\n }\r\n}\r\n\r\nconst tags = ref<string[]>([])\r\nconst dropdownRef = useTemplateRef('dropdown')\r\nconst onSelect: TableSelectContext['onSelect'] = (selection, clear) => {\r\n elModel.value = selection.map((item) => pick(item, pickup))\r\n tags.value = selection.map((item) => tag(item))\r\n if (clear) {\r\n inputValue.value = ''\r\n }\r\n emit('change', selection)\r\n}\r\nconst selectDone: TableSelectContext['selectDone'] = () => {\r\n dropdownRef.value!.handleClose()\r\n}\r\n\r\nlet completionItemProvider: RowCompletionProvider | undefined\r\nconst registerRowCompletionProvider: TableSelectContext['registerRowCompletionProvider'] = (provider) => {\r\n completionItemProvider = provider\r\n}\r\n\r\nprovide(\r\n tableSelectContext,\r\n reactive({\r\n inputValue,\r\n selection,\r\n onSelect,\r\n selectDone,\r\n tag,\r\n registerRowCompletionProvider\r\n })\r\n)\r\n</script>","import { withInstall } from '../_util'\r\n\r\nimport Form from './Form.vue'\r\nimport StringInput from './StringInput/StringInput.vue'\r\nimport PasswordInput from './PasswordInput/PasswordInput.vue'\r\nimport Textarea from './Textarea/Textarea.vue'\r\nimport SingleSelect from './SingleSelect/SingleSelect.vue'\r\nimport MultiSelect from './MultiSelect/MultiSelect.vue'\r\nimport RadioGroup from './RadioGroup/RadioGroup.vue'\r\nimport CheckboxGroup from './CheckboxGroup/CheckboxGroup.vue'\r\nimport Checkbox from './Checkbox/Checkbox.vue'\r\nimport Switch from './Switch/Switch.vue'\r\nimport DateInput from './DateInput/DateInput.vue'\r\nimport FileInput from './FileInput/FileInput.vue'\r\nimport ButtonGroup from './ButtonGroup/ButtonGroup.vue'\r\nimport DiyItem from './DiyItem/DiyItem.vue'\r\nimport LovInput from './LovInput/LovInput.vue'\r\nimport NumberInput from './NumberInput/NumberInput.vue'\r\nimport TableSelect from './TableSelect/TableSelect.vue'\r\n\r\nexport default withInstall<\r\n typeof Form,\r\n {\r\n StringInput: typeof StringInput\r\n PasswordInput: typeof PasswordInput\r\n Textarea: typeof Textarea\r\n SingleSelect: typeof SingleSelect\r\n MultiSelect: typeof MultiSelect\r\n RadioGroup: typeof RadioGroup\r\n CheckboxGroup: typeof CheckboxGroup\r\n Checkbox: typeof Checkbox\r\n Switch: typeof Switch\r\n DateInput: typeof DateInput\r\n FileInput: typeof FileInput\r\n ButtonGroup: typeof ButtonGroup\r\n DiyItem: typeof DiyItem\r\n LovInput: typeof LovInput\r\n NumberInput: typeof NumberInput\r\n TableSelect: typeof TableSelect\r\n }\r\n>(Form, {\r\n StringInput,\r\n PasswordInput,\r\n Textarea,\r\n SingleSelect,\r\n MultiSelect,\r\n RadioGroup,\r\n CheckboxGroup,\r\n Checkbox,\r\n Switch,\r\n DateInput,\r\n FileInput,\r\n ButtonGroup,\r\n DiyItem,\r\n LovInput,\r\n NumberInput,\r\n TableSelect,\r\n})\r\n\r\nexport * from './Form'\r\nexport * from './StringInput'\r\nexport * from './PasswordInput'\r\nexport * from './Textarea'\r\nexport * from './SingleSelect'\r\nexport * from './MultiSelect'\r\nexport * from './RadioGroup'\r\nexport * from './CheckboxGroup'\r\nexport * from './Checkbox'\r\nexport * from './Switch'\r\nexport * from './DateInput'\r\nexport * from './FileInput'\r\nexport * from './ButtonGroup'\r\nexport * from './DiyItem'\r\nexport * from './LovInput'\r\nexport * from './NumberInput'\r\nexport * from './TableSelect'\r\n"],"names":["emit","__emit","updateModelValue","name","value","__props","OrionError","updateModelValueMulti","data","modelKeys","dataKeys","diff","difference","isEmpty","formRef","useTemplateRef","__expose","provide","formContextKey","reactive","toRef","slots","useSlots","normalizedSpan","useFormItemSpan","normalizedRules","useFormItemRules","elModel","useFormItemStringModel","attrs","useAttrs","normalizedDisabled","useFormItemDisabled","normalizedCode","useFormItemCode","content","computed","getSingleCodeContent","useFormItemMultiModel","formContext","useFormContext","getMultiCodeContent","useFormItemBooleanModel","isTimePicker","normalizedSourceFormat","dateType","picker","isDate","isString","dayjsObj","dayjs","newValue","watch","file","ref","fileRef","onMounted","event","_a","style","visible","onVisibleChange","val","changed","onInput","dropdownRef","keydownHandler","registerKeydownHandler","handler","onKeydown","e","inputRef","onBlur","onChange","pairs","i","dstName","lovContextKey","params","srcName","srcValue","isNumber","toNumber","inputValue","modifyByForm","isArray","selection","completionItemProvider","tags","item","onFocus","onSelect","clear","pick","selectDone","registerRowCompletionProvider","provider","tableSelectContext","index","withInstall","Form","StringInput","PasswordInput","Textarea","SingleSelect","MultiSelect","RadioGroup","CheckboxGroup","Checkbox","Switch","DateInput","FileInput","ButtonGroup","DiyItem","LovInput","NumberInput","TableSelect"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAmB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A,EAAA,aACAC;AACF,CAAC;"}
@@ -1,2 +1,2 @@
1
- declare const _default: "0.1.43";
1
+ declare const _default: "0.1.44";
2
2
  export default _default;
@@ -1,4 +1,4 @@
1
- const e = "0.1.43";
1
+ const e = "0.1.44";
2
2
  export {
3
3
  e as default
4
4
  };
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","sources":["../../src/version/version.ts"],"sourcesContent":["export default '0.1.43';"],"names":["version"],"mappings":"AAAA,MAAAA,IAAe;"}
1
+ {"version":3,"file":"version.js","sources":["../../src/version/version.ts"],"sourcesContent":["export default '0.1.44';"],"names":["version"],"mappings":"AAAA,MAAAA,IAAe;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orion-design",
3
- "version": "0.1.43",
3
+ "version": "0.1.44",
4
4
  "main": "dist/index.js",
5
5
  "type": "module",
6
6
  "types": "dist/index.d.ts",