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