sinosoft-common-form 1.2.9 → 1.3.0
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 +264 -253
- 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 { reactive as Q, ref as m, shallowRef as B, h as P, computed as R, onMounted as Z, watch as G, toRefs as J, resolveComponent as
|
|
2
|
-
const
|
|
1
|
+
import { reactive as Q, ref as m, shallowRef as B, h as P, computed as R, onMounted as Z, watch as G, toRefs as J, resolveComponent as k, openBlock as o, createBlock as u, mergeProps as X, withModifiers as $, withCtx as d, createVNode as b, createElementBlock as s, Fragment as V, renderList as U, withDirectives as ee, createElementVNode as w, normalizeStyle as M, toDisplayString as c, createTextVNode as f, createCommentVNode as D, renderSlot as C, withKeys as O, normalizeClass as K, createSlots as le, vShow as ae, pushScopeId as oe, popScopeId as de } from "vue";
|
|
2
|
+
const se = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHZpZXdCb3g9IjAgMCAxNCAxNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEyLjc1MDIgMS44NzY5NUgxMC4xMjUyVjAuODc2OTUzQzEwLjEyNTIgMC44MDgyMDMgMTAuMDY5IDAuNzUxOTUzIDEwLjAwMDIgMC43NTE5NTNIOS4xMjUyNUM5LjA1NjQ5IDAuNzUxOTUzIDkuMDAwMjUgMC44MDgyMDMgOS4wMDAyNSAwLjg3Njk1M1YxLjg3Njk1SDUuMDAwMjRWMC44NzY5NTNDNS4wMDAyNCAwLjgwODIwMyA0Ljk0Mzk5IDAuNzUxOTUzIDQuODc1MjQgMC43NTE5NTNINC4wMDAyNEMzLjkzMTQ5IDAuNzUxOTUzIDMuODc1MjQgMC44MDgyMDMgMy44NzUyNCAwLjg3Njk1M1YxLjg3Njk1SDEuMjUwMjRDMC45NzM2ODIgMS44NzY5NSAwLjc1MDI0NCAyLjEwMDM5IDAuNzUwMjQ0IDIuMzc2OTVWMTIuNzUyQzAuNzUwMjQ0IDEzLjAyODUgMC45NzM2ODIgMTMuMjUyIDEuMjUwMjQgMTMuMjUySDEyLjc1MDJDMTMuMDI2OCAxMy4yNTIgMTMuMjUwMiAxMy4wMjg1IDEzLjI1MDIgMTIuNzUyVjIuMzc2OTVDMTMuMjUwMiAyLjEwMDM5IDEzLjAyNjggMS44NzY5NSAxMi43NTAyIDEuODc2OTVaTTEyLjEyNTIgMTIuMTI3SDEuODc1MjRWNi4xODk0NUgxMi4xMjUyVjEyLjEyN1pNMS44NzUyNCA1LjEyNjk1VjMuMDAxOTVIMy44NzUyNFYzLjc1MTk1QzMuODc1MjQgMy44MjA3IDMuOTMxNDkgMy44NzY5NSA0LjAwMDI0IDMuODc2OTVINC44NzUyNEM0Ljk0Mzk5IDMuODc2OTUgNS4wMDAyNCAzLjgyMDcgNS4wMDAyNCAzLjc1MTk1VjMuMDAxOTVIOS4wMDAyNVYzLjc1MTk1QzkuMDAwMjUgMy44MjA3IDkuMDU2NDkgMy44NzY5NSA5LjEyNTI1IDMuODc2OTVIMTAuMDAwMkMxMC4wNjkgMy44NzY5NSAxMC4xMjUyIDMuODIwNyAxMC4xMjUyIDMuNzUxOTVWMy4wMDE5NUgxMi4xMjUyVjUuMTI2OTVIMS44NzUyNFoiIGZpbGw9ImJsYWNrIiBmaWxsLW9wYWNpdHk9IjAuODUiLz4KPC9zdmc+Cg==", ne = {
|
|
3
3
|
props: {
|
|
4
4
|
fieldList: {
|
|
5
5
|
type: Array,
|
|
@@ -8,73 +8,73 @@ const ne = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHZpZX
|
|
|
8
8
|
model: Object,
|
|
9
9
|
options: Object
|
|
10
10
|
},
|
|
11
|
-
setup(
|
|
12
|
-
const
|
|
11
|
+
setup(r, { emit: N }) {
|
|
12
|
+
const g = Q({
|
|
13
13
|
model: {}
|
|
14
14
|
}), l = m(null), z = B({
|
|
15
15
|
render() {
|
|
16
16
|
return P("img", {
|
|
17
|
-
src:
|
|
17
|
+
src: se
|
|
18
18
|
});
|
|
19
19
|
}
|
|
20
|
-
}),
|
|
21
|
-
|
|
22
|
-
},
|
|
23
|
-
l.value && (
|
|
24
|
-
if (
|
|
25
|
-
|
|
20
|
+
}), F = R(() => Object.assign([], r.options)), p = () => {
|
|
21
|
+
g.model = r.model;
|
|
22
|
+
}, x = (t, y, e) => {
|
|
23
|
+
l.value && (y ? l.value.validate((v) => {
|
|
24
|
+
if (v)
|
|
25
|
+
N(e || "submit", g.model, t);
|
|
26
26
|
else
|
|
27
27
|
return !1;
|
|
28
|
-
}) : e === "reset" ? l.value.resetFields() :
|
|
29
|
-
},
|
|
30
|
-
|
|
31
|
-
},
|
|
32
|
-
|
|
33
|
-
},
|
|
34
|
-
|
|
35
|
-
}, A = (
|
|
36
|
-
const e =
|
|
37
|
-
e !== 1 && (e > 1 &&
|
|
38
|
-
}, S = (
|
|
39
|
-
|
|
40
|
-
}, T = (
|
|
41
|
-
|
|
42
|
-
}, E = (
|
|
43
|
-
|
|
44
|
-
},
|
|
45
|
-
l.value.resetFields(
|
|
46
|
-
},
|
|
47
|
-
l.value.clearValidate(
|
|
28
|
+
}) : e === "reset" ? l.value.resetFields() : N(e || "submit", g.model, t));
|
|
29
|
+
}, j = (t, y) => {
|
|
30
|
+
N("selectChange", t, y);
|
|
31
|
+
}, I = (t, y) => {
|
|
32
|
+
N("radioChange", t, y);
|
|
33
|
+
}, L = (t, y) => {
|
|
34
|
+
N("checkChange", t, y);
|
|
35
|
+
}, A = (t, y) => {
|
|
36
|
+
const e = g.model[y].length;
|
|
37
|
+
e !== 1 && (e > 1 && g.model[y].shift(), N("checkChange", t, y));
|
|
38
|
+
}, S = (t, y, e) => {
|
|
39
|
+
x(t, y, e);
|
|
40
|
+
}, T = (t, y) => {
|
|
41
|
+
t && (y == null ? void 0 : y.key) === "Enter" && x(void 0, !0, "submit");
|
|
42
|
+
}, E = (t) => {
|
|
43
|
+
N("dateChange", t);
|
|
44
|
+
}, Y = (t) => {
|
|
45
|
+
l.value.resetFields(t);
|
|
46
|
+
}, q = (t) => {
|
|
47
|
+
l.value.clearValidate(t);
|
|
48
48
|
};
|
|
49
49
|
return Z(() => {
|
|
50
|
-
|
|
51
|
-
}), G(() =>
|
|
52
|
-
|
|
50
|
+
p(), l.value.resetFields();
|
|
51
|
+
}), G(() => r.fieldList, (t, y) => {
|
|
52
|
+
t !== y && p();
|
|
53
53
|
}), {
|
|
54
|
-
...J(
|
|
54
|
+
...J(g),
|
|
55
55
|
formRef: l,
|
|
56
|
-
states:
|
|
57
|
-
formOptions:
|
|
58
|
-
onSubmit:
|
|
59
|
-
selectChange:
|
|
60
|
-
radioChange:
|
|
61
|
-
checkChange:
|
|
56
|
+
states: g,
|
|
57
|
+
formOptions: F,
|
|
58
|
+
onSubmit: x,
|
|
59
|
+
selectChange: j,
|
|
60
|
+
radioChange: I,
|
|
61
|
+
checkChange: L,
|
|
62
62
|
handleCheckedChange: A,
|
|
63
63
|
prefixIcon: z,
|
|
64
64
|
handleClick: S,
|
|
65
65
|
handleKeyUp: T,
|
|
66
|
-
resetFieldsTest:
|
|
67
|
-
clearValidateTest:
|
|
66
|
+
resetFieldsTest: Y,
|
|
67
|
+
clearValidateTest: q,
|
|
68
68
|
dateChange: E
|
|
69
69
|
};
|
|
70
70
|
}
|
|
71
71
|
};
|
|
72
|
-
const re = (
|
|
73
|
-
const
|
|
74
|
-
for (const [l, z] of
|
|
75
|
-
|
|
76
|
-
return
|
|
77
|
-
}, te = (
|
|
72
|
+
const re = (r, N) => {
|
|
73
|
+
const g = r.__vccOpts || r;
|
|
74
|
+
for (const [l, z] of N)
|
|
75
|
+
g[l] = z;
|
|
76
|
+
return g;
|
|
77
|
+
}, te = (r) => (oe("data-v-2127471b"), r = r(), de(), r), ue = { class: "header-title" }, pe = { class: "title-content" }, ce = {
|
|
78
78
|
key: 0,
|
|
79
79
|
class: "custom-required"
|
|
80
80
|
}, ye = {
|
|
@@ -92,83 +92,84 @@ const re = (M, x) => {
|
|
|
92
92
|
}, _e = {
|
|
93
93
|
key: 0,
|
|
94
94
|
class: "custom-required"
|
|
95
|
-
},
|
|
95
|
+
}, Ne = {
|
|
96
96
|
key: 0,
|
|
97
97
|
class: "custom-required"
|
|
98
|
-
},
|
|
98
|
+
}, ke = {
|
|
99
99
|
key: 0,
|
|
100
100
|
class: "custom-required"
|
|
101
|
-
},
|
|
101
|
+
}, De = {
|
|
102
102
|
key: 0,
|
|
103
103
|
class: "custom-required"
|
|
104
|
-
},
|
|
104
|
+
}, Ce = {
|
|
105
105
|
key: 0,
|
|
106
106
|
class: "custom-required"
|
|
107
|
-
},
|
|
107
|
+
}, xe = {
|
|
108
108
|
key: 0,
|
|
109
109
|
class: "custom-required"
|
|
110
|
-
}, Ve = /* @__PURE__ */ te(() => /* @__PURE__ */
|
|
110
|
+
}, Ve = /* @__PURE__ */ te(() => /* @__PURE__ */ w("div", {
|
|
111
111
|
class: "line",
|
|
112
112
|
style: { "border-top": "1px solid #e8e8e8", width: "100%", height: "0px", margin: "20px 0" }
|
|
113
113
|
}, null, -1)), Ue = {
|
|
114
114
|
key: 0,
|
|
115
115
|
class: "custom-required"
|
|
116
116
|
};
|
|
117
|
-
function we(
|
|
118
|
-
const
|
|
119
|
-
return
|
|
117
|
+
function we(r, N, g, l, z, F) {
|
|
118
|
+
const p = k("el-form-item"), x = k("el-input"), j = k("el-radio"), I = k("el-radio-group"), L = k("el-checkbox"), A = k("el-checkbox-group"), S = k("el-option"), T = k("el-select"), E = k("el-date-picker"), Y = k("el-col"), q = k("el-row"), t = k("sinosoft-common-button"), y = k("el-form");
|
|
119
|
+
return o(), u(y, X({
|
|
120
120
|
"hide-required-asterisk": "",
|
|
121
|
-
onSubmit:
|
|
121
|
+
onSubmit: N[0] || (N[0] = $(() => {
|
|
122
122
|
}, ["prevent"])),
|
|
123
|
-
model:
|
|
123
|
+
model: g.model
|
|
124
124
|
}, l.formOptions, {
|
|
125
125
|
"label-position": l.formOptions.labelPosition,
|
|
126
126
|
ref: "formRef"
|
|
127
127
|
}), {
|
|
128
|
-
default:
|
|
129
|
-
|
|
130
|
-
default:
|
|
131
|
-
(
|
|
128
|
+
default: d(() => [
|
|
129
|
+
b(q, { gutter: 20 }, {
|
|
130
|
+
default: d(() => [
|
|
131
|
+
(o(!0), s(V, null, U(g.fieldList, (e, v) => ee((o(), u(Y, {
|
|
132
132
|
xs: e.xs ? e.xs : 24,
|
|
133
133
|
sm: e.sm ? e.sm : 24,
|
|
134
134
|
md: e.md ? e.md : 8,
|
|
135
135
|
lg: e.lg ? e.lg : 8,
|
|
136
136
|
xl: e.xl ? e.xl : 8,
|
|
137
|
-
key:
|
|
137
|
+
key: v
|
|
138
138
|
}, {
|
|
139
|
-
default:
|
|
140
|
-
|
|
141
|
-
style:
|
|
139
|
+
default: d(() => [
|
|
140
|
+
w("div", {
|
|
141
|
+
style: M(e.style)
|
|
142
142
|
}, [
|
|
143
|
-
e.type === "title" ? (
|
|
144
|
-
default:
|
|
145
|
-
|
|
146
|
-
|
|
143
|
+
e.type === "title" ? (o(), u(p, { key: 0 }, {
|
|
144
|
+
default: d(() => [
|
|
145
|
+
w("div", ue, [
|
|
146
|
+
w("span", pe, c(e.title), 1)
|
|
147
147
|
])
|
|
148
148
|
]),
|
|
149
149
|
_: 2
|
|
150
|
-
}, 1024)) : e.type === "name" ? (
|
|
150
|
+
}, 1024)) : e.type === "name" ? (o(), u(p, {
|
|
151
151
|
key: 1,
|
|
152
152
|
label: e.label,
|
|
153
153
|
disabled: e.disabled || l.formOptions.isDisabled,
|
|
154
154
|
class: "container_name"
|
|
155
155
|
}, {
|
|
156
|
-
label:
|
|
157
|
-
|
|
158
|
-
|
|
156
|
+
label: d(() => [
|
|
157
|
+
e.slotLabelName ? C(r.$slots, e.slotLabelName, { key: 1 }, void 0, !0) : (o(), s("div", {
|
|
158
|
+
key: 0,
|
|
159
|
+
style: M(e.labelStyle)
|
|
159
160
|
}, [
|
|
160
161
|
f(c(e.label) + " ", 1),
|
|
161
|
-
e.required ? (
|
|
162
|
-
], 4)
|
|
162
|
+
e.required ? (o(), s("span", ce, "*")) : D("", !0)
|
|
163
|
+
], 4))
|
|
163
164
|
]),
|
|
164
|
-
default:
|
|
165
|
-
|
|
165
|
+
default: d(() => [
|
|
166
|
+
b(p, {
|
|
166
167
|
rules: e.isHide ? [] : e.rules.nameEnFamily,
|
|
167
168
|
prop: e.field.nameEnFamily,
|
|
168
169
|
class: "item-name"
|
|
169
170
|
}, {
|
|
170
|
-
default:
|
|
171
|
-
|
|
171
|
+
default: d(() => [
|
|
172
|
+
b(x, {
|
|
172
173
|
maxlength: e.maxlength,
|
|
173
174
|
modelValue: l.states.model[e.field.nameEnFamily],
|
|
174
175
|
"onUpdate:modelValue": (a) => l.states.model[e.field.nameEnFamily] = a,
|
|
@@ -182,13 +183,13 @@ function we(M, x, _, l, z, H) {
|
|
|
182
183
|
]),
|
|
183
184
|
_: 2
|
|
184
185
|
}, 1032, ["rules", "prop"]),
|
|
185
|
-
|
|
186
|
+
b(p, {
|
|
186
187
|
rules: e.isHide ? [] : e.rules.nameEn,
|
|
187
188
|
prop: e.field.nameEn,
|
|
188
189
|
class: "item-name-right"
|
|
189
190
|
}, {
|
|
190
|
-
default:
|
|
191
|
-
|
|
191
|
+
default: d(() => [
|
|
192
|
+
b(x, {
|
|
192
193
|
maxlength: e.maxlength,
|
|
193
194
|
modelValue: l.states.model[e.field.nameEn],
|
|
194
195
|
"onUpdate:modelValue": (a) => l.states.model[e.field.nameEn] = a,
|
|
@@ -201,13 +202,13 @@ function we(M, x, _, l, z, H) {
|
|
|
201
202
|
]),
|
|
202
203
|
_: 2
|
|
203
204
|
}, 1032, ["rules", "prop"]),
|
|
204
|
-
|
|
205
|
+
b(p, {
|
|
205
206
|
rules: e.isHide ? [] : e.rules.nameChFamily,
|
|
206
207
|
prop: e.field.nameChFamily,
|
|
207
208
|
class: "item-name"
|
|
208
209
|
}, {
|
|
209
|
-
default:
|
|
210
|
-
|
|
210
|
+
default: d(() => [
|
|
211
|
+
b(x, {
|
|
211
212
|
maxlength: e.maxlength,
|
|
212
213
|
modelValue: l.states.model[e.field.nameChFamily],
|
|
213
214
|
"onUpdate:modelValue": (a) => l.states.model[e.field.nameChFamily] = a,
|
|
@@ -220,13 +221,13 @@ function we(M, x, _, l, z, H) {
|
|
|
220
221
|
]),
|
|
221
222
|
_: 2
|
|
222
223
|
}, 1032, ["rules", "prop"]),
|
|
223
|
-
|
|
224
|
+
b(p, {
|
|
224
225
|
rules: e.isHide ? [] : e.rules.nameCh,
|
|
225
226
|
prop: e.field.nameCh,
|
|
226
227
|
class: "item-name-right"
|
|
227
228
|
}, {
|
|
228
|
-
default:
|
|
229
|
-
|
|
229
|
+
default: d(() => [
|
|
230
|
+
b(x, {
|
|
230
231
|
maxlength: e.maxlength,
|
|
231
232
|
modelValue: l.states.model[e.field.nameCh],
|
|
232
233
|
"onUpdate:modelValue": (a) => l.states.model[e.field.nameCh] = a,
|
|
@@ -241,39 +242,40 @@ function we(M, x, _, l, z, H) {
|
|
|
241
242
|
}, 1032, ["rules", "prop"])
|
|
242
243
|
]),
|
|
243
244
|
_: 2
|
|
244
|
-
}, 1032, ["label", "disabled"])) : e.type === "gender" ? (
|
|
245
|
+
}, 1032, ["label", "disabled"])) : e.type === "gender" ? (o(), u(p, {
|
|
245
246
|
key: 2,
|
|
246
247
|
label: e.label,
|
|
247
248
|
rules: e.isHide ? [] : e.rules,
|
|
248
249
|
prop: e.field
|
|
249
250
|
}, {
|
|
250
|
-
label:
|
|
251
|
-
|
|
252
|
-
|
|
251
|
+
label: d(() => [
|
|
252
|
+
e.slotLabelName ? C(r.$slots, e.slotLabelName, { key: 1 }, void 0, !0) : (o(), s("div", {
|
|
253
|
+
key: 0,
|
|
254
|
+
style: M(e.labelStyle)
|
|
253
255
|
}, [
|
|
254
256
|
f(c(e.label) + " ", 1),
|
|
255
|
-
e.required ? (
|
|
256
|
-
], 4)
|
|
257
|
+
e.required ? (o(), s("span", ye, "*")) : D("", !0)
|
|
258
|
+
], 4))
|
|
257
259
|
]),
|
|
258
|
-
default:
|
|
259
|
-
|
|
260
|
+
default: d(() => [
|
|
261
|
+
b(I, {
|
|
260
262
|
modelValue: l.states.model[e.field],
|
|
261
263
|
"onUpdate:modelValue": (a) => l.states.model[e.field] = a,
|
|
262
264
|
disabled: e.disabled || l.formOptions.isDisabled,
|
|
263
265
|
onChange: (a) => l.radioChange(a, e.field)
|
|
264
266
|
}, {
|
|
265
|
-
default:
|
|
267
|
+
default: d(() => {
|
|
266
268
|
var a;
|
|
267
269
|
return [
|
|
268
|
-
(
|
|
269
|
-
var
|
|
270
|
-
return
|
|
271
|
-
label: n[((
|
|
270
|
+
(o(!0), s(V, null, U((a = e.options) == null ? void 0 : a.data, (n) => {
|
|
271
|
+
var i, h;
|
|
272
|
+
return o(), u(j, {
|
|
273
|
+
label: n[((i = e.options) == null ? void 0 : i.valueKey) || "code"],
|
|
272
274
|
size: "large",
|
|
273
275
|
key: n[((h = e.options) == null ? void 0 : h.valueKey) || "code"]
|
|
274
276
|
}, {
|
|
275
|
-
default:
|
|
276
|
-
|
|
277
|
+
default: d(() => [
|
|
278
|
+
w("img", {
|
|
277
279
|
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",
|
|
278
280
|
style: { width: "44px", height: "44px", "margin-bottom": "-15px", "margin-left": "4px" },
|
|
279
281
|
alt: ""
|
|
@@ -288,42 +290,43 @@ function we(M, x, _, l, z, H) {
|
|
|
288
290
|
}, 1032, ["modelValue", "onUpdate:modelValue", "disabled", "onChange"])
|
|
289
291
|
]),
|
|
290
292
|
_: 2
|
|
291
|
-
}, 1032, ["label", "rules", "prop"])) : e.type === "radio" ? (
|
|
293
|
+
}, 1032, ["label", "rules", "prop"])) : e.type === "radio" ? (o(), u(p, {
|
|
292
294
|
key: 3,
|
|
293
295
|
label: e.label,
|
|
294
296
|
rules: e.isHide ? [] : e.rules,
|
|
295
297
|
prop: e.field,
|
|
296
|
-
class:
|
|
298
|
+
class: K([e.labelNode ? "radio_Note" : "rule_err"])
|
|
297
299
|
}, {
|
|
298
|
-
label:
|
|
299
|
-
|
|
300
|
-
|
|
300
|
+
label: d(() => [
|
|
301
|
+
e.slotLabelName ? C(r.$slots, e.slotLabelName, { key: 1 }, void 0, !0) : (o(), s("div", {
|
|
302
|
+
key: 0,
|
|
303
|
+
style: M(e.labelStyle)
|
|
301
304
|
}, [
|
|
302
305
|
f(c(e.label) + " ", 1),
|
|
303
|
-
e.required ? (
|
|
304
|
-
], 4)
|
|
306
|
+
e.required ? (o(), s("span", ie, "*")) : D("", !0)
|
|
307
|
+
], 4))
|
|
305
308
|
]),
|
|
306
|
-
default:
|
|
307
|
-
|
|
309
|
+
default: d(() => [
|
|
310
|
+
b(I, {
|
|
308
311
|
modelValue: l.states.model[e.field],
|
|
309
312
|
"onUpdate:modelValue": (a) => l.states.model[e.field] = a,
|
|
310
313
|
disabled: e.disabled || l.formOptions.isDisabled,
|
|
311
314
|
onChange: (a) => l.radioChange(a, e.field)
|
|
312
315
|
}, {
|
|
313
|
-
default:
|
|
316
|
+
default: d(() => {
|
|
314
317
|
var a;
|
|
315
318
|
return [
|
|
316
|
-
(
|
|
317
|
-
var
|
|
318
|
-
return
|
|
319
|
+
(o(!0), s(V, null, U((a = e.options) == null ? void 0 : a.data, (n) => {
|
|
320
|
+
var i, h;
|
|
321
|
+
return o(), u(j, {
|
|
319
322
|
size: "large",
|
|
320
|
-
label: n[((
|
|
323
|
+
label: n[((i = e.options) == null ? void 0 : i.valueKey) || "code"],
|
|
321
324
|
key: n[((h = e.options) == null ? void 0 : h.valueKey) || "code"]
|
|
322
325
|
}, {
|
|
323
|
-
default:
|
|
324
|
-
var
|
|
326
|
+
default: d(() => {
|
|
327
|
+
var _;
|
|
325
328
|
return [
|
|
326
|
-
f(c(n[((
|
|
329
|
+
f(c(n[((_ = e.options) == null ? void 0 : _.labelkey) || "name"]), 1)
|
|
327
330
|
];
|
|
328
331
|
}),
|
|
329
332
|
_: 2
|
|
@@ -335,39 +338,39 @@ function we(M, x, _, l, z, H) {
|
|
|
335
338
|
}, 1032, ["modelValue", "onUpdate:modelValue", "disabled", "onChange"])
|
|
336
339
|
]),
|
|
337
340
|
_: 2
|
|
338
|
-
}, 1032, ["label", "rules", "prop", "class"])) : e.type === "radioNote" ? (
|
|
341
|
+
}, 1032, ["label", "rules", "prop", "class"])) : e.type === "radioNote" ? (o(), u(p, {
|
|
339
342
|
key: 4,
|
|
340
343
|
label: e.label,
|
|
341
344
|
rules: e.isHide ? [] : e.rules,
|
|
342
345
|
prop: e.field,
|
|
343
|
-
class:
|
|
346
|
+
class: K([e.labelNode ? "radio_Note" : "rule_err"])
|
|
344
347
|
}, {
|
|
345
|
-
default:
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
e.required ? (
|
|
348
|
+
default: d(() => [
|
|
349
|
+
w("div", null, [
|
|
350
|
+
w("span", he, c(e.labelBefore), 1),
|
|
351
|
+
w("span", fe, c(e.labelNode), 1),
|
|
352
|
+
e.required ? (o(), s("span", Me, "*")) : D("", !0)
|
|
350
353
|
]),
|
|
351
|
-
|
|
354
|
+
b(I, {
|
|
352
355
|
modelValue: l.states.model[e.field],
|
|
353
356
|
"onUpdate:modelValue": (a) => l.states.model[e.field] = a,
|
|
354
357
|
disabled: e.disabled || l.formOptions.isDisabled,
|
|
355
358
|
onChange: (a) => l.radioChange(a, e.field)
|
|
356
359
|
}, {
|
|
357
|
-
default:
|
|
360
|
+
default: d(() => {
|
|
358
361
|
var a;
|
|
359
362
|
return [
|
|
360
|
-
(
|
|
361
|
-
var
|
|
362
|
-
return
|
|
363
|
+
(o(!0), s(V, null, U((a = e.options) == null ? void 0 : a.data, (n) => {
|
|
364
|
+
var i, h;
|
|
365
|
+
return o(), u(j, {
|
|
363
366
|
size: "large",
|
|
364
|
-
label: n[((
|
|
367
|
+
label: n[((i = e.options) == null ? void 0 : i.valueKey) || "code"],
|
|
365
368
|
key: n[((h = e.options) == null ? void 0 : h.valueKey) || "code"]
|
|
366
369
|
}, {
|
|
367
|
-
default:
|
|
368
|
-
var
|
|
370
|
+
default: d(() => {
|
|
371
|
+
var _;
|
|
369
372
|
return [
|
|
370
|
-
f(c(n[((
|
|
373
|
+
f(c(n[((_ = e.options) == null ? void 0 : _.labelkey) || "name"]), 1)
|
|
371
374
|
];
|
|
372
375
|
}),
|
|
373
376
|
_: 2
|
|
@@ -379,43 +382,44 @@ function we(M, x, _, l, z, H) {
|
|
|
379
382
|
}, 1032, ["modelValue", "onUpdate:modelValue", "disabled", "onChange"])
|
|
380
383
|
]),
|
|
381
384
|
_: 2
|
|
382
|
-
}, 1032, ["label", "rules", "prop", "class"])) : e.type === "checkbox" ? (
|
|
385
|
+
}, 1032, ["label", "rules", "prop", "class"])) : e.type === "checkbox" ? (o(), u(p, {
|
|
383
386
|
key: 5,
|
|
384
387
|
label: e.label,
|
|
385
388
|
rules: e.isHide ? [] : e.rules,
|
|
386
389
|
prop: e.field
|
|
387
390
|
}, {
|
|
388
|
-
label:
|
|
389
|
-
|
|
390
|
-
|
|
391
|
+
label: d(() => [
|
|
392
|
+
e.slotLabelName ? C(r.$slots, e.slotLabelName, { key: 1 }, void 0, !0) : (o(), s("div", {
|
|
393
|
+
key: 0,
|
|
394
|
+
style: M(e.labelStyle)
|
|
391
395
|
}, [
|
|
392
396
|
f(c(e.label) + " ", 1),
|
|
393
|
-
e.required ? (
|
|
394
|
-
], 4)
|
|
397
|
+
e.required ? (o(), s("span", ge, "*")) : D("", !0)
|
|
398
|
+
], 4))
|
|
395
399
|
]),
|
|
396
|
-
default:
|
|
397
|
-
|
|
400
|
+
default: d(() => [
|
|
401
|
+
b(A, {
|
|
398
402
|
modelValue: l.states.model[e.field],
|
|
399
403
|
"onUpdate:modelValue": (a) => l.states.model[e.field] = a,
|
|
400
404
|
onChange: (a) => l.checkChange(a, e.field),
|
|
401
405
|
disabled: e.disabled || l.formOptions.isDisabled,
|
|
402
|
-
style:
|
|
406
|
+
style: M(
|
|
403
407
|
e.ways === "row" ? "display: flex; align-items: flex-start;flex-flow: row nowrap; " : "display: flex; align-items: flex-start;flex-flow: column nowrap; "
|
|
404
408
|
)
|
|
405
409
|
}, {
|
|
406
|
-
default:
|
|
410
|
+
default: d(() => {
|
|
407
411
|
var a;
|
|
408
412
|
return [
|
|
409
|
-
(
|
|
410
|
-
var
|
|
411
|
-
return
|
|
412
|
-
key: n[((
|
|
413
|
+
(o(!0), s(V, null, U((a = e.options) == null ? void 0 : a.data, (n) => {
|
|
414
|
+
var i, h;
|
|
415
|
+
return o(), u(L, {
|
|
416
|
+
key: n[((i = e.options) == null ? void 0 : i.valueKey) || "code"],
|
|
413
417
|
label: n[((h = e.options) == null ? void 0 : h.valueKey) || "code"]
|
|
414
418
|
}, {
|
|
415
|
-
default:
|
|
416
|
-
var
|
|
419
|
+
default: d(() => {
|
|
420
|
+
var _;
|
|
417
421
|
return [
|
|
418
|
-
f(c(n[((
|
|
422
|
+
f(c(n[((_ = e.options) == null ? void 0 : _.labelkey) || "name"]), 1)
|
|
419
423
|
];
|
|
420
424
|
}),
|
|
421
425
|
_: 2
|
|
@@ -427,43 +431,44 @@ function we(M, x, _, l, z, H) {
|
|
|
427
431
|
}, 1032, ["modelValue", "onUpdate:modelValue", "onChange", "disabled", "style"])
|
|
428
432
|
]),
|
|
429
433
|
_: 2
|
|
430
|
-
}, 1032, ["label", "rules", "prop"])) : e.type === "checkboxRadio" ? (
|
|
434
|
+
}, 1032, ["label", "rules", "prop"])) : e.type === "checkboxRadio" ? (o(), u(p, {
|
|
431
435
|
key: 6,
|
|
432
436
|
label: e.label,
|
|
433
437
|
rules: e.isHide ? [] : e.rules,
|
|
434
438
|
prop: e.field
|
|
435
439
|
}, {
|
|
436
|
-
label:
|
|
437
|
-
|
|
438
|
-
|
|
440
|
+
label: d(() => [
|
|
441
|
+
e.slotLabelName ? C(r.$slots, e.slotLabelName, { key: 1 }, void 0, !0) : (o(), s("div", {
|
|
442
|
+
key: 0,
|
|
443
|
+
style: M(e.labelStyle)
|
|
439
444
|
}, [
|
|
440
445
|
f(c(e.label) + " ", 1),
|
|
441
|
-
e.required ? (
|
|
442
|
-
], 4)
|
|
446
|
+
e.required ? (o(), s("span", _e, "*")) : D("", !0)
|
|
447
|
+
], 4))
|
|
443
448
|
]),
|
|
444
|
-
default:
|
|
445
|
-
|
|
449
|
+
default: d(() => [
|
|
450
|
+
b(A, {
|
|
446
451
|
modelValue: l.states.model[e.field],
|
|
447
452
|
"onUpdate:modelValue": (a) => l.states.model[e.field] = a,
|
|
448
453
|
onChange: (a) => l.handleCheckedChange(a, e.field),
|
|
449
454
|
disabled: e.disabled || l.formOptions.isDisabled,
|
|
450
|
-
style:
|
|
455
|
+
style: M(
|
|
451
456
|
e.ways === "row" ? "display: flex; align-items: flex-start;flex-flow: row nowrap; " : "display: flex; align-items: flex-start;flex-flow: column nowrap; "
|
|
452
457
|
)
|
|
453
458
|
}, {
|
|
454
|
-
default:
|
|
459
|
+
default: d(() => {
|
|
455
460
|
var a;
|
|
456
461
|
return [
|
|
457
|
-
(
|
|
458
|
-
var
|
|
459
|
-
return
|
|
460
|
-
key: n[((
|
|
462
|
+
(o(!0), s(V, null, U((a = e.options) == null ? void 0 : a.data, (n) => {
|
|
463
|
+
var i, h;
|
|
464
|
+
return o(), u(L, {
|
|
465
|
+
key: n[((i = e.options) == null ? void 0 : i.valueKey) || "code"],
|
|
461
466
|
label: n[((h = e.options) == null ? void 0 : h.valueKey) || "code"]
|
|
462
467
|
}, {
|
|
463
|
-
default:
|
|
464
|
-
var
|
|
468
|
+
default: d(() => {
|
|
469
|
+
var _;
|
|
465
470
|
return [
|
|
466
|
-
f(c(n[((
|
|
471
|
+
f(c(n[((_ = e.options) == null ? void 0 : _.labelkey) || "name"]), 1)
|
|
467
472
|
];
|
|
468
473
|
}),
|
|
469
474
|
_: 2
|
|
@@ -475,23 +480,24 @@ function we(M, x, _, l, z, H) {
|
|
|
475
480
|
}, 1032, ["modelValue", "onUpdate:modelValue", "onChange", "disabled", "style"])
|
|
476
481
|
]),
|
|
477
482
|
_: 2
|
|
478
|
-
}, 1032, ["label", "rules", "prop"])) : e.type === "select" ? (
|
|
483
|
+
}, 1032, ["label", "rules", "prop"])) : e.type === "select" ? (o(), u(p, {
|
|
479
484
|
key: 7,
|
|
480
485
|
label: e.label,
|
|
481
486
|
rules: e.isHide ? [] : e.rules,
|
|
482
487
|
disabled: e.disabled || l.formOptions.isDisabled,
|
|
483
488
|
prop: e.field
|
|
484
489
|
}, {
|
|
485
|
-
label:
|
|
486
|
-
|
|
487
|
-
|
|
490
|
+
label: d(() => [
|
|
491
|
+
e.slotLabelName ? C(r.$slots, e.slotLabelName, { key: 1 }, void 0, !0) : (o(), s("div", {
|
|
492
|
+
key: 0,
|
|
493
|
+
style: M(e.labelStyle)
|
|
488
494
|
}, [
|
|
489
495
|
f(c(e.label) + " ", 1),
|
|
490
|
-
e.required ? (
|
|
491
|
-
], 4)
|
|
496
|
+
e.required ? (o(), s("span", Ne, "*")) : D("", !0)
|
|
497
|
+
], 4))
|
|
492
498
|
]),
|
|
493
|
-
default:
|
|
494
|
-
|
|
499
|
+
default: d(() => [
|
|
500
|
+
b(T, {
|
|
495
501
|
onChange: (a) => l.selectChange(a, e.field),
|
|
496
502
|
modelValue: l.states.model[e.field],
|
|
497
503
|
"onUpdate:modelValue": (a) => l.states.model[e.field] = a,
|
|
@@ -499,43 +505,44 @@ function we(M, x, _, l, z, H) {
|
|
|
499
505
|
placeholder: e.placeholder,
|
|
500
506
|
clearable: e.clearable
|
|
501
507
|
}, {
|
|
502
|
-
default:
|
|
508
|
+
default: d(() => {
|
|
503
509
|
var a;
|
|
504
510
|
return [
|
|
505
|
-
(
|
|
506
|
-
var
|
|
507
|
-
return
|
|
508
|
-
key: n[((
|
|
511
|
+
(o(!0), s(V, null, U((a = e.options) == null ? void 0 : a.data, (n) => {
|
|
512
|
+
var i, h, _;
|
|
513
|
+
return o(), u(S, {
|
|
514
|
+
key: n[((i = e.options) == null ? void 0 : i.valueKey) || "code"],
|
|
509
515
|
label: n[((h = e.options) == null ? void 0 : h.labelkey) || "name"],
|
|
510
|
-
value: n[((
|
|
516
|
+
value: n[((_ = e.options) == null ? void 0 : _.valueKey) || "code"]
|
|
511
517
|
}, null, 8, ["label", "value"]);
|
|
512
518
|
}), 128))
|
|
513
519
|
];
|
|
514
520
|
}),
|
|
515
521
|
_: 2
|
|
516
522
|
}, 1032, ["onChange", "modelValue", "onUpdate:modelValue", "disabled", "placeholder", "clearable"]),
|
|
517
|
-
|
|
523
|
+
w("div", {
|
|
518
524
|
class: "item_tips_blow",
|
|
519
|
-
style:
|
|
525
|
+
style: M(e.tipsBlowStyle)
|
|
520
526
|
}, c(e.tipsBlow), 5)
|
|
521
527
|
]),
|
|
522
528
|
_: 2
|
|
523
|
-
}, 1032, ["label", "rules", "disabled", "prop"])) : e.type === "date" ? (
|
|
529
|
+
}, 1032, ["label", "rules", "disabled", "prop"])) : e.type === "date" ? (o(), u(p, {
|
|
524
530
|
key: 8,
|
|
525
531
|
label: e.label,
|
|
526
532
|
rules: e.isHide ? [] : e.rules,
|
|
527
533
|
prop: e.field
|
|
528
534
|
}, {
|
|
529
|
-
label:
|
|
530
|
-
|
|
531
|
-
|
|
535
|
+
label: d(() => [
|
|
536
|
+
e.slotLabelName ? C(r.$slots, e.slotLabelName, { key: 1 }, void 0, !0) : (o(), s("div", {
|
|
537
|
+
key: 0,
|
|
538
|
+
style: M(e.labelStyle)
|
|
532
539
|
}, [
|
|
533
540
|
f(c(e.label) + " ", 1),
|
|
534
|
-
e.required ? (
|
|
535
|
-
], 4)
|
|
541
|
+
e.required ? (o(), s("span", ke, "*")) : D("", !0)
|
|
542
|
+
], 4))
|
|
536
543
|
]),
|
|
537
|
-
default:
|
|
538
|
-
|
|
544
|
+
default: d(() => [
|
|
545
|
+
b(E, {
|
|
539
546
|
format: "DD/MM/YYYY",
|
|
540
547
|
"value-format": "DD/MM/YYYY",
|
|
541
548
|
"disabled-date": e.disabledDate,
|
|
@@ -550,22 +557,23 @@ function we(M, x, _, l, z, H) {
|
|
|
550
557
|
}, null, 8, ["disabled-date", "onChange", "prefix-icon", "modelValue", "onUpdate:modelValue", "disabled", "readonly", "type", "placeholder"])
|
|
551
558
|
]),
|
|
552
559
|
_: 2
|
|
553
|
-
}, 1032, ["label", "rules", "prop"])) : e.type === "daterange" ? (
|
|
560
|
+
}, 1032, ["label", "rules", "prop"])) : e.type === "daterange" ? (o(), u(p, {
|
|
554
561
|
key: 9,
|
|
555
562
|
label: e.label,
|
|
556
563
|
rules: e.isHide ? [] : e.rules,
|
|
557
564
|
prop: e.field
|
|
558
565
|
}, {
|
|
559
|
-
label:
|
|
560
|
-
|
|
561
|
-
|
|
566
|
+
label: d(() => [
|
|
567
|
+
e.slotLabelName ? C(r.$slots, e.slotLabelName, { key: 1 }, void 0, !0) : (o(), s("div", {
|
|
568
|
+
key: 0,
|
|
569
|
+
style: M(e.labelStyle)
|
|
562
570
|
}, [
|
|
563
571
|
f(c(e.label) + " ", 1),
|
|
564
|
-
e.required ? (
|
|
565
|
-
], 4)
|
|
572
|
+
e.required ? (o(), s("span", De, "*")) : D("", !0)
|
|
573
|
+
], 4))
|
|
566
574
|
]),
|
|
567
|
-
default:
|
|
568
|
-
|
|
575
|
+
default: d(() => [
|
|
576
|
+
b(E, {
|
|
569
577
|
format: "DD/MM/YYYY",
|
|
570
578
|
"value-format": "DD/MM/YYYY",
|
|
571
579
|
"disabled-date": e.disabledDate,
|
|
@@ -581,42 +589,44 @@ function we(M, x, _, l, z, H) {
|
|
|
581
589
|
}, null, 8, ["disabled-date", "onChange", "modelValue", "onUpdate:modelValue", "prefix-icon", "start-placeholder", "end-placeholder"])
|
|
582
590
|
]),
|
|
583
591
|
_: 2
|
|
584
|
-
}, 1032, ["label", "rules", "prop"])) : e.type === "slotItem" ? (
|
|
592
|
+
}, 1032, ["label", "rules", "prop"])) : e.type === "slotItem" ? (o(), u(p, {
|
|
585
593
|
key: 10,
|
|
586
594
|
label: e.label,
|
|
587
595
|
rules: e.isHide ? [] : e.rules,
|
|
588
596
|
prop: e.field,
|
|
589
597
|
class: "rule_err"
|
|
590
598
|
}, {
|
|
591
|
-
label:
|
|
592
|
-
|
|
593
|
-
|
|
599
|
+
label: d(() => [
|
|
600
|
+
e.slotLabelName ? C(r.$slots, e.slotLabelName, { key: 1 }, void 0, !0) : (o(), s("div", {
|
|
601
|
+
key: 0,
|
|
602
|
+
style: M(e.labelStyle)
|
|
594
603
|
}, [
|
|
595
604
|
f(c(e.label) + " ", 1),
|
|
596
|
-
e.required ? (
|
|
597
|
-
], 4)
|
|
605
|
+
e.required ? (o(), s("span", Ce, "*")) : D("", !0)
|
|
606
|
+
], 4))
|
|
598
607
|
]),
|
|
599
|
-
default:
|
|
600
|
-
|
|
608
|
+
default: d(() => [
|
|
609
|
+
C(r.$slots, e.slotItemName, {}, void 0, !0)
|
|
601
610
|
]),
|
|
602
611
|
_: 2
|
|
603
|
-
}, 1032, ["label", "rules", "prop"])) : e.type === "phone" ? (
|
|
612
|
+
}, 1032, ["label", "rules", "prop"])) : e.type === "phone" ? (o(), u(p, {
|
|
604
613
|
key: 11,
|
|
605
614
|
label: e.label,
|
|
606
615
|
rules: e.isHide ? [] : e.rules.phoneNumber,
|
|
607
616
|
prop: e.field.phoneNumber,
|
|
608
617
|
class: "phone_item"
|
|
609
618
|
}, {
|
|
610
|
-
label:
|
|
611
|
-
|
|
612
|
-
|
|
619
|
+
label: d(() => [
|
|
620
|
+
e.slotLabelName ? C(r.$slots, e.slotLabelName, { key: 1 }, void 0, !0) : (o(), s("div", {
|
|
621
|
+
key: 0,
|
|
622
|
+
style: M(e.labelStyle)
|
|
613
623
|
}, [
|
|
614
624
|
f(c(e.label) + " ", 1),
|
|
615
|
-
e.required ? (
|
|
616
|
-
], 4)
|
|
625
|
+
e.required ? (o(), s("span", xe, "*")) : D("", !0)
|
|
626
|
+
], 4))
|
|
617
627
|
]),
|
|
618
|
-
default:
|
|
619
|
-
|
|
628
|
+
default: d(() => [
|
|
629
|
+
b(x, {
|
|
620
630
|
maxlength: e.maxlength,
|
|
621
631
|
modelValue: l.states.model[e.field.phoneNumber],
|
|
622
632
|
"onUpdate:modelValue": (a) => l.states.model[e.field.phoneNumber] = a,
|
|
@@ -624,22 +634,22 @@ function we(M, x, _, l, z, H) {
|
|
|
624
634
|
placeholder: e.placeholder || "请选择",
|
|
625
635
|
clearable: e.clearable
|
|
626
636
|
}, {
|
|
627
|
-
prepend:
|
|
637
|
+
prepend: d(() => {
|
|
628
638
|
var a;
|
|
629
639
|
return [
|
|
630
|
-
|
|
640
|
+
b(T, {
|
|
631
641
|
disabled: e.disabled || l.formOptions.isDisabled,
|
|
632
642
|
modelValue: l.states.model[e.field.areaCode],
|
|
633
643
|
"onUpdate:modelValue": (n) => l.states.model[e.field.areaCode] = n,
|
|
634
644
|
placeholder: ((a = e.options) == null ? void 0 : a.placeholder) || "请选择",
|
|
635
645
|
style: { width: "115px" }
|
|
636
646
|
}, {
|
|
637
|
-
default:
|
|
647
|
+
default: d(() => {
|
|
638
648
|
var n;
|
|
639
649
|
return [
|
|
640
|
-
(
|
|
641
|
-
label:
|
|
642
|
-
value:
|
|
650
|
+
(o(!0), s(V, null, U((n = e.options) == null ? void 0 : n.data, (i, h) => (o(), u(S, {
|
|
651
|
+
label: i.name,
|
|
652
|
+
value: i.code,
|
|
643
653
|
key: h
|
|
644
654
|
}, null, 8, ["label", "value"]))), 128))
|
|
645
655
|
];
|
|
@@ -652,30 +662,31 @@ function we(M, x, _, l, z, H) {
|
|
|
652
662
|
}, 1032, ["maxlength", "modelValue", "onUpdate:modelValue", "disabled", "placeholder", "clearable"])
|
|
653
663
|
]),
|
|
654
664
|
_: 2
|
|
655
|
-
}, 1032, ["label", "rules", "prop"])) : e.type === "line" ? (
|
|
665
|
+
}, 1032, ["label", "rules", "prop"])) : e.type === "line" ? (o(), u(p, {
|
|
656
666
|
key: 12,
|
|
657
667
|
label: e.label
|
|
658
668
|
}, {
|
|
659
|
-
default:
|
|
669
|
+
default: d(() => [
|
|
660
670
|
Ve
|
|
661
671
|
]),
|
|
662
672
|
_: 2
|
|
663
|
-
}, 1032, ["label"])) : (
|
|
673
|
+
}, 1032, ["label"])) : (o(), u(p, {
|
|
664
674
|
key: 13,
|
|
665
675
|
rules: e.isHide ? [] : e.rules,
|
|
666
676
|
prop: e.field,
|
|
667
|
-
class:
|
|
677
|
+
class: K(e.prepend ? "input-item" : "")
|
|
668
678
|
}, {
|
|
669
|
-
label:
|
|
670
|
-
|
|
671
|
-
|
|
679
|
+
label: d(() => [
|
|
680
|
+
e.slotLabelName ? C(r.$slots, e.slotLabelName, { key: 1 }, void 0, !0) : (o(), s("div", {
|
|
681
|
+
key: 0,
|
|
682
|
+
style: M(e.labelStyle)
|
|
672
683
|
}, [
|
|
673
684
|
f(c(e.label) + " ", 1),
|
|
674
|
-
e.required ? (
|
|
675
|
-
], 4)
|
|
685
|
+
e.required ? (o(), s("span", Ue, "*")) : D("", !0)
|
|
686
|
+
], 4))
|
|
676
687
|
]),
|
|
677
|
-
default:
|
|
678
|
-
|
|
688
|
+
default: d(() => [
|
|
689
|
+
b(x, {
|
|
679
690
|
maxlength: e.maxlength,
|
|
680
691
|
modelValue: l.states.model[e.field],
|
|
681
692
|
"onUpdate:modelValue": (a) => l.states.model[e.field] = a,
|
|
@@ -689,14 +700,14 @@ function we(M, x, _, l, z, H) {
|
|
|
689
700
|
}, le({ _: 2 }, [
|
|
690
701
|
e.prepend ? {
|
|
691
702
|
name: "prepend",
|
|
692
|
-
fn:
|
|
703
|
+
fn: d(() => [
|
|
693
704
|
f(c(e.prepend), 1)
|
|
694
705
|
]),
|
|
695
706
|
key: "0"
|
|
696
707
|
} : void 0,
|
|
697
708
|
e.append ? {
|
|
698
709
|
name: "append",
|
|
699
|
-
fn:
|
|
710
|
+
fn: d(() => [
|
|
700
711
|
f(c(e.append), 1)
|
|
701
712
|
]),
|
|
702
713
|
key: "1"
|
|
@@ -714,14 +725,14 @@ function we(M, x, _, l, z, H) {
|
|
|
714
725
|
]),
|
|
715
726
|
_: 3
|
|
716
727
|
}),
|
|
717
|
-
|
|
718
|
-
default:
|
|
719
|
-
|
|
720
|
-
model:
|
|
728
|
+
b(p, { class: "btnsItem" }, {
|
|
729
|
+
default: d(() => [
|
|
730
|
+
C(r.$slots, "buttons", {
|
|
731
|
+
model: g.model,
|
|
721
732
|
onBtnClick: l.onSubmit
|
|
722
733
|
}, () => [
|
|
723
|
-
(
|
|
724
|
-
e.isShow ? (
|
|
734
|
+
(o(!0), s(V, null, U(l.formOptions.btnConfig, (e, v) => (o(), s("div", { key: v }, [
|
|
735
|
+
e.isShow ? (o(), u(t, {
|
|
725
736
|
key: 0,
|
|
726
737
|
btnCode: e.btnCode,
|
|
727
738
|
plain: e.plain,
|
|
@@ -744,14 +755,14 @@ function we(M, x, _, l, z, H) {
|
|
|
744
755
|
fontSize: e.fontSize,
|
|
745
756
|
fontWeight: e.fontWeight,
|
|
746
757
|
styleObj: { ...e.style },
|
|
747
|
-
class:
|
|
758
|
+
class: K(e.class),
|
|
748
759
|
onHandleClick: (a) => l.handleClick(a, e.isRule, e.emitName)
|
|
749
760
|
}, {
|
|
750
|
-
default:
|
|
761
|
+
default: d(() => [
|
|
751
762
|
f(c(e.name), 1)
|
|
752
763
|
]),
|
|
753
764
|
_: 2
|
|
754
|
-
}, 1032, ["btnCode", "plain", "primary", "info", "text", "link", "loading", "loadingColor", "width", "height", "circle", "color", "bgColor", "borderColor", "borderStyle", "borderWidth", "icon", "size", "fontSize", "fontWeight", "styleObj", "class", "onHandleClick"])) :
|
|
765
|
+
}, 1032, ["btnCode", "plain", "primary", "info", "text", "link", "loading", "loadingColor", "width", "height", "circle", "color", "bgColor", "borderColor", "borderStyle", "borderWidth", "icon", "size", "fontSize", "fontWeight", "styleObj", "class", "onHandleClick"])) : D("", !0)
|
|
755
766
|
]))), 128))
|
|
756
767
|
], !0)
|
|
757
768
|
]),
|
|
@@ -761,11 +772,11 @@ function we(M, x, _, l, z, H) {
|
|
|
761
772
|
_: 3
|
|
762
773
|
}, 16, ["model", "label-position"]);
|
|
763
774
|
}
|
|
764
|
-
const W = /* @__PURE__ */ re(
|
|
765
|
-
function
|
|
766
|
-
|
|
775
|
+
const W = /* @__PURE__ */ re(ne, [["render", we], ["__scopeId", "data-v-2127471b"]]);
|
|
776
|
+
function H(r, N = {}) {
|
|
777
|
+
H.installed || (H.installed = !0, r.component("common-el-form", W));
|
|
767
778
|
}
|
|
768
|
-
W.install =
|
|
779
|
+
W.install = H;
|
|
769
780
|
export {
|
|
770
781
|
W as default
|
|
771
782
|
};
|
package/common-form.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(e,f){typeof exports=="object"&&typeof module<"u"?module.exports=f(require("vue")):typeof define=="function"&&define.amd?define(["vue"],f):(e=typeof globalThis<"u"?globalThis:e||self,e.Form=f(e.Vue))})(this,function(e){"use strict";const f="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHZpZXdCb3g9IjAgMCAxNCAxNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEyLjc1MDIgMS44NzY5NUgxMC4xMjUyVjAuODc2OTUzQzEwLjEyNTIgMC44MDgyMDMgMTAuMDY5IDAuNzUxOTUzIDEwLjAwMDIgMC43NTE5NTNIOS4xMjUyNUM5LjA1NjQ5IDAuNzUxOTUzIDkuMDAwMjUgMC44MDgyMDMgOS4wMDAyNSAwLjg3Njk1M1YxLjg3Njk1SDUuMDAwMjRWMC44NzY5NTNDNS4wMDAyNCAwLjgwODIwMyA0Ljk0Mzk5IDAuNzUxOTUzIDQuODc1MjQgMC43NTE5NTNINC4wMDAyNEMzLjkzMTQ5IDAuNzUxOTUzIDMuODc1MjQgMC44MDgyMDMgMy44NzUyNCAwLjg3Njk1M1YxLjg3Njk1SDEuMjUwMjRDMC45NzM2ODIgMS44NzY5NSAwLjc1MDI0NCAyLjEwMDM5IDAuNzUwMjQ0IDIuMzc2OTVWMTIuNzUyQzAuNzUwMjQ0IDEzLjAyODUgMC45NzM2ODIgMTMuMjUyIDEuMjUwMjQgMTMuMjUySDEyLjc1MDJDMTMuMDI2OCAxMy4yNTIgMTMuMjUwMiAxMy4wMjg1IDEzLjI1MDIgMTIuNzUyVjIuMzc2OTVDMTMuMjUwMiAyLjEwMDM5IDEzLjAyNjggMS44NzY5NSAxMi43NTAyIDEuODc2OTVaTTEyLjEyNTIgMTIuMTI3SDEuODc1MjRWNi4xODk0NUgxMi4xMjUyVjEyLjEyN1pNMS44NzUyNCA1LjEyNjk1VjMuMDAxOTVIMy44NzUyNFYzLjc1MTk1QzMuODc1MjQgMy44MjA3IDMuOTMxNDkgMy44NzY5NSA0LjAwMDI0IDMuODc2OTVINC44NzUyNEM0Ljk0Mzk5IDMuODc2OTUgNS4wMDAyNCAzLjgyMDcgNS4wMDAyNCAzLjc1MTk1VjMuMDAxOTVIOS4wMDAyNVYzLjc1MTk1QzkuMDAwMjUgMy44MjA3IDkuMDU2NDkgMy44NzY5NSA5LjEyNTI1IDMuODc2OTVIMTAuMDAwMkMxMC4wNjkgMy44NzY5NSAxMC4xMjUyIDMuODIwNyAxMC4xMjUyIDMuNzUxOTVWMy4wMDE5NUgxMi4xMjUyVjUuMTI2OTVIMS44NzUyNFoiIGZpbGw9ImJsYWNrIiBmaWxsLW9wYWNpdHk9IjAuODUiLz4KPC9zdmc+Cg==",z={props:{fieldList:{type:Array,required:!0},model:Object,options:Object},setup(p,{emit:h}){const i=e.reactive({model:{}}),o=e.ref(null),x=e.shallowRef({render(){return e.h("img",{src:f})}}),E=e.computed(()=>Object.assign([],p.options)),t=()=>{i.model=p.model},b=(n,r,l)=>{o.value&&(r?o.value.validate(C=>{if(C)h(l||"submit",i.model,n);else return!1}):l==="reset"?o.value.resetFields():h(l||"submit",i.model,n))},g=(n,r)=>{h("selectChange",n,r)},k=(n,r)=>{h("radioChange",n,r)},N=(n,r)=>{h("checkChange",n,r)},M=(n,r)=>{const l=i.model[r].length;l!==1&&(l>1&&i.model[r].shift(),h("checkChange",n,r))},V=(n,r,l)=>{b(n,r,l)},_=(n,r)=>{n&&(r==null?void 0:r.key)==="Enter"&&b(void 0,!0,"submit")},D=n=>{h("dateChange",n)},B=n=>{o.value.resetFields(n)},S=n=>{o.value.clearValidate(n)};return e.onMounted(()=>{t(),o.value.resetFields()}),e.watch(()=>p.fieldList,(n,r)=>{n!==r&&t()}),{...e.toRefs(i),formRef:o,states:i,formOptions:E,onSubmit:b,selectChange:g,radioChange:k,checkChange:N,handleCheckedChange:M,prefixIcon:x,handleClick:V,handleKeyUp:_,resetFieldsTest:B,clearValidateTest:S,dateChange:D}}},$="",U=(p,h)=>{const i=p.__vccOpts||p;for(const[o,x]of h)i[o]=x;return i},j=p=>(e.pushScopeId("data-v-a432e7d1"),p=p(),e.popScopeId(),p),I={class:"header-title"},T={class:"title-content"},O={key:0,class:"custom-required"},A={key:0,class:"custom-required"},L=["src"],K={key:0,class:"custom-required"},Y={class:"lable"},F={class:"lable_note"},q={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"},R={key:0,class:"custom-required"},Z={key:0,class:"custom-required"},u={key:0,class:"custom-required"},G=j(()=>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(p,h,i,o,x,E){const t=e.resolveComponent("el-form-item"),b=e.resolveComponent("el-input"),g=e.resolveComponent("el-radio"),k=e.resolveComponent("el-radio-group"),N=e.resolveComponent("el-checkbox"),M=e.resolveComponent("el-checkbox-group"),V=e.resolveComponent("el-option"),_=e.resolveComponent("el-select"),D=e.resolveComponent("el-date-picker"),B=e.resolveComponent("el-col"),S=e.resolveComponent("el-row"),n=e.resolveComponent("sinosoft-common-button"),r=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(r,e.mergeProps({"hide-required-asterisk":"",onSubmit:h[0]||(h[0]=e.withModifiers(()=>{},["prevent"])),model:i.model},o.formOptions,{"label-position":o.formOptions.labelPosition,ref:"formRef"}),{default:e.withCtx(()=>[e.createVNode(S,{gutter:20},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.fieldList,(l,C)=>e.withDirectives((e.openBlock(),e.createBlock(B,{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:C},{default:e.withCtx(()=>[e.createElementVNode("div",{style:e.normalizeStyle(l.style)},[l.type==="title"?(e.openBlock(),e.createBlock(t,{key:0},{default:e.withCtx(()=>[e.createElementVNode("div",I,[e.createElementVNode("span",T,e.toDisplayString(l.title),1)])]),_:2},1024)):l.type==="name"?(e.openBlock(),e.createBlock(t,{key:1,label:l.label,disabled:l.disabled||o.formOptions.isDisabled,class:"container_name"},{label:e.withCtx(()=>[e.createElementVNode("div",{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(t,{rules:l.isHide?[]:l.rules.nameEnFamily,prop:l.field.nameEnFamily,class:"item-name"},{default:e.withCtx(()=>[e.createVNode(b,{maxlength:l.maxlength,modelValue:o.states.model[l.field.nameEnFamily],"onUpdate:modelValue":a=>o.states.model[l.field.nameEnFamily]=a,"show-word-limit":"",readonly:l.readonly,type:l.type?l.type:"text",placeholder:l.placeholderNameEnFamily,disabled:l.disabled||o.formOptions.isDisabled,onKeyup:e.withKeys(a=>o.handleKeyUp(l.enterable),["enter"])},null,8,["maxlength","modelValue","onUpdate:modelValue","readonly","type","placeholder","disabled","onKeyup"])]),_:2},1032,["rules","prop"]),e.createVNode(t,{rules:l.isHide?[]:l.rules.nameEn,prop:l.field.nameEn,class:"item-name-right"},{default:e.withCtx(()=>[e.createVNode(b,{maxlength:l.maxlength,modelValue:o.states.model[l.field.nameEn],"onUpdate:modelValue":a=>o.states.model[l.field.nameEn]=a,readonly:l.readonly,type:l.type?l.type:"text",placeholder:l.placeholderNameEn,disabled:l.disabled||o.formOptions.isDisabled,onKeyup:e.withKeys(a=>o.handleKeyUp(l.enterable),["enter"])},null,8,["maxlength","modelValue","onUpdate:modelValue","readonly","type","placeholder","disabled","onKeyup"])]),_:2},1032,["rules","prop"]),e.createVNode(t,{rules:l.isHide?[]:l.rules.nameChFamily,prop:l.field.nameChFamily,class:"item-name"},{default:e.withCtx(()=>[e.createVNode(b,{maxlength:l.maxlength,modelValue:o.states.model[l.field.nameChFamily],"onUpdate:modelValue":a=>o.states.model[l.field.nameChFamily]=a,readonly:l.readonly,type:l.type?l.type:"text",placeholder:l.placeholderNameChFamily,disabled:l.disabled||o.formOptions.isDisabled,onKeyup:e.withKeys(a=>o.handleKeyUp(l.enterable),["enter"])},null,8,["maxlength","modelValue","onUpdate:modelValue","readonly","type","placeholder","disabled","onKeyup"])]),_:2},1032,["rules","prop"]),e.createVNode(t,{rules:l.isHide?[]:l.rules.nameCh,prop:l.field.nameCh,class:"item-name-right"},{default:e.withCtx(()=>[e.createVNode(b,{maxlength:l.maxlength,modelValue:o.states.model[l.field.nameCh],"onUpdate:modelValue":a=>o.states.model[l.field.nameCh]=a,readonly:l.readonly,type:l.type?l.type:"text",placeholder:l.placeholderNameCh,disabled:l.disabled||o.formOptions.isDisabled,onKeyup:e.withKeys(a=>o.handleKeyUp(l.enterable),["enter"])},null,8,["maxlength","modelValue","onUpdate:modelValue","readonly","type","placeholder","disabled","onKeyup"])]),_:2},1032,["rules","prop"])]),_:2},1032,["label","disabled"])):l.type==="gender"?(e.openBlock(),e.createBlock(t,{key:2,label:l.label,rules:l.isHide?[]:l.rules,prop:l.field},{label:e.withCtx(()=>[e.createElementVNode("div",{style:e.normalizeStyle(l.labelStyle)},[e.createTextVNode(e.toDisplayString(l.label)+" ",1),l.required?(e.openBlock(),e.createElementBlock("span",A,"*")):e.createCommentVNode("",!0)],4)]),default:e.withCtx(()=>[e.createVNode(k,{modelValue:o.states.model[l.field],"onUpdate:modelValue":a=>o.states.model[l.field]=a,disabled:l.disabled||o.formOptions.isDisabled,onChange:a=>o.radioChange(a,l.field)},{default:e.withCtx(()=>{var a;return[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((a=l.options)==null?void 0:a.data,d=>{var s,c;return e.openBlock(),e.createBlock(g,{label:d[((s=l.options)==null?void 0:s.valueKey)||"code"],size:"large",key:d[((c=l.options)==null?void 0:c.valueKey)||"code"]},{default:e.withCtx(()=>[e.createElementVNode("img",{src:d.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(t,{key:3,label:l.label,rules:l.isHide?[]:l.rules,prop:l.field,class:e.normalizeClass([l.labelNode?"radio_Note":"rule_err"])},{label:e.withCtx(()=>[e.createElementVNode("div",{style:e.normalizeStyle(l.labelStyle)},[e.createTextVNode(e.toDisplayString(l.label)+" ",1),l.required?(e.openBlock(),e.createElementBlock("span",K,"*")):e.createCommentVNode("",!0)],4)]),default:e.withCtx(()=>[e.createVNode(k,{modelValue:o.states.model[l.field],"onUpdate:modelValue":a=>o.states.model[l.field]=a,disabled:l.disabled||o.formOptions.isDisabled,onChange:a=>o.radioChange(a,l.field)},{default:e.withCtx(()=>{var a;return[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((a=l.options)==null?void 0:a.data,d=>{var s,c;return e.openBlock(),e.createBlock(g,{size:"large",label:d[((s=l.options)==null?void 0:s.valueKey)||"code"],key:d[((c=l.options)==null?void 0:c.valueKey)||"code"]},{default:e.withCtx(()=>{var y;return[e.createTextVNode(e.toDisplayString(d[((y=l.options)==null?void 0:y.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(t,{key:4,label:l.label,rules:l.isHide?[]:l.rules,prop:l.field,class:e.normalizeClass([l.labelNode?"radio_Note":"rule_err"])},{default:e.withCtx(()=>[e.createElementVNode("div",null,[e.createElementVNode("span",Y,e.toDisplayString(l.labelBefore),1),e.createElementVNode("span",F,e.toDisplayString(l.labelNode),1),l.required?(e.openBlock(),e.createElementBlock("span",q,"*")):e.createCommentVNode("",!0)]),e.createVNode(k,{modelValue:o.states.model[l.field],"onUpdate:modelValue":a=>o.states.model[l.field]=a,disabled:l.disabled||o.formOptions.isDisabled,onChange:a=>o.radioChange(a,l.field)},{default:e.withCtx(()=>{var a;return[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((a=l.options)==null?void 0:a.data,d=>{var s,c;return e.openBlock(),e.createBlock(g,{size:"large",label:d[((s=l.options)==null?void 0:s.valueKey)||"code"],key:d[((c=l.options)==null?void 0:c.valueKey)||"code"]},{default:e.withCtx(()=>{var y;return[e.createTextVNode(e.toDisplayString(d[((y=l.options)==null?void 0:y.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(t,{key:5,label:l.label,rules:l.isHide?[]:l.rules,prop:l.field},{label:e.withCtx(()=>[e.createElementVNode("div",{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,{modelValue:o.states.model[l.field],"onUpdate:modelValue":a=>o.states.model[l.field]=a,onChange:a=>o.checkChange(a,l.field),disabled:l.disabled||o.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 a;return[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((a=l.options)==null?void 0:a.data,d=>{var s,c;return e.openBlock(),e.createBlock(N,{key:d[((s=l.options)==null?void 0:s.valueKey)||"code"],label:d[((c=l.options)==null?void 0:c.valueKey)||"code"]},{default:e.withCtx(()=>{var y;return[e.createTextVNode(e.toDisplayString(d[((y=l.options)==null?void 0:y.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(t,{key:6,label:l.label,rules:l.isHide?[]:l.rules,prop:l.field},{label:e.withCtx(()=>[e.createElementVNode("div",{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(M,{modelValue:o.states.model[l.field],"onUpdate:modelValue":a=>o.states.model[l.field]=a,onChange:a=>o.handleCheckedChange(a,l.field),disabled:l.disabled||o.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 a;return[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((a=l.options)==null?void 0:a.data,d=>{var s,c;return e.openBlock(),e.createBlock(N,{key:d[((s=l.options)==null?void 0:s.valueKey)||"code"],label:d[((c=l.options)==null?void 0:c.valueKey)||"code"]},{default:e.withCtx(()=>{var y;return[e.createTextVNode(e.toDisplayString(d[((y=l.options)==null?void 0:y.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(t,{key:7,label:l.label,rules:l.isHide?[]:l.rules,disabled:l.disabled||o.formOptions.isDisabled,prop:l.field},{label:e.withCtx(()=>[e.createElementVNode("div",{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(_,{onChange:a=>o.selectChange(a,l.field),modelValue:o.states.model[l.field],"onUpdate:modelValue":a=>o.states.model[l.field]=a,disabled:l.disabled||o.formOptions.isDisabled,placeholder:l.placeholder,clearable:l.clearable},{default:e.withCtx(()=>{var a;return[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((a=l.options)==null?void 0:a.data,d=>{var s,c,y;return e.openBlock(),e.createBlock(V,{key:d[((s=l.options)==null?void 0:s.valueKey)||"code"],label:d[((c=l.options)==null?void 0:c.labelkey)||"name"],value:d[((y=l.options)==null?void 0:y.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(t,{key:8,label:l.label,rules:l.isHide?[]:l.rules,prop:l.field},{label:e.withCtx(()=>[e.createElementVNode("div",{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.createVNode(D,{format:"DD/MM/YYYY","value-format":"DD/MM/YYYY","disabled-date":l.disabledDate,onChange:o.dateChange,"prefix-icon":o.prefixIcon,modelValue:o.states.model[l.field],"onUpdate:modelValue":a=>o.states.model[l.field]=a,disabled:l.disabled||o.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(t,{key:9,label:l.label,rules:l.isHide?[]:l.rules,prop:l.field},{label:e.withCtx(()=>[e.createElementVNode("div",{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(D,{format:"DD/MM/YYYY","value-format":"DD/MM/YYYY","disabled-date":l.disabledDate,onChange:o.dateChange,modelValue:o.states.model[l.field],"onUpdate:modelValue":a=>o.states.model[l.field]=a,"prefix-icon":o.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(t,{key:10,label:l.label,rules:l.isHide?[]:l.rules,prop:l.field,class:"rule_err"},{label:e.withCtx(()=>[e.createElementVNode("div",{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.renderSlot(p.$slots,l.slotItemName,{},void 0,!0)]),_:2},1032,["label","rules","prop"])):l.type==="phone"?(e.openBlock(),e.createBlock(t,{key:11,label:l.label,rules:l.isHide?[]:l.rules.phoneNumber,prop:l.field.phoneNumber,class:"phone_item"},{label:e.withCtx(()=>[e.createElementVNode("div",{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(b,{maxlength:l.maxlength,modelValue:o.states.model[l.field.phoneNumber],"onUpdate:modelValue":a=>o.states.model[l.field.phoneNumber]=a,disabled:l.disabled||o.formOptions.isDisabled,placeholder:l.placeholder||"请选择",clearable:l.clearable},{prepend:e.withCtx(()=>{var a;return[e.createVNode(_,{disabled:l.disabled||o.formOptions.isDisabled,modelValue:o.states.model[l.field.areaCode],"onUpdate:modelValue":d=>o.states.model[l.field.areaCode]=d,placeholder:((a=l.options)==null?void 0:a.placeholder)||"请选择",style:{width:"115px"}},{default:e.withCtx(()=>{var d;return[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((d=l.options)==null?void 0:d.data,(s,c)=>(e.openBlock(),e.createBlock(V,{label:s.name,value:s.code,key:c},null,8,["label","value"]))),128))]}),_:2},1032,["disabled","modelValue","onUpdate:modelValue","placeholder"])]}),_:2},1032,["maxlength","modelValue","onUpdate:modelValue","disabled","placeholder","clearable"])]),_:2},1032,["label","rules","prop"])):l.type==="line"?(e.openBlock(),e.createBlock(t,{key:12,label:l.label},{default:e.withCtx(()=>[G]),_:2},1032,["label"])):(e.openBlock(),e.createBlock(t,{key:13,rules:l.isHide?[]:l.rules,prop:l.field,class:e.normalizeClass(l.prepend?"input-item":"")},{label:e.withCtx(()=>[e.createElementVNode("div",{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(b,{maxlength:l.maxlength,modelValue:o.states.model[l.field],"onUpdate:modelValue":a=>o.states.model[l.field]=a,readonly:l.readonly,type:l.type?l.type:"text",placeholder:l.placeholder||l.label,disabled:l.disabled||o.formOptions.isDisabled,showPassword:l.showPassword,clearable:l.clearable,onKeyup:e.withKeys(a=>o.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,["maxlength","modelValue","onUpdate:modelValue","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(t,{class:"btnsItem"},{default:e.withCtx(()=>[e.renderSlot(p.$slots,"buttons",{model:i.model,onBtnClick:o.onSubmit},()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.formOptions.btnConfig,(l,C)=>(e.openBlock(),e.createElementBlock("div",{key:C},[l.isShow?(e.openBlock(),e.createBlock(n,{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,styleObj:{...l.style},class:e.normalizeClass(l.class),onHandleClick:a=>o.handleClick(a,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","styleObj","class","onHandleClick"])):e.createCommentVNode("",!0)]))),128))],!0)]),_:3})]),_:3},16,["model","label-position"])}const w=U(z,[["render",X],["__scopeId","data-v-a432e7d1"]]);function m(p,h={}){m.installed||(m.installed=!0,p.component("common-el-form",w))}return w.install=m,w});
|
|
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==",z={props:{fieldList:{type:Array,required:!0},model:Object,options:Object},setup(n,{emit:b}){const i=e.reactive({model:{}}),o=e.ref(null),C=e.shallowRef({render(){return e.h("img",{src:k})}}),E=e.computed(()=>Object.assign([],n.options)),r=()=>{i.model=n.model},h=(t,s,l)=>{o.value&&(s?o.value.validate(N=>{if(N)b(l||"submit",i.model,t);else return!1}):l==="reset"?o.value.resetFields():b(l||"submit",i.model,t))},f=(t,s)=>{b("selectChange",t,s)},g=(t,s)=>{b("radioChange",t,s)},x=(t,s)=>{b("checkChange",t,s)},M=(t,s)=>{const l=i.model[s].length;l!==1&&(l>1&&i.model[s].shift(),b("checkChange",t,s))},V=(t,s,l)=>{h(t,s,l)},_=(t,s)=>{t&&(s==null?void 0:s.key)==="Enter"&&h(void 0,!0,"submit")},D=t=>{b("dateChange",t)},m=t=>{o.value.resetFields(t)},S=t=>{o.value.clearValidate(t)};return e.onMounted(()=>{r(),o.value.resetFields()}),e.watch(()=>n.fieldList,(t,s)=>{t!==s&&r()}),{...e.toRefs(i),formRef:o,states:i,formOptions:E,onSubmit:h,selectChange:f,radioChange:g,checkChange:x,handleCheckedChange:M,prefixIcon:C,handleClick:V,handleKeyUp:_,resetFieldsTest:m,clearValidateTest:S,dateChange:D}}},$="",U=(n,b)=>{const i=n.__vccOpts||n;for(const[o,C]of b)i[o]=C;return i},j=n=>(e.pushScopeId("data-v-2127471b"),n=n(),e.popScopeId(),n),I={class:"header-title"},T={class:"title-content"},L={key:0,class:"custom-required"},O={key:0,class:"custom-required"},A=["src"],K={key:0,class:"custom-required"},Y={class:"lable"},F={class:"lable_note"},q={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"},R={key:0,class:"custom-required"},Z={key:0,class:"custom-required"},G={key:0,class:"custom-required"},J=j(()=>e.createElementVNode("div",{class:"line",style:{"border-top":"1px solid #e8e8e8",width:"100%",height:"0px",margin:"20px 0"}},null,-1)),X={key:0,class:"custom-required"};function u(n,b,i,o,C,E){const r=e.resolveComponent("el-form-item"),h=e.resolveComponent("el-input"),f=e.resolveComponent("el-radio"),g=e.resolveComponent("el-radio-group"),x=e.resolveComponent("el-checkbox"),M=e.resolveComponent("el-checkbox-group"),V=e.resolveComponent("el-option"),_=e.resolveComponent("el-select"),D=e.resolveComponent("el-date-picker"),m=e.resolveComponent("el-col"),S=e.resolveComponent("el-row"),t=e.resolveComponent("sinosoft-common-button"),s=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(s,e.mergeProps({"hide-required-asterisk":"",onSubmit:b[0]||(b[0]=e.withModifiers(()=>{},["prevent"])),model:i.model},o.formOptions,{"label-position":o.formOptions.labelPosition,ref:"formRef"}),{default:e.withCtx(()=>[e.createVNode(S,{gutter:20},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.fieldList,(l,N)=>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:N},{default:e.withCtx(()=>[e.createElementVNode("div",{style:e.normalizeStyle(l.style)},[l.type==="title"?(e.openBlock(),e.createBlock(r,{key:0},{default:e.withCtx(()=>[e.createElementVNode("div",I,[e.createElementVNode("span",T,e.toDisplayString(l.title),1)])]),_:2},1024)):l.type==="name"?(e.openBlock(),e.createBlock(r,{key:1,label:l.label,disabled:l.disabled||o.formOptions.isDisabled,class:"container_name"},{label:e.withCtx(()=>[l.slotLabelName?e.renderSlot(n.$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(r,{rules:l.isHide?[]:l.rules.nameEnFamily,prop:l.field.nameEnFamily,class:"item-name"},{default:e.withCtx(()=>[e.createVNode(h,{maxlength:l.maxlength,modelValue:o.states.model[l.field.nameEnFamily],"onUpdate:modelValue":a=>o.states.model[l.field.nameEnFamily]=a,"show-word-limit":"",readonly:l.readonly,type:l.type?l.type:"text",placeholder:l.placeholderNameEnFamily,disabled:l.disabled||o.formOptions.isDisabled,onKeyup:e.withKeys(a=>o.handleKeyUp(l.enterable),["enter"])},null,8,["maxlength","modelValue","onUpdate:modelValue","readonly","type","placeholder","disabled","onKeyup"])]),_:2},1032,["rules","prop"]),e.createVNode(r,{rules:l.isHide?[]:l.rules.nameEn,prop:l.field.nameEn,class:"item-name-right"},{default:e.withCtx(()=>[e.createVNode(h,{maxlength:l.maxlength,modelValue:o.states.model[l.field.nameEn],"onUpdate:modelValue":a=>o.states.model[l.field.nameEn]=a,readonly:l.readonly,type:l.type?l.type:"text",placeholder:l.placeholderNameEn,disabled:l.disabled||o.formOptions.isDisabled,onKeyup:e.withKeys(a=>o.handleKeyUp(l.enterable),["enter"])},null,8,["maxlength","modelValue","onUpdate:modelValue","readonly","type","placeholder","disabled","onKeyup"])]),_:2},1032,["rules","prop"]),e.createVNode(r,{rules:l.isHide?[]:l.rules.nameChFamily,prop:l.field.nameChFamily,class:"item-name"},{default:e.withCtx(()=>[e.createVNode(h,{maxlength:l.maxlength,modelValue:o.states.model[l.field.nameChFamily],"onUpdate:modelValue":a=>o.states.model[l.field.nameChFamily]=a,readonly:l.readonly,type:l.type?l.type:"text",placeholder:l.placeholderNameChFamily,disabled:l.disabled||o.formOptions.isDisabled,onKeyup:e.withKeys(a=>o.handleKeyUp(l.enterable),["enter"])},null,8,["maxlength","modelValue","onUpdate:modelValue","readonly","type","placeholder","disabled","onKeyup"])]),_:2},1032,["rules","prop"]),e.createVNode(r,{rules:l.isHide?[]:l.rules.nameCh,prop:l.field.nameCh,class:"item-name-right"},{default:e.withCtx(()=>[e.createVNode(h,{maxlength:l.maxlength,modelValue:o.states.model[l.field.nameCh],"onUpdate:modelValue":a=>o.states.model[l.field.nameCh]=a,readonly:l.readonly,type:l.type?l.type:"text",placeholder:l.placeholderNameCh,disabled:l.disabled||o.formOptions.isDisabled,onKeyup:e.withKeys(a=>o.handleKeyUp(l.enterable),["enter"])},null,8,["maxlength","modelValue","onUpdate:modelValue","readonly","type","placeholder","disabled","onKeyup"])]),_:2},1032,["rules","prop"])]),_:2},1032,["label","disabled"])):l.type==="gender"?(e.openBlock(),e.createBlock(r,{key:2,label:l.label,rules:l.isHide?[]:l.rules,prop:l.field},{label:e.withCtx(()=>[l.slotLabelName?e.renderSlot(n.$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(g,{modelValue:o.states.model[l.field],"onUpdate:modelValue":a=>o.states.model[l.field]=a,disabled:l.disabled||o.formOptions.isDisabled,onChange:a=>o.radioChange(a,l.field)},{default:e.withCtx(()=>{var a;return[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((a=l.options)==null?void 0:a.data,d=>{var c,p;return e.openBlock(),e.createBlock(f,{label:d[((c=l.options)==null?void 0:c.valueKey)||"code"],size:"large",key:d[((p=l.options)==null?void 0:p.valueKey)||"code"]},{default:e.withCtx(()=>[e.createElementVNode("img",{src:d.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,A)]),_:2},1032,["label"])}),128))]}),_:2},1032,["modelValue","onUpdate:modelValue","disabled","onChange"])]),_:2},1032,["label","rules","prop"])):l.type==="radio"?(e.openBlock(),e.createBlock(r,{key:3,label:l.label,rules:l.isHide?[]:l.rules,prop:l.field,class:e.normalizeClass([l.labelNode?"radio_Note":"rule_err"])},{label:e.withCtx(()=>[l.slotLabelName?e.renderSlot(n.$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",K,"*")):e.createCommentVNode("",!0)],4))]),default:e.withCtx(()=>[e.createVNode(g,{modelValue:o.states.model[l.field],"onUpdate:modelValue":a=>o.states.model[l.field]=a,disabled:l.disabled||o.formOptions.isDisabled,onChange:a=>o.radioChange(a,l.field)},{default:e.withCtx(()=>{var a;return[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((a=l.options)==null?void 0:a.data,d=>{var c,p;return e.openBlock(),e.createBlock(f,{size:"large",label:d[((c=l.options)==null?void 0:c.valueKey)||"code"],key:d[((p=l.options)==null?void 0:p.valueKey)||"code"]},{default:e.withCtx(()=>{var y;return[e.createTextVNode(e.toDisplayString(d[((y=l.options)==null?void 0:y.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(r,{key:4,label:l.label,rules:l.isHide?[]:l.rules,prop:l.field,class:e.normalizeClass([l.labelNode?"radio_Note":"rule_err"])},{default:e.withCtx(()=>[e.createElementVNode("div",null,[e.createElementVNode("span",Y,e.toDisplayString(l.labelBefore),1),e.createElementVNode("span",F,e.toDisplayString(l.labelNode),1),l.required?(e.openBlock(),e.createElementBlock("span",q,"*")):e.createCommentVNode("",!0)]),e.createVNode(g,{modelValue:o.states.model[l.field],"onUpdate:modelValue":a=>o.states.model[l.field]=a,disabled:l.disabled||o.formOptions.isDisabled,onChange:a=>o.radioChange(a,l.field)},{default:e.withCtx(()=>{var a;return[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((a=l.options)==null?void 0:a.data,d=>{var c,p;return e.openBlock(),e.createBlock(f,{size:"large",label:d[((c=l.options)==null?void 0:c.valueKey)||"code"],key:d[((p=l.options)==null?void 0:p.valueKey)||"code"]},{default:e.withCtx(()=>{var y;return[e.createTextVNode(e.toDisplayString(d[((y=l.options)==null?void 0:y.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(r,{key:5,label:l.label,rules:l.isHide?[]:l.rules,prop:l.field},{label:e.withCtx(()=>[l.slotLabelName?e.renderSlot(n.$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,{modelValue:o.states.model[l.field],"onUpdate:modelValue":a=>o.states.model[l.field]=a,onChange:a=>o.checkChange(a,l.field),disabled:l.disabled||o.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 a;return[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((a=l.options)==null?void 0:a.data,d=>{var c,p;return e.openBlock(),e.createBlock(x,{key:d[((c=l.options)==null?void 0:c.valueKey)||"code"],label:d[((p=l.options)==null?void 0:p.valueKey)||"code"]},{default:e.withCtx(()=>{var y;return[e.createTextVNode(e.toDisplayString(d[((y=l.options)==null?void 0:y.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(r,{key:6,label:l.label,rules:l.isHide?[]:l.rules,prop:l.field},{label:e.withCtx(()=>[l.slotLabelName?e.renderSlot(n.$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(M,{modelValue:o.states.model[l.field],"onUpdate:modelValue":a=>o.states.model[l.field]=a,onChange:a=>o.handleCheckedChange(a,l.field),disabled:l.disabled||o.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 a;return[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((a=l.options)==null?void 0:a.data,d=>{var c,p;return e.openBlock(),e.createBlock(x,{key:d[((c=l.options)==null?void 0:c.valueKey)||"code"],label:d[((p=l.options)==null?void 0:p.valueKey)||"code"]},{default:e.withCtx(()=>{var y;return[e.createTextVNode(e.toDisplayString(d[((y=l.options)==null?void 0:y.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(r,{key:7,label:l.label,rules:l.isHide?[]:l.rules,disabled:l.disabled||o.formOptions.isDisabled,prop:l.field},{label:e.withCtx(()=>[l.slotLabelName?e.renderSlot(n.$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(_,{onChange:a=>o.selectChange(a,l.field),modelValue:o.states.model[l.field],"onUpdate:modelValue":a=>o.states.model[l.field]=a,disabled:l.disabled||o.formOptions.isDisabled,placeholder:l.placeholder,clearable:l.clearable},{default:e.withCtx(()=>{var a;return[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((a=l.options)==null?void 0:a.data,d=>{var c,p,y;return e.openBlock(),e.createBlock(V,{key:d[((c=l.options)==null?void 0:c.valueKey)||"code"],label:d[((p=l.options)==null?void 0:p.labelkey)||"name"],value:d[((y=l.options)==null?void 0:y.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(r,{key:8,label:l.label,rules:l.isHide?[]:l.rules,prop:l.field},{label:e.withCtx(()=>[l.slotLabelName?e.renderSlot(n.$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.createVNode(D,{format:"DD/MM/YYYY","value-format":"DD/MM/YYYY","disabled-date":l.disabledDate,onChange:o.dateChange,"prefix-icon":o.prefixIcon,modelValue:o.states.model[l.field],"onUpdate:modelValue":a=>o.states.model[l.field]=a,disabled:l.disabled||o.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(r,{key:9,label:l.label,rules:l.isHide?[]:l.rules,prop:l.field},{label:e.withCtx(()=>[l.slotLabelName?e.renderSlot(n.$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(D,{format:"DD/MM/YYYY","value-format":"DD/MM/YYYY","disabled-date":l.disabledDate,onChange:o.dateChange,modelValue:o.states.model[l.field],"onUpdate:modelValue":a=>o.states.model[l.field]=a,"prefix-icon":o.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(r,{key:10,label:l.label,rules:l.isHide?[]:l.rules,prop:l.field,class:"rule_err"},{label:e.withCtx(()=>[l.slotLabelName?e.renderSlot(n.$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.renderSlot(n.$slots,l.slotItemName,{},void 0,!0)]),_:2},1032,["label","rules","prop"])):l.type==="phone"?(e.openBlock(),e.createBlock(r,{key:11,label:l.label,rules:l.isHide?[]:l.rules.phoneNumber,prop:l.field.phoneNumber,class:"phone_item"},{label:e.withCtx(()=>[l.slotLabelName?e.renderSlot(n.$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",G,"*")):e.createCommentVNode("",!0)],4))]),default:e.withCtx(()=>[e.createVNode(h,{maxlength:l.maxlength,modelValue:o.states.model[l.field.phoneNumber],"onUpdate:modelValue":a=>o.states.model[l.field.phoneNumber]=a,disabled:l.disabled||o.formOptions.isDisabled,placeholder:l.placeholder||"请选择",clearable:l.clearable},{prepend:e.withCtx(()=>{var a;return[e.createVNode(_,{disabled:l.disabled||o.formOptions.isDisabled,modelValue:o.states.model[l.field.areaCode],"onUpdate:modelValue":d=>o.states.model[l.field.areaCode]=d,placeholder:((a=l.options)==null?void 0:a.placeholder)||"请选择",style:{width:"115px"}},{default:e.withCtx(()=>{var d;return[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((d=l.options)==null?void 0:d.data,(c,p)=>(e.openBlock(),e.createBlock(V,{label:c.name,value:c.code,key:p},null,8,["label","value"]))),128))]}),_:2},1032,["disabled","modelValue","onUpdate:modelValue","placeholder"])]}),_:2},1032,["maxlength","modelValue","onUpdate:modelValue","disabled","placeholder","clearable"])]),_:2},1032,["label","rules","prop"])):l.type==="line"?(e.openBlock(),e.createBlock(r,{key:12,label:l.label},{default:e.withCtx(()=>[J]),_:2},1032,["label"])):(e.openBlock(),e.createBlock(r,{key:13,rules:l.isHide?[]:l.rules,prop:l.field,class:e.normalizeClass(l.prepend?"input-item":"")},{label:e.withCtx(()=>[l.slotLabelName?e.renderSlot(n.$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",X,"*")):e.createCommentVNode("",!0)],4))]),default:e.withCtx(()=>[e.createVNode(h,{maxlength:l.maxlength,modelValue:o.states.model[l.field],"onUpdate:modelValue":a=>o.states.model[l.field]=a,readonly:l.readonly,type:l.type?l.type:"text",placeholder:l.placeholder||l.label,disabled:l.disabled||o.formOptions.isDisabled,showPassword:l.showPassword,clearable:l.clearable,onKeyup:e.withKeys(a=>o.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,["maxlength","modelValue","onUpdate:modelValue","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(r,{class:"btnsItem"},{default:e.withCtx(()=>[e.renderSlot(n.$slots,"buttons",{model:i.model,onBtnClick:o.onSubmit},()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.formOptions.btnConfig,(l,N)=>(e.openBlock(),e.createElementBlock("div",{key:N},[l.isShow?(e.openBlock(),e.createBlock(t,{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,styleObj:{...l.style},class:e.normalizeClass(l.class),onHandleClick:a=>o.handleClick(a,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","styleObj","class","onHandleClick"])):e.createCommentVNode("",!0)]))),128))],!0)]),_:3})]),_:3},16,["model","label-position"])}const w=U(z,[["render",u],["__scopeId","data-v-2127471b"]]);function B(n,b={}){B.installed||(B.installed=!0,n.component("common-el-form",w))}return w.install=B,w});
|
package/package.json
CHANGED
package/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@charset "UTF-8";[data-v-
|
|
1
|
+
@charset "UTF-8";[data-v-2127471b] .el-date-editor{height:60px!important;width:100%!important}.form-item[data-v-2127471b]{width:50%;display:inline-block;padding-right:0;box-sizing:border-box}[data-v-2127471b] .el-input__inner{height:42px;color:#1d1d1d}[data-v-2127471b] .el-card__body{padding:0}[data-v-2127471b] .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-2127471b] .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-2127471b]{width:100%}[data-v-2127471b] .el-checkbox-group,[data-v-2127471b] .el-radio-group{height:62px;line-height:62px}[data-v-2127471b] .el-radio-group .el-radio{height:auto}.rule_err[data-v-2127471b] .el-form-item__content,.radio_Note[data-v-2127471b] .el-form-item__content{display:block}.radio_Note .lable[data-v-2127471b]{font-size:16px;line-height:22px;color:#1d1d1d;font-weight:400;font-family:Roboto Medium}.radio_Note .lable_note[data-v-2127471b]{font-size:16px;line-height:22px;color:#6e6e73;font-weight:400;font-family:Roboto Medium}.container_name[data-v-2127471b] .el-form-item__content{align-items:start}[data-v-2127471b] .el-form-item__error{position:relative}.item-name[data-v-2127471b]{width:51%;padding-right:20px;padding-bottom:12px;box-sizing:border-box}.item-name-right[data-v-2127471b]{width:49%;padding-bottom:12px;padding-right:0}.btnsItem[data-v-2127471b]{width:100%;margin:0 auto;justify-content:right}.btnsItem[data-v-2127471b] .el-form-item__content{justify-content:right}label[data-v-2127471b]{display:block}.title-content[data-v-2127471b]{font-size:22px;line-height:30px;color:#1d1d1d;font-weight:300;font-family:Roboto Medium}[data-v-2127471b] .el-input-group--prepend .el-input-group__prepend .el-select .el-input .el-input__wrapper{background-color:#fff;width:80px}[data-v-2127471b] .el-input__wrapper{height:60px;border-radius:8px;border:1px solid #c7c8ca;box-shadow:none!important}.phone_item[data-v-2127471b] .el-input__wrapper{border-left:0px!important}.phone_item[data-v-2127471b] .el-input-group__prepend{box-shadow:none!important}.phone_item[data-v-2127471b] .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}.phone_item[data-v-2127471b] .el-input-group__prepend .el-input__wrapper .el-input__suffix{display:none;width:0!important}.phone_item[data-v-2127471b] .el-input-group__prepend:hover{box-shadow:none!important}.phone_item[data-v-2127471b] .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-2127471b] .el-input-group__prepend:hover .el-input__wrapper:hover .el-input__suffix{display:none;width:0!important}.input-item[data-v-2127471b] .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-2127471b] .el-input__wrapper{border-left:0px!important;border-right:0px!important}.input-item[data-v-2127471b] .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-2127471b] .el-select{width:100%}.custom-required[data-v-2127471b]{content:"*";color:#e2a650;margin-left:4px}.item_tips_blow[data-v-2127471b]{font-size:14px;line-height:22px;color:#00000073;font-weight:400;font-family:Roboto Medium;width:100%;word-wrap:break-word;white-space:normal}
|