orion-design 0.1.42 → 0.1.44
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +5 -5
- package/dist/Throne/hooks/use-throne-context.js.map +1 -1
- package/dist/components/Form/NumberInput/NumberInput.vue.d.ts +18 -1
- package/dist/components/Form/index.js +302 -273
- package/dist/components/Form/index.js.map +1 -1
- package/dist/components/Modal/index.d.ts +1 -0
- package/dist/components/Modal/index.js +10 -8
- package/dist/components/Modal/index.js.map +1 -1
- package/dist/components/Tree/Tree.d.ts +45 -0
- package/dist/components/Tree/Tree.js +2 -0
- package/dist/components/Tree/Tree.js.map +1 -0
- package/dist/components/Tree/Tree.vue.d.ts +1709 -0
- package/dist/components/Tree/index.d.ts +899 -1
- package/dist/components/Tree/index.js +92 -1
- package/dist/components/Tree/index.js.map +1 -1
- package/dist/components/Tree/utils/index.d.ts +3 -0
- package/dist/components/Tree/utils/index.js +7 -0
- package/dist/components/Tree/utils/index.js.map +1 -0
- package/dist/components/components.d.ts +1 -0
- package/dist/components/components.js +10 -8
- package/dist/components/components.js.map +1 -1
- package/dist/components/index.d.ts +2 -1
- package/dist/components/index.js +41 -38
- package/dist/components/index.js.map +1 -1
- package/dist/{components-Pdc4XEej.js → components-G3_R2B-U.js} +14 -12
- package/dist/components-G3_R2B-U.js.map +1 -0
- package/dist/index-C2i44sFt.js +33 -0
- package/dist/index-C2i44sFt.js.map +1 -0
- package/dist/index.js +43 -40
- package/dist/index.js.map +1 -1
- package/dist/version/version.d.ts +1 -1
- package/dist/version/version.js +1 -1
- package/dist/version/version.js.map +1 -1
- package/global.d.ts +2 -0
- package/package.json +1 -1
- package/dist/components-Pdc4XEej.js.map +0 -1
@@ -1,10 +1,10 @@
|
|
1
|
-
import { difference as
|
2
|
-
import { defineComponent as v, useTemplateRef as
|
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
|
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
|
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:
|
28
|
-
const
|
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
|
-
|
32
|
-
},
|
33
|
-
const m = Object.keys(a.modelValue), y = Object.keys(o),
|
34
|
-
if (!
|
35
|
-
throw new D(`modelValue中不存在[${
|
36
|
-
|
37
|
-
},
|
38
|
-
return
|
39
|
-
validate: async () => await
|
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:
|
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(),
|
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:
|
58
|
+
default: d(() => [
|
59
59
|
b(e(Oe), { gutter: 16 }, {
|
60
|
-
default:
|
61
|
-
|
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
|
87
|
-
return (
|
88
|
-
default:
|
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:
|
91
|
-
label:
|
92
|
-
"label-width":
|
93
|
-
required:
|
94
|
-
rules: e(
|
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:
|
96
|
+
default: d(() => [
|
97
97
|
b(e(W), {
|
98
98
|
modelValue: e(n),
|
99
|
-
"onUpdate:modelValue":
|
100
|
-
maxlength:
|
101
|
-
placeholder:
|
102
|
-
disabled:
|
103
|
-
readonly:
|
104
|
-
},
|
105
|
-
e(
|
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:
|
108
|
-
|
107
|
+
fn: d(() => [
|
108
|
+
B(t.$slots, "prefix")
|
109
109
|
]),
|
110
110
|
key: "0"
|
111
111
|
} : void 0,
|
112
|
-
e(
|
112
|
+
e(i).suffix ? {
|
113
113
|
name: "suffix",
|
114
|
-
fn:
|
115
|
-
|
114
|
+
fn: d(() => [
|
115
|
+
B(t.$slots, "suffix")
|
116
116
|
]),
|
117
117
|
key: "1"
|
118
118
|
} : void 0,
|
119
|
-
e(
|
119
|
+
e(i).prepend ? {
|
120
120
|
name: "prepend",
|
121
|
-
fn:
|
122
|
-
|
121
|
+
fn: d(() => [
|
122
|
+
B(t.$slots, "prepend")
|
123
123
|
]),
|
124
124
|
key: "2"
|
125
125
|
} : void 0,
|
126
|
-
e(
|
126
|
+
e(i).append ? {
|
127
127
|
name: "append",
|
128
|
-
fn:
|
129
|
-
|
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
|
159
|
-
return (n,
|
160
|
-
default:
|
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(
|
166
|
+
rules: e(p)
|
167
167
|
}, {
|
168
|
-
default:
|
168
|
+
default: d(() => [
|
169
169
|
b(e(W), {
|
170
|
-
modelValue: e(
|
171
|
-
"onUpdate:modelValue":
|
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
|
204
|
-
return (n,
|
205
|
-
default:
|
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(
|
211
|
+
rules: e(p)
|
212
212
|
}, {
|
213
|
-
default:
|
213
|
+
default: d(() => [
|
214
214
|
b(e(W), {
|
215
|
-
modelValue: e(
|
216
|
-
"onUpdate:modelValue":
|
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
|
251
|
-
return (o, m) => (f(),
|
252
|
-
default:
|
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(
|
258
|
+
rules: e(r)
|
259
259
|
}, {
|
260
|
-
default:
|
261
|
-
e(n) ? (f(),
|
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(),
|
267
|
+
}, null, 8, ["model-value", "placeholder"])) : (f(), h(e(se), {
|
268
268
|
key: 1,
|
269
|
-
modelValue: e(
|
270
|
-
"onUpdate:modelValue": m[0] || (m[0] = (y) =>
|
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(
|
274
|
+
onChange: e(i).onChange
|
275
275
|
}, {
|
276
|
-
default:
|
277
|
-
(f(!0), E(U, null, N(e(
|
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
|
311
|
-
return (m, y) => (f(),
|
312
|
-
default:
|
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(
|
318
|
+
rules: e(r)
|
319
319
|
}, {
|
320
|
-
default:
|
321
|
-
e(n) ? (f(),
|
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(),
|
327
|
+
}, null, 8, ["model-value", "placeholder"])) : (f(), h(e(se), {
|
328
328
|
key: 1,
|
329
|
-
modelValue: e(
|
330
|
-
"onUpdate:modelValue": y[0] || (y[0] = (
|
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(
|
335
|
+
onChange: e(i).onChange
|
336
336
|
}, {
|
337
|
-
default:
|
338
|
-
(f(!0), E(U, null, N(e(
|
339
|
-
key:
|
340
|
-
label:
|
341
|
-
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
|
369
|
-
return (
|
370
|
-
default:
|
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:
|
373
|
-
label:
|
374
|
-
"label-width":
|
375
|
-
required:
|
376
|
-
rules: e(
|
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:
|
378
|
+
default: d(() => [
|
379
379
|
b(e(Fe), {
|
380
380
|
modelValue: e(n),
|
381
|
-
"onUpdate:modelValue":
|
382
|
-
disabled:
|
381
|
+
"onUpdate:modelValue": l[0] || (l[0] = (s) => k(n) ? n.value = s : null),
|
382
|
+
disabled: t.disabled
|
383
383
|
}, {
|
384
|
-
default:
|
385
|
-
(f(!0), E(U, null, N(e(
|
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:
|
390
|
-
|
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
|
420
|
-
return (
|
421
|
-
default:
|
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:
|
424
|
-
label:
|
425
|
-
"label-width":
|
426
|
-
required:
|
427
|
-
rules: e(
|
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:
|
429
|
+
default: d(() => [
|
430
430
|
b(e(We), {
|
431
431
|
modelValue: e(n),
|
432
|
-
"onUpdate:modelValue":
|
433
|
-
disabled:
|
432
|
+
"onUpdate:modelValue": l[0] || (l[0] = (s) => k(n) ? n.value = s : null),
|
433
|
+
disabled: t.disabled
|
434
434
|
}, {
|
435
|
-
default:
|
436
|
-
(f(!0), E(U, null, N(e(
|
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
|
465
|
-
return (
|
466
|
-
default:
|
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:
|
469
|
-
label:
|
470
|
-
"label-width":
|
471
|
-
rules:
|
468
|
+
prop: r.name,
|
469
|
+
label: r.label,
|
470
|
+
"label-width": r.labelWidth,
|
471
|
+
rules: r.rules
|
472
472
|
}, {
|
473
|
-
default:
|
474
|
-
b(e(
|
475
|
-
modelValue: e(
|
476
|
-
"onUpdate:modelValue": n[0] || (n[0] = (
|
477
|
-
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
|
500
|
-
return (
|
501
|
-
default:
|
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:
|
504
|
-
label:
|
505
|
-
"label-width":
|
506
|
-
rules:
|
503
|
+
prop: r.name,
|
504
|
+
label: r.label,
|
505
|
+
"label-width": r.labelWidth,
|
506
|
+
rules: r.rules
|
507
507
|
}, {
|
508
|
-
default:
|
508
|
+
default: d(() => [
|
509
509
|
b(e(Re), {
|
510
|
-
modelValue: e(
|
511
|
-
"onUpdate:modelValue": n[0] || (n[0] = (
|
512
|
-
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
|
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
|
-
}),
|
545
|
+
}), l = P(), s = O({
|
546
546
|
get: () => {
|
547
|
-
const o =
|
547
|
+
const o = l.modelValue[a.name];
|
548
548
|
if (o) {
|
549
|
-
if (
|
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 ?
|
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(),
|
565
|
-
default:
|
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(
|
571
|
+
rules: e(p)
|
572
572
|
}, {
|
573
|
-
default:
|
574
|
-
|
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(),
|
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:
|
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
|
621
|
-
|
622
|
-
|
620
|
+
const i = w(), p = q(), r = $();
|
621
|
+
re(r, () => {
|
622
|
+
r.value || (n.value = "");
|
623
623
|
});
|
624
|
-
const n = z(""),
|
625
|
-
return
|
626
|
-
|
624
|
+
const n = z(""), t = A("inputRef");
|
625
|
+
return de(() => {
|
626
|
+
t.value.input.onchange = (l) => {
|
627
627
|
var s;
|
628
|
-
|
628
|
+
r.value = (s = l == null ? void 0 : l.target) == null ? void 0 : s.files[0];
|
629
629
|
}, n.value = "";
|
630
|
-
}), (
|
631
|
-
default:
|
630
|
+
}), (l, s) => (f(), h(e(g), { span: e(i) }, {
|
631
|
+
default: d(() => [
|
632
632
|
b(e(S), {
|
633
|
-
prop:
|
634
|
-
label:
|
635
|
-
"label-width":
|
636
|
-
required:
|
637
|
-
rules: e(
|
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:
|
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:
|
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
|
665
|
+
const i = O(() => ({
|
666
666
|
textAlign: a.align
|
667
|
-
})),
|
668
|
-
return (
|
669
|
-
span: e(
|
670
|
-
style: Se(
|
667
|
+
})), p = w();
|
668
|
+
return (r, n) => (f(), h(e(g), {
|
669
|
+
span: e(p),
|
670
|
+
style: Se(i.value)
|
671
671
|
}, {
|
672
|
-
default:
|
672
|
+
default: d(() => [
|
673
673
|
b(e(Ne), {
|
674
|
-
gutter:
|
674
|
+
gutter: r.gutter,
|
675
675
|
style: { "margin-bottom": "var(--orion-form-validation-message-height)" }
|
676
676
|
}, {
|
677
|
-
default:
|
678
|
-
|
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
|
700
|
-
return (
|
701
|
-
default:
|
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:
|
704
|
-
label:
|
705
|
-
"label-width":
|
706
|
-
required:
|
707
|
-
rules: e(
|
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:
|
710
|
-
|
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
|
737
|
-
|
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),
|
739
|
+
s.value || (s.value = !0), t.value || I.value.handleOpen();
|
740
740
|
};
|
741
741
|
let m;
|
742
|
-
const y = (
|
743
|
-
m =
|
744
|
-
},
|
745
|
-
["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight", "Enter", "Space"].indexOf(
|
746
|
-
}, H =
|
747
|
-
|
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
|
751
|
-
for (let
|
752
|
-
const F = V[
|
753
|
-
|
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(
|
755
|
+
n.updateModelValueMulti(c);
|
756
756
|
}
|
757
|
-
}, I =
|
757
|
+
}, I = A("dropdown");
|
758
758
|
return Z(
|
759
759
|
Ge,
|
760
760
|
x({
|
761
|
-
lovValue:
|
762
|
-
backfill: (
|
761
|
+
lovValue: r,
|
762
|
+
backfill: (c) => {
|
763
763
|
if (I.value.handleClose(), L(a.fillMapping)) {
|
764
|
-
const V = {},
|
765
|
-
for (let F = 0; F <
|
766
|
-
const R =
|
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(
|
771
|
+
a.fillMapping && a.fillMapping(c);
|
772
772
|
s.value && (s.value = !1);
|
773
773
|
},
|
774
774
|
registerKeydownHandler: y
|
775
775
|
})
|
776
|
-
), (
|
777
|
-
default:
|
776
|
+
), (c, V) => (f(), h(e(g), { span: e(i) }, {
|
777
|
+
default: d(() => [
|
778
778
|
b(e(S), {
|
779
|
-
prop:
|
780
|
-
label:
|
781
|
-
"label-width":
|
782
|
-
required:
|
783
|
-
rules: e(
|
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:
|
786
|
-
b(e(
|
785
|
+
default: d(() => [
|
786
|
+
b(e(pe), {
|
787
787
|
ref: "dropdown",
|
788
788
|
trigger: "click",
|
789
|
-
onVisibleChange:
|
789
|
+
onVisibleChange: l,
|
790
790
|
style: { width: "100%" }
|
791
791
|
}, {
|
792
|
-
dropdown:
|
793
|
-
|
792
|
+
dropdown: d(() => [
|
793
|
+
B(c.$slots, "default")
|
794
794
|
]),
|
795
|
-
default:
|
795
|
+
default: d(() => [
|
796
796
|
b(e(W), {
|
797
797
|
ref: "input",
|
798
|
-
modelValue: e(
|
799
|
-
"onUpdate:modelValue": V[0] || (V[0] = (
|
800
|
-
maxlength:
|
801
|
-
placeholder:
|
802
|
-
disabled:
|
803
|
-
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:
|
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(),
|
843
|
+
const i = le(), p = w(), r = q(), n = P(), t = O({
|
844
844
|
get: () => {
|
845
|
-
const l =
|
845
|
+
const l = n.modelValue[a.name];
|
846
846
|
if (l) {
|
847
|
-
if (
|
847
|
+
if (ve(l))
|
848
848
|
return l;
|
849
849
|
if (L(l))
|
850
|
-
return
|
850
|
+
return ge(l);
|
851
851
|
throw new D("数字输入框的值只能为字符串或数字类型");
|
852
852
|
}
|
853
853
|
},
|
854
854
|
set: (l) => {
|
855
|
-
l ?
|
855
|
+
l ? n.updateModelValue(a.name, l) : n.updateModelValue(a.name, void 0);
|
856
856
|
}
|
857
857
|
});
|
858
|
-
return (l,
|
859
|
-
default:
|
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(
|
866
|
-
}, {
|
867
|
-
default:
|
865
|
+
rules: e(r)
|
866
|
+
}, ae({
|
867
|
+
default: d(() => [
|
868
868
|
b(e(Ee), {
|
869
|
-
modelValue:
|
870
|
-
"onUpdate:modelValue":
|
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
|
-
_:
|
885
|
-
},
|
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
|
-
_:
|
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
|
-
},
|
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:
|
913
|
-
const
|
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 (!
|
946
|
+
if (!we(u))
|
918
947
|
throw new D("表格下拉框的值只能为数组类型");
|
919
948
|
return u;
|
920
949
|
}
|
921
950
|
},
|
922
951
|
set: (u) => {
|
923
|
-
|
952
|
+
l.value = !1, u ? s.updateModelValue(a.name, u) : s.updateModelValue(a.name, void 0);
|
924
953
|
}
|
925
954
|
}), m = z([]);
|
926
|
-
|
927
|
-
R && (m.value = await R(o.value), m.value && (
|
928
|
-
}),
|
929
|
-
|
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),
|
960
|
+
const y = z(!1), M = (u) => {
|
932
961
|
y.value = u;
|
933
962
|
}, H = () => {
|
934
963
|
y.value || V.value.handleOpen();
|
935
|
-
}, Y =
|
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() :
|
941
|
-
},
|
942
|
-
o.value = u.map((T) =>
|
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:
|
982
|
+
inputValue: t,
|
954
983
|
selection: m,
|
955
|
-
onSelect:
|
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(),
|
963
|
-
default:
|
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:
|
972
|
-
b(e(
|
1000
|
+
default: d(() => [
|
1001
|
+
b(e(pe), {
|
973
1002
|
ref: "dropdown",
|
974
1003
|
trigger: "click",
|
975
|
-
onVisibleChange:
|
1004
|
+
onVisibleChange: M,
|
976
1005
|
style: { width: "100%" }
|
977
1006
|
}, {
|
978
|
-
dropdown:
|
979
|
-
|
1007
|
+
dropdown: d(() => [
|
1008
|
+
B(u.$slots, "default")
|
980
1009
|
]),
|
981
|
-
default:
|
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:
|
989
|
-
"onUpdate:modelValue": j[0] || (j[0] = (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:
|
1002
|
-
(f(!0), E(U, null, N(
|
1003
|
-
default:
|
1004
|
-
|
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:
|
1069
|
+
TableSelect: il
|
1041
1070
|
});
|
1042
1071
|
export {
|
1043
1072
|
Sl as default,
|