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