sinosoft-common-form 1.3.5 → 1.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/common-form.es.js +65 -59
- package/common-form.umd.js +1 -1
- package/package.json +1 -1
- package/style.css +1 -1
package/common-form.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ref as q, reactive as H, shallowRef as W, h as Q, computed as P, onMounted as Z, watch as G, toRefs as J, resolveComponent as M, openBlock as n, createBlock as c, mergeProps as
|
|
2
|
-
const
|
|
1
|
+
import { ref as q, reactive as H, shallowRef as W, h as Q, computed as P, onMounted as Z, watch as G, toRefs as J, nextTick as X, resolveComponent as M, openBlock as n, createBlock as c, mergeProps as $, withModifiers as ee, withCtx as s, createVNode as b, createElementBlock as r, Fragment as I, renderList as x, withDirectives as le, createElementVNode as V, normalizeStyle as g, toDisplayString as p, createTextVNode as i, createCommentVNode as _, renderSlot as C, withKeys as v, normalizeClass as T, createSlots as oe, vShow as ae, pushScopeId as ne, popScopeId as de } from "vue";
|
|
2
|
+
const se = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHZpZXdCb3g9IjAgMCAxNCAxNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEyLjc1MDIgMS44NzY5NUgxMC4xMjUyVjAuODc2OTUzQzEwLjEyNTIgMC44MDgyMDMgMTAuMDY5IDAuNzUxOTUzIDEwLjAwMDIgMC43NTE5NTNIOS4xMjUyNUM5LjA1NjQ5IDAuNzUxOTUzIDkuMDAwMjUgMC44MDgyMDMgOS4wMDAyNSAwLjg3Njk1M1YxLjg3Njk1SDUuMDAwMjRWMC44NzY5NTNDNS4wMDAyNCAwLjgwODIwMyA0Ljk0Mzk5IDAuNzUxOTUzIDQuODc1MjQgMC43NTE5NTNINC4wMDAyNEMzLjkzMTQ5IDAuNzUxOTUzIDMuODc1MjQgMC44MDgyMDMgMy44NzUyNCAwLjg3Njk1M1YxLjg3Njk1SDEuMjUwMjRDMC45NzM2ODIgMS44NzY5NSAwLjc1MDI0NCAyLjEwMDM5IDAuNzUwMjQ0IDIuMzc2OTVWMTIuNzUyQzAuNzUwMjQ0IDEzLjAyODUgMC45NzM2ODIgMTMuMjUyIDEuMjUwMjQgMTMuMjUySDEyLjc1MDJDMTMuMDI2OCAxMy4yNTIgMTMuMjUwMiAxMy4wMjg1IDEzLjI1MDIgMTIuNzUyVjIuMzc2OTVDMTMuMjUwMiAyLjEwMDM5IDEzLjAyNjggMS44NzY5NSAxMi43NTAyIDEuODc2OTVaTTEyLjEyNTIgMTIuMTI3SDEuODc1MjRWNi4xODk0NUgxMi4xMjUyVjEyLjEyN1pNMS44NzUyNCA1LjEyNjk1VjMuMDAxOTVIMy44NzUyNFYzLjc1MTk1QzMuODc1MjQgMy44MjA3IDMuOTMxNDkgMy44NzY5NSA0LjAwMDI0IDMuODc2OTVINC44NzUyNEM0Ljk0Mzk5IDMuODc2OTUgNS4wMDAyNCAzLjgyMDcgNS4wMDAyNCAzLjc1MTk1VjMuMDAxOTVIOS4wMDAyNVYzLjc1MTk1QzkuMDAwMjUgMy44MjA3IDkuMDU2NDkgMy44NzY5NSA5LjEyNTI1IDMuODc2OTVIMTAuMDAwMkMxMC4wNjkgMy44NzY5NSAxMC4xMjUyIDMuODIwNyAxMC4xMjUyIDMuNzUxOTVWMy4wMDE5NUgxMi4xMjUyVjUuMTI2OTVIMS44NzUyNFoiIGZpbGw9ImJsYWNrIiBmaWxsLW9wYWNpdHk9IjAuODUiLz4KPC9zdmc+Cg==", re = {
|
|
3
3
|
props: {
|
|
4
4
|
fieldList: {
|
|
5
5
|
type: Array,
|
|
@@ -11,20 +11,22 @@ const de = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHZpZX
|
|
|
11
11
|
setup(t, { emit: h }) {
|
|
12
12
|
const k = q(!0), o = H({
|
|
13
13
|
model: {}
|
|
14
|
-
}), N = q(null),
|
|
14
|
+
}), N = q(null), m = W({
|
|
15
15
|
render() {
|
|
16
16
|
return Q("img", {
|
|
17
|
-
src:
|
|
17
|
+
src: se
|
|
18
18
|
});
|
|
19
19
|
}
|
|
20
20
|
}), y = P(() => Object.assign([], t.options)), D = () => {
|
|
21
21
|
o.model = t.model;
|
|
22
22
|
}, w = (a, d, u) => {
|
|
23
|
-
N.value && (d ? (k.value = !1,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
N.value && (d ? (k.value = !1, X(() => {
|
|
24
|
+
N.value.validate((f) => {
|
|
25
|
+
if (f)
|
|
26
|
+
h(u || "submit", o.model, a);
|
|
27
|
+
else
|
|
28
|
+
return !1;
|
|
29
|
+
});
|
|
28
30
|
})) : u === "reset" ? N.value.resetFields() : h(u || "submit", o.model, a));
|
|
29
31
|
}, U = (a, d) => {
|
|
30
32
|
h("selectChange", a, d);
|
|
@@ -39,7 +41,7 @@ const de = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHZpZX
|
|
|
39
41
|
w(a, d, u);
|
|
40
42
|
}, A = (a, d) => {
|
|
41
43
|
a && (d == null ? void 0 : d.key) === "Enter" && w(void 0, !0, "submit");
|
|
42
|
-
},
|
|
44
|
+
}, S = (a, d) => {
|
|
43
45
|
h("dateChange", a, d);
|
|
44
46
|
}, E = (a, d) => {
|
|
45
47
|
console.log(N.value), h("inputBlur", a, d);
|
|
@@ -56,9 +58,12 @@ const de = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHZpZX
|
|
|
56
58
|
};
|
|
57
59
|
return Z(() => {
|
|
58
60
|
D(), N.value.resetFields();
|
|
59
|
-
}), G(
|
|
60
|
-
|
|
61
|
-
|
|
61
|
+
}), G(
|
|
62
|
+
() => t.fieldList,
|
|
63
|
+
(a, d) => {
|
|
64
|
+
a !== d && D();
|
|
65
|
+
}
|
|
66
|
+
), {
|
|
62
67
|
...J(o),
|
|
63
68
|
formRef: N,
|
|
64
69
|
states: o,
|
|
@@ -68,12 +73,12 @@ const de = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHZpZX
|
|
|
68
73
|
radioChange: F,
|
|
69
74
|
checkChange: z,
|
|
70
75
|
handleCheckedChange: O,
|
|
71
|
-
prefixIcon:
|
|
76
|
+
prefixIcon: m,
|
|
72
77
|
handleClick: L,
|
|
73
78
|
handleKeyUp: A,
|
|
74
79
|
resetFieldsTest: j,
|
|
75
80
|
clearValidateTest: l,
|
|
76
|
-
dateChange:
|
|
81
|
+
dateChange: S,
|
|
77
82
|
inputBlur: E,
|
|
78
83
|
inputFocus: B,
|
|
79
84
|
inputChange: K,
|
|
@@ -82,24 +87,21 @@ const de = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHZpZX
|
|
|
82
87
|
};
|
|
83
88
|
}
|
|
84
89
|
};
|
|
85
|
-
const
|
|
90
|
+
const ue = (t, h) => {
|
|
86
91
|
const k = t.__vccOpts || t;
|
|
87
92
|
for (const [o, N] of h)
|
|
88
93
|
k[o] = N;
|
|
89
94
|
return k;
|
|
90
|
-
},
|
|
91
|
-
key: 0,
|
|
92
|
-
class: "custom-required"
|
|
93
|
-
}, ye = {
|
|
95
|
+
}, te = (t) => (ne("data-v-03397e4e"), t = t(), de(), t), ce = { class: "header-title" }, pe = { class: "title-content" }, ye = {
|
|
94
96
|
key: 0,
|
|
95
97
|
class: "custom-required"
|
|
96
|
-
}, be =
|
|
98
|
+
}, be = {
|
|
97
99
|
key: 0,
|
|
98
100
|
class: "custom-required"
|
|
99
|
-
},
|
|
101
|
+
}, ie = ["src"], he = {
|
|
100
102
|
key: 0,
|
|
101
103
|
class: "custom-required"
|
|
102
|
-
}, Me = {
|
|
104
|
+
}, fe = { class: "lable" }, ge = { class: "lable_note" }, Me = {
|
|
103
105
|
key: 0,
|
|
104
106
|
class: "custom-required"
|
|
105
107
|
}, _e = {
|
|
@@ -120,18 +122,21 @@ const re = (t, h) => {
|
|
|
120
122
|
}, Ie = {
|
|
121
123
|
key: 0,
|
|
122
124
|
class: "custom-required"
|
|
123
|
-
}, xe =
|
|
125
|
+
}, xe = {
|
|
126
|
+
key: 0,
|
|
127
|
+
class: "custom-required"
|
|
128
|
+
}, Ve = /* @__PURE__ */ te(() => /* @__PURE__ */ V("div", {
|
|
124
129
|
class: "line",
|
|
125
130
|
style: { "border-top": "1px solid #e8e8e8", width: "100%", height: "0px", margin: "20px 0" }
|
|
126
|
-
}, null, -1)),
|
|
131
|
+
}, null, -1)), we = {
|
|
127
132
|
key: 0,
|
|
128
133
|
class: "custom-required"
|
|
129
134
|
};
|
|
130
|
-
function
|
|
131
|
-
const y = M("el-form-item"), D = M("el-input"), w = M("el-radio"), U = M("el-radio-group"), F = M("el-checkbox"), z = M("el-checkbox-group"), O = M("el-option"), L = M("el-select"), A = M("el-date-picker"),
|
|
132
|
-
return n(), c(K,
|
|
135
|
+
function Ue(t, h, k, o, N, m) {
|
|
136
|
+
const y = M("el-form-item"), D = M("el-input"), w = M("el-radio"), U = M("el-radio-group"), F = M("el-checkbox"), z = M("el-checkbox-group"), O = M("el-option"), L = M("el-select"), A = M("el-date-picker"), S = M("el-col"), E = M("el-row"), B = M("sinosoft-common-button"), K = M("el-form");
|
|
137
|
+
return n(), c(K, $({
|
|
133
138
|
"hide-required-asterisk": "",
|
|
134
|
-
onSubmit: h[0] || (h[0] =
|
|
139
|
+
onSubmit: h[0] || (h[0] = ee(() => {
|
|
135
140
|
}, ["prevent"])),
|
|
136
141
|
model: k.model
|
|
137
142
|
}, o.formOptions, {
|
|
@@ -141,7 +146,7 @@ function we(t, h, k, o, N, Y) {
|
|
|
141
146
|
default: s(() => [
|
|
142
147
|
b(E, { gutter: 20 }, {
|
|
143
148
|
default: s(() => [
|
|
144
|
-
(n(!0), r(I, null, x(k.fieldList, (e, j) =>
|
|
149
|
+
(n(!0), r(I, null, x(k.fieldList, (e, j) => le((n(), c(S, {
|
|
145
150
|
xs: e.xs ? e.xs : 24,
|
|
146
151
|
sm: e.sm ? e.sm : 24,
|
|
147
152
|
md: e.md ? e.md : 8,
|
|
@@ -155,8 +160,8 @@ function we(t, h, k, o, N, Y) {
|
|
|
155
160
|
}, [
|
|
156
161
|
e.type === "title" ? (n(), c(y, { key: 0 }, {
|
|
157
162
|
default: s(() => [
|
|
158
|
-
V("div",
|
|
159
|
-
V("span",
|
|
163
|
+
V("div", ce, [
|
|
164
|
+
V("span", pe, p(e.title), 1)
|
|
160
165
|
])
|
|
161
166
|
]),
|
|
162
167
|
_: 2
|
|
@@ -172,7 +177,7 @@ function we(t, h, k, o, N, Y) {
|
|
|
172
177
|
style: g(e.labelStyle)
|
|
173
178
|
}, [
|
|
174
179
|
i(p(e.label) + " ", 1),
|
|
175
|
-
e.required ? (n(), r("span",
|
|
180
|
+
e.required ? (n(), r("span", ye, "*")) : _("", !0)
|
|
176
181
|
], 4))
|
|
177
182
|
]),
|
|
178
183
|
default: s(() => [
|
|
@@ -282,7 +287,7 @@ function we(t, h, k, o, N, Y) {
|
|
|
282
287
|
style: g(e.labelStyle)
|
|
283
288
|
}, [
|
|
284
289
|
i(p(e.label) + " ", 1),
|
|
285
|
-
e.required ? (n(), r("span",
|
|
290
|
+
e.required ? (n(), r("span", be, "*")) : _("", !0)
|
|
286
291
|
], 4))
|
|
287
292
|
]),
|
|
288
293
|
default: s(() => [
|
|
@@ -307,7 +312,7 @@ function we(t, h, k, o, N, Y) {
|
|
|
307
312
|
src: a.code === "M" ? "http://192.168.5.200:9000/test/sex_img_M.png" : "http://192.168.5.200:9000/test/sex_img_F.png",
|
|
308
313
|
style: { width: "44px", height: "44px", "margin-bottom": "-15px", "margin-left": "4px" },
|
|
309
314
|
alt: ""
|
|
310
|
-
}, null, 8,
|
|
315
|
+
}, null, 8, ie)
|
|
311
316
|
]),
|
|
312
317
|
_: 2
|
|
313
318
|
}, 1032, ["label"]);
|
|
@@ -323,7 +328,7 @@ function we(t, h, k, o, N, Y) {
|
|
|
323
328
|
label: e.label,
|
|
324
329
|
rules: e.isHide || o.noFormRule ? [] : e.rules,
|
|
325
330
|
prop: e.field,
|
|
326
|
-
class:
|
|
331
|
+
class: T([e.labelNode ? "radio_Note" : "rule_err"])
|
|
327
332
|
}, {
|
|
328
333
|
label: s(() => [
|
|
329
334
|
e.slotLabelName ? C(t.$slots, e.slotLabelName, { key: 1 }, void 0, !0) : (n(), r("div", {
|
|
@@ -331,7 +336,7 @@ function we(t, h, k, o, N, Y) {
|
|
|
331
336
|
style: g(e.labelStyle)
|
|
332
337
|
}, [
|
|
333
338
|
i(p(e.label) + " ", 1),
|
|
334
|
-
e.required ? (n(), r("span",
|
|
339
|
+
e.required ? (n(), r("span", he, "*")) : _("", !0)
|
|
335
340
|
], 4))
|
|
336
341
|
]),
|
|
337
342
|
default: s(() => [
|
|
@@ -371,13 +376,13 @@ function we(t, h, k, o, N, Y) {
|
|
|
371
376
|
label: e.label,
|
|
372
377
|
rules: e.isHide || o.noFormRule ? [] : e.rules,
|
|
373
378
|
prop: e.field,
|
|
374
|
-
class:
|
|
379
|
+
class: T([e.labelNode ? "radio_Note" : "rule_err"])
|
|
375
380
|
}, {
|
|
376
381
|
default: s(() => [
|
|
377
382
|
V("div", null, [
|
|
378
|
-
V("span",
|
|
379
|
-
V("span",
|
|
380
|
-
e.required ? (n(), r("span",
|
|
383
|
+
V("span", fe, p(e.labelBefore), 1),
|
|
384
|
+
V("span", ge, p(e.labelNode), 1),
|
|
385
|
+
e.required ? (n(), r("span", Me, "*")) : _("", !0)
|
|
381
386
|
]),
|
|
382
387
|
b(U, {
|
|
383
388
|
modelValue: o.states.model[e.field],
|
|
@@ -422,7 +427,7 @@ function we(t, h, k, o, N, Y) {
|
|
|
422
427
|
style: g(e.labelStyle)
|
|
423
428
|
}, [
|
|
424
429
|
i(p(e.label) + " ", 1),
|
|
425
|
-
e.required ? (n(), r("span",
|
|
430
|
+
e.required ? (n(), r("span", _e, "*")) : _("", !0)
|
|
426
431
|
], 4))
|
|
427
432
|
]),
|
|
428
433
|
default: s(() => [
|
|
@@ -471,7 +476,7 @@ function we(t, h, k, o, N, Y) {
|
|
|
471
476
|
style: g(e.labelStyle)
|
|
472
477
|
}, [
|
|
473
478
|
i(p(e.label) + " ", 1),
|
|
474
|
-
e.required ? (n(), r("span",
|
|
479
|
+
e.required ? (n(), r("span", Ce, "*")) : _("", !0)
|
|
475
480
|
], 4))
|
|
476
481
|
]),
|
|
477
482
|
default: s(() => [
|
|
@@ -521,7 +526,7 @@ function we(t, h, k, o, N, Y) {
|
|
|
521
526
|
style: g(e.labelStyle)
|
|
522
527
|
}, [
|
|
523
528
|
i(p(e.label) + " ", 1),
|
|
524
|
-
e.required ? (n(), r("span",
|
|
529
|
+
e.required ? (n(), r("span", Ne, "*")) : _("", !0)
|
|
525
530
|
], 4))
|
|
526
531
|
]),
|
|
527
532
|
default: s(() => [
|
|
@@ -566,7 +571,7 @@ function we(t, h, k, o, N, Y) {
|
|
|
566
571
|
style: g(e.labelStyle)
|
|
567
572
|
}, [
|
|
568
573
|
i(p(e.label) + " ", 1),
|
|
569
|
-
e.required ? (n(), r("span",
|
|
574
|
+
e.required ? (n(), r("span", ke, "*")) : _("", !0)
|
|
570
575
|
], 4))
|
|
571
576
|
]),
|
|
572
577
|
default: s(() => [
|
|
@@ -597,7 +602,7 @@ function we(t, h, k, o, N, Y) {
|
|
|
597
602
|
style: g(e.labelStyle)
|
|
598
603
|
}, [
|
|
599
604
|
i(p(e.label) + " ", 1),
|
|
600
|
-
e.required ? (n(), r("span",
|
|
605
|
+
e.required ? (n(), r("span", De, "*")) : _("", !0)
|
|
601
606
|
], 4))
|
|
602
607
|
]),
|
|
603
608
|
default: s(() => [
|
|
@@ -630,7 +635,7 @@ function we(t, h, k, o, N, Y) {
|
|
|
630
635
|
style: g(e.labelStyle)
|
|
631
636
|
}, [
|
|
632
637
|
i(p(e.label) + " ", 1),
|
|
633
|
-
e.required ? (n(), r("span",
|
|
638
|
+
e.required ? (n(), r("span", Ie, "*")) : _("", !0)
|
|
634
639
|
], 4))
|
|
635
640
|
]),
|
|
636
641
|
default: s(() => [
|
|
@@ -650,7 +655,7 @@ function we(t, h, k, o, N, Y) {
|
|
|
650
655
|
style: g(e.labelStyle)
|
|
651
656
|
}, [
|
|
652
657
|
i(p(e.label) + " ", 1),
|
|
653
|
-
e.required ? (n(), r("span",
|
|
658
|
+
e.required ? (n(), r("span", xe, "*")) : _("", !0)
|
|
654
659
|
], 4))
|
|
655
660
|
]),
|
|
656
661
|
default: s(() => [
|
|
@@ -699,14 +704,14 @@ function we(t, h, k, o, N, Y) {
|
|
|
699
704
|
label: e.label
|
|
700
705
|
}, {
|
|
701
706
|
default: s(() => [
|
|
702
|
-
|
|
707
|
+
Ve
|
|
703
708
|
]),
|
|
704
709
|
_: 2
|
|
705
710
|
}, 1032, ["label"])) : (n(), c(y, {
|
|
706
711
|
key: 13,
|
|
707
712
|
rules: e.isHide || o.noFormRule ? [] : e.rules,
|
|
708
713
|
prop: e.field,
|
|
709
|
-
class:
|
|
714
|
+
class: T(e.prepend ? "input-item" : "")
|
|
710
715
|
}, {
|
|
711
716
|
label: s(() => [
|
|
712
717
|
e.slotLabelName ? C(t.$slots, e.slotLabelName, { key: 1 }, void 0, !0) : (n(), r("div", {
|
|
@@ -714,7 +719,7 @@ function we(t, h, k, o, N, Y) {
|
|
|
714
719
|
style: g(e.labelStyle)
|
|
715
720
|
}, [
|
|
716
721
|
i(p(e.label) + " ", 1),
|
|
717
|
-
e.required ? (n(), r("span",
|
|
722
|
+
e.required ? (n(), r("span", we, "*")) : _("", !0)
|
|
718
723
|
], 4))
|
|
719
724
|
]),
|
|
720
725
|
default: s(() => [
|
|
@@ -734,7 +739,7 @@ function we(t, h, k, o, N, Y) {
|
|
|
734
739
|
showPassword: e.showPassword,
|
|
735
740
|
clearable: e.clearable,
|
|
736
741
|
onKeyup: v((l) => o.handleKeyUp(e.enterable), ["enter"])
|
|
737
|
-
},
|
|
742
|
+
}, oe({ _: 2 }, [
|
|
738
743
|
e.prepend ? {
|
|
739
744
|
name: "prepend",
|
|
740
745
|
fn: s(() => [
|
|
@@ -757,7 +762,7 @@ function we(t, h, k, o, N, Y) {
|
|
|
757
762
|
]),
|
|
758
763
|
_: 2
|
|
759
764
|
}, 1032, ["xs", "sm", "md", "lg", "xl"])), [
|
|
760
|
-
[
|
|
765
|
+
[ae, !e.isHide]
|
|
761
766
|
])), 128))
|
|
762
767
|
]),
|
|
763
768
|
_: 3
|
|
@@ -776,6 +781,7 @@ function we(t, h, k, o, N, Y) {
|
|
|
776
781
|
primary: e.primary,
|
|
777
782
|
info: e.info,
|
|
778
783
|
text: e.text,
|
|
784
|
+
debounced: e.debounced ? e.debounced : !1,
|
|
779
785
|
link: e.link,
|
|
780
786
|
loading: e.loading,
|
|
781
787
|
loadingColor: e.loadingColor,
|
|
@@ -792,14 +798,14 @@ function we(t, h, k, o, N, Y) {
|
|
|
792
798
|
fontSize: e.fontSize,
|
|
793
799
|
fontWeight: e.fontWeight,
|
|
794
800
|
style: g(e.style),
|
|
795
|
-
class:
|
|
801
|
+
class: T(e.class),
|
|
796
802
|
onHandleClick: (l) => o.handleClick(l, e.isRule, e.emitName)
|
|
797
803
|
}, {
|
|
798
804
|
default: s(() => [
|
|
799
805
|
i(p(e.name), 1)
|
|
800
806
|
]),
|
|
801
807
|
_: 2
|
|
802
|
-
}, 1032, ["btnCode", "plain", "primary", "info", "text", "link", "loading", "loadingColor", "width", "height", "circle", "color", "bgColor", "borderColor", "borderStyle", "borderWidth", "icon", "size", "fontSize", "fontWeight", "style", "class", "onHandleClick"])) : _("", !0)
|
|
808
|
+
}, 1032, ["btnCode", "plain", "primary", "info", "text", "debounced", "link", "loading", "loadingColor", "width", "height", "circle", "color", "bgColor", "borderColor", "borderStyle", "borderWidth", "icon", "size", "fontSize", "fontWeight", "style", "class", "onHandleClick"])) : _("", !0)
|
|
803
809
|
]))), 128))
|
|
804
810
|
], !0)
|
|
805
811
|
]),
|
|
@@ -809,11 +815,11 @@ function we(t, h, k, o, N, Y) {
|
|
|
809
815
|
_: 3
|
|
810
816
|
}, 16, ["model", "label-position"]);
|
|
811
817
|
}
|
|
812
|
-
const R = /* @__PURE__ */ re
|
|
813
|
-
function
|
|
814
|
-
|
|
818
|
+
const R = /* @__PURE__ */ ue(re, [["render", Ue], ["__scopeId", "data-v-03397e4e"]]);
|
|
819
|
+
function Y(t, h = {}) {
|
|
820
|
+
Y.installed || (Y.installed = !0, t.component("common-el-form", R));
|
|
815
821
|
}
|
|
816
|
-
R.install =
|
|
822
|
+
R.install = Y;
|
|
817
823
|
export {
|
|
818
824
|
R as default
|
|
819
825
|
};
|
package/common-form.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(e,k){typeof exports=="object"&&typeof module<"u"?module.exports=k(require("vue")):typeof define=="function"&&define.amd?define(["vue"],k):(e=typeof globalThis<"u"?globalThis:e||self,e.Form=k(e.Vue))})(this,function(e){"use strict";const k="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHZpZXdCb3g9IjAgMCAxNCAxNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEyLjc1MDIgMS44NzY5NUgxMC4xMjUyVjAuODc2OTUzQzEwLjEyNTIgMC44MDgyMDMgMTAuMDY5IDAuNzUxOTUzIDEwLjAwMDIgMC43NTE5NTNIOS4xMjUyNUM5LjA1NjQ5IDAuNzUxOTUzIDkuMDAwMjUgMC44MDgyMDMgOS4wMDAyNSAwLjg3Njk1M1YxLjg3Njk1SDUuMDAwMjRWMC44NzY5NTNDNS4wMDAyNCAwLjgwODIwMyA0Ljk0Mzk5IDAuNzUxOTUzIDQuODc1MjQgMC43NTE5NTNINC4wMDAyNEMzLjkzMTQ5IDAuNzUxOTUzIDMuODc1MjQgMC44MDgyMDMgMy44NzUyNCAwLjg3Njk1M1YxLjg3Njk1SDEuMjUwMjRDMC45NzM2ODIgMS44NzY5NSAwLjc1MDI0NCAyLjEwMDM5IDAuNzUwMjQ0IDIuMzc2OTVWMTIuNzUyQzAuNzUwMjQ0IDEzLjAyODUgMC45NzM2ODIgMTMuMjUyIDEuMjUwMjQgMTMuMjUySDEyLjc1MDJDMTMuMDI2OCAxMy4yNTIgMTMuMjUwMiAxMy4wMjg1IDEzLjI1MDIgMTIuNzUyVjIuMzc2OTVDMTMuMjUwMiAyLjEwMDM5IDEzLjAyNjggMS44NzY5NSAxMi43NTAyIDEuODc2OTVaTTEyLjEyNTIgMTIuMTI3SDEuODc1MjRWNi4xODk0NUgxMi4xMjUyVjEyLjEyN1pNMS44NzUyNCA1LjEyNjk1VjMuMDAxOTVIMy44NzUyNFYzLjc1MTk1QzMuODc1MjQgMy44MjA3IDMuOTMxNDkgMy44NzY5NSA0LjAwMDI0IDMuODc2OTVINC44NzUyNEM0Ljk0Mzk5IDMuODc2OTUgNS4wMDAyNCAzLjgyMDcgNS4wMDAyNCAzLjc1MTk1VjMuMDAxOTVIOS4wMDAyNVYzLjc1MTk1QzkuMDAwMjUgMy44MjA3IDkuMDU2NDkgMy44NzY5NSA5LjEyNTI1IDMuODc2OTVIMTAuMDAwMkMxMC4wNjkgMy44NzY5NSAxMC4xMjUyIDMuODIwNyAxMC4xMjUyIDMuNzUxOTVWMy4wMDE5NUgxMi4xMjUyVjUuMTI2OTVIMS44NzUyNFoiIGZpbGw9ImJsYWNrIiBmaWxsLW9wYWNpdHk9IjAuODUiLz4KPC9zdmc+Cg==",E={props:{fieldList:{type:Array,required:!0},model:Object,options:Object},setup(t,{emit:c}){const y=e.ref(!0),a=e.reactive({model:{}}),i=e.ref(null),I=e.shallowRef({render(){return e.h("img",{src:k})}}),s=e.computed(()=>Object.assign([],t.options)),h=()=>{a.model=t.model},b=(n,d,r)=>{i.value&&(d?(y.value=!1,i.value.validate(p=>{if(p)c(r||"submit",a.model,n);else return!1})):r==="reset"?i.value.resetFields():c(r||"submit",a.model,n))},f=(n,d)=>{c("selectChange",n,d)},C=(n,d)=>{c("radioChange",n,d)},N=(n,d)=>{c("checkChange",n,d)},x=(n,d)=>{const r=a.model[d].length;r!==1&&(r>1&&a.model[d].shift(),c("checkChange",n,d))},M=(n,d,r)=>{b(n,d,r)},B=(n,d)=>{n&&(d==null?void 0:d.key)==="Enter"&&b(void 0,!0,"submit")},m=(n,d)=>{c("dateChange",n,d)},D=(n,d)=>{console.log(i.value),c("inputBlur",n,d)},w=(n,d)=>{c("inputFocus",n,d)},S=(n,d)=>{c("inputChange",n,d)},l=(n,d)=>{c("inputInput",n,d)},g=n=>{i.value.resetFields(n)},o=n=>{i.value.clearValidate(n)};return e.onMounted(()=>{h(),i.value.resetFields()}),e.watch(()=>t.fieldList,(n,d)=>{n!==d&&h()}),{...e.toRefs(a),formRef:i,states:a,formOptions:s,onSubmit:b,selectChange:f,radioChange:C,checkChange:N,handleCheckedChange:x,prefixIcon:I,handleClick:M,handleKeyUp:B,resetFieldsTest:g,clearValidateTest:o,dateChange:m,inputBlur:D,inputFocus:w,inputChange:S,inputInput:l,noFormRule:y}}},$="",z=(t,c)=>{const y=t.__vccOpts||t;for(const[a,i]of c)y[a]=i;return y},U=t=>(e.pushScopeId("data-v-c3a9efbd"),t=t(),e.popScopeId(),t),j={class:"header-title"},F={class:"title-content"},T={key:0,class:"custom-required"},L={key:0,class:"custom-required"},u=["src"],O={key:0,class:"custom-required"},A={class:"lable"},K={class:"lable_note"},Y={key:0,class:"custom-required"},q={key:0,class:"custom-required"},R={key:0,class:"custom-required"},H={key:0,class:"custom-required"},W={key:0,class:"custom-required"},Q={key:0,class:"custom-required"},P={key:0,class:"custom-required"},Z={key:0,class:"custom-required"},G=U(()=>e.createElementVNode("div",{class:"line",style:{"border-top":"1px solid #e8e8e8",width:"100%",height:"0px",margin:"20px 0"}},null,-1)),J={key:0,class:"custom-required"};function X(t,c,y,a,i,I){const s=e.resolveComponent("el-form-item"),h=e.resolveComponent("el-input"),b=e.resolveComponent("el-radio"),f=e.resolveComponent("el-radio-group"),C=e.resolveComponent("el-checkbox"),N=e.resolveComponent("el-checkbox-group"),x=e.resolveComponent("el-option"),M=e.resolveComponent("el-select"),B=e.resolveComponent("el-date-picker"),m=e.resolveComponent("el-col"),D=e.resolveComponent("el-row"),w=e.resolveComponent("sinosoft-common-button"),S=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(S,e.mergeProps({"hide-required-asterisk":"",onSubmit:c[0]||(c[0]=e.withModifiers(()=>{},["prevent"])),model:y.model},a.formOptions,{"label-position":a.formOptions.labelPosition,ref:"formRef"}),{default:e.withCtx(()=>[e.createVNode(D,{gutter:20},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.fieldList,(l,g)=>e.withDirectives((e.openBlock(),e.createBlock(m,{xs:l.xs?l.xs:24,sm:l.sm?l.sm:24,md:l.md?l.md:8,lg:l.lg?l.lg:8,xl:l.xl?l.xl:8,key:g},{default:e.withCtx(()=>[e.createElementVNode("div",{style:e.normalizeStyle(l.style)},[l.type==="title"?(e.openBlock(),e.createBlock(s,{key:0},{default:e.withCtx(()=>[e.createElementVNode("div",j,[e.createElementVNode("span",F,e.toDisplayString(l.title),1)])]),_:2},1024)):l.type==="name"?(e.openBlock(),e.createBlock(s,{key:1,label:l.label,disabled:l.disabled||a.formOptions.isDisabled,class:"container_name"},{label:e.withCtx(()=>[l.slotLabelName?e.renderSlot(t.$slots,l.slotLabelName,{key:1},void 0,!0):(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(l.labelStyle)},[e.createTextVNode(e.toDisplayString(l.label)+" ",1),l.required?(e.openBlock(),e.createElementBlock("span",T,"*")):e.createCommentVNode("",!0)],4))]),default:e.withCtx(()=>[e.createVNode(s,{rules:l.isHide||a.noFormRule?[]:l.rules.nameEnFamily,prop:l.field.nameEnFamily,class:"item-name"},{default:e.withCtx(()=>[e.createVNode(h,{onBlur:o=>a.inputBlur(o,l.field.nameEnFamily),onFocus:o=>a.inputFocus(o,l.field.nameEnFamily),onChange:o=>a.inputChange(o,l.field.nameEnFamily),onInput:o=>a.inputInput(o,l.field.nameEnFamily),maxlength:l.maxlengthNameEnFamily,modelValue:a.states.model[l.field.nameEnFamily],"onUpdate:modelValue":o=>a.states.model[l.field.nameEnFamily]=o,readonly:l.readonly,type:l.type?l.type:"text",placeholder:l.placeholderNameEnFamily,disabled:l.disabled||a.formOptions.isDisabled,onKeyup:e.withKeys(o=>a.handleKeyUp(l.enterable),["enter"])},null,8,["onBlur","onFocus","onChange","onInput","maxlength","modelValue","onUpdate:modelValue","readonly","type","placeholder","disabled","onKeyup"])]),_:2},1032,["rules","prop"]),e.createVNode(s,{rules:l.isHide||a.noFormRule?[]:l.rules.nameEn,prop:l.field.nameEn,class:"item-name-right"},{default:e.withCtx(()=>[e.createVNode(h,{onBlur:o=>a.inputBlur(o,l.field.nameEn),onFocus:o=>a.inputFocus(o,l.field.nameEn),onChange:o=>a.inputChange(o,l.field.nameEn),onInput:o=>a.inputInput(o,l.field.nameEn),maxlength:l.maxlengthNameEn,modelValue:a.states.model[l.field.nameEn],"onUpdate:modelValue":o=>a.states.model[l.field.nameEn]=o,readonly:l.readonly,type:l.type?l.type:"text",placeholder:l.placeholderNameEn,disabled:l.disabled||a.formOptions.isDisabled,onKeyup:e.withKeys(o=>a.handleKeyUp(l.enterable),["enter"])},null,8,["onBlur","onFocus","onChange","onInput","maxlength","modelValue","onUpdate:modelValue","readonly","type","placeholder","disabled","onKeyup"])]),_:2},1032,["rules","prop"]),e.createVNode(s,{rules:l.isHide||a.noFormRule?[]:l.rules.nameChFamily,prop:l.field.nameChFamily,class:"item-name"},{default:e.withCtx(()=>[e.createVNode(h,{onBlur:o=>a.inputBlur(o,l.field.nameChFamily),onFocus:o=>a.inputFocus(o,l.field.nameChFamily),onChange:o=>a.inputChange(o,l.field.nameChFamily),onInput:o=>a.inputInput(o,l.field.nameChFamily),maxlength:l.maxlengthNameChFamily,modelValue:a.states.model[l.field.nameChFamily],"onUpdate:modelValue":o=>a.states.model[l.field.nameChFamily]=o,readonly:l.readonly,type:l.type?l.type:"text",placeholder:l.placeholderNameChFamily,disabled:l.disabled||a.formOptions.isDisabled,onKeyup:e.withKeys(o=>a.handleKeyUp(l.enterable),["enter"])},null,8,["onBlur","onFocus","onChange","onInput","maxlength","modelValue","onUpdate:modelValue","readonly","type","placeholder","disabled","onKeyup"])]),_:2},1032,["rules","prop"]),e.createVNode(s,{rules:l.isHide||a.noFormRule?[]:l.rules.nameCh,prop:l.field.nameCh,class:"item-name-right"},{default:e.withCtx(()=>[e.createVNode(h,{onBlur:o=>a.inputBlur(o,l.field.nameCh),onFocus:o=>a.inputFocus(o,l.field.nameCh),onChange:o=>a.inputChange(o,l.field.nameCh),onInput:o=>a.inputInput(o,l.field.nameCh),maxlength:l.maxlengthNameCh,modelValue:a.states.model[l.field.nameCh],"onUpdate:modelValue":o=>a.states.model[l.field.nameCh]=o,readonly:l.readonly,type:l.type?l.type:"text",placeholder:l.placeholderNameCh,disabled:l.disabled||a.formOptions.isDisabled,onKeyup:e.withKeys(o=>a.handleKeyUp(l.enterable),["enter"])},null,8,["onBlur","onFocus","onChange","onInput","maxlength","modelValue","onUpdate:modelValue","readonly","type","placeholder","disabled","onKeyup"])]),_:2},1032,["rules","prop"])]),_:2},1032,["label","disabled"])):l.type==="gender"?(e.openBlock(),e.createBlock(s,{key:2,label:l.label,rules:l.isHide||a.noFormRule?[]:l.rules,prop:l.field},{label:e.withCtx(()=>[l.slotLabelName?e.renderSlot(t.$slots,l.slotLabelName,{key:1},void 0,!0):(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(l.labelStyle)},[e.createTextVNode(e.toDisplayString(l.label)+" ",1),l.required?(e.openBlock(),e.createElementBlock("span",L,"*")):e.createCommentVNode("",!0)],4))]),default:e.withCtx(()=>[e.createVNode(f,{modelValue:a.states.model[l.field],"onUpdate:modelValue":o=>a.states.model[l.field]=o,disabled:l.disabled||a.formOptions.isDisabled,onChange:o=>a.radioChange(o,l.field)},{default:e.withCtx(()=>{var o;return[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((o=l.options)==null?void 0:o.data,n=>{var d,r;return e.openBlock(),e.createBlock(b,{label:n[((d=l.options)==null?void 0:d.valueKey)||"code"],size:"large",key:n[((r=l.options)==null?void 0:r.valueKey)||"code"]},{default:e.withCtx(()=>[e.createElementVNode("img",{src:n.code==="M"?"http://192.168.5.200:9000/test/sex_img_M.png":"http://192.168.5.200:9000/test/sex_img_F.png",style:{width:"44px",height:"44px","margin-bottom":"-15px","margin-left":"4px"},alt:""},null,8,u)]),_:2},1032,["label"])}),128))]}),_:2},1032,["modelValue","onUpdate:modelValue","disabled","onChange"])]),_:2},1032,["label","rules","prop"])):l.type==="radio"?(e.openBlock(),e.createBlock(s,{key:3,label:l.label,rules:l.isHide||a.noFormRule?[]:l.rules,prop:l.field,class:e.normalizeClass([l.labelNode?"radio_Note":"rule_err"])},{label:e.withCtx(()=>[l.slotLabelName?e.renderSlot(t.$slots,l.slotLabelName,{key:1},void 0,!0):(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(l.labelStyle)},[e.createTextVNode(e.toDisplayString(l.label)+" ",1),l.required?(e.openBlock(),e.createElementBlock("span",O,"*")):e.createCommentVNode("",!0)],4))]),default:e.withCtx(()=>[e.createVNode(f,{modelValue:a.states.model[l.field],"onUpdate:modelValue":o=>a.states.model[l.field]=o,disabled:l.disabled||a.formOptions.isDisabled,onChange:o=>a.radioChange(o,l.field)},{default:e.withCtx(()=>{var o;return[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((o=l.options)==null?void 0:o.data,n=>{var d,r;return e.openBlock(),e.createBlock(b,{size:"large",label:n[((d=l.options)==null?void 0:d.valueKey)||"code"],key:n[((r=l.options)==null?void 0:r.valueKey)||"code"]},{default:e.withCtx(()=>{var p;return[e.createTextVNode(e.toDisplayString(n[((p=l.options)==null?void 0:p.labelkey)||"name"]),1)]}),_:2},1032,["label"])}),128))]}),_:2},1032,["modelValue","onUpdate:modelValue","disabled","onChange"])]),_:2},1032,["label","rules","prop","class"])):l.type==="radioNote"?(e.openBlock(),e.createBlock(s,{key:4,label:l.label,rules:l.isHide||a.noFormRule?[]:l.rules,prop:l.field,class:e.normalizeClass([l.labelNode?"radio_Note":"rule_err"])},{default:e.withCtx(()=>[e.createElementVNode("div",null,[e.createElementVNode("span",A,e.toDisplayString(l.labelBefore),1),e.createElementVNode("span",K,e.toDisplayString(l.labelNode),1),l.required?(e.openBlock(),e.createElementBlock("span",Y,"*")):e.createCommentVNode("",!0)]),e.createVNode(f,{modelValue:a.states.model[l.field],"onUpdate:modelValue":o=>a.states.model[l.field]=o,disabled:l.disabled||a.formOptions.isDisabled,onChange:o=>a.radioChange(o,l.field)},{default:e.withCtx(()=>{var o;return[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((o=l.options)==null?void 0:o.data,n=>{var d,r;return e.openBlock(),e.createBlock(b,{size:"large",label:n[((d=l.options)==null?void 0:d.valueKey)||"code"],key:n[((r=l.options)==null?void 0:r.valueKey)||"code"]},{default:e.withCtx(()=>{var p;return[e.createTextVNode(e.toDisplayString(n[((p=l.options)==null?void 0:p.labelkey)||"name"]),1)]}),_:2},1032,["label"])}),128))]}),_:2},1032,["modelValue","onUpdate:modelValue","disabled","onChange"])]),_:2},1032,["label","rules","prop","class"])):l.type==="checkbox"?(e.openBlock(),e.createBlock(s,{key:5,label:l.label,rules:l.isHide||a.noFormRule?[]:l.rules,prop:l.field},{label:e.withCtx(()=>[l.slotLabelName?e.renderSlot(t.$slots,l.slotLabelName,{key:1},void 0,!0):(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(l.labelStyle)},[e.createTextVNode(e.toDisplayString(l.label)+" ",1),l.required?(e.openBlock(),e.createElementBlock("span",q,"*")):e.createCommentVNode("",!0)],4))]),default:e.withCtx(()=>[e.createVNode(N,{modelValue:a.states.model[l.field],"onUpdate:modelValue":o=>a.states.model[l.field]=o,onChange:o=>a.checkChange(o,l.field),disabled:l.disabled||a.formOptions.isDisabled,style:e.normalizeStyle(l.ways==="row"?"display: flex; align-items: flex-start;flex-flow: row nowrap; ":"display: flex; align-items: flex-start;flex-flow: column nowrap; ")},{default:e.withCtx(()=>{var o;return[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((o=l.options)==null?void 0:o.data,n=>{var d,r;return e.openBlock(),e.createBlock(C,{key:n[((d=l.options)==null?void 0:d.valueKey)||"code"],label:n[((r=l.options)==null?void 0:r.valueKey)||"code"]},{default:e.withCtx(()=>{var p;return[e.createTextVNode(e.toDisplayString(n[((p=l.options)==null?void 0:p.labelkey)||"name"]),1)]}),_:2},1032,["label"])}),128))]}),_:2},1032,["modelValue","onUpdate:modelValue","onChange","disabled","style"])]),_:2},1032,["label","rules","prop"])):l.type==="checkboxRadio"?(e.openBlock(),e.createBlock(s,{key:6,label:l.label,rules:l.isHide||a.noFormRule?[]:l.rules,prop:l.field},{label:e.withCtx(()=>[l.slotLabelName?e.renderSlot(t.$slots,l.slotLabelName,{key:1},void 0,!0):(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(l.labelStyle)},[e.createTextVNode(e.toDisplayString(l.label)+" ",1),l.required?(e.openBlock(),e.createElementBlock("span",R,"*")):e.createCommentVNode("",!0)],4))]),default:e.withCtx(()=>[e.createVNode(N,{modelValue:a.states.model[l.field],"onUpdate:modelValue":o=>a.states.model[l.field]=o,onChange:o=>a.handleCheckedChange(o,l.field),disabled:l.disabled||a.formOptions.isDisabled,style:e.normalizeStyle(l.ways==="row"?"display: flex; align-items: flex-start;flex-flow: row nowrap; ":"display: flex; align-items: flex-start;flex-flow: column nowrap; ")},{default:e.withCtx(()=>{var o;return[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((o=l.options)==null?void 0:o.data,n=>{var d,r;return e.openBlock(),e.createBlock(C,{key:n[((d=l.options)==null?void 0:d.valueKey)||"code"],label:n[((r=l.options)==null?void 0:r.valueKey)||"code"]},{default:e.withCtx(()=>{var p;return[e.createTextVNode(e.toDisplayString(n[((p=l.options)==null?void 0:p.labelkey)||"name"]),1)]}),_:2},1032,["label"])}),128))]}),_:2},1032,["modelValue","onUpdate:modelValue","onChange","disabled","style"])]),_:2},1032,["label","rules","prop"])):l.type==="select"?(e.openBlock(),e.createBlock(s,{key:7,label:l.label,rules:l.isHide||a.noFormRule?[]:l.rules,disabled:l.disabled||a.formOptions.isDisabled,prop:l.field},{label:e.withCtx(()=>[l.slotLabelName?e.renderSlot(t.$slots,l.slotLabelName,{key:1},void 0,!0):(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(l.labelStyle)},[e.createTextVNode(e.toDisplayString(l.label)+" ",1),l.required?(e.openBlock(),e.createElementBlock("span",H,"*")):e.createCommentVNode("",!0)],4))]),default:e.withCtx(()=>[e.createVNode(M,{onChange:o=>a.selectChange(o,l.field),modelValue:a.states.model[l.field],"onUpdate:modelValue":o=>a.states.model[l.field]=o,disabled:l.disabled||a.formOptions.isDisabled,placeholder:l.placeholder,clearable:l.clearable},{default:e.withCtx(()=>{var o;return[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((o=l.options)==null?void 0:o.data,n=>{var d,r,p;return e.openBlock(),e.createBlock(x,{key:n[((d=l.options)==null?void 0:d.valueKey)||"code"],label:n[((r=l.options)==null?void 0:r.labelkey)||"name"],value:n[((p=l.options)==null?void 0:p.valueKey)||"code"]},null,8,["label","value"])}),128))]}),_:2},1032,["onChange","modelValue","onUpdate:modelValue","disabled","placeholder","clearable"]),e.createElementVNode("div",{class:"item_tips_blow",style:e.normalizeStyle(l.tipsBlowStyle)},e.toDisplayString(l.tipsBlow),5)]),_:2},1032,["label","rules","disabled","prop"])):l.type==="date"?(e.openBlock(),e.createBlock(s,{key:8,label:l.label,rules:l.isHide||a.noFormRule?[]:l.rules,prop:l.field},{label:e.withCtx(()=>[l.slotLabelName?e.renderSlot(t.$slots,l.slotLabelName,{key:1},void 0,!0):(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(l.labelStyle)},[e.createTextVNode(e.toDisplayString(l.label)+" ",1),l.required?(e.openBlock(),e.createElementBlock("span",W,"*")):e.createCommentVNode("",!0)],4))]),default:e.withCtx(()=>[e.createVNode(B,{format:"DD/MM/YYYY","value-format":"DD/MM/YYYY","disabled-date":l.disabledDate,onChange:o=>a.dateChange(o,l.field),"prefix-icon":a.prefixIcon,modelValue:a.states.model[l.field],"onUpdate:modelValue":o=>a.states.model[l.field]=o,disabled:l.disabled||a.formOptions.isDisabled,readonly:l.readonly,type:l.type,placeholder:l.placeholder||l.label},null,8,["disabled-date","onChange","prefix-icon","modelValue","onUpdate:modelValue","disabled","readonly","type","placeholder"])]),_:2},1032,["label","rules","prop"])):l.type==="daterange"?(e.openBlock(),e.createBlock(s,{key:9,label:l.label,rules:l.isHide||a.noFormRule?[]:l.rules,prop:l.field},{label:e.withCtx(()=>[l.slotLabelName?e.renderSlot(t.$slots,l.slotLabelName,{key:1},void 0,!0):(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(l.labelStyle)},[e.createTextVNode(e.toDisplayString(l.label)+" ",1),l.required?(e.openBlock(),e.createElementBlock("span",Q,"*")):e.createCommentVNode("",!0)],4))]),default:e.withCtx(()=>[e.createVNode(B,{format:"DD/MM/YYYY","value-format":"DD/MM/YYYY","disabled-date":l.disabledDate,onChange:o=>a.dateChange(o,l.field),modelValue:a.states.model[l.field],"onUpdate:modelValue":o=>a.states.model[l.field]=o,"prefix-icon":a.prefixIcon,type:"daterange","range-separator":"To","start-placeholder":l.startPlaceholder,"end-placeholder":l.endPlaceholder,size:"large"},null,8,["disabled-date","onChange","modelValue","onUpdate:modelValue","prefix-icon","start-placeholder","end-placeholder"])]),_:2},1032,["label","rules","prop"])):l.type==="slotItem"?(e.openBlock(),e.createBlock(s,{key:10,label:l.label,rules:l.isHide||a.noFormRule?[]:l.rules,prop:l.field,class:"rule_err"},{label:e.withCtx(()=>[l.slotLabelName?e.renderSlot(t.$slots,l.slotLabelName,{key:1},void 0,!0):(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(l.labelStyle)},[e.createTextVNode(e.toDisplayString(l.label)+" ",1),l.required?(e.openBlock(),e.createElementBlock("span",P,"*")):e.createCommentVNode("",!0)],4))]),default:e.withCtx(()=>[e.renderSlot(t.$slots,l.slotItemName,{},void 0,!0)]),_:2},1032,["label","rules","prop"])):l.type==="phone"?(e.openBlock(),e.createBlock(s,{key:11,label:l.label,rules:l.isHide||a.noFormRule?[]:l.rules.phoneNumber,prop:l.field.phoneNumber,class:"phone_item"},{label:e.withCtx(()=>[l.slotLabelName?e.renderSlot(t.$slots,l.slotLabelName,{key:1},void 0,!0):(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(l.labelStyle)},[e.createTextVNode(e.toDisplayString(l.label)+" ",1),l.required?(e.openBlock(),e.createElementBlock("span",Z,"*")):e.createCommentVNode("",!0)],4))]),default:e.withCtx(()=>[e.createVNode(h,{onBlur:o=>a.inputBlur(o,l.field),onFocus:o=>a.inputFocus(o,l.field),onChange:o=>a.inputChange(o,l.field),onInput:o=>a.inputInput(o,l.field),maxlength:l.maxlength,modelValue:a.states.model[l.field.phoneNumber],"onUpdate:modelValue":o=>a.states.model[l.field.phoneNumber]=o,disabled:l.disabled||a.formOptions.isDisabled,placeholder:l.placeholder||"请选择",clearable:l.clearable},{prepend:e.withCtx(()=>{var o;return[e.createVNode(M,{disabled:l.disabled||a.formOptions.isDisabled,modelValue:a.states.model[l.field.areaCode],"onUpdate:modelValue":n=>a.states.model[l.field.areaCode]=n,placeholder:((o=l.options)==null?void 0:o.placeholder)||"请选择",style:{width:"115px"}},{default:e.withCtx(()=>{var n;return[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((n=l.options)==null?void 0:n.data,(d,r)=>(e.openBlock(),e.createBlock(x,{label:d.name,value:d.code,key:r},null,8,["label","value"]))),128))]}),_:2},1032,["disabled","modelValue","onUpdate:modelValue","placeholder"])]}),_:2},1032,["onBlur","onFocus","onChange","onInput","maxlength","modelValue","onUpdate:modelValue","disabled","placeholder","clearable"])]),_:2},1032,["label","rules","prop"])):l.type==="line"?(e.openBlock(),e.createBlock(s,{key:12,label:l.label},{default:e.withCtx(()=>[G]),_:2},1032,["label"])):(e.openBlock(),e.createBlock(s,{key:13,rules:l.isHide||a.noFormRule?[]:l.rules,prop:l.field,class:e.normalizeClass(l.prepend?"input-item":"")},{label:e.withCtx(()=>[l.slotLabelName?e.renderSlot(t.$slots,l.slotLabelName,{key:1},void 0,!0):(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(l.labelStyle)},[e.createTextVNode(e.toDisplayString(l.label)+" ",1),l.required?(e.openBlock(),e.createElementBlock("span",J,"*")):e.createCommentVNode("",!0)],4))]),default:e.withCtx(()=>[e.createVNode(h,{onBlur:o=>a.inputBlur(o,l.field),onFocus:o=>a.inputFocus(o,l.field),onChange:o=>a.inputChange(o,l.field),onInput:o=>a.inputInput(o,l.field),maxlength:l.maxlength,modelValue:a.states.model[l.field],"onUpdate:modelValue":o=>a.states.model[l.field]=o,"show-word-limit":l.showWordLimit,readonly:l.readonly,type:l.type?l.type:"text",placeholder:l.placeholder||l.label,disabled:l.disabled||a.formOptions.isDisabled,showPassword:l.showPassword,clearable:l.clearable,onKeyup:e.withKeys(o=>a.handleKeyUp(l.enterable),["enter"])},e.createSlots({_:2},[l.prepend?{name:"prepend",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.prepend),1)]),key:"0"}:void 0,l.append?{name:"append",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.append),1)]),key:"1"}:void 0]),1032,["onBlur","onFocus","onChange","onInput","maxlength","modelValue","onUpdate:modelValue","show-word-limit","readonly","type","placeholder","disabled","showPassword","clearable","onKeyup"])]),_:2},1032,["rules","prop","class"]))],4)]),_:2},1032,["xs","sm","md","lg","xl"])),[[e.vShow,!l.isHide]])),128))]),_:3}),e.createVNode(s,{class:"btnsItem"},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"buttons",{model:y.model,onBtnClick:a.onSubmit},()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.formOptions.btnConfig,(l,g)=>(e.openBlock(),e.createElementBlock("div",{key:g},[l.isShow?(e.openBlock(),e.createBlock(w,{key:0,btnCode:l.btnCode,plain:l.plain,primary:l.primary,info:l.info,text:l.text,link:l.link,loading:l.loading,loadingColor:l.loadingColor,width:l.width,height:l.height,circle:l.circle,color:l.color,bgColor:l.bgColor,borderColor:l.borderColor,borderStyle:l.borderStyle,borderWidth:l.borderWidth,icon:l.icon,size:l.size,fontSize:l.fontSize,fontWeight:l.fontWeight,style:e.normalizeStyle(l.style),class:e.normalizeClass(l.class),onHandleClick:o=>a.handleClick(o,l.isRule,l.emitName)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.name),1)]),_:2},1032,["btnCode","plain","primary","info","text","link","loading","loadingColor","width","height","circle","color","bgColor","borderColor","borderStyle","borderWidth","icon","size","fontSize","fontWeight","style","class","onHandleClick"])):e.createCommentVNode("",!0)]))),128))],!0)]),_:3})]),_:3},16,["model","label-position"])}const V=z(E,[["render",X],["__scopeId","data-v-c3a9efbd"]]);function _(t,c={}){_.installed||(_.installed=!0,t.component("common-el-form",V))}return V.install=_,V});
|
|
1
|
+
(function(e,k){typeof exports=="object"&&typeof module<"u"?module.exports=k(require("vue")):typeof define=="function"&&define.amd?define(["vue"],k):(e=typeof globalThis<"u"?globalThis:e||self,e.Form=k(e.Vue))})(this,function(e){"use strict";const k="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHZpZXdCb3g9IjAgMCAxNCAxNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEyLjc1MDIgMS44NzY5NUgxMC4xMjUyVjAuODc2OTUzQzEwLjEyNTIgMC44MDgyMDMgMTAuMDY5IDAuNzUxOTUzIDEwLjAwMDIgMC43NTE5NTNIOS4xMjUyNUM5LjA1NjQ5IDAuNzUxOTUzIDkuMDAwMjUgMC44MDgyMDMgOS4wMDAyNSAwLjg3Njk1M1YxLjg3Njk1SDUuMDAwMjRWMC44NzY5NTNDNS4wMDAyNCAwLjgwODIwMyA0Ljk0Mzk5IDAuNzUxOTUzIDQuODc1MjQgMC43NTE5NTNINC4wMDAyNEMzLjkzMTQ5IDAuNzUxOTUzIDMuODc1MjQgMC44MDgyMDMgMy44NzUyNCAwLjg3Njk1M1YxLjg3Njk1SDEuMjUwMjRDMC45NzM2ODIgMS44NzY5NSAwLjc1MDI0NCAyLjEwMDM5IDAuNzUwMjQ0IDIuMzc2OTVWMTIuNzUyQzAuNzUwMjQ0IDEzLjAyODUgMC45NzM2ODIgMTMuMjUyIDEuMjUwMjQgMTMuMjUySDEyLjc1MDJDMTMuMDI2OCAxMy4yNTIgMTMuMjUwMiAxMy4wMjg1IDEzLjI1MDIgMTIuNzUyVjIuMzc2OTVDMTMuMjUwMiAyLjEwMDM5IDEzLjAyNjggMS44NzY5NSAxMi43NTAyIDEuODc2OTVaTTEyLjEyNTIgMTIuMTI3SDEuODc1MjRWNi4xODk0NUgxMi4xMjUyVjEyLjEyN1pNMS44NzUyNCA1LjEyNjk1VjMuMDAxOTVIMy44NzUyNFYzLjc1MTk1QzMuODc1MjQgMy44MjA3IDMuOTMxNDkgMy44NzY5NSA0LjAwMDI0IDMuODc2OTVINC44NzUyNEM0Ljk0Mzk5IDMuODc2OTUgNS4wMDAyNCAzLjgyMDcgNS4wMDAyNCAzLjc1MTk1VjMuMDAxOTVIOS4wMDAyNVYzLjc1MTk1QzkuMDAwMjUgMy44MjA3IDkuMDU2NDkgMy44NzY5NSA5LjEyNTI1IDMuODc2OTVIMTAuMDAwMkMxMC4wNjkgMy44NzY5NSAxMC4xMjUyIDMuODIwNyAxMC4xMjUyIDMuNzUxOTVWMy4wMDE5NUgxMi4xMjUyVjUuMTI2OTVIMS44NzUyNFoiIGZpbGw9ImJsYWNrIiBmaWxsLW9wYWNpdHk9IjAuODUiLz4KPC9zdmc+Cg==",E={props:{fieldList:{type:Array,required:!0},model:Object,options:Object},setup(t,{emit:c}){const y=e.ref(!0),a=e.reactive({model:{}}),i=e.ref(null),I=e.shallowRef({render(){return e.h("img",{src:k})}}),s=e.computed(()=>Object.assign([],t.options)),h=()=>{a.model=t.model},b=(n,d,r)=>{i.value&&(d?(y.value=!1,e.nextTick(()=>{i.value.validate(p=>{if(p)c(r||"submit",a.model,n);else return!1})})):r==="reset"?i.value.resetFields():c(r||"submit",a.model,n))},f=(n,d)=>{c("selectChange",n,d)},C=(n,d)=>{c("radioChange",n,d)},N=(n,d)=>{c("checkChange",n,d)},x=(n,d)=>{const r=a.model[d].length;r!==1&&(r>1&&a.model[d].shift(),c("checkChange",n,d))},M=(n,d,r)=>{b(n,d,r)},B=(n,d)=>{n&&(d==null?void 0:d.key)==="Enter"&&b(void 0,!0,"submit")},D=(n,d)=>{c("dateChange",n,d)},m=(n,d)=>{console.log(i.value),c("inputBlur",n,d)},w=(n,d)=>{c("inputFocus",n,d)},S=(n,d)=>{c("inputChange",n,d)},l=(n,d)=>{c("inputInput",n,d)},g=n=>{i.value.resetFields(n)},o=n=>{i.value.clearValidate(n)};return e.onMounted(()=>{h(),i.value.resetFields()}),e.watch(()=>t.fieldList,(n,d)=>{n!==d&&h()}),{...e.toRefs(a),formRef:i,states:a,formOptions:s,onSubmit:b,selectChange:f,radioChange:C,checkChange:N,handleCheckedChange:x,prefixIcon:I,handleClick:M,handleKeyUp:B,resetFieldsTest:g,clearValidateTest:o,dateChange:D,inputBlur:m,inputFocus:w,inputChange:S,inputInput:l,noFormRule:y}}},$="",z=(t,c)=>{const y=t.__vccOpts||t;for(const[a,i]of c)y[a]=i;return y},U=t=>(e.pushScopeId("data-v-03397e4e"),t=t(),e.popScopeId(),t),j={class:"header-title"},F={class:"title-content"},T={key:0,class:"custom-required"},u={key:0,class:"custom-required"},L=["src"],O={key:0,class:"custom-required"},A={class:"lable"},K={class:"lable_note"},Y={key:0,class:"custom-required"},q={key:0,class:"custom-required"},R={key:0,class:"custom-required"},H={key:0,class:"custom-required"},W={key:0,class:"custom-required"},Q={key:0,class:"custom-required"},P={key:0,class:"custom-required"},Z={key:0,class:"custom-required"},G=U(()=>e.createElementVNode("div",{class:"line",style:{"border-top":"1px solid #e8e8e8",width:"100%",height:"0px",margin:"20px 0"}},null,-1)),J={key:0,class:"custom-required"};function X(t,c,y,a,i,I){const s=e.resolveComponent("el-form-item"),h=e.resolveComponent("el-input"),b=e.resolveComponent("el-radio"),f=e.resolveComponent("el-radio-group"),C=e.resolveComponent("el-checkbox"),N=e.resolveComponent("el-checkbox-group"),x=e.resolveComponent("el-option"),M=e.resolveComponent("el-select"),B=e.resolveComponent("el-date-picker"),D=e.resolveComponent("el-col"),m=e.resolveComponent("el-row"),w=e.resolveComponent("sinosoft-common-button"),S=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(S,e.mergeProps({"hide-required-asterisk":"",onSubmit:c[0]||(c[0]=e.withModifiers(()=>{},["prevent"])),model:y.model},a.formOptions,{"label-position":a.formOptions.labelPosition,ref:"formRef"}),{default:e.withCtx(()=>[e.createVNode(m,{gutter:20},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.fieldList,(l,g)=>e.withDirectives((e.openBlock(),e.createBlock(D,{xs:l.xs?l.xs:24,sm:l.sm?l.sm:24,md:l.md?l.md:8,lg:l.lg?l.lg:8,xl:l.xl?l.xl:8,key:g},{default:e.withCtx(()=>[e.createElementVNode("div",{style:e.normalizeStyle(l.style)},[l.type==="title"?(e.openBlock(),e.createBlock(s,{key:0},{default:e.withCtx(()=>[e.createElementVNode("div",j,[e.createElementVNode("span",F,e.toDisplayString(l.title),1)])]),_:2},1024)):l.type==="name"?(e.openBlock(),e.createBlock(s,{key:1,label:l.label,disabled:l.disabled||a.formOptions.isDisabled,class:"container_name"},{label:e.withCtx(()=>[l.slotLabelName?e.renderSlot(t.$slots,l.slotLabelName,{key:1},void 0,!0):(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(l.labelStyle)},[e.createTextVNode(e.toDisplayString(l.label)+" ",1),l.required?(e.openBlock(),e.createElementBlock("span",T,"*")):e.createCommentVNode("",!0)],4))]),default:e.withCtx(()=>[e.createVNode(s,{rules:l.isHide||a.noFormRule?[]:l.rules.nameEnFamily,prop:l.field.nameEnFamily,class:"item-name"},{default:e.withCtx(()=>[e.createVNode(h,{onBlur:o=>a.inputBlur(o,l.field.nameEnFamily),onFocus:o=>a.inputFocus(o,l.field.nameEnFamily),onChange:o=>a.inputChange(o,l.field.nameEnFamily),onInput:o=>a.inputInput(o,l.field.nameEnFamily),maxlength:l.maxlengthNameEnFamily,modelValue:a.states.model[l.field.nameEnFamily],"onUpdate:modelValue":o=>a.states.model[l.field.nameEnFamily]=o,readonly:l.readonly,type:l.type?l.type:"text",placeholder:l.placeholderNameEnFamily,disabled:l.disabled||a.formOptions.isDisabled,onKeyup:e.withKeys(o=>a.handleKeyUp(l.enterable),["enter"])},null,8,["onBlur","onFocus","onChange","onInput","maxlength","modelValue","onUpdate:modelValue","readonly","type","placeholder","disabled","onKeyup"])]),_:2},1032,["rules","prop"]),e.createVNode(s,{rules:l.isHide||a.noFormRule?[]:l.rules.nameEn,prop:l.field.nameEn,class:"item-name-right"},{default:e.withCtx(()=>[e.createVNode(h,{onBlur:o=>a.inputBlur(o,l.field.nameEn),onFocus:o=>a.inputFocus(o,l.field.nameEn),onChange:o=>a.inputChange(o,l.field.nameEn),onInput:o=>a.inputInput(o,l.field.nameEn),maxlength:l.maxlengthNameEn,modelValue:a.states.model[l.field.nameEn],"onUpdate:modelValue":o=>a.states.model[l.field.nameEn]=o,readonly:l.readonly,type:l.type?l.type:"text",placeholder:l.placeholderNameEn,disabled:l.disabled||a.formOptions.isDisabled,onKeyup:e.withKeys(o=>a.handleKeyUp(l.enterable),["enter"])},null,8,["onBlur","onFocus","onChange","onInput","maxlength","modelValue","onUpdate:modelValue","readonly","type","placeholder","disabled","onKeyup"])]),_:2},1032,["rules","prop"]),e.createVNode(s,{rules:l.isHide||a.noFormRule?[]:l.rules.nameChFamily,prop:l.field.nameChFamily,class:"item-name"},{default:e.withCtx(()=>[e.createVNode(h,{onBlur:o=>a.inputBlur(o,l.field.nameChFamily),onFocus:o=>a.inputFocus(o,l.field.nameChFamily),onChange:o=>a.inputChange(o,l.field.nameChFamily),onInput:o=>a.inputInput(o,l.field.nameChFamily),maxlength:l.maxlengthNameChFamily,modelValue:a.states.model[l.field.nameChFamily],"onUpdate:modelValue":o=>a.states.model[l.field.nameChFamily]=o,readonly:l.readonly,type:l.type?l.type:"text",placeholder:l.placeholderNameChFamily,disabled:l.disabled||a.formOptions.isDisabled,onKeyup:e.withKeys(o=>a.handleKeyUp(l.enterable),["enter"])},null,8,["onBlur","onFocus","onChange","onInput","maxlength","modelValue","onUpdate:modelValue","readonly","type","placeholder","disabled","onKeyup"])]),_:2},1032,["rules","prop"]),e.createVNode(s,{rules:l.isHide||a.noFormRule?[]:l.rules.nameCh,prop:l.field.nameCh,class:"item-name-right"},{default:e.withCtx(()=>[e.createVNode(h,{onBlur:o=>a.inputBlur(o,l.field.nameCh),onFocus:o=>a.inputFocus(o,l.field.nameCh),onChange:o=>a.inputChange(o,l.field.nameCh),onInput:o=>a.inputInput(o,l.field.nameCh),maxlength:l.maxlengthNameCh,modelValue:a.states.model[l.field.nameCh],"onUpdate:modelValue":o=>a.states.model[l.field.nameCh]=o,readonly:l.readonly,type:l.type?l.type:"text",placeholder:l.placeholderNameCh,disabled:l.disabled||a.formOptions.isDisabled,onKeyup:e.withKeys(o=>a.handleKeyUp(l.enterable),["enter"])},null,8,["onBlur","onFocus","onChange","onInput","maxlength","modelValue","onUpdate:modelValue","readonly","type","placeholder","disabled","onKeyup"])]),_:2},1032,["rules","prop"])]),_:2},1032,["label","disabled"])):l.type==="gender"?(e.openBlock(),e.createBlock(s,{key:2,label:l.label,rules:l.isHide||a.noFormRule?[]:l.rules,prop:l.field},{label:e.withCtx(()=>[l.slotLabelName?e.renderSlot(t.$slots,l.slotLabelName,{key:1},void 0,!0):(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(l.labelStyle)},[e.createTextVNode(e.toDisplayString(l.label)+" ",1),l.required?(e.openBlock(),e.createElementBlock("span",u,"*")):e.createCommentVNode("",!0)],4))]),default:e.withCtx(()=>[e.createVNode(f,{modelValue:a.states.model[l.field],"onUpdate:modelValue":o=>a.states.model[l.field]=o,disabled:l.disabled||a.formOptions.isDisabled,onChange:o=>a.radioChange(o,l.field)},{default:e.withCtx(()=>{var o;return[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((o=l.options)==null?void 0:o.data,n=>{var d,r;return e.openBlock(),e.createBlock(b,{label:n[((d=l.options)==null?void 0:d.valueKey)||"code"],size:"large",key:n[((r=l.options)==null?void 0:r.valueKey)||"code"]},{default:e.withCtx(()=>[e.createElementVNode("img",{src:n.code==="M"?"http://192.168.5.200:9000/test/sex_img_M.png":"http://192.168.5.200:9000/test/sex_img_F.png",style:{width:"44px",height:"44px","margin-bottom":"-15px","margin-left":"4px"},alt:""},null,8,L)]),_:2},1032,["label"])}),128))]}),_:2},1032,["modelValue","onUpdate:modelValue","disabled","onChange"])]),_:2},1032,["label","rules","prop"])):l.type==="radio"?(e.openBlock(),e.createBlock(s,{key:3,label:l.label,rules:l.isHide||a.noFormRule?[]:l.rules,prop:l.field,class:e.normalizeClass([l.labelNode?"radio_Note":"rule_err"])},{label:e.withCtx(()=>[l.slotLabelName?e.renderSlot(t.$slots,l.slotLabelName,{key:1},void 0,!0):(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(l.labelStyle)},[e.createTextVNode(e.toDisplayString(l.label)+" ",1),l.required?(e.openBlock(),e.createElementBlock("span",O,"*")):e.createCommentVNode("",!0)],4))]),default:e.withCtx(()=>[e.createVNode(f,{modelValue:a.states.model[l.field],"onUpdate:modelValue":o=>a.states.model[l.field]=o,disabled:l.disabled||a.formOptions.isDisabled,onChange:o=>a.radioChange(o,l.field)},{default:e.withCtx(()=>{var o;return[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((o=l.options)==null?void 0:o.data,n=>{var d,r;return e.openBlock(),e.createBlock(b,{size:"large",label:n[((d=l.options)==null?void 0:d.valueKey)||"code"],key:n[((r=l.options)==null?void 0:r.valueKey)||"code"]},{default:e.withCtx(()=>{var p;return[e.createTextVNode(e.toDisplayString(n[((p=l.options)==null?void 0:p.labelkey)||"name"]),1)]}),_:2},1032,["label"])}),128))]}),_:2},1032,["modelValue","onUpdate:modelValue","disabled","onChange"])]),_:2},1032,["label","rules","prop","class"])):l.type==="radioNote"?(e.openBlock(),e.createBlock(s,{key:4,label:l.label,rules:l.isHide||a.noFormRule?[]:l.rules,prop:l.field,class:e.normalizeClass([l.labelNode?"radio_Note":"rule_err"])},{default:e.withCtx(()=>[e.createElementVNode("div",null,[e.createElementVNode("span",A,e.toDisplayString(l.labelBefore),1),e.createElementVNode("span",K,e.toDisplayString(l.labelNode),1),l.required?(e.openBlock(),e.createElementBlock("span",Y,"*")):e.createCommentVNode("",!0)]),e.createVNode(f,{modelValue:a.states.model[l.field],"onUpdate:modelValue":o=>a.states.model[l.field]=o,disabled:l.disabled||a.formOptions.isDisabled,onChange:o=>a.radioChange(o,l.field)},{default:e.withCtx(()=>{var o;return[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((o=l.options)==null?void 0:o.data,n=>{var d,r;return e.openBlock(),e.createBlock(b,{size:"large",label:n[((d=l.options)==null?void 0:d.valueKey)||"code"],key:n[((r=l.options)==null?void 0:r.valueKey)||"code"]},{default:e.withCtx(()=>{var p;return[e.createTextVNode(e.toDisplayString(n[((p=l.options)==null?void 0:p.labelkey)||"name"]),1)]}),_:2},1032,["label"])}),128))]}),_:2},1032,["modelValue","onUpdate:modelValue","disabled","onChange"])]),_:2},1032,["label","rules","prop","class"])):l.type==="checkbox"?(e.openBlock(),e.createBlock(s,{key:5,label:l.label,rules:l.isHide||a.noFormRule?[]:l.rules,prop:l.field},{label:e.withCtx(()=>[l.slotLabelName?e.renderSlot(t.$slots,l.slotLabelName,{key:1},void 0,!0):(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(l.labelStyle)},[e.createTextVNode(e.toDisplayString(l.label)+" ",1),l.required?(e.openBlock(),e.createElementBlock("span",q,"*")):e.createCommentVNode("",!0)],4))]),default:e.withCtx(()=>[e.createVNode(N,{modelValue:a.states.model[l.field],"onUpdate:modelValue":o=>a.states.model[l.field]=o,onChange:o=>a.checkChange(o,l.field),disabled:l.disabled||a.formOptions.isDisabled,style:e.normalizeStyle(l.ways==="row"?"display: flex; align-items: flex-start;flex-flow: row nowrap; ":"display: flex; align-items: flex-start;flex-flow: column nowrap; ")},{default:e.withCtx(()=>{var o;return[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((o=l.options)==null?void 0:o.data,n=>{var d,r;return e.openBlock(),e.createBlock(C,{key:n[((d=l.options)==null?void 0:d.valueKey)||"code"],label:n[((r=l.options)==null?void 0:r.valueKey)||"code"]},{default:e.withCtx(()=>{var p;return[e.createTextVNode(e.toDisplayString(n[((p=l.options)==null?void 0:p.labelkey)||"name"]),1)]}),_:2},1032,["label"])}),128))]}),_:2},1032,["modelValue","onUpdate:modelValue","onChange","disabled","style"])]),_:2},1032,["label","rules","prop"])):l.type==="checkboxRadio"?(e.openBlock(),e.createBlock(s,{key:6,label:l.label,rules:l.isHide||a.noFormRule?[]:l.rules,prop:l.field},{label:e.withCtx(()=>[l.slotLabelName?e.renderSlot(t.$slots,l.slotLabelName,{key:1},void 0,!0):(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(l.labelStyle)},[e.createTextVNode(e.toDisplayString(l.label)+" ",1),l.required?(e.openBlock(),e.createElementBlock("span",R,"*")):e.createCommentVNode("",!0)],4))]),default:e.withCtx(()=>[e.createVNode(N,{modelValue:a.states.model[l.field],"onUpdate:modelValue":o=>a.states.model[l.field]=o,onChange:o=>a.handleCheckedChange(o,l.field),disabled:l.disabled||a.formOptions.isDisabled,style:e.normalizeStyle(l.ways==="row"?"display: flex; align-items: flex-start;flex-flow: row nowrap; ":"display: flex; align-items: flex-start;flex-flow: column nowrap; ")},{default:e.withCtx(()=>{var o;return[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((o=l.options)==null?void 0:o.data,n=>{var d,r;return e.openBlock(),e.createBlock(C,{key:n[((d=l.options)==null?void 0:d.valueKey)||"code"],label:n[((r=l.options)==null?void 0:r.valueKey)||"code"]},{default:e.withCtx(()=>{var p;return[e.createTextVNode(e.toDisplayString(n[((p=l.options)==null?void 0:p.labelkey)||"name"]),1)]}),_:2},1032,["label"])}),128))]}),_:2},1032,["modelValue","onUpdate:modelValue","onChange","disabled","style"])]),_:2},1032,["label","rules","prop"])):l.type==="select"?(e.openBlock(),e.createBlock(s,{key:7,label:l.label,rules:l.isHide||a.noFormRule?[]:l.rules,disabled:l.disabled||a.formOptions.isDisabled,prop:l.field},{label:e.withCtx(()=>[l.slotLabelName?e.renderSlot(t.$slots,l.slotLabelName,{key:1},void 0,!0):(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(l.labelStyle)},[e.createTextVNode(e.toDisplayString(l.label)+" ",1),l.required?(e.openBlock(),e.createElementBlock("span",H,"*")):e.createCommentVNode("",!0)],4))]),default:e.withCtx(()=>[e.createVNode(M,{onChange:o=>a.selectChange(o,l.field),modelValue:a.states.model[l.field],"onUpdate:modelValue":o=>a.states.model[l.field]=o,disabled:l.disabled||a.formOptions.isDisabled,placeholder:l.placeholder,clearable:l.clearable},{default:e.withCtx(()=>{var o;return[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((o=l.options)==null?void 0:o.data,n=>{var d,r,p;return e.openBlock(),e.createBlock(x,{key:n[((d=l.options)==null?void 0:d.valueKey)||"code"],label:n[((r=l.options)==null?void 0:r.labelkey)||"name"],value:n[((p=l.options)==null?void 0:p.valueKey)||"code"]},null,8,["label","value"])}),128))]}),_:2},1032,["onChange","modelValue","onUpdate:modelValue","disabled","placeholder","clearable"]),e.createElementVNode("div",{class:"item_tips_blow",style:e.normalizeStyle(l.tipsBlowStyle)},e.toDisplayString(l.tipsBlow),5)]),_:2},1032,["label","rules","disabled","prop"])):l.type==="date"?(e.openBlock(),e.createBlock(s,{key:8,label:l.label,rules:l.isHide||a.noFormRule?[]:l.rules,prop:l.field},{label:e.withCtx(()=>[l.slotLabelName?e.renderSlot(t.$slots,l.slotLabelName,{key:1},void 0,!0):(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(l.labelStyle)},[e.createTextVNode(e.toDisplayString(l.label)+" ",1),l.required?(e.openBlock(),e.createElementBlock("span",W,"*")):e.createCommentVNode("",!0)],4))]),default:e.withCtx(()=>[e.createVNode(B,{format:"DD/MM/YYYY","value-format":"DD/MM/YYYY","disabled-date":l.disabledDate,onChange:o=>a.dateChange(o,l.field),"prefix-icon":a.prefixIcon,modelValue:a.states.model[l.field],"onUpdate:modelValue":o=>a.states.model[l.field]=o,disabled:l.disabled||a.formOptions.isDisabled,readonly:l.readonly,type:l.type,placeholder:l.placeholder||l.label},null,8,["disabled-date","onChange","prefix-icon","modelValue","onUpdate:modelValue","disabled","readonly","type","placeholder"])]),_:2},1032,["label","rules","prop"])):l.type==="daterange"?(e.openBlock(),e.createBlock(s,{key:9,label:l.label,rules:l.isHide||a.noFormRule?[]:l.rules,prop:l.field},{label:e.withCtx(()=>[l.slotLabelName?e.renderSlot(t.$slots,l.slotLabelName,{key:1},void 0,!0):(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(l.labelStyle)},[e.createTextVNode(e.toDisplayString(l.label)+" ",1),l.required?(e.openBlock(),e.createElementBlock("span",Q,"*")):e.createCommentVNode("",!0)],4))]),default:e.withCtx(()=>[e.createVNode(B,{format:"DD/MM/YYYY","value-format":"DD/MM/YYYY","disabled-date":l.disabledDate,onChange:o=>a.dateChange(o,l.field),modelValue:a.states.model[l.field],"onUpdate:modelValue":o=>a.states.model[l.field]=o,"prefix-icon":a.prefixIcon,type:"daterange","range-separator":"To","start-placeholder":l.startPlaceholder,"end-placeholder":l.endPlaceholder,size:"large"},null,8,["disabled-date","onChange","modelValue","onUpdate:modelValue","prefix-icon","start-placeholder","end-placeholder"])]),_:2},1032,["label","rules","prop"])):l.type==="slotItem"?(e.openBlock(),e.createBlock(s,{key:10,label:l.label,rules:l.isHide||a.noFormRule?[]:l.rules,prop:l.field,class:"rule_err"},{label:e.withCtx(()=>[l.slotLabelName?e.renderSlot(t.$slots,l.slotLabelName,{key:1},void 0,!0):(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(l.labelStyle)},[e.createTextVNode(e.toDisplayString(l.label)+" ",1),l.required?(e.openBlock(),e.createElementBlock("span",P,"*")):e.createCommentVNode("",!0)],4))]),default:e.withCtx(()=>[e.renderSlot(t.$slots,l.slotItemName,{},void 0,!0)]),_:2},1032,["label","rules","prop"])):l.type==="phone"?(e.openBlock(),e.createBlock(s,{key:11,label:l.label,rules:l.isHide||a.noFormRule?[]:l.rules.phoneNumber,prop:l.field.phoneNumber,class:"phone_item"},{label:e.withCtx(()=>[l.slotLabelName?e.renderSlot(t.$slots,l.slotLabelName,{key:1},void 0,!0):(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(l.labelStyle)},[e.createTextVNode(e.toDisplayString(l.label)+" ",1),l.required?(e.openBlock(),e.createElementBlock("span",Z,"*")):e.createCommentVNode("",!0)],4))]),default:e.withCtx(()=>[e.createVNode(h,{onBlur:o=>a.inputBlur(o,l.field),onFocus:o=>a.inputFocus(o,l.field),onChange:o=>a.inputChange(o,l.field),onInput:o=>a.inputInput(o,l.field),maxlength:l.maxlength,modelValue:a.states.model[l.field.phoneNumber],"onUpdate:modelValue":o=>a.states.model[l.field.phoneNumber]=o,disabled:l.disabled||a.formOptions.isDisabled,placeholder:l.placeholder||"请选择",clearable:l.clearable},{prepend:e.withCtx(()=>{var o;return[e.createVNode(M,{disabled:l.disabled||a.formOptions.isDisabled,modelValue:a.states.model[l.field.areaCode],"onUpdate:modelValue":n=>a.states.model[l.field.areaCode]=n,placeholder:((o=l.options)==null?void 0:o.placeholder)||"请选择",style:{width:"115px"}},{default:e.withCtx(()=>{var n;return[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((n=l.options)==null?void 0:n.data,(d,r)=>(e.openBlock(),e.createBlock(x,{label:d.name,value:d.code,key:r},null,8,["label","value"]))),128))]}),_:2},1032,["disabled","modelValue","onUpdate:modelValue","placeholder"])]}),_:2},1032,["onBlur","onFocus","onChange","onInput","maxlength","modelValue","onUpdate:modelValue","disabled","placeholder","clearable"])]),_:2},1032,["label","rules","prop"])):l.type==="line"?(e.openBlock(),e.createBlock(s,{key:12,label:l.label},{default:e.withCtx(()=>[G]),_:2},1032,["label"])):(e.openBlock(),e.createBlock(s,{key:13,rules:l.isHide||a.noFormRule?[]:l.rules,prop:l.field,class:e.normalizeClass(l.prepend?"input-item":"")},{label:e.withCtx(()=>[l.slotLabelName?e.renderSlot(t.$slots,l.slotLabelName,{key:1},void 0,!0):(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(l.labelStyle)},[e.createTextVNode(e.toDisplayString(l.label)+" ",1),l.required?(e.openBlock(),e.createElementBlock("span",J,"*")):e.createCommentVNode("",!0)],4))]),default:e.withCtx(()=>[e.createVNode(h,{onBlur:o=>a.inputBlur(o,l.field),onFocus:o=>a.inputFocus(o,l.field),onChange:o=>a.inputChange(o,l.field),onInput:o=>a.inputInput(o,l.field),maxlength:l.maxlength,modelValue:a.states.model[l.field],"onUpdate:modelValue":o=>a.states.model[l.field]=o,"show-word-limit":l.showWordLimit,readonly:l.readonly,type:l.type?l.type:"text",placeholder:l.placeholder||l.label,disabled:l.disabled||a.formOptions.isDisabled,showPassword:l.showPassword,clearable:l.clearable,onKeyup:e.withKeys(o=>a.handleKeyUp(l.enterable),["enter"])},e.createSlots({_:2},[l.prepend?{name:"prepend",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.prepend),1)]),key:"0"}:void 0,l.append?{name:"append",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.append),1)]),key:"1"}:void 0]),1032,["onBlur","onFocus","onChange","onInput","maxlength","modelValue","onUpdate:modelValue","show-word-limit","readonly","type","placeholder","disabled","showPassword","clearable","onKeyup"])]),_:2},1032,["rules","prop","class"]))],4)]),_:2},1032,["xs","sm","md","lg","xl"])),[[e.vShow,!l.isHide]])),128))]),_:3}),e.createVNode(s,{class:"btnsItem"},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"buttons",{model:y.model,onBtnClick:a.onSubmit},()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.formOptions.btnConfig,(l,g)=>(e.openBlock(),e.createElementBlock("div",{key:g},[l.isShow?(e.openBlock(),e.createBlock(w,{key:0,btnCode:l.btnCode,plain:l.plain,primary:l.primary,info:l.info,text:l.text,debounced:l.debounced?l.debounced:!1,link:l.link,loading:l.loading,loadingColor:l.loadingColor,width:l.width,height:l.height,circle:l.circle,color:l.color,bgColor:l.bgColor,borderColor:l.borderColor,borderStyle:l.borderStyle,borderWidth:l.borderWidth,icon:l.icon,size:l.size,fontSize:l.fontSize,fontWeight:l.fontWeight,style:e.normalizeStyle(l.style),class:e.normalizeClass(l.class),onHandleClick:o=>a.handleClick(o,l.isRule,l.emitName)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.name),1)]),_:2},1032,["btnCode","plain","primary","info","text","debounced","link","loading","loadingColor","width","height","circle","color","bgColor","borderColor","borderStyle","borderWidth","icon","size","fontSize","fontWeight","style","class","onHandleClick"])):e.createCommentVNode("",!0)]))),128))],!0)]),_:3})]),_:3},16,["model","label-position"])}const V=z(E,[["render",X],["__scopeId","data-v-03397e4e"]]);function _(t,c={}){_.installed||(_.installed=!0,t.component("common-el-form",V))}return V.install=_,V});
|
package/package.json
CHANGED
package/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@charset "UTF-8";[data-v-
|
|
1
|
+
@charset "UTF-8";[data-v-03397e4e] .el-date-editor{height:60px!important;width:100%!important}.form-item[data-v-03397e4e]{width:50%;display:inline-block;padding-right:0;box-sizing:border-box}[data-v-03397e4e] .el-input__inner{height:42px;color:#1d1d1d}[data-v-03397e4e] .el-card__body{padding:0}[data-v-03397e4e] .el-input__inner::placeholder{font-family:Roboto;font-size:14px;font-weight:400;line-height:22px;letter-spacing:0em;text-align:left;color:#6e6e73}[data-v-03397e4e] .el-form-item__label{font-size:16px;line-height:22px;color:#1d1d1d;font-weight:400;font-family:Roboto Medium;height:auto!important}.form-item-title[data-v-03397e4e]{width:100%}[data-v-03397e4e] .el-checkbox-group .el-checkbox{display:flex}[data-v-03397e4e] .el-radio-group{height:62px;line-height:62px}[data-v-03397e4e] .el-radio-group .el-radio{height:auto}.rule_err[data-v-03397e4e] .el-form-item__content,.radio_Note[data-v-03397e4e] .el-form-item__content{display:block}.radio_Note .lable[data-v-03397e4e]{font-size:16px;line-height:22px;color:#1d1d1d;font-weight:400;font-family:Roboto Medium}.radio_Note .lable_note[data-v-03397e4e]{font-size:16px;line-height:22px;color:#6e6e73;font-weight:400;font-family:Roboto Medium}.container_name[data-v-03397e4e] .el-form-item__content{align-items:start}[data-v-03397e4e] .el-form-item__error{position:relative}.item-name[data-v-03397e4e]{width:51%;padding-right:20px;padding-bottom:12px;box-sizing:border-box}.item-name-right[data-v-03397e4e]{width:49%;padding-bottom:12px;padding-right:0}.btnsItem[data-v-03397e4e]{width:100%;margin:0 auto;justify-content:right}.btnsItem[data-v-03397e4e] .el-form-item__content{justify-content:right}label[data-v-03397e4e]{display:block}.title-content[data-v-03397e4e]{font-size:22px;line-height:30px;color:#1d1d1d;font-weight:300;font-family:Roboto Medium}[data-v-03397e4e] .el-input__wrapper{height:60px;border-radius:8px;border:1px solid #c7c8ca;box-shadow:none!important}.phone_item[data-v-03397e4e] .el-input__wrapper{border-left:0px!important;border-top-left-radius:0!important;border-bottom-left-radius:0!important}.phone_item[data-v-03397e4e] .el-input-group__prepend{box-shadow:none!important;background-color:unset!important}.phone_item[data-v-03397e4e] .el-input-group__prepend .el-input__wrapper{height:60px;border-radius:8px;border:1px solid #c7c8ca!important;padding-left:16px;padding-right:16px;border-right:0px!important;box-shadow:none!important;border-radius:8px 0 0 8px/8px 0px 0px 8px!important}.phone_item[data-v-03397e4e] .el-input-group__prepend .el-input__wrapper .el-input__suffix{display:none;width:0!important}.phone_item[data-v-03397e4e] .el-input-group__prepend:hover{box-shadow:none!important;background-color:unset!important}.phone_item[data-v-03397e4e] .el-input-group__prepend:hover .el-input__wrapper:hover{border:none;border-right:0px!important;box-shadow:none!important;padding-left:16px;padding-right:16px}.phone_item[data-v-03397e4e] .el-input-group__prepend:hover .el-input__wrapper:hover .el-input__suffix{display:none;width:0!important}.input-item[data-v-03397e4e] .el-input-group__prepend{border:1px solid #c7c8ca!important;border-top-left-radius:8px;border-bottom-left-radius:8px;border-right:0px!important;box-shadow:none!important;background-color:unset!important;padding:0 16px;font-size:14px;line-height:22px;color:#0b0b0b;font-weight:400;font-family:Roboto Medium}.input-item[data-v-03397e4e] .el-input__wrapper{border-left:0px!important;border-right:0px!important;border-radius:0!important}.input-item[data-v-03397e4e] .el-input-group__append{border:1px solid #c7c8ca!important;border-top-right-radius:8px;border-bottom-right-radius:8px;border-left:0px!important;box-shadow:none!important;background-color:unset!important;padding:0 16px;font-size:14px;line-height:22px;color:#0b0b0b;font-weight:400;font-family:Roboto Medium}[data-v-03397e4e] .el-select{width:100%}.custom-required[data-v-03397e4e]{content:"*";color:#e2a650;margin-left:4px}.item_tips_blow[data-v-03397e4e]{font-size:14px;line-height:22px;color:#00000073;font-weight:400;font-family:Roboto Medium;width:100%;word-wrap:break-word;white-space:normal}
|