orion-design 0.1.15 → 0.1.16
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +5 -5
- package/dist/components/Form/FileInput/FileInput.vue.d.ts +2 -2
- package/dist/components/Form/LovInput/LovInput.d.ts +2 -0
- package/dist/components/Form/LovInput/LovInput.js.map +1 -1
- package/dist/components/Form/index.js +291 -283
- package/dist/components/Form/index.js.map +1 -1
- package/dist/components/LovTable/LovPagetable.vue.d.ts +16 -0
- package/dist/components/LovTable/LovQuerytable.vue.d.ts +16 -0
- package/dist/components/LovTable/index.d.ts +34 -2
- package/dist/components/LovTable/index.js +34 -44
- package/dist/components/LovTable/index.js.map +1 -1
- package/dist/components/Tabs/constants.d.ts +19 -0
- package/dist/components/Tabs/constants.js +5 -0
- package/dist/components/Tabs/constants.js.map +1 -0
- package/dist/components/Tabs/index.d.ts +74 -0
- package/dist/components/Tabs/index.js +367 -0
- package/dist/components/Tabs/index.js.map +1 -0
- package/dist/components/Tabs/tab-bar.d.ts +59 -0
- package/dist/components/Tabs/tab-bar.js +15 -0
- package/dist/components/Tabs/tab-bar.js.map +1 -0
- package/dist/components/Tabs/tab-bar.vue.d.ts +131 -0
- package/dist/components/Tabs/tab-nav.d.ts +237 -0
- package/dist/components/Tabs/tab-pane.d.ts +16 -0
- package/dist/components/Tabs/tab-pane.js +35 -0
- package/dist/components/Tabs/tab-pane.js.map +1 -0
- package/dist/components/Tabs/tab-pane.vue.d.ts +43 -0
- package/dist/components/Tabs/tabs.d.ts +101 -0
- package/dist/components/_constants/aria.d.ts +17 -0
- package/dist/components/_constants/aria.js +25 -0
- package/dist/components/_constants/aria.js.map +1 -0
- package/dist/components/_constants/event.d.ts +3 -0
- package/dist/components/_constants/event.js +7 -0
- package/dist/components/_constants/event.js.map +1 -0
- package/dist/components/_constants/index.d.ts +2 -0
- package/dist/components/_constants/index.js +9 -0
- package/dist/components/_constants/index.js.map +1 -0
- package/dist/components/_hooks/index.d.ts +2 -0
- package/dist/components/_hooks/index.js +10 -0
- package/dist/components/_hooks/index.js.map +1 -0
- package/dist/components/_hooks/use-namespace/index.d.ts +23 -0
- package/dist/components/_hooks/use-namespace/index.js +46 -0
- package/dist/components/_hooks/use-namespace/index.js.map +1 -0
- package/dist/components/_hooks/use-ordered-children/index.d.ts +8 -0
- package/dist/components/_hooks/use-ordered-children/index.js +27 -0
- package/dist/components/_hooks/use-ordered-children/index.js.map +1 -0
- package/dist/components/_util/arrays.js.map +1 -1
- package/dist/components/_util/browser.js +2 -2
- package/dist/components/_util/browser.js.map +1 -1
- package/dist/components/_util/dom/aria.js.map +1 -1
- package/dist/components/_util/dom/element.js +1 -1
- package/dist/components/_util/dom/element.js.map +1 -1
- package/dist/components/_util/dom/event.js.map +1 -1
- package/dist/components/_util/dom/position.js +1 -1
- package/dist/components/_util/dom/position.js.map +1 -1
- package/dist/components/_util/dom/scroll.js +1 -1
- package/dist/components/_util/dom/scroll.js.map +1 -1
- package/dist/components/_util/dom/style.js +1 -1
- package/dist/components/_util/dom/style.js.map +1 -1
- package/dist/components/_util/easings.js.map +1 -1
- package/dist/components/_util/error.js.map +1 -1
- package/dist/components/_util/i18n.js.map +1 -1
- package/dist/components/_util/index.js +1 -1
- package/dist/components/_util/objects.js.map +1 -1
- package/dist/components/_util/raf.js +1 -1
- package/dist/components/_util/raf.js.map +1 -1
- package/dist/components/_util/rand.js.map +1 -1
- package/dist/components/_util/strings.js.map +1 -1
- package/dist/components/_util/throttleByRaf.js.map +1 -1
- package/dist/components/_util/types.js.map +1 -1
- package/dist/components/_util/typescript.js.map +1 -1
- package/dist/components/_util/vue/global-node.js +1 -1
- package/dist/components/_util/vue/global-node.js.map +1 -1
- package/dist/components/_util/vue/icon.js +24 -146
- package/dist/components/_util/vue/icon.js.map +1 -1
- package/dist/components/_util/vue/install.js.map +1 -1
- package/dist/components/_util/vue/props/runtime.js.map +1 -1
- package/dist/components/_util/vue/refs.js.map +1 -1
- package/dist/components/_util/vue/size.js.map +1 -1
- package/dist/components/_util/vue/validator.js.map +1 -1
- package/dist/components/_util/vue/vnode.js.map +1 -1
- package/dist/components/components.d.ts +2 -0
- package/dist/components/components.js +13 -11
- package/dist/components/components.js.map +1 -1
- package/dist/components/index.js +21 -19
- package/dist/components/index.js.map +1 -1
- package/dist/components-0PErqPHo.js +72 -0
- package/dist/{components-DXZmD0GT.js.map → components-0PErqPHo.js.map} +1 -1
- package/dist/index-BwWeqwHB.js +164 -0
- package/dist/index-BwWeqwHB.js.map +1 -0
- package/dist/index-DG_8kbAs.js +45 -0
- package/dist/{index-C8JNJPWW.js.map → index-DG_8kbAs.js.map} +1 -1
- package/dist/index-DLvlyWAh.js +127 -0
- package/dist/index-DLvlyWAh.js.map +1 -0
- package/dist/index.css +1 -1
- package/dist/index.js +21 -19
- 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 +6 -1
- package/package.json +3 -1
- package/dist/components/LovTable/LovPagetable.d.ts +0 -2
- package/dist/components/LovTable/LovQuerytable.d.ts +0 -2
- package/dist/components-DXZmD0GT.js +0 -70
- package/dist/index-C8JNJPWW.js +0 -8
@@ -1,15 +1,15 @@
|
|
1
|
-
import { difference as
|
2
|
-
import { defineComponent as c, useTemplateRef as
|
3
|
-
import { withInstall as
|
4
|
-
import { ElForm as
|
5
|
-
import { formContextKey as
|
6
|
-
import
|
7
|
-
import { useFormItemSpan as v, useFormItemRules as g, useFormItemStringModel as
|
8
|
-
import { getSingleCodeContent as
|
9
|
-
import { S as
|
10
|
-
import { lovContextKey as
|
11
|
-
import { default as
|
12
|
-
const
|
1
|
+
import { difference as x, isEmpty as _, isDate as ee, isString as I } from "lodash-es";
|
2
|
+
import { defineComponent as c, useTemplateRef as U, provide as L, reactive as T, toRef as W, openBlock as m, createBlock as p, unref as e, withCtx as n, createVNode as b, renderSlot as R, isRef as S, computed as B, createElementBlock as $, Fragment as A, renderList as D, createTextVNode as le, toDisplayString as ae, watch as oe, ref as re, onMounted as te, normalizeStyle as ne } from "vue";
|
3
|
+
import { withInstall as de } from "../_util/vue/install.js";
|
4
|
+
import { ElForm as ue, ElRow as ie, ElCol as y, ElFormItem as w, ElInput as F, ElSelect as j, ElOption as P, ElRadioGroup as se, ElRadio as me, ElCheckboxGroup as pe, ElCheckbox as H, ElSwitch as be, dayjs as G, ElTimePicker as fe, ElDatePicker as he, ElDropdown as ce } from "element-plus";
|
5
|
+
import { formContextKey as ye } from "./Form.js";
|
6
|
+
import C from "../../error/OrionError.js";
|
7
|
+
import { useFormItemSpan as v, useFormItemRules as g, useFormItemStringModel as z, useFormItemDisabled as K, useFormItemCode as E, useFormItemMultiModel as N, useFormContext as Y, useFormItemBooleanModel as J } from "./hooks/index.js";
|
8
|
+
import { getSingleCodeContent as ve, getMultiCodeContent as we } from "./utils/index.js";
|
9
|
+
import { S as Ve } from "../../index-BbsXWo7C.js";
|
10
|
+
import { lovContextKey as ge } from "./LovInput/LovInput.js";
|
11
|
+
import { default as Xe } from "./LovInput/hooks/useLov.js";
|
12
|
+
const Se = /* @__PURE__ */ c({
|
13
13
|
name: "OForm",
|
14
14
|
inheritAttrs: !1,
|
15
15
|
__name: "Form",
|
@@ -21,40 +21,40 @@ const Ve = /* @__PURE__ */ c({
|
|
21
21
|
modelValue: {}
|
22
22
|
},
|
23
23
|
emits: ["update:modelValue"],
|
24
|
-
setup(r, { expose:
|
25
|
-
const o = i,
|
26
|
-
if (!Object.keys(r.modelValue).includes(
|
27
|
-
throw new
|
28
|
-
o("update:modelValue", { ...r.modelValue, [
|
29
|
-
}, t = (
|
30
|
-
const
|
31
|
-
if (!
|
32
|
-
throw new
|
33
|
-
o("update:modelValue", { ...r.modelValue, ...
|
34
|
-
},
|
35
|
-
return
|
36
|
-
validate: async () => await
|
37
|
-
}),
|
38
|
-
|
39
|
-
|
40
|
-
modelValue:
|
41
|
-
updateModelValue:
|
24
|
+
setup(r, { expose: s, emit: i }) {
|
25
|
+
const o = i, l = (a, h) => {
|
26
|
+
if (!Object.keys(r.modelValue).includes(a))
|
27
|
+
throw new C(`modelValue中不存在[${a}]`);
|
28
|
+
o("update:modelValue", { ...r.modelValue, [a]: h });
|
29
|
+
}, t = (a) => {
|
30
|
+
const h = Object.keys(r.modelValue), V = Object.keys(a), f = x(V, h);
|
31
|
+
if (!_(f))
|
32
|
+
throw new C(`modelValue中不存在[${f.join(",")}]`);
|
33
|
+
o("update:modelValue", { ...r.modelValue, ...a });
|
34
|
+
}, u = U("form");
|
35
|
+
return s({
|
36
|
+
validate: async () => await u.value.validate()
|
37
|
+
}), L(
|
38
|
+
ye,
|
39
|
+
T({
|
40
|
+
modelValue: W(() => r.modelValue),
|
41
|
+
updateModelValue: l,
|
42
42
|
updateModelValueMulti: t,
|
43
|
-
rules:
|
44
|
-
itemSpan:
|
45
|
-
disabled:
|
43
|
+
rules: W(() => r.rules),
|
44
|
+
itemSpan: W(() => r.itemSpan),
|
45
|
+
disabled: W(() => r.disabled)
|
46
46
|
})
|
47
|
-
), (
|
47
|
+
), (a, h) => (m(), p(e(ue), {
|
48
48
|
ref: "form",
|
49
|
-
model:
|
50
|
-
rules:
|
51
|
-
"label-width":
|
52
|
-
disabled:
|
49
|
+
model: a.modelValue,
|
50
|
+
rules: a.rules,
|
51
|
+
"label-width": a.itemLabelWidth,
|
52
|
+
disabled: a.disabled
|
53
53
|
}, {
|
54
54
|
default: n(() => [
|
55
|
-
|
55
|
+
b(e(ie), { gutter: 16 }, {
|
56
56
|
default: n(() => [
|
57
|
-
|
57
|
+
R(a.$slots, "default")
|
58
58
|
]),
|
59
59
|
_: 3
|
60
60
|
})
|
@@ -62,7 +62,7 @@ const Ve = /* @__PURE__ */ c({
|
|
62
62
|
_: 3
|
63
63
|
}, 8, ["model", "rules", "label-width", "disabled"]));
|
64
64
|
}
|
65
|
-
}),
|
65
|
+
}), qe = /* @__PURE__ */ c({
|
66
66
|
name: "OFormString",
|
67
67
|
inheritAttrs: !1,
|
68
68
|
__name: "StringInput",
|
@@ -79,24 +79,24 @@ const Ve = /* @__PURE__ */ c({
|
|
79
79
|
readonly: { type: Boolean }
|
80
80
|
},
|
81
81
|
setup(r) {
|
82
|
-
const
|
83
|
-
return (
|
82
|
+
const s = v(), i = g(), o = z();
|
83
|
+
return (l, t) => (m(), p(e(y), { span: e(s) }, {
|
84
84
|
default: n(() => [
|
85
|
-
|
86
|
-
prop:
|
87
|
-
label:
|
88
|
-
"label-width":
|
89
|
-
required:
|
85
|
+
b(e(w), {
|
86
|
+
prop: l.name,
|
87
|
+
label: l.label,
|
88
|
+
"label-width": l.labelWidth,
|
89
|
+
required: l.required,
|
90
90
|
rules: e(i)
|
91
91
|
}, {
|
92
92
|
default: n(() => [
|
93
|
-
|
93
|
+
b(e(F), {
|
94
94
|
modelValue: e(o),
|
95
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
96
|
-
maxlength:
|
97
|
-
placeholder:
|
98
|
-
disabled:
|
99
|
-
readonly:
|
95
|
+
"onUpdate:modelValue": t[0] || (t[0] = (u) => S(o) ? o.value = u : null),
|
96
|
+
maxlength: l.maxlength,
|
97
|
+
placeholder: l.placeholder,
|
98
|
+
disabled: l.disabled,
|
99
|
+
readonly: l.readonly
|
100
100
|
}, null, 8, ["modelValue", "maxlength", "placeholder", "disabled", "readonly"])
|
101
101
|
]),
|
102
102
|
_: 1
|
@@ -105,7 +105,7 @@ const Ve = /* @__PURE__ */ c({
|
|
105
105
|
_: 1
|
106
106
|
}, 8, ["span"]));
|
107
107
|
}
|
108
|
-
}),
|
108
|
+
}), Me = /* @__PURE__ */ c({
|
109
109
|
name: "OFormPassword",
|
110
110
|
inheritAttrs: !1,
|
111
111
|
__name: "PasswordInput",
|
@@ -122,24 +122,24 @@ const Ve = /* @__PURE__ */ c({
|
|
122
122
|
readonly: { type: Boolean }
|
123
123
|
},
|
124
124
|
setup(r) {
|
125
|
-
const
|
126
|
-
return (
|
125
|
+
const s = v(), i = g(), o = z();
|
126
|
+
return (l, t) => (m(), p(e(y), { span: e(s) }, {
|
127
127
|
default: n(() => [
|
128
|
-
|
129
|
-
prop:
|
130
|
-
label:
|
131
|
-
"label-width":
|
132
|
-
required:
|
128
|
+
b(e(w), {
|
129
|
+
prop: l.name,
|
130
|
+
label: l.label,
|
131
|
+
"label-width": l.labelWidth,
|
132
|
+
required: l.required,
|
133
133
|
rules: e(i)
|
134
134
|
}, {
|
135
135
|
default: n(() => [
|
136
|
-
|
136
|
+
b(e(F), {
|
137
137
|
modelValue: e(o),
|
138
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
139
|
-
maxlength:
|
140
|
-
placeholder:
|
141
|
-
disabled:
|
142
|
-
readonly:
|
138
|
+
"onUpdate:modelValue": t[0] || (t[0] = (u) => S(o) ? o.value = u : null),
|
139
|
+
maxlength: l.maxlength,
|
140
|
+
placeholder: l.placeholder,
|
141
|
+
disabled: l.disabled,
|
142
|
+
readonly: l.readonly,
|
143
143
|
type: "password"
|
144
144
|
}, null, 8, ["modelValue", "maxlength", "placeholder", "disabled", "readonly"])
|
145
145
|
]),
|
@@ -149,7 +149,7 @@ const Ve = /* @__PURE__ */ c({
|
|
149
149
|
_: 1
|
150
150
|
}, 8, ["span"]));
|
151
151
|
}
|
152
|
-
}),
|
152
|
+
}), Be = /* @__PURE__ */ c({
|
153
153
|
name: "OFormTextarea",
|
154
154
|
inheritAttrs: !1,
|
155
155
|
__name: "Textarea",
|
@@ -167,26 +167,26 @@ const Ve = /* @__PURE__ */ c({
|
|
167
167
|
rows: {}
|
168
168
|
},
|
169
169
|
setup(r) {
|
170
|
-
const
|
171
|
-
return (
|
170
|
+
const s = v(), i = g(), o = z();
|
171
|
+
return (l, t) => (m(), p(e(y), { span: e(s) }, {
|
172
172
|
default: n(() => [
|
173
|
-
|
174
|
-
prop:
|
175
|
-
label:
|
176
|
-
"label-width":
|
177
|
-
required:
|
173
|
+
b(e(w), {
|
174
|
+
prop: l.name,
|
175
|
+
label: l.label,
|
176
|
+
"label-width": l.labelWidth,
|
177
|
+
required: l.required,
|
178
178
|
rules: e(i)
|
179
179
|
}, {
|
180
180
|
default: n(() => [
|
181
|
-
|
181
|
+
b(e(F), {
|
182
182
|
modelValue: e(o),
|
183
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
184
|
-
maxlength:
|
185
|
-
placeholder:
|
186
|
-
disabled:
|
187
|
-
readonly:
|
183
|
+
"onUpdate:modelValue": t[0] || (t[0] = (u) => S(o) ? o.value = u : null),
|
184
|
+
maxlength: l.maxlength,
|
185
|
+
placeholder: l.placeholder,
|
186
|
+
disabled: l.disabled,
|
187
|
+
readonly: l.readonly,
|
188
188
|
type: "textarea",
|
189
|
-
rows:
|
189
|
+
rows: l.rows,
|
190
190
|
resize: "none"
|
191
191
|
}, null, 8, ["modelValue", "maxlength", "placeholder", "disabled", "readonly", "rows"])
|
192
192
|
]),
|
@@ -196,7 +196,7 @@ const Ve = /* @__PURE__ */ c({
|
|
196
196
|
_: 1
|
197
197
|
}, 8, ["span"]));
|
198
198
|
}
|
199
|
-
}),
|
199
|
+
}), Fe = /* @__PURE__ */ c({
|
200
200
|
name: "OFormSingleselect",
|
201
201
|
inheritAttrs: !1,
|
202
202
|
__name: "SingleSelect",
|
@@ -214,36 +214,36 @@ const Ve = /* @__PURE__ */ c({
|
|
214
214
|
filterable: { type: Boolean }
|
215
215
|
},
|
216
216
|
setup(r) {
|
217
|
-
const
|
218
|
-
return (
|
217
|
+
const s = v(), i = g(), o = K(), l = E(), t = z(), u = B(() => ve(l.value, t.value));
|
218
|
+
return (d, a) => (m(), p(e(y), { span: e(s) }, {
|
219
219
|
default: n(() => [
|
220
|
-
|
221
|
-
prop:
|
222
|
-
label:
|
223
|
-
"label-width":
|
224
|
-
required:
|
220
|
+
b(e(w), {
|
221
|
+
prop: d.name,
|
222
|
+
label: d.label,
|
223
|
+
"label-width": d.labelWidth,
|
224
|
+
required: d.required,
|
225
225
|
rules: e(i)
|
226
226
|
}, {
|
227
227
|
default: n(() => [
|
228
|
-
e(o) ? (
|
228
|
+
e(o) ? (m(), p(e(F), {
|
229
229
|
key: 0,
|
230
|
-
"model-value":
|
231
|
-
placeholder:
|
230
|
+
"model-value": u.value,
|
231
|
+
placeholder: d.placeholder,
|
232
232
|
disabled: !0,
|
233
233
|
readonly: !0
|
234
|
-
}, null, 8, ["model-value", "placeholder"])) : (
|
234
|
+
}, null, 8, ["model-value", "placeholder"])) : (m(), p(e(j), {
|
235
235
|
key: 1,
|
236
236
|
modelValue: e(t),
|
237
|
-
"onUpdate:modelValue":
|
238
|
-
placeholder:
|
239
|
-
clearable:
|
240
|
-
filterable:
|
237
|
+
"onUpdate:modelValue": a[0] || (a[0] = (h) => S(t) ? t.value = h : null),
|
238
|
+
placeholder: d.placeholder,
|
239
|
+
clearable: d.clearable,
|
240
|
+
filterable: d.filterable
|
241
241
|
}, {
|
242
242
|
default: n(() => [
|
243
|
-
(
|
244
|
-
key:
|
245
|
-
label:
|
246
|
-
value:
|
243
|
+
(m(!0), $(A, null, D(e(l), (h) => (m(), p(e(P), {
|
244
|
+
key: h.value,
|
245
|
+
label: h.content,
|
246
|
+
value: h.value
|
247
247
|
}, null, 8, ["label", "value"]))), 128))
|
248
248
|
]),
|
249
249
|
_: 1
|
@@ -255,7 +255,7 @@ const Ve = /* @__PURE__ */ c({
|
|
255
255
|
_: 1
|
256
256
|
}, 8, ["span"]));
|
257
257
|
}
|
258
|
-
}),
|
258
|
+
}), ze = /* @__PURE__ */ c({
|
259
259
|
name: "OFormMultiselect",
|
260
260
|
inheritAttrs: !1,
|
261
261
|
__name: "MultiSelect",
|
@@ -271,35 +271,35 @@ const Ve = /* @__PURE__ */ c({
|
|
271
271
|
code: {}
|
272
272
|
},
|
273
273
|
setup(r) {
|
274
|
-
const
|
275
|
-
return (
|
274
|
+
const s = v(), i = g(), o = K(), l = E(), t = N(), u = Y(), d = B(() => we(l.value, u.modelValue[r.name]));
|
275
|
+
return (a, h) => (m(), p(e(y), { span: e(s) }, {
|
276
276
|
default: n(() => [
|
277
|
-
|
278
|
-
prop:
|
279
|
-
label:
|
280
|
-
"label-width":
|
281
|
-
required:
|
277
|
+
b(e(w), {
|
278
|
+
prop: a.name,
|
279
|
+
label: a.label,
|
280
|
+
"label-width": a.labelWidth,
|
281
|
+
required: a.required,
|
282
282
|
rules: e(i)
|
283
283
|
}, {
|
284
284
|
default: n(() => [
|
285
|
-
e(o) ? (
|
285
|
+
e(o) ? (m(), p(e(F), {
|
286
286
|
key: 0,
|
287
|
-
"model-value":
|
288
|
-
placeholder:
|
287
|
+
"model-value": d.value,
|
288
|
+
placeholder: a.placeholder,
|
289
289
|
disabled: !0,
|
290
290
|
readonly: !0
|
291
|
-
}, null, 8, ["model-value", "placeholder"])) : (
|
291
|
+
}, null, 8, ["model-value", "placeholder"])) : (m(), p(e(j), {
|
292
292
|
key: 1,
|
293
293
|
modelValue: e(t),
|
294
|
-
"onUpdate:modelValue":
|
295
|
-
placeholder:
|
294
|
+
"onUpdate:modelValue": h[0] || (h[0] = (V) => S(t) ? t.value = V : null),
|
295
|
+
placeholder: a.placeholder,
|
296
296
|
multiple: ""
|
297
297
|
}, {
|
298
298
|
default: n(() => [
|
299
|
-
(
|
300
|
-
key:
|
301
|
-
label:
|
302
|
-
value:
|
299
|
+
(m(!0), $(A, null, D(e(l), (V) => (m(), p(e(P), {
|
300
|
+
key: V.value,
|
301
|
+
label: V.content,
|
302
|
+
value: V.value
|
303
303
|
}, null, 8, ["label", "value"]))), 128))
|
304
304
|
]),
|
305
305
|
_: 1
|
@@ -311,7 +311,7 @@ const Ve = /* @__PURE__ */ c({
|
|
311
311
|
_: 1
|
312
312
|
}, 8, ["span"]));
|
313
313
|
}
|
314
|
-
}),
|
314
|
+
}), ke = /* @__PURE__ */ c({
|
315
315
|
name: "OFormRadiogroup",
|
316
316
|
inheritAttrs: !1,
|
317
317
|
__name: "RadioGroup",
|
@@ -326,10 +326,10 @@ const Ve = /* @__PURE__ */ c({
|
|
326
326
|
code: {}
|
327
327
|
},
|
328
328
|
setup(r) {
|
329
|
-
const
|
330
|
-
return (t,
|
329
|
+
const s = v(), i = g(), o = E(), l = z();
|
330
|
+
return (t, u) => (m(), p(e(y), { span: e(s) }, {
|
331
331
|
default: n(() => [
|
332
|
-
|
332
|
+
b(e(w), {
|
333
333
|
prop: t.name,
|
334
334
|
label: t.label,
|
335
335
|
"label-width": t.labelWidth,
|
@@ -337,18 +337,18 @@ const Ve = /* @__PURE__ */ c({
|
|
337
337
|
rules: e(i)
|
338
338
|
}, {
|
339
339
|
default: n(() => [
|
340
|
-
|
341
|
-
modelValue: e(
|
342
|
-
"onUpdate:modelValue":
|
340
|
+
b(e(se), {
|
341
|
+
modelValue: e(l),
|
342
|
+
"onUpdate:modelValue": u[0] || (u[0] = (d) => S(l) ? l.value = d : null),
|
343
343
|
disabled: t.disabled
|
344
344
|
}, {
|
345
345
|
default: n(() => [
|
346
|
-
(
|
347
|
-
key:
|
348
|
-
value:
|
346
|
+
(m(!0), $(A, null, D(e(o), (d) => (m(), p(e(me), {
|
347
|
+
key: d.value,
|
348
|
+
value: d.value
|
349
349
|
}, {
|
350
350
|
default: n(() => [
|
351
|
-
|
351
|
+
le(ae(d.content), 1)
|
352
352
|
]),
|
353
353
|
_: 2
|
354
354
|
}, 1032, ["value"]))), 128))
|
@@ -362,7 +362,7 @@ const Ve = /* @__PURE__ */ c({
|
|
362
362
|
_: 1
|
363
363
|
}, 8, ["span"]));
|
364
364
|
}
|
365
|
-
}),
|
365
|
+
}), Oe = /* @__PURE__ */ c({
|
366
366
|
name: "OFormCheckboxgroup",
|
367
367
|
inheritAttrs: !1,
|
368
368
|
__name: "CheckboxGroup",
|
@@ -377,10 +377,10 @@ const Ve = /* @__PURE__ */ c({
|
|
377
377
|
code: {}
|
378
378
|
},
|
379
379
|
setup(r) {
|
380
|
-
const
|
381
|
-
return (t,
|
380
|
+
const s = v(), i = g(), o = E(), l = N();
|
381
|
+
return (t, u) => (m(), p(e(y), { span: e(s) }, {
|
382
382
|
default: n(() => [
|
383
|
-
|
383
|
+
b(e(w), {
|
384
384
|
prop: t.name,
|
385
385
|
label: t.label,
|
386
386
|
"label-width": t.labelWidth,
|
@@ -388,16 +388,16 @@ const Ve = /* @__PURE__ */ c({
|
|
388
388
|
rules: e(i)
|
389
389
|
}, {
|
390
390
|
default: n(() => [
|
391
|
-
|
392
|
-
modelValue: e(
|
393
|
-
"onUpdate:modelValue":
|
391
|
+
b(e(pe), {
|
392
|
+
modelValue: e(l),
|
393
|
+
"onUpdate:modelValue": u[0] || (u[0] = (d) => S(l) ? l.value = d : null),
|
394
394
|
disabled: t.disabled
|
395
395
|
}, {
|
396
396
|
default: n(() => [
|
397
|
-
(
|
398
|
-
key:
|
399
|
-
label:
|
400
|
-
value:
|
397
|
+
(m(!0), $(A, null, D(e(o), (d) => (m(), p(e(H), {
|
398
|
+
key: d.value,
|
399
|
+
label: d.content,
|
400
|
+
value: d.value
|
401
401
|
}, null, 8, ["label", "value"]))), 128))
|
402
402
|
]),
|
403
403
|
_: 1
|
@@ -409,7 +409,7 @@ const Ve = /* @__PURE__ */ c({
|
|
409
409
|
_: 1
|
410
410
|
}, 8, ["span"]));
|
411
411
|
}
|
412
|
-
}),
|
412
|
+
}), We = /* @__PURE__ */ c({
|
413
413
|
name: "OFormCheckbox",
|
414
414
|
inheritAttrs: !1,
|
415
415
|
__name: "Checkbox",
|
@@ -422,19 +422,19 @@ const Ve = /* @__PURE__ */ c({
|
|
422
422
|
disabled: { type: Boolean }
|
423
423
|
},
|
424
424
|
setup(r) {
|
425
|
-
const
|
426
|
-
return (o,
|
425
|
+
const s = v(), i = J();
|
426
|
+
return (o, l) => (m(), p(e(y), { span: e(s) }, {
|
427
427
|
default: n(() => [
|
428
|
-
|
428
|
+
b(e(w), {
|
429
429
|
prop: o.name,
|
430
430
|
label: o.label,
|
431
431
|
"label-width": o.labelWidth,
|
432
432
|
rules: o.rules
|
433
433
|
}, {
|
434
434
|
default: n(() => [
|
435
|
-
|
435
|
+
b(e(H), {
|
436
436
|
modelValue: e(i),
|
437
|
-
"onUpdate:modelValue":
|
437
|
+
"onUpdate:modelValue": l[0] || (l[0] = (t) => S(i) ? i.value = t : null),
|
438
438
|
disabled: o.disabled
|
439
439
|
}, null, 8, ["modelValue", "disabled"])
|
440
440
|
]),
|
@@ -444,7 +444,7 @@ const Ve = /* @__PURE__ */ c({
|
|
444
444
|
_: 1
|
445
445
|
}, 8, ["span"]));
|
446
446
|
}
|
447
|
-
}),
|
447
|
+
}), Ce = /* @__PURE__ */ c({
|
448
448
|
name: "OFormSwitch",
|
449
449
|
inheritAttrs: !1,
|
450
450
|
__name: "Switch",
|
@@ -457,19 +457,19 @@ const Ve = /* @__PURE__ */ c({
|
|
457
457
|
disabled: { type: Boolean }
|
458
458
|
},
|
459
459
|
setup(r) {
|
460
|
-
const
|
461
|
-
return (o,
|
460
|
+
const s = v(), i = J();
|
461
|
+
return (o, l) => (m(), p(e(y), { span: e(s) }, {
|
462
462
|
default: n(() => [
|
463
|
-
|
463
|
+
b(e(w), {
|
464
464
|
prop: o.name,
|
465
465
|
label: o.label,
|
466
466
|
"label-width": o.labelWidth,
|
467
467
|
rules: o.rules
|
468
468
|
}, {
|
469
469
|
default: n(() => [
|
470
|
-
|
470
|
+
b(e(be), {
|
471
471
|
modelValue: e(i),
|
472
|
-
"onUpdate:modelValue":
|
472
|
+
"onUpdate:modelValue": l[0] || (l[0] = (t) => S(i) ? i.value = t : null),
|
473
473
|
disabled: o.disabled
|
474
474
|
}, null, 8, ["modelValue", "disabled"])
|
475
475
|
]),
|
@@ -479,7 +479,7 @@ const Ve = /* @__PURE__ */ c({
|
|
479
479
|
_: 1
|
480
480
|
}, 8, ["span"]));
|
481
481
|
}
|
482
|
-
}),
|
482
|
+
}), Re = /* @__PURE__ */ c({
|
483
483
|
name: "OFormDate",
|
484
484
|
inheritAttrs: !1,
|
485
485
|
__name: "DateInput",
|
@@ -500,61 +500,61 @@ const Ve = /* @__PURE__ */ c({
|
|
500
500
|
sourceFormat: {}
|
501
501
|
},
|
502
502
|
setup(r) {
|
503
|
-
const
|
504
|
-
let
|
505
|
-
return (r.format.indexOf("y") > -1 || r.format.indexOf("Y") > -1) && (
|
506
|
-
}),
|
503
|
+
const s = v(), i = g(), o = B(() => r.format.startsWith("H") || r.format.startsWith("h") || r.format.startsWith("m") || r.format.startsWith("s")), l = B(() => r.sourceFormat ? r.sourceFormat : o.value ? "HH:mm:ss" : "YYYY-MM-DD"), t = B(() => {
|
504
|
+
let a = "date";
|
505
|
+
return (r.format.indexOf("y") > -1 || r.format.indexOf("Y") > -1) && (a = "year"), r.format.indexOf("M") > -1 && (a = "month"), (r.format.indexOf("d") > -1 || r.format.indexOf("D") > -1) && (a = "date"), (r.format.indexOf("H") > -1 || r.format.indexOf("h") > -1 || r.format.indexOf("k") > -1 || r.format.indexOf("m") > -1 || r.format.indexOf("s") > -1 || r.format.indexOf("S") > -1) && (a = "datetime"), a;
|
506
|
+
}), u = Y(), d = B({
|
507
507
|
get: () => {
|
508
|
-
const
|
509
|
-
if (
|
510
|
-
if (
|
511
|
-
return
|
512
|
-
if (
|
513
|
-
const
|
514
|
-
if (!
|
515
|
-
throw new
|
516
|
-
return
|
508
|
+
const a = u.modelValue[r.name];
|
509
|
+
if (a) {
|
510
|
+
if (ee(a))
|
511
|
+
return a;
|
512
|
+
if (I(a)) {
|
513
|
+
const h = G(a, l.value, !0);
|
514
|
+
if (!h.isValid())
|
515
|
+
throw new C(`日期输入框的值无效,不符合${l.value}格式`);
|
516
|
+
return h.toDate();
|
517
517
|
} else
|
518
|
-
throw new
|
518
|
+
throw new C("日期输入框的值只能为字符串或日期类型");
|
519
519
|
}
|
520
520
|
},
|
521
|
-
set: (
|
522
|
-
r.sourceFormat ?
|
521
|
+
set: (a) => {
|
522
|
+
r.sourceFormat ? a ? u.updateModelValue(r.name, G(a).format(l.value)) : u.updateModelValue(r.name, "") : a ? u.updateModelValue(r.name, a) : u.updateModelValue(r.name, void 0);
|
523
523
|
}
|
524
524
|
});
|
525
|
-
return (
|
525
|
+
return (a, h) => (m(), p(e(y), { span: e(s) }, {
|
526
526
|
default: n(() => [
|
527
|
-
|
528
|
-
prop:
|
529
|
-
label:
|
530
|
-
"label-width":
|
531
|
-
required:
|
527
|
+
b(e(w), {
|
528
|
+
prop: a.name,
|
529
|
+
label: a.label,
|
530
|
+
"label-width": a.labelWidth,
|
531
|
+
required: a.required,
|
532
532
|
rules: e(i)
|
533
533
|
}, {
|
534
534
|
default: n(() => [
|
535
|
-
o.value ? (
|
535
|
+
o.value ? (m(), p(e(fe), {
|
536
536
|
key: 0,
|
537
|
-
modelValue:
|
538
|
-
"onUpdate:modelValue":
|
539
|
-
placeholder:
|
540
|
-
disabled:
|
541
|
-
readonly:
|
542
|
-
editable:
|
543
|
-
clearable:
|
544
|
-
format:
|
537
|
+
modelValue: d.value,
|
538
|
+
"onUpdate:modelValue": h[0] || (h[0] = (V) => d.value = V),
|
539
|
+
placeholder: a.placeholder,
|
540
|
+
disabled: a.disabled,
|
541
|
+
readonly: a.readonly,
|
542
|
+
editable: a.editable,
|
543
|
+
clearable: a.clearable,
|
544
|
+
format: l.value,
|
545
545
|
"arrow-control": "",
|
546
546
|
style: { width: "100%" }
|
547
|
-
}, null, 8, ["modelValue", "placeholder", "disabled", "readonly", "editable", "clearable", "format"])) : (
|
547
|
+
}, null, 8, ["modelValue", "placeholder", "disabled", "readonly", "editable", "clearable", "format"])) : (m(), p(e(he), {
|
548
548
|
key: 1,
|
549
|
-
modelValue:
|
550
|
-
"onUpdate:modelValue":
|
551
|
-
placeholder:
|
552
|
-
disabled:
|
553
|
-
readonly:
|
554
|
-
editable:
|
555
|
-
clearable:
|
549
|
+
modelValue: d.value,
|
550
|
+
"onUpdate:modelValue": h[1] || (h[1] = (V) => d.value = V),
|
551
|
+
placeholder: a.placeholder,
|
552
|
+
disabled: a.disabled,
|
553
|
+
readonly: a.readonly,
|
554
|
+
editable: a.editable,
|
555
|
+
clearable: a.clearable,
|
556
556
|
type: t.value,
|
557
|
-
format:
|
557
|
+
format: l.value,
|
558
558
|
style: { width: "100%" }
|
559
559
|
}, null, 8, ["modelValue", "placeholder", "disabled", "readonly", "editable", "clearable", "type", "format"]))
|
560
560
|
]),
|
@@ -564,7 +564,7 @@ const Ve = /* @__PURE__ */ c({
|
|
564
564
|
_: 1
|
565
565
|
}, 8, ["span"]));
|
566
566
|
}
|
567
|
-
}),
|
567
|
+
}), $e = /* @__PURE__ */ c({
|
568
568
|
name: "OFormFile",
|
569
569
|
inheritAttrs: !1,
|
570
570
|
__name: "FileInput",
|
@@ -578,31 +578,31 @@ const Ve = /* @__PURE__ */ c({
|
|
578
578
|
disabled: { type: Boolean }
|
579
579
|
},
|
580
580
|
setup(r) {
|
581
|
-
const
|
582
|
-
|
583
|
-
o.value || (
|
581
|
+
const s = v(), i = g(), o = z();
|
582
|
+
oe(o, () => {
|
583
|
+
o.value || (l.value = "");
|
584
584
|
});
|
585
|
-
const
|
586
|
-
return
|
587
|
-
t.value.input.onchange = (
|
588
|
-
var
|
589
|
-
o.value = (
|
590
|
-
},
|
591
|
-
}), (
|
585
|
+
const l = re(""), t = U("inputRef");
|
586
|
+
return te(() => {
|
587
|
+
t.value.input.onchange = (u) => {
|
588
|
+
var d;
|
589
|
+
o.value = (d = u == null ? void 0 : u.target) == null ? void 0 : d.files[0];
|
590
|
+
}, l.value = "";
|
591
|
+
}), (u, d) => (m(), p(e(y), { span: e(s) }, {
|
592
592
|
default: n(() => [
|
593
|
-
|
594
|
-
prop:
|
595
|
-
label:
|
596
|
-
"label-width":
|
597
|
-
required:
|
593
|
+
b(e(w), {
|
594
|
+
prop: u.name,
|
595
|
+
label: u.label,
|
596
|
+
"label-width": u.labelWidth,
|
597
|
+
required: u.required,
|
598
598
|
rules: e(i)
|
599
599
|
}, {
|
600
600
|
default: n(() => [
|
601
|
-
|
601
|
+
b(e(F), {
|
602
602
|
ref: "inputRef",
|
603
|
-
modelValue:
|
604
|
-
"onUpdate:modelValue":
|
605
|
-
disabled:
|
603
|
+
modelValue: l.value,
|
604
|
+
"onUpdate:modelValue": d[0] || (d[0] = (a) => l.value = a),
|
605
|
+
disabled: u.disabled,
|
606
606
|
type: "file",
|
607
607
|
"validate-event": !1
|
608
608
|
}, null, 8, ["modelValue", "disabled"])
|
@@ -613,7 +613,7 @@ const Ve = /* @__PURE__ */ c({
|
|
613
613
|
_: 1
|
614
614
|
}, 8, ["span"]));
|
615
615
|
}
|
616
|
-
}),
|
616
|
+
}), Ae = /* @__PURE__ */ c({
|
617
617
|
name: "OFormButtongroup",
|
618
618
|
inheritAttrs: !1,
|
619
619
|
__name: "ButtonGroup",
|
@@ -623,20 +623,20 @@ const Ve = /* @__PURE__ */ c({
|
|
623
623
|
align: { default: "right" }
|
624
624
|
},
|
625
625
|
setup(r) {
|
626
|
-
const
|
626
|
+
const s = B(() => ({
|
627
627
|
textAlign: r.align
|
628
628
|
})), i = v();
|
629
|
-
return (o,
|
629
|
+
return (o, l) => (m(), p(e(y), {
|
630
630
|
span: e(i),
|
631
|
-
style:
|
631
|
+
style: ne(s.value)
|
632
632
|
}, {
|
633
633
|
default: n(() => [
|
634
|
-
|
634
|
+
b(e(Ve), {
|
635
635
|
gutter: o.gutter,
|
636
636
|
style: { "margin-bottom": "18px" }
|
637
637
|
}, {
|
638
638
|
default: n(() => [
|
639
|
-
|
639
|
+
R(o.$slots, "default")
|
640
640
|
]),
|
641
641
|
_: 3
|
642
642
|
}, 8, ["gutter"])
|
@@ -644,7 +644,7 @@ const Ve = /* @__PURE__ */ c({
|
|
644
644
|
_: 3
|
645
645
|
}, 8, ["span", "style"]));
|
646
646
|
}
|
647
|
-
}),
|
647
|
+
}), De = /* @__PURE__ */ c({
|
648
648
|
name: "OFormDiy",
|
649
649
|
inheritAttrs: !1,
|
650
650
|
__name: "DiyItem",
|
@@ -657,10 +657,10 @@ const Ve = /* @__PURE__ */ c({
|
|
657
657
|
rules: {}
|
658
658
|
},
|
659
659
|
setup(r) {
|
660
|
-
const
|
661
|
-
return (o,
|
660
|
+
const s = v(), i = g();
|
661
|
+
return (o, l) => (m(), p(e(y), { span: e(s) }, {
|
662
662
|
default: n(() => [
|
663
|
-
|
663
|
+
b(e(w), {
|
664
664
|
prop: o.name,
|
665
665
|
label: o.label,
|
666
666
|
"label-width": o.labelWidth,
|
@@ -668,7 +668,7 @@ const Ve = /* @__PURE__ */ c({
|
|
668
668
|
rules: e(i)
|
669
669
|
}, {
|
670
670
|
default: n(() => [
|
671
|
-
|
671
|
+
R(o.$slots, "default")
|
672
672
|
]),
|
673
673
|
_: 3
|
674
674
|
}, 8, ["prop", "label", "label-width", "required", "rules"])
|
@@ -676,7 +676,7 @@ const Ve = /* @__PURE__ */ c({
|
|
676
676
|
_: 3
|
677
677
|
}, 8, ["span"]));
|
678
678
|
}
|
679
|
-
}),
|
679
|
+
}), Ee = /* @__PURE__ */ c({
|
680
680
|
name: "OFormLov",
|
681
681
|
inheritAttrs: !1,
|
682
682
|
__name: "LovInput",
|
@@ -694,60 +694,68 @@ const Ve = /* @__PURE__ */ c({
|
|
694
694
|
fillMapping: { type: [String, Function] }
|
695
695
|
},
|
696
696
|
setup(r) {
|
697
|
-
const
|
698
|
-
|
699
|
-
|
700
|
-
|
701
|
-
|
702
|
-
|
697
|
+
const s = v(), i = g(), o = z(), l = Y();
|
698
|
+
let t;
|
699
|
+
const u = (f) => {
|
700
|
+
t = f;
|
701
|
+
}, d = (f) => {
|
702
|
+
["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight", "Enter", "Space"].indexOf(f.code) > -1 && (t && t(f.code), f.stopPropagation());
|
703
|
+
}, a = () => {
|
704
|
+
if (I(r.fillMapping)) {
|
705
|
+
const f = {}, q = r.fillMapping.split(",");
|
706
|
+
for (let M = 0; M < q.length; M++) {
|
707
|
+
const k = q[M].split(":")[0].trim();
|
708
|
+
f[k] = void 0;
|
703
709
|
}
|
704
|
-
|
710
|
+
l.updateModelValueMulti(f);
|
705
711
|
}
|
706
|
-
},
|
707
|
-
return
|
708
|
-
|
709
|
-
|
712
|
+
}, h = U("dropdown");
|
713
|
+
return L(
|
714
|
+
ge,
|
715
|
+
T({
|
710
716
|
lovValue: o,
|
711
|
-
backfill: (
|
712
|
-
var
|
713
|
-
if ((
|
714
|
-
const
|
715
|
-
for (let
|
716
|
-
const
|
717
|
-
|
717
|
+
backfill: (f) => {
|
718
|
+
var q;
|
719
|
+
if ((q = h.value) == null || q.handleClose(), I(r.fillMapping)) {
|
720
|
+
const M = {}, k = r.fillMapping.split(",");
|
721
|
+
for (let O = 0; O < k.length; O++) {
|
722
|
+
const Q = k[O].split(":")[0].trim(), X = k[O].split(":")[1].trim(), Z = f[X];
|
723
|
+
M[Q] = Z;
|
718
724
|
}
|
719
|
-
|
725
|
+
l.updateModelValueMulti(M);
|
720
726
|
} else
|
721
|
-
r.fillMapping && r.fillMapping(
|
722
|
-
}
|
727
|
+
r.fillMapping && r.fillMapping(f);
|
728
|
+
},
|
729
|
+
registerKeydownHandler: u
|
723
730
|
})
|
724
|
-
), (
|
731
|
+
), (f, q) => (m(), p(e(y), { span: e(s) }, {
|
725
732
|
default: n(() => [
|
726
|
-
|
727
|
-
prop:
|
728
|
-
label:
|
729
|
-
"label-width":
|
730
|
-
required:
|
733
|
+
b(e(w), {
|
734
|
+
prop: f.name,
|
735
|
+
label: f.label,
|
736
|
+
"label-width": f.labelWidth,
|
737
|
+
required: f.required,
|
731
738
|
rules: e(i)
|
732
739
|
}, {
|
733
740
|
default: n(() => [
|
734
|
-
|
741
|
+
b(e(ce), {
|
735
742
|
ref: "dropdown",
|
736
743
|
trigger: "click",
|
737
744
|
style: { width: "100%" }
|
738
745
|
}, {
|
739
746
|
dropdown: n(() => [
|
740
|
-
|
747
|
+
R(f.$slots, "default")
|
741
748
|
]),
|
742
749
|
default: n(() => [
|
743
|
-
|
750
|
+
b(e(F), {
|
744
751
|
modelValue: e(o),
|
745
|
-
"onUpdate:modelValue":
|
746
|
-
maxlength:
|
747
|
-
placeholder:
|
748
|
-
disabled:
|
749
|
-
readonly:
|
750
|
-
|
752
|
+
"onUpdate:modelValue": q[0] || (q[0] = (M) => S(o) ? o.value = M : null),
|
753
|
+
maxlength: f.maxlength,
|
754
|
+
placeholder: f.placeholder,
|
755
|
+
disabled: f.disabled,
|
756
|
+
readonly: f.readonly,
|
757
|
+
onKeydown: d,
|
758
|
+
onChange: a
|
751
759
|
}, null, 8, ["modelValue", "maxlength", "placeholder", "disabled", "readonly"])
|
752
760
|
]),
|
753
761
|
_: 3
|
@@ -759,26 +767,26 @@ const Ve = /* @__PURE__ */ c({
|
|
759
767
|
_: 3
|
760
768
|
}, 8, ["span"]));
|
761
769
|
}
|
762
|
-
}),
|
763
|
-
StringInput:
|
764
|
-
PasswordInput:
|
765
|
-
Textarea:
|
766
|
-
SingleSelect:
|
767
|
-
MultiSelect:
|
768
|
-
RadioGroup:
|
769
|
-
CheckboxGroup:
|
770
|
-
Checkbox:
|
771
|
-
Switch:
|
772
|
-
DateInput:
|
773
|
-
FileInput:
|
774
|
-
ButtonGroup:
|
775
|
-
DiyItem:
|
776
|
-
LovInput:
|
770
|
+
}), Ne = de(Se, {
|
771
|
+
StringInput: qe,
|
772
|
+
PasswordInput: Me,
|
773
|
+
Textarea: Be,
|
774
|
+
SingleSelect: Fe,
|
775
|
+
MultiSelect: ze,
|
776
|
+
RadioGroup: ke,
|
777
|
+
CheckboxGroup: Oe,
|
778
|
+
Checkbox: We,
|
779
|
+
Switch: Ce,
|
780
|
+
DateInput: Re,
|
781
|
+
FileInput: $e,
|
782
|
+
ButtonGroup: Ae,
|
783
|
+
DiyItem: De,
|
784
|
+
LovInput: Ee
|
777
785
|
});
|
778
786
|
export {
|
779
|
-
|
780
|
-
|
781
|
-
|
782
|
-
|
787
|
+
Ne as default,
|
788
|
+
ye as formContextKey,
|
789
|
+
ge as lovContextKey,
|
790
|
+
Xe as useLov
|
783
791
|
};
|
784
792
|
//# sourceMappingURL=index.js.map
|