sinosoft-common-form 1.1.7 → 1.1.8
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 +371 -226
- package/common-form.umd.js +1 -1
- package/package.json +1 -1
- package/style.css +1 -1
package/common-form.es.js
CHANGED
|
@@ -1,17 +1,62 @@
|
|
|
1
|
-
import { defineComponent as W, ref as
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as W, ref as L, computed as X, resolveComponent as h, openBlock as o, createBlock as n, withCtx as a, createVNode as b, mergeProps as Z, withModifiers as m, createElementBlock as u, Fragment as x, renderList as C, normalizeClass as Y, normalizeStyle as M, createElementVNode as c, toDisplayString as t, createCommentVNode as _, withKeys as N, createTextVNode as K, renderSlot as D, createSlots as ee, pushScopeId as le, popScopeId as ae } from "vue";
|
|
2
|
+
const oe = (V) => (le("data-v-f02dc9c8"), V = V(), ae(), V), de = { class: "header-title" }, se = { class: "title-content" }, re = {
|
|
3
|
+
key: 0,
|
|
4
|
+
class: "custom-required"
|
|
5
|
+
}, ne = {
|
|
6
|
+
key: 0,
|
|
7
|
+
class: "custom-required"
|
|
8
|
+
}, ue = ["src"], pe = {
|
|
9
|
+
key: 0,
|
|
10
|
+
class: "custom-required"
|
|
11
|
+
}, te = { class: "lable" }, ce = { class: "lable_note" }, be = {
|
|
12
|
+
key: 0,
|
|
13
|
+
class: "custom-required"
|
|
14
|
+
}, ye = {
|
|
15
|
+
key: 0,
|
|
16
|
+
class: "custom-required"
|
|
17
|
+
}, fe = {
|
|
18
|
+
key: 0,
|
|
19
|
+
class: "custom-required"
|
|
20
|
+
}, _e = {
|
|
21
|
+
key: 0,
|
|
22
|
+
class: "custom-required"
|
|
23
|
+
}, ie = {
|
|
24
|
+
key: 0,
|
|
25
|
+
class: "custom-required"
|
|
26
|
+
}, he = {
|
|
27
|
+
key: 0,
|
|
28
|
+
class: "custom-required"
|
|
29
|
+
}, ve = {
|
|
30
|
+
key: 0,
|
|
31
|
+
class: "custom-required"
|
|
32
|
+
}, ke = {
|
|
33
|
+
key: 0,
|
|
34
|
+
class: "custom-required"
|
|
35
|
+
}, Ve = {
|
|
36
|
+
key: 0,
|
|
37
|
+
class: "custom-required"
|
|
38
|
+
}, ge = {
|
|
39
|
+
key: 0,
|
|
40
|
+
class: "custom-required"
|
|
41
|
+
}, qe = {
|
|
42
|
+
key: 0,
|
|
43
|
+
class: "custom-required"
|
|
44
|
+
}, xe = {
|
|
45
|
+
key: 0,
|
|
46
|
+
class: "custom-required"
|
|
47
|
+
}, Ce = /* @__PURE__ */ oe(() => /* @__PURE__ */ c("div", {
|
|
3
48
|
class: "line",
|
|
4
|
-
style: { "border-top": "1px solid #
|
|
5
|
-
}, null, -1)),
|
|
49
|
+
style: { "border-top": "1px solid #e8e8e8", width: "100%", height: "0px", margin: "20px 0" }
|
|
50
|
+
}, null, -1)), Ue = /* @__PURE__ */ W({
|
|
6
51
|
__name: "Index",
|
|
7
52
|
props: {
|
|
8
|
-
fieldList:
|
|
9
|
-
model:
|
|
10
|
-
options:
|
|
53
|
+
fieldList: {},
|
|
54
|
+
model: {},
|
|
55
|
+
options: {}
|
|
11
56
|
},
|
|
12
57
|
emits: ["submit", "reset", "cancel"],
|
|
13
|
-
setup(
|
|
14
|
-
const
|
|
58
|
+
setup(V, { expose: F, emit: U }) {
|
|
59
|
+
const v = V, d = L({}), w = L(), y = X(() => Object.assign([
|
|
15
60
|
// {
|
|
16
61
|
// isShow: true,
|
|
17
62
|
// name: '提交',
|
|
@@ -44,134 +89,138 @@ const de = (_) => (ae("data-v-9f1d3121"), _ = _(), oe(), _), se = { class: "head
|
|
|
44
89
|
// isRule: true,
|
|
45
90
|
// style: 'margin-right: 30px'
|
|
46
91
|
// },
|
|
47
|
-
],
|
|
48
|
-
|
|
92
|
+
], v == null ? void 0 : v.options)), R = (s, g) => {
|
|
93
|
+
U("selectChange", s, g);
|
|
49
94
|
};
|
|
50
95
|
F({
|
|
51
|
-
formRef:
|
|
96
|
+
formRef: w
|
|
52
97
|
}), (() => {
|
|
53
|
-
|
|
54
|
-
const
|
|
98
|
+
v.fieldList.map((s) => {
|
|
99
|
+
const g = s.type === "checkbox" ? [] : "";
|
|
55
100
|
if (s.field && typeof s.field == "object")
|
|
56
|
-
for (let
|
|
57
|
-
|
|
58
|
-
|
|
101
|
+
for (let r of Object.keys(s.field))
|
|
102
|
+
v.model ? d.value = v.model : d.value[s.field[r]] = s.value || g;
|
|
103
|
+
v.model ? d.value = v.model : d.value[s.field] = s.value || g, s.type === "address" && s.field.objectName && (d.value[s.field.objectName][s.field] = s.value);
|
|
59
104
|
});
|
|
60
|
-
})(), console.log("pppp",
|
|
61
|
-
const
|
|
62
|
-
|
|
63
|
-
if (
|
|
64
|
-
|
|
105
|
+
})(), console.log("pppp", v.model, d.value);
|
|
106
|
+
const E = (s, g, r) => {
|
|
107
|
+
w.value && (g ? w.value.validate((q) => {
|
|
108
|
+
if (q)
|
|
109
|
+
U(r, d.value, s);
|
|
65
110
|
else
|
|
66
111
|
return !1;
|
|
67
|
-
}) :
|
|
112
|
+
}) : r === "reset" ? w.value.resetFields() : U(r, d.value, s));
|
|
68
113
|
}, I = (s) => {
|
|
69
|
-
s &&
|
|
114
|
+
s && E("", w.value, !0);
|
|
70
115
|
};
|
|
71
|
-
return (s,
|
|
72
|
-
const
|
|
73
|
-
return
|
|
74
|
-
default:
|
|
75
|
-
|
|
116
|
+
return (s, g) => {
|
|
117
|
+
const r = h("el-form-item"), q = h("el-input"), $ = h("el-radio"), z = h("el-radio-group"), T = h("el-checkbox"), A = h("el-checkbox-group"), H = h("el-option"), j = h("el-select"), B = h("el-date-picker"), G = h("sinosoft-common-button"), J = h("el-form"), Q = h("el-card");
|
|
118
|
+
return o(), n(Q, { class: "mb-5" }, {
|
|
119
|
+
default: a(() => [
|
|
120
|
+
b(J, Z({
|
|
76
121
|
"hide-required-asterisk": "",
|
|
77
|
-
onSubmit:
|
|
122
|
+
onSubmit: g[0] || (g[0] = m(() => {
|
|
78
123
|
}, ["prevent"])),
|
|
79
|
-
model:
|
|
80
|
-
},
|
|
81
|
-
"label-position":
|
|
124
|
+
model: d.value
|
|
125
|
+
}, y.value, {
|
|
126
|
+
"label-position": y.value.labelPosition,
|
|
82
127
|
ref_key: "formRef",
|
|
83
|
-
ref:
|
|
128
|
+
ref: w
|
|
84
129
|
}), {
|
|
85
|
-
default:
|
|
86
|
-
(
|
|
130
|
+
default: a(() => [
|
|
131
|
+
(o(!0), u(x, null, C(s.fieldList, (e, S) => (o(), u("div", {
|
|
87
132
|
key: S,
|
|
88
|
-
class:
|
|
133
|
+
class: Y(
|
|
89
134
|
e.type === "title" || e.type === "name" ? "form-item-title" : "form-item"
|
|
90
135
|
),
|
|
91
|
-
style:
|
|
136
|
+
style: M(e.style)
|
|
92
137
|
}, [
|
|
93
|
-
e.type === "title" ? (
|
|
94
|
-
default:
|
|
95
|
-
|
|
96
|
-
|
|
138
|
+
e.type === "title" ? (o(), n(r, { key: 0 }, {
|
|
139
|
+
default: a(() => [
|
|
140
|
+
c("div", de, [
|
|
141
|
+
c("span", se, t(e.title), 1)
|
|
97
142
|
])
|
|
98
143
|
]),
|
|
99
144
|
_: 2
|
|
100
|
-
}, 1024)) : e.type === "name" ? (
|
|
145
|
+
}, 1024)) : e.type === "name" ? (o(), n(r, {
|
|
101
146
|
key: 1,
|
|
102
147
|
label: e.label,
|
|
103
|
-
disabled: e.disabled ||
|
|
148
|
+
disabled: e.disabled || y.value.isDisabled,
|
|
104
149
|
class: "container_name",
|
|
105
150
|
rules: e.rules.nameEnFamily
|
|
106
151
|
}, {
|
|
107
|
-
|
|
108
|
-
|
|
152
|
+
label: a(() => [
|
|
153
|
+
c("span", null, t(e.label), 1),
|
|
154
|
+
e.required ? (o(), u("span", re, "*")) : _("", !0)
|
|
155
|
+
]),
|
|
156
|
+
default: a(() => [
|
|
157
|
+
b(r, {
|
|
109
158
|
rules: e.rules.nameEnFamily,
|
|
110
159
|
prop: [e.field.nameEnFamily],
|
|
111
160
|
class: "item-name"
|
|
112
161
|
}, {
|
|
113
|
-
default:
|
|
114
|
-
|
|
115
|
-
modelValue:
|
|
116
|
-
"onUpdate:modelValue": (l) =>
|
|
162
|
+
default: a(() => [
|
|
163
|
+
b(q, {
|
|
164
|
+
modelValue: d.value[e.field.nameEnFamily],
|
|
165
|
+
"onUpdate:modelValue": (l) => d.value[e.field.nameEnFamily] = l,
|
|
117
166
|
readonly: e.readonly,
|
|
118
167
|
type: e.type ? e.type : "text",
|
|
119
168
|
placeholder: e.placeholderNameEnFamily,
|
|
120
|
-
disabled: e.disabled ||
|
|
169
|
+
disabled: e.disabled || y.value.isDisabled,
|
|
121
170
|
onKeyup: N((l) => I(e.enterable), ["enter"])
|
|
122
171
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "readonly", "type", "placeholder", "disabled", "onKeyup"])
|
|
123
172
|
]),
|
|
124
173
|
_: 2
|
|
125
174
|
}, 1032, ["rules", "prop"]),
|
|
126
|
-
|
|
175
|
+
b(r, {
|
|
127
176
|
rules: e.rules.nameChFamily,
|
|
128
177
|
prop: [e.field.nameChFamily],
|
|
129
178
|
class: "item-name-right"
|
|
130
179
|
}, {
|
|
131
|
-
default:
|
|
132
|
-
|
|
133
|
-
modelValue:
|
|
134
|
-
"onUpdate:modelValue": (l) =>
|
|
180
|
+
default: a(() => [
|
|
181
|
+
b(q, {
|
|
182
|
+
modelValue: d.value[e.field.nameChFamily],
|
|
183
|
+
"onUpdate:modelValue": (l) => d.value[e.field.nameChFamily] = l,
|
|
135
184
|
readonly: e.readonly,
|
|
136
185
|
type: e.type ? e.type : "text",
|
|
137
186
|
placeholder: e.placeholderNameChFamily,
|
|
138
|
-
disabled: e.disabled ||
|
|
187
|
+
disabled: e.disabled || y.value.isDisabled,
|
|
139
188
|
onKeyup: N((l) => I(e.enterable), ["enter"])
|
|
140
189
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "readonly", "type", "placeholder", "disabled", "onKeyup"])
|
|
141
190
|
]),
|
|
142
191
|
_: 2
|
|
143
192
|
}, 1032, ["rules", "prop"]),
|
|
144
|
-
|
|
193
|
+
b(r, {
|
|
145
194
|
rules: e.rules.nameEn,
|
|
146
195
|
prop: [e.field.nameEn],
|
|
147
196
|
class: "item-name"
|
|
148
197
|
}, {
|
|
149
|
-
default:
|
|
150
|
-
|
|
151
|
-
modelValue:
|
|
152
|
-
"onUpdate:modelValue": (l) =>
|
|
198
|
+
default: a(() => [
|
|
199
|
+
b(q, {
|
|
200
|
+
modelValue: d.value[e.field.nameEn],
|
|
201
|
+
"onUpdate:modelValue": (l) => d.value[e.field.nameEn] = l,
|
|
153
202
|
readonly: e.readonly,
|
|
154
203
|
type: e.type ? e.type : "text",
|
|
155
204
|
placeholder: e.placeholderNameEn,
|
|
156
|
-
disabled: e.disabled ||
|
|
205
|
+
disabled: e.disabled || y.value.isDisabled,
|
|
157
206
|
onKeyup: N((l) => I(e.enterable), ["enter"])
|
|
158
207
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "readonly", "type", "placeholder", "disabled", "onKeyup"])
|
|
159
208
|
]),
|
|
160
209
|
_: 2
|
|
161
210
|
}, 1032, ["rules", "prop"]),
|
|
162
|
-
|
|
211
|
+
b(r, {
|
|
163
212
|
rules: e.rules.nameCh,
|
|
164
213
|
prop: [e.field.nameCh],
|
|
165
214
|
class: "item-name-right"
|
|
166
215
|
}, {
|
|
167
|
-
default:
|
|
168
|
-
|
|
169
|
-
modelValue:
|
|
170
|
-
"onUpdate:modelValue": (l) =>
|
|
216
|
+
default: a(() => [
|
|
217
|
+
b(q, {
|
|
218
|
+
modelValue: d.value[e.field.nameCh],
|
|
219
|
+
"onUpdate:modelValue": (l) => d.value[e.field.nameCh] = l,
|
|
171
220
|
readonly: e.readonly,
|
|
172
221
|
type: e.type ? e.type : "text",
|
|
173
222
|
placeholder: e.placeholderNameCh,
|
|
174
|
-
disabled: e.disabled ||
|
|
223
|
+
disabled: e.disabled || y.value.isDisabled,
|
|
175
224
|
onKeyup: N((l) => I(e.enterable), ["enter"])
|
|
176
225
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "readonly", "type", "placeholder", "disabled", "onKeyup"])
|
|
177
226
|
]),
|
|
@@ -179,34 +228,38 @@ const de = (_) => (ae("data-v-9f1d3121"), _ = _(), oe(), _), se = { class: "head
|
|
|
179
228
|
}, 1032, ["rules", "prop"])
|
|
180
229
|
]),
|
|
181
230
|
_: 2
|
|
182
|
-
}, 1032, ["label", "disabled", "rules"])) : e.type === "gender" ? (
|
|
231
|
+
}, 1032, ["label", "disabled", "rules"])) : e.type === "gender" ? (o(), n(r, {
|
|
183
232
|
key: 2,
|
|
184
233
|
label: e.label,
|
|
185
234
|
rules: e.rules,
|
|
186
235
|
prop: [e.field]
|
|
187
236
|
}, {
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
237
|
+
label: a(() => [
|
|
238
|
+
c("span", null, t(e.label), 1),
|
|
239
|
+
e.required ? (o(), u("span", ne, "*")) : _("", !0)
|
|
240
|
+
]),
|
|
241
|
+
default: a(() => [
|
|
242
|
+
b(z, {
|
|
243
|
+
modelValue: d.value[e.field],
|
|
244
|
+
"onUpdate:modelValue": (l) => d.value[e.field] = l,
|
|
245
|
+
disabled: e.disabled || y.value.isDisabled
|
|
193
246
|
}, {
|
|
194
|
-
default:
|
|
247
|
+
default: a(() => {
|
|
195
248
|
var l;
|
|
196
249
|
return [
|
|
197
|
-
(
|
|
198
|
-
var
|
|
199
|
-
return
|
|
200
|
-
label: p[((
|
|
250
|
+
(o(!0), u(x, null, C((l = e.options) == null ? void 0 : l.data, (p) => {
|
|
251
|
+
var f, i;
|
|
252
|
+
return o(), n($, {
|
|
253
|
+
label: p[((f = e.options) == null ? void 0 : f.valueKey) || "code"],
|
|
201
254
|
size: "large",
|
|
202
|
-
key: p[((
|
|
255
|
+
key: p[((i = e.options) == null ? void 0 : i.valueKey) || "code"]
|
|
203
256
|
}, {
|
|
204
|
-
default:
|
|
205
|
-
|
|
257
|
+
default: a(() => [
|
|
258
|
+
c("img", {
|
|
206
259
|
src: p.code === "M" ? "http://192.168.5.200:9000/test/sex_img_M.png" : "http://192.168.5.200:9000/test/sex_img_F.png",
|
|
207
260
|
style: { width: "44px", height: "44px", "margin-bottom": "-15px", "margin-left": "4px" },
|
|
208
261
|
alt: ""
|
|
209
|
-
}, null, 8,
|
|
262
|
+
}, null, 8, ue)
|
|
210
263
|
]),
|
|
211
264
|
_: 2
|
|
212
265
|
}, 1032, ["label"]);
|
|
@@ -217,37 +270,37 @@ const de = (_) => (ae("data-v-9f1d3121"), _ = _(), oe(), _), se = { class: "head
|
|
|
217
270
|
}, 1032, ["modelValue", "onUpdate:modelValue", "disabled"])
|
|
218
271
|
]),
|
|
219
272
|
_: 2
|
|
220
|
-
}, 1032, ["label", "rules", "prop"])) : e.type === "radio" ? (
|
|
273
|
+
}, 1032, ["label", "rules", "prop"])) : e.type === "radio" ? (o(), n(r, {
|
|
221
274
|
key: 3,
|
|
222
275
|
label: e.label,
|
|
223
276
|
rules: e.rules,
|
|
224
277
|
prop: [e.field],
|
|
225
|
-
class:
|
|
278
|
+
class: Y([e.labelNode ? "radio_Note" : "rule_err"])
|
|
226
279
|
}, {
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
modelValue:
|
|
234
|
-
"onUpdate:modelValue": (l) =>
|
|
235
|
-
disabled: e.disabled ||
|
|
280
|
+
label: a(() => [
|
|
281
|
+
c("span", null, t(e.label), 1),
|
|
282
|
+
e.required ? (o(), u("span", pe, "*")) : _("", !0)
|
|
283
|
+
]),
|
|
284
|
+
default: a(() => [
|
|
285
|
+
b(z, {
|
|
286
|
+
modelValue: d.value[e.field],
|
|
287
|
+
"onUpdate:modelValue": (l) => d.value[e.field] = l,
|
|
288
|
+
disabled: e.disabled || y.value.isDisabled
|
|
236
289
|
}, {
|
|
237
|
-
default:
|
|
290
|
+
default: a(() => {
|
|
238
291
|
var l;
|
|
239
292
|
return [
|
|
240
|
-
(
|
|
241
|
-
var
|
|
242
|
-
return
|
|
293
|
+
(o(!0), u(x, null, C((l = e.options) == null ? void 0 : l.data, (p) => {
|
|
294
|
+
var f, i;
|
|
295
|
+
return o(), n($, {
|
|
243
296
|
size: "large",
|
|
244
|
-
label: p[((
|
|
245
|
-
key: p[((
|
|
297
|
+
label: p[((f = e.options) == null ? void 0 : f.valueKey) || "code"],
|
|
298
|
+
key: p[((i = e.options) == null ? void 0 : i.valueKey) || "code"]
|
|
246
299
|
}, {
|
|
247
|
-
default:
|
|
300
|
+
default: a(() => {
|
|
248
301
|
var k;
|
|
249
302
|
return [
|
|
250
|
-
|
|
303
|
+
K(t(p[((k = e.options) == null ? void 0 : k.labelkey) || "name"]), 1)
|
|
251
304
|
];
|
|
252
305
|
}),
|
|
253
306
|
_: 2
|
|
@@ -259,34 +312,81 @@ const de = (_) => (ae("data-v-9f1d3121"), _ = _(), oe(), _), se = { class: "head
|
|
|
259
312
|
}, 1032, ["modelValue", "onUpdate:modelValue", "disabled"])
|
|
260
313
|
]),
|
|
261
314
|
_: 2
|
|
262
|
-
}, 1032, ["label", "rules", "prop", "class"])) : e.type === "
|
|
315
|
+
}, 1032, ["label", "rules", "prop", "class"])) : e.type === "radioNote" ? (o(), n(r, {
|
|
263
316
|
key: 4,
|
|
264
317
|
label: e.label,
|
|
265
318
|
rules: e.rules,
|
|
319
|
+
prop: [e.field],
|
|
320
|
+
class: Y([e.labelNode ? "radio_Note" : "rule_err"])
|
|
321
|
+
}, {
|
|
322
|
+
default: a(() => [
|
|
323
|
+
c("div", null, [
|
|
324
|
+
c("span", te, t(e.labelBefore), 1),
|
|
325
|
+
c("span", ce, t(e.labelNode), 1),
|
|
326
|
+
e.required ? (o(), u("span", be, "*")) : _("", !0)
|
|
327
|
+
]),
|
|
328
|
+
b(z, {
|
|
329
|
+
modelValue: d.value[e.field],
|
|
330
|
+
"onUpdate:modelValue": (l) => d.value[e.field] = l,
|
|
331
|
+
disabled: e.disabled || y.value.isDisabled
|
|
332
|
+
}, {
|
|
333
|
+
default: a(() => {
|
|
334
|
+
var l;
|
|
335
|
+
return [
|
|
336
|
+
(o(!0), u(x, null, C((l = e.options) == null ? void 0 : l.data, (p) => {
|
|
337
|
+
var f, i;
|
|
338
|
+
return o(), n($, {
|
|
339
|
+
size: "large",
|
|
340
|
+
label: p[((f = e.options) == null ? void 0 : f.valueKey) || "code"],
|
|
341
|
+
key: p[((i = e.options) == null ? void 0 : i.valueKey) || "code"]
|
|
342
|
+
}, {
|
|
343
|
+
default: a(() => {
|
|
344
|
+
var k;
|
|
345
|
+
return [
|
|
346
|
+
K(t(p[((k = e.options) == null ? void 0 : k.labelkey) || "name"]), 1)
|
|
347
|
+
];
|
|
348
|
+
}),
|
|
349
|
+
_: 2
|
|
350
|
+
}, 1032, ["label"]);
|
|
351
|
+
}), 128))
|
|
352
|
+
];
|
|
353
|
+
}),
|
|
354
|
+
_: 2
|
|
355
|
+
}, 1032, ["modelValue", "onUpdate:modelValue", "disabled"])
|
|
356
|
+
]),
|
|
357
|
+
_: 2
|
|
358
|
+
}, 1032, ["label", "rules", "prop", "class"])) : e.type === "checkbox" ? (o(), n(r, {
|
|
359
|
+
key: 5,
|
|
360
|
+
label: e.label,
|
|
361
|
+
rules: e.rules,
|
|
266
362
|
prop: [e.field]
|
|
267
363
|
}, {
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
364
|
+
label: a(() => [
|
|
365
|
+
c("span", null, t(e.label), 1),
|
|
366
|
+
e.required ? (o(), u("span", ye, "*")) : _("", !0)
|
|
367
|
+
]),
|
|
368
|
+
default: a(() => [
|
|
369
|
+
b(A, {
|
|
370
|
+
modelValue: d.value[e.field],
|
|
371
|
+
"onUpdate:modelValue": (l) => d.value[e.field] = l,
|
|
372
|
+
disabled: e.disabled || y.value.isDisabled,
|
|
373
|
+
style: M(
|
|
274
374
|
e.ways === "row" ? "display: flex; align-items: flex-start;flex-flow: row nowrap; " : "display: flex; align-items: flex-start;flex-flow: column nowrap; "
|
|
275
375
|
)
|
|
276
376
|
}, {
|
|
277
|
-
default:
|
|
377
|
+
default: a(() => {
|
|
278
378
|
var l;
|
|
279
379
|
return [
|
|
280
|
-
(
|
|
281
|
-
var
|
|
282
|
-
return
|
|
283
|
-
key: p[((
|
|
284
|
-
label: p[((
|
|
380
|
+
(o(!0), u(x, null, C((l = e.options) == null ? void 0 : l.data, (p) => {
|
|
381
|
+
var f, i;
|
|
382
|
+
return o(), n(T, {
|
|
383
|
+
key: p[((f = e.options) == null ? void 0 : f.valueKey) || "code"],
|
|
384
|
+
label: p[((i = e.options) == null ? void 0 : i.valueKey) || "code"]
|
|
285
385
|
}, {
|
|
286
|
-
default:
|
|
386
|
+
default: a(() => {
|
|
287
387
|
var k;
|
|
288
388
|
return [
|
|
289
|
-
|
|
389
|
+
K(t(p[((k = e.options) == null ? void 0 : k.labelkey) || "name"]), 1)
|
|
290
390
|
];
|
|
291
391
|
}),
|
|
292
392
|
_: 2
|
|
@@ -298,30 +398,34 @@ const de = (_) => (ae("data-v-9f1d3121"), _ = _(), oe(), _), se = { class: "head
|
|
|
298
398
|
}, 1032, ["modelValue", "onUpdate:modelValue", "disabled", "style"])
|
|
299
399
|
]),
|
|
300
400
|
_: 2
|
|
301
|
-
}, 1032, ["label", "rules", "prop"])) : e.type === "select" ? (
|
|
302
|
-
key:
|
|
401
|
+
}, 1032, ["label", "rules", "prop"])) : e.type === "select" ? (o(), n(r, {
|
|
402
|
+
key: 6,
|
|
303
403
|
label: e.label,
|
|
304
404
|
rules: e.rules,
|
|
305
|
-
disabled: e.disabled ||
|
|
405
|
+
disabled: e.disabled || y.value.isDisabled,
|
|
306
406
|
prop: [e.field]
|
|
307
407
|
}, {
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
408
|
+
label: a(() => [
|
|
409
|
+
c("span", null, t(e.label), 1),
|
|
410
|
+
e.required ? (o(), u("span", fe, "*")) : _("", !0)
|
|
411
|
+
]),
|
|
412
|
+
default: a(() => [
|
|
413
|
+
b(j, {
|
|
414
|
+
onChange: (l) => R(l, e.field),
|
|
415
|
+
modelValue: d.value[e.field],
|
|
416
|
+
"onUpdate:modelValue": (l) => d.value[e.field] = l,
|
|
417
|
+
disabled: e.disabled || y.value.isDisabled,
|
|
314
418
|
placeholder: e.placeholder,
|
|
315
419
|
clearable: e.clearable
|
|
316
420
|
}, {
|
|
317
|
-
default:
|
|
421
|
+
default: a(() => {
|
|
318
422
|
var l;
|
|
319
423
|
return [
|
|
320
|
-
(
|
|
321
|
-
var
|
|
322
|
-
return
|
|
323
|
-
key: p[((
|
|
324
|
-
label: p[((
|
|
424
|
+
(o(!0), u(x, null, C((l = e.options) == null ? void 0 : l.data, (p) => {
|
|
425
|
+
var f, i, k;
|
|
426
|
+
return o(), n(H, {
|
|
427
|
+
key: p[((f = e.options) == null ? void 0 : f.valueKey) || "code"],
|
|
428
|
+
label: p[((i = e.options) == null ? void 0 : i.labelkey) || "name"],
|
|
325
429
|
value: p[((k = e.options) == null ? void 0 : k.valueKey) || "code"]
|
|
326
430
|
}, null, 8, ["label", "value"]);
|
|
327
431
|
}), 128))
|
|
@@ -331,17 +435,21 @@ const de = (_) => (ae("data-v-9f1d3121"), _ = _(), oe(), _), se = { class: "head
|
|
|
331
435
|
}, 1032, ["onChange", "modelValue", "onUpdate:modelValue", "disabled", "placeholder", "clearable"])
|
|
332
436
|
]),
|
|
333
437
|
_: 2
|
|
334
|
-
}, 1032, ["label", "rules", "disabled", "prop"])) : e.type === "date" ? (
|
|
335
|
-
key:
|
|
438
|
+
}, 1032, ["label", "rules", "disabled", "prop"])) : e.type === "date" ? (o(), n(r, {
|
|
439
|
+
key: 7,
|
|
336
440
|
label: e.label,
|
|
337
441
|
rules: e.rules,
|
|
338
442
|
prop: [e.field]
|
|
339
443
|
}, {
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
444
|
+
label: a(() => [
|
|
445
|
+
c("span", null, t(e.label), 1),
|
|
446
|
+
e.required ? (o(), u("span", _e, "*")) : _("", !0)
|
|
447
|
+
]),
|
|
448
|
+
default: a(() => [
|
|
449
|
+
b(B, {
|
|
450
|
+
modelValue: d.value[e.field],
|
|
451
|
+
"onUpdate:modelValue": (l) => d.value[e.field] = l,
|
|
452
|
+
disabled: e.disabled || y.value.isDisabled,
|
|
345
453
|
readonly: e.readonly,
|
|
346
454
|
type: e.type,
|
|
347
455
|
placeholder: e.placeholder || e.label,
|
|
@@ -349,16 +457,20 @@ const de = (_) => (ae("data-v-9f1d3121"), _ = _(), oe(), _), se = { class: "head
|
|
|
349
457
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "disabled", "readonly", "type", "placeholder", "value-format"])
|
|
350
458
|
]),
|
|
351
459
|
_: 2
|
|
352
|
-
}, 1032, ["label", "rules", "prop"])) : e.type === "daterange" ? (
|
|
353
|
-
key:
|
|
460
|
+
}, 1032, ["label", "rules", "prop"])) : e.type === "daterange" ? (o(), n(r, {
|
|
461
|
+
key: 8,
|
|
354
462
|
label: e.label,
|
|
355
463
|
rules: e.rules,
|
|
356
464
|
prop: [e.field]
|
|
357
465
|
}, {
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
466
|
+
label: a(() => [
|
|
467
|
+
c("span", null, t(e.label), 1),
|
|
468
|
+
e.required ? (o(), u("span", ie, "*")) : _("", !0)
|
|
469
|
+
]),
|
|
470
|
+
default: a(() => [
|
|
471
|
+
b(B, {
|
|
472
|
+
modelValue: d.value[e.field],
|
|
473
|
+
"onUpdate:modelValue": (l) => d.value[e.field] = l,
|
|
362
474
|
type: "daterange",
|
|
363
475
|
"range-separator": "To",
|
|
364
476
|
"start-placeholder": e.startPlaceholder,
|
|
@@ -368,87 +480,116 @@ const de = (_) => (ae("data-v-9f1d3121"), _ = _(), oe(), _), se = { class: "head
|
|
|
368
480
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "start-placeholder", "end-placeholder", "value-format"])
|
|
369
481
|
]),
|
|
370
482
|
_: 2
|
|
371
|
-
}, 1032, ["label", "rules", "prop"])) : e.type === "slotItem1" ? (
|
|
372
|
-
key: 8,
|
|
373
|
-
label: e.label,
|
|
374
|
-
rules: e.rules,
|
|
375
|
-
prop: [e.field]
|
|
376
|
-
}, {
|
|
377
|
-
default: o(() => [
|
|
378
|
-
K(s.$slots, "slotItem1", {}, void 0, !0)
|
|
379
|
-
]),
|
|
380
|
-
_: 2
|
|
381
|
-
}, 1032, ["label", "rules", "prop"])) : e.type === "slotItem2" ? (d(), r(n, {
|
|
483
|
+
}, 1032, ["label", "rules", "prop"])) : e.type === "slotItem1" ? (o(), n(r, {
|
|
382
484
|
key: 9,
|
|
383
485
|
label: e.label,
|
|
384
486
|
rules: e.rules,
|
|
385
|
-
prop: [e.field]
|
|
487
|
+
prop: [e.field],
|
|
488
|
+
class: "rule_err"
|
|
386
489
|
}, {
|
|
387
|
-
|
|
388
|
-
|
|
490
|
+
label: a(() => [
|
|
491
|
+
c("span", null, t(e.label), 1),
|
|
492
|
+
e.required ? (o(), u("span", he, "*")) : _("", !0)
|
|
493
|
+
]),
|
|
494
|
+
default: a(() => [
|
|
495
|
+
D(s.$slots, "slotItem1", {}, void 0, !0)
|
|
389
496
|
]),
|
|
390
497
|
_: 2
|
|
391
|
-
}, 1032, ["label", "rules", "prop"])) : e.type === "
|
|
498
|
+
}, 1032, ["label", "rules", "prop"])) : e.type === "slotItem2" ? (o(), n(r, {
|
|
392
499
|
key: 10,
|
|
393
500
|
label: e.label,
|
|
394
501
|
rules: e.rules,
|
|
395
|
-
prop: [e.field]
|
|
502
|
+
prop: [e.field],
|
|
503
|
+
class: "rule_err"
|
|
396
504
|
}, {
|
|
397
|
-
|
|
398
|
-
|
|
505
|
+
label: a(() => [
|
|
506
|
+
c("span", null, t(e.label), 1),
|
|
507
|
+
e.required ? (o(), u("span", ve, "*")) : _("", !0)
|
|
508
|
+
]),
|
|
509
|
+
default: a(() => [
|
|
510
|
+
D(s.$slots, "slotItem2", {}, void 0, !0)
|
|
399
511
|
]),
|
|
400
512
|
_: 2
|
|
401
|
-
}, 1032, ["label", "rules", "prop"])) : e.type === "
|
|
513
|
+
}, 1032, ["label", "rules", "prop"])) : e.type === "slotItem3" ? (o(), n(r, {
|
|
402
514
|
key: 11,
|
|
403
515
|
label: e.label,
|
|
404
516
|
rules: e.rules,
|
|
405
|
-
prop: [e.field]
|
|
517
|
+
prop: [e.field],
|
|
518
|
+
class: "rule_err"
|
|
406
519
|
}, {
|
|
407
|
-
|
|
408
|
-
|
|
520
|
+
label: a(() => [
|
|
521
|
+
c("span", null, t(e.label), 1),
|
|
522
|
+
e.required ? (o(), u("span", ke, "*")) : _("", !0)
|
|
523
|
+
]),
|
|
524
|
+
default: a(() => [
|
|
525
|
+
D(s.$slots, "slotItem3", {}, void 0, !0)
|
|
409
526
|
]),
|
|
410
527
|
_: 2
|
|
411
|
-
}, 1032, ["label", "rules", "prop"])) : e.type === "
|
|
528
|
+
}, 1032, ["label", "rules", "prop"])) : e.type === "slotItem4" ? (o(), n(r, {
|
|
412
529
|
key: 12,
|
|
413
530
|
label: e.label,
|
|
414
531
|
rules: e.rules,
|
|
415
|
-
prop: [e.field]
|
|
532
|
+
prop: [e.field],
|
|
533
|
+
class: "rule_err"
|
|
416
534
|
}, {
|
|
417
|
-
|
|
418
|
-
|
|
535
|
+
label: a(() => [
|
|
536
|
+
c("span", null, t(e.label), 1),
|
|
537
|
+
e.required ? (o(), u("span", Ve, "*")) : _("", !0)
|
|
538
|
+
]),
|
|
539
|
+
default: a(() => [
|
|
540
|
+
D(s.$slots, "slotItem4", {}, void 0, !0)
|
|
419
541
|
]),
|
|
420
542
|
_: 2
|
|
421
|
-
}, 1032, ["label", "rules", "prop"])) : e.type === "
|
|
543
|
+
}, 1032, ["label", "rules", "prop"])) : e.type === "slotItem5" ? (o(), n(r, {
|
|
422
544
|
key: 13,
|
|
423
545
|
label: e.label,
|
|
546
|
+
rules: e.rules,
|
|
547
|
+
prop: [e.field],
|
|
548
|
+
class: "rule_err"
|
|
549
|
+
}, {
|
|
550
|
+
label: a(() => [
|
|
551
|
+
c("span", null, t(e.label), 1),
|
|
552
|
+
e.required ? (o(), u("span", ge, "*")) : _("", !0)
|
|
553
|
+
]),
|
|
554
|
+
default: a(() => [
|
|
555
|
+
D(s.$slots, "slotItem5", {}, void 0, !0)
|
|
556
|
+
]),
|
|
557
|
+
_: 2
|
|
558
|
+
}, 1032, ["label", "rules", "prop"])) : e.type === "phone" ? (o(), n(r, {
|
|
559
|
+
key: 14,
|
|
560
|
+
label: e.label,
|
|
424
561
|
rules: e.rules.phoneNumber,
|
|
425
562
|
prop: [e.field.phoneNumber]
|
|
426
563
|
}, {
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
564
|
+
label: a(() => [
|
|
565
|
+
c("span", null, t(e.label), 1),
|
|
566
|
+
e.required ? (o(), u("span", qe, "*")) : _("", !0)
|
|
567
|
+
]),
|
|
568
|
+
default: a(() => [
|
|
569
|
+
b(q, {
|
|
570
|
+
modelValue: d.value[e.field.phoneNumber],
|
|
571
|
+
"onUpdate:modelValue": (l) => d.value[e.field.phoneNumber] = l,
|
|
572
|
+
disabled: e.disabled || y.value.isDisabled,
|
|
432
573
|
placeholder: e.placeholder || "请选择",
|
|
433
574
|
clearable: e.clearable
|
|
434
575
|
}, {
|
|
435
|
-
prepend:
|
|
576
|
+
prepend: a(() => {
|
|
436
577
|
var l;
|
|
437
578
|
return [
|
|
438
|
-
|
|
439
|
-
disabled: e.disabled ||
|
|
440
|
-
modelValue:
|
|
441
|
-
"onUpdate:modelValue": (p) =>
|
|
579
|
+
b(j, {
|
|
580
|
+
disabled: e.disabled || y.value.isDisabled,
|
|
581
|
+
modelValue: d.value[e.field.areaCode],
|
|
582
|
+
"onUpdate:modelValue": (p) => d.value[e.field.areaCode] = p,
|
|
442
583
|
placeholder: ((l = e.options) == null ? void 0 : l.placeholder) || "请选择",
|
|
443
584
|
style: { width: "115px" }
|
|
444
585
|
}, {
|
|
445
|
-
default:
|
|
586
|
+
default: a(() => {
|
|
446
587
|
var p;
|
|
447
588
|
return [
|
|
448
|
-
(
|
|
449
|
-
label:
|
|
450
|
-
value:
|
|
451
|
-
key:
|
|
589
|
+
(o(!0), u(x, null, C((p = e.options) == null ? void 0 : p.data, (f, i) => (o(), n(H, {
|
|
590
|
+
label: f.name,
|
|
591
|
+
value: f.code,
|
|
592
|
+
key: i
|
|
452
593
|
}, null, 8, ["label", "value"]))), 128))
|
|
453
594
|
];
|
|
454
595
|
}),
|
|
@@ -460,73 +601,77 @@ const de = (_) => (ae("data-v-9f1d3121"), _ = _(), oe(), _), se = { class: "head
|
|
|
460
601
|
}, 1032, ["modelValue", "onUpdate:modelValue", "disabled", "placeholder", "clearable"])
|
|
461
602
|
]),
|
|
462
603
|
_: 2
|
|
463
|
-
}, 1032, ["label", "rules", "prop"])) : e.type === "input" ? (
|
|
464
|
-
key:
|
|
604
|
+
}, 1032, ["label", "rules", "prop"])) : e.type === "input" ? (o(), n(r, {
|
|
605
|
+
key: 15,
|
|
465
606
|
label: e.label,
|
|
466
607
|
rules: e.rules,
|
|
467
608
|
prop: [e.field]
|
|
468
609
|
}, {
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
610
|
+
label: a(() => [
|
|
611
|
+
c("span", null, t(e.label), 1),
|
|
612
|
+
e.required ? (o(), u("span", xe, "*")) : _("", !0)
|
|
613
|
+
]),
|
|
614
|
+
default: a(() => [
|
|
615
|
+
b(q, {
|
|
616
|
+
modelValue: d.value[e.field],
|
|
617
|
+
"onUpdate:modelValue": (l) => d.value[e.field] = l,
|
|
473
618
|
readonly: e.readonly,
|
|
474
619
|
type: e.type ? e.type : "text",
|
|
475
620
|
placeholder: e.placeholder || e.label,
|
|
476
|
-
disabled: e.disabled ||
|
|
621
|
+
disabled: e.disabled || y.value.isDisabled,
|
|
477
622
|
showPassword: e.showPassword,
|
|
478
623
|
clearable: e.clearable,
|
|
479
624
|
onKeyup: N((l) => I(e.enterable), ["enter"])
|
|
480
|
-
},
|
|
625
|
+
}, ee({ _: 2 }, [
|
|
481
626
|
e.prepend ? {
|
|
482
627
|
name: "prepend",
|
|
483
|
-
fn:
|
|
484
|
-
|
|
628
|
+
fn: a(() => [
|
|
629
|
+
K(t(e.field), 1)
|
|
485
630
|
]),
|
|
486
631
|
key: "0"
|
|
487
632
|
} : void 0,
|
|
488
633
|
e.append ? {
|
|
489
634
|
name: "append",
|
|
490
|
-
fn:
|
|
491
|
-
|
|
635
|
+
fn: a(() => [
|
|
636
|
+
K(t(e.append), 1)
|
|
492
637
|
]),
|
|
493
638
|
key: "1"
|
|
494
639
|
} : void 0
|
|
495
640
|
]), 1032, ["modelValue", "onUpdate:modelValue", "readonly", "type", "placeholder", "disabled", "showPassword", "clearable", "onKeyup"])
|
|
496
641
|
]),
|
|
497
642
|
_: 2
|
|
498
|
-
}, 1032, ["label", "rules", "prop"])) : e.type === "line" ? (
|
|
499
|
-
key:
|
|
643
|
+
}, 1032, ["label", "rules", "prop"])) : e.type === "line" ? (o(), n(r, {
|
|
644
|
+
key: 16,
|
|
500
645
|
label: e.label
|
|
501
646
|
}, {
|
|
502
|
-
default:
|
|
503
|
-
|
|
647
|
+
default: a(() => [
|
|
648
|
+
Ce
|
|
504
649
|
]),
|
|
505
650
|
_: 2
|
|
506
|
-
}, 1032, ["label"])) :
|
|
651
|
+
}, 1032, ["label"])) : _("", !0)
|
|
507
652
|
], 6))), 128)),
|
|
508
|
-
|
|
509
|
-
default:
|
|
510
|
-
|
|
511
|
-
model:
|
|
512
|
-
|
|
653
|
+
b(r, { class: "btnsItem" }, {
|
|
654
|
+
default: a(() => [
|
|
655
|
+
D(s.$slots, "buttons", {
|
|
656
|
+
model: d.value,
|
|
657
|
+
onBtnClick: E
|
|
513
658
|
}, () => [
|
|
514
|
-
(
|
|
515
|
-
e.isShow ? (
|
|
659
|
+
(o(!0), u(x, null, C(y.value.btnConfig, (e, S) => (o(), u("div", { key: S }, [
|
|
660
|
+
e.isShow ? (o(), n(G, {
|
|
516
661
|
key: 0,
|
|
517
662
|
size: 15,
|
|
518
663
|
width: e.size,
|
|
519
664
|
btnCode: e.btnCode,
|
|
520
665
|
onHandleClick: (l) => {
|
|
521
|
-
|
|
666
|
+
E(l, e.isRule, e.emitName);
|
|
522
667
|
},
|
|
523
|
-
style:
|
|
668
|
+
style: M(e.style)
|
|
524
669
|
}, {
|
|
525
|
-
default:
|
|
526
|
-
|
|
670
|
+
default: a(() => [
|
|
671
|
+
K(t(e.name), 1)
|
|
527
672
|
]),
|
|
528
673
|
_: 2
|
|
529
|
-
}, 1032, ["width", "btnCode", "onHandleClick", "style"])) :
|
|
674
|
+
}, 1032, ["width", "btnCode", "onHandleClick", "style"])) : _("", !0)
|
|
530
675
|
]))), 128))
|
|
531
676
|
], !0)
|
|
532
677
|
]),
|
|
@@ -541,16 +686,16 @@ const de = (_) => (ae("data-v-9f1d3121"), _ = _(), oe(), _), se = { class: "head
|
|
|
541
686
|
};
|
|
542
687
|
}
|
|
543
688
|
});
|
|
544
|
-
const
|
|
545
|
-
const
|
|
546
|
-
for (const [
|
|
547
|
-
|
|
548
|
-
return
|
|
549
|
-
}, O = /* @__PURE__ */
|
|
550
|
-
function
|
|
551
|
-
|
|
689
|
+
const we = (V, F) => {
|
|
690
|
+
const U = V.__vccOpts || V;
|
|
691
|
+
for (const [v, d] of F)
|
|
692
|
+
U[v] = d;
|
|
693
|
+
return U;
|
|
694
|
+
}, O = /* @__PURE__ */ we(Ue, [["__scopeId", "data-v-f02dc9c8"]]);
|
|
695
|
+
function P(V, F = {}) {
|
|
696
|
+
P.installed || (P.installed = !0, V.component("common-el-form", O));
|
|
552
697
|
}
|
|
553
|
-
O.install =
|
|
698
|
+
O.install = P;
|
|
554
699
|
export {
|
|
555
700
|
O as default
|
|
556
701
|
};
|
package/common-form.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(e,u){typeof exports=="object"&&typeof module<"u"?module.exports=u(require("vue")):typeof define=="function"&&define.amd?define(["vue"],u):(e=typeof globalThis<"u"?globalThis:e||self,e.Form=u(e.Vue))})(this,function(e){"use strict";const u=c=>(e.pushScopeId("data-v-9f1d3121"),c=c(),e.popScopeId(),c),D={class:"header-title"},K={class:"title-content"},S=["src"],F={class:"lable"},I={class:"lable_note"},z=u(()=>e.createElementVNode("div",{class:"line",style:{"border-top":"1px solid #E8E8E8",width:"100%",height:"0px",margin:"20px 0"}},null,-1)),$=e.defineComponent({__name:"Index",props:{fieldList:null,model:null,options:null},emits:["submit","reset","cancel"],setup(c,{expose:V,emit:h}){const f=c,a=e.ref({}),_=e.ref(),r=e.computed(()=>Object.assign([],f==null?void 0:f.options)),L=(d,i)=>{h("selectChange",d,i)};V({formRef:_}),(()=>{f.fieldList.map(d=>{const i=d.type==="checkbox"?[]:"";if(d.field&&typeof d.field=="object")for(let n of Object.keys(d.field))f.model?a.value=f.model:a.value[d.field[n]]=d.value||i;f.model?a.value=f.model:a.value[d.field]=d.value||i,d.type==="address"&&d.field.objectName&&(a.value[d.field.objectName][d.field]=d.value)})})(),console.log("pppp",f.model,a.value);const g=(d,i,n,b)=>{i&&(n?i.validate(C=>{if(C)h(b,a.value,d);else return!1}):b==="reset"?i.resetFields():h(b,a.value,d))},k=d=>{d&&g("",_.value,!0,"submit")};return(d,i)=>{const n=e.resolveComponent("el-form-item"),b=e.resolveComponent("el-input"),C=e.resolveComponent("el-radio"),N=e.resolveComponent("el-radio-group"),T=e.resolveComponent("el-checkbox"),Y=e.resolveComponent("el-checkbox-group"),m=e.resolveComponent("el-option"),E=e.resolveComponent("el-select"),U=e.resolveComponent("el-date-picker"),M=e.resolveComponent("sinosoft-common-button"),P=e.resolveComponent("el-form"),j=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(j,{class:"mb-5"},{default:e.withCtx(()=>[e.createVNode(P,e.mergeProps({"hide-required-asterisk":"",onSubmit:i[0]||(i[0]=e.withModifiers(()=>{},["prevent"])),model:a.value},e.unref(r),{"label-position":e.unref(r).labelPosition,ref_key:"formRef",ref:_}),{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.fieldList,(l,w)=>(e.openBlock(),e.createElementBlock("div",{key:w,class:e.normalizeClass(l.type==="title"||l.type==="name"?"form-item-title":"form-item"),style:e.normalizeStyle(l.style)},[l.type==="title"?(e.openBlock(),e.createBlock(n,{key:0},{default:e.withCtx(()=>[e.createElementVNode("div",D,[e.createElementVNode("span",K,e.toDisplayString(l.title),1)])]),_:2},1024)):l.type==="name"?(e.openBlock(),e.createBlock(n,{key:1,label:l.label,disabled:l.disabled||e.unref(r).isDisabled,class:"container_name",rules:l.rules.nameEnFamily},{default:e.withCtx(()=>[e.createVNode(n,{rules:l.rules.nameEnFamily,prop:[l.field.nameEnFamily],class:"item-name"},{default:e.withCtx(()=>[e.createVNode(b,{modelValue:a.value[l.field.nameEnFamily],"onUpdate:modelValue":o=>a.value[l.field.nameEnFamily]=o,readonly:l.readonly,type:l.type?l.type:"text",placeholder:l.placeholderNameEnFamily,disabled:l.disabled||e.unref(r).isDisabled,onKeyup:e.withKeys(o=>k(l.enterable),["enter"])},null,8,["modelValue","onUpdate:modelValue","readonly","type","placeholder","disabled","onKeyup"])]),_:2},1032,["rules","prop"]),e.createVNode(n,{rules:l.rules.nameChFamily,prop:[l.field.nameChFamily],class:"item-name-right"},{default:e.withCtx(()=>[e.createVNode(b,{modelValue:a.value[l.field.nameChFamily],"onUpdate:modelValue":o=>a.value[l.field.nameChFamily]=o,readonly:l.readonly,type:l.type?l.type:"text",placeholder:l.placeholderNameChFamily,disabled:l.disabled||e.unref(r).isDisabled,onKeyup:e.withKeys(o=>k(l.enterable),["enter"])},null,8,["modelValue","onUpdate:modelValue","readonly","type","placeholder","disabled","onKeyup"])]),_:2},1032,["rules","prop"]),e.createVNode(n,{rules:l.rules.nameEn,prop:[l.field.nameEn],class:"item-name"},{default:e.withCtx(()=>[e.createVNode(b,{modelValue:a.value[l.field.nameEn],"onUpdate:modelValue":o=>a.value[l.field.nameEn]=o,readonly:l.readonly,type:l.type?l.type:"text",placeholder:l.placeholderNameEn,disabled:l.disabled||e.unref(r).isDisabled,onKeyup:e.withKeys(o=>k(l.enterable),["enter"])},null,8,["modelValue","onUpdate:modelValue","readonly","type","placeholder","disabled","onKeyup"])]),_:2},1032,["rules","prop"]),e.createVNode(n,{rules:l.rules.nameCh,prop:[l.field.nameCh],class:"item-name-right"},{default:e.withCtx(()=>[e.createVNode(b,{modelValue:a.value[l.field.nameCh],"onUpdate:modelValue":o=>a.value[l.field.nameCh]=o,readonly:l.readonly,type:l.type?l.type:"text",placeholder:l.placeholderNameCh,disabled:l.disabled||e.unref(r).isDisabled,onKeyup:e.withKeys(o=>k(l.enterable),["enter"])},null,8,["modelValue","onUpdate:modelValue","readonly","type","placeholder","disabled","onKeyup"])]),_:2},1032,["rules","prop"])]),_:2},1032,["label","disabled","rules"])):l.type==="gender"?(e.openBlock(),e.createBlock(n,{key:2,label:l.label,rules:l.rules,prop:[l.field]},{default:e.withCtx(()=>[e.createVNode(N,{modelValue:a.value[l.field],"onUpdate:modelValue":o=>a.value[l.field]=o,disabled:l.disabled||e.unref(r).isDisabled},{default:e.withCtx(()=>{var o;return[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((o=l.options)==null?void 0:o.data,t=>{var s,p;return e.openBlock(),e.createBlock(C,{label:t[((s=l.options)==null?void 0:s.valueKey)||"code"],size:"large",key:t[((p=l.options)==null?void 0:p.valueKey)||"code"]},{default:e.withCtx(()=>[e.createElementVNode("img",{src:t.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,S)]),_:2},1032,["label"])}),128))]}),_:2},1032,["modelValue","onUpdate:modelValue","disabled"])]),_:2},1032,["label","rules","prop"])):l.type==="radio"?(e.openBlock(),e.createBlock(n,{key:3,label:l.label,rules:l.rules,prop:[l.field],class:e.normalizeClass([l.labelNode?"radio_Note":""])},{default:e.withCtx(()=>[e.createElementVNode("div",null,[e.createElementVNode("span",F,e.toDisplayString(l.labelBefore),1),e.createElementVNode("span",I,e.toDisplayString(l.labelNode),1)]),e.createVNode(N,{modelValue:a.value[l.field],"onUpdate:modelValue":o=>a.value[l.field]=o,disabled:l.disabled||e.unref(r).isDisabled},{default:e.withCtx(()=>{var o;return[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((o=l.options)==null?void 0:o.data,t=>{var s,p;return e.openBlock(),e.createBlock(C,{size:"large",label:t[((s=l.options)==null?void 0:s.valueKey)||"code"],key:t[((p=l.options)==null?void 0:p.valueKey)||"code"]},{default:e.withCtx(()=>{var y;return[e.createTextVNode(e.toDisplayString(t[((y=l.options)==null?void 0:y.labelkey)||"name"]),1)]}),_:2},1032,["label"])}),128))]}),_:2},1032,["modelValue","onUpdate:modelValue","disabled"])]),_:2},1032,["label","rules","prop","class"])):l.type==="checkbox"?(e.openBlock(),e.createBlock(n,{key:4,label:l.label,rules:l.rules,prop:[l.field]},{default:e.withCtx(()=>[e.createVNode(Y,{modelValue:a.value[l.field],"onUpdate:modelValue":o=>a.value[l.field]=o,disabled:l.disabled||e.unref(r).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,t=>{var s,p;return e.openBlock(),e.createBlock(T,{key:t[((s=l.options)==null?void 0:s.valueKey)||"code"],label:t[((p=l.options)==null?void 0:p.valueKey)||"code"]},{default:e.withCtx(()=>{var y;return[e.createTextVNode(e.toDisplayString(t[((y=l.options)==null?void 0:y.labelkey)||"name"]),1)]}),_:2},1032,["label"])}),128))]}),_:2},1032,["modelValue","onUpdate:modelValue","disabled","style"])]),_:2},1032,["label","rules","prop"])):l.type==="select"?(e.openBlock(),e.createBlock(n,{key:5,label:l.label,rules:l.rules,disabled:l.disabled||e.unref(r).isDisabled,prop:[l.field]},{default:e.withCtx(()=>[e.createVNode(E,{onChange:o=>L(o,l.field),modelValue:a.value[l.field],"onUpdate:modelValue":o=>a.value[l.field]=o,disabled:l.disabled||e.unref(r).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,t=>{var s,p,y;return e.openBlock(),e.createBlock(m,{key:t[((s=l.options)==null?void 0:s.valueKey)||"code"],label:t[((p=l.options)==null?void 0:p.labelkey)||"name"],value:t[((y=l.options)==null?void 0:y.valueKey)||"code"]},null,8,["label","value"])}),128))]}),_:2},1032,["onChange","modelValue","onUpdate:modelValue","disabled","placeholder","clearable"])]),_:2},1032,["label","rules","disabled","prop"])):l.type==="date"?(e.openBlock(),e.createBlock(n,{key:6,label:l.label,rules:l.rules,prop:[l.field]},{default:e.withCtx(()=>[e.createVNode(U,{modelValue:a.value[l.field],"onUpdate:modelValue":o=>a.value[l.field]=o,disabled:l.disabled||e.unref(r).isDisabled,readonly:l.readonly,type:l.type,placeholder:l.placeholder||l.label,"value-format":l.format||"YYYY-MM-DD HH:mm:ss"},null,8,["modelValue","onUpdate:modelValue","disabled","readonly","type","placeholder","value-format"])]),_:2},1032,["label","rules","prop"])):l.type==="daterange"?(e.openBlock(),e.createBlock(n,{key:7,label:l.label,rules:l.rules,prop:[l.field]},{default:e.withCtx(()=>[e.createVNode(U,{modelValue:a.value[l.field],"onUpdate:modelValue":o=>a.value[l.field]=o,type:"daterange","range-separator":"To","start-placeholder":l.startPlaceholder,"end-placeholder":l.endPlaceholder,"value-format":l.format||"YYYY-MM-DD HH:mm:ss",size:"large"},null,8,["modelValue","onUpdate:modelValue","start-placeholder","end-placeholder","value-format"])]),_:2},1032,["label","rules","prop"])):l.type==="slotItem1"?(e.openBlock(),e.createBlock(n,{key:8,label:l.label,rules:l.rules,prop:[l.field]},{default:e.withCtx(()=>[e.renderSlot(d.$slots,"slotItem1",{},void 0,!0)]),_:2},1032,["label","rules","prop"])):l.type==="slotItem2"?(e.openBlock(),e.createBlock(n,{key:9,label:l.label,rules:l.rules,prop:[l.field]},{default:e.withCtx(()=>[e.renderSlot(d.$slots,"slotItem2",{},void 0,!0)]),_:2},1032,["label","rules","prop"])):l.type==="slotItem3"?(e.openBlock(),e.createBlock(n,{key:10,label:l.label,rules:l.rules,prop:[l.field]},{default:e.withCtx(()=>[e.renderSlot(d.$slots,"slotItem3",{},void 0,!0)]),_:2},1032,["label","rules","prop"])):l.type==="slotItem4"?(e.openBlock(),e.createBlock(n,{key:11,label:l.label,rules:l.rules,prop:[l.field]},{default:e.withCtx(()=>[e.renderSlot(d.$slots,"slotItem4",{},void 0,!0)]),_:2},1032,["label","rules","prop"])):l.type==="slotItem5"?(e.openBlock(),e.createBlock(n,{key:12,label:l.label,rules:l.rules,prop:[l.field]},{default:e.withCtx(()=>[e.renderSlot(d.$slots,"slotItem5",{},void 0,!0)]),_:2},1032,["label","rules","prop"])):l.type==="phone"?(e.openBlock(),e.createBlock(n,{key:13,label:l.label,rules:l.rules.phoneNumber,prop:[l.field.phoneNumber]},{default:e.withCtx(()=>[e.createVNode(b,{modelValue:a.value[l.field.phoneNumber],"onUpdate:modelValue":o=>a.value[l.field.phoneNumber]=o,disabled:l.disabled||e.unref(r).isDisabled,placeholder:l.placeholder||"请选择",clearable:l.clearable},{prepend:e.withCtx(()=>{var o;return[e.createVNode(E,{disabled:l.disabled||e.unref(r).isDisabled,modelValue:a.value[l.field.areaCode],"onUpdate:modelValue":t=>a.value[l.field.areaCode]=t,placeholder:((o=l.options)==null?void 0:o.placeholder)||"请选择",style:{width:"115px"}},{default:e.withCtx(()=>{var t;return[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((t=l.options)==null?void 0:t.data,(s,p)=>(e.openBlock(),e.createBlock(m,{label:s.name,value:s.code,key:p},null,8,["label","value"]))),128))]}),_:2},1032,["disabled","modelValue","onUpdate:modelValue","placeholder"])]}),_:2},1032,["modelValue","onUpdate:modelValue","disabled","placeholder","clearable"])]),_:2},1032,["label","rules","prop"])):l.type==="input"?(e.openBlock(),e.createBlock(n,{key:14,label:l.label,rules:l.rules,prop:[l.field]},{default:e.withCtx(()=>[e.createVNode(b,{modelValue:a.value[l.field],"onUpdate:modelValue":o=>a.value[l.field]=o,readonly:l.readonly,type:l.type?l.type:"text",placeholder:l.placeholder||l.label,disabled:l.disabled||e.unref(r).isDisabled,showPassword:l.showPassword,clearable:l.clearable,onKeyup:e.withKeys(o=>k(l.enterable),["enter"])},e.createSlots({_:2},[l.prepend?{name:"prepend",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.field),1)]),key:"0"}:void 0,l.append?{name:"append",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.append),1)]),key:"1"}:void 0]),1032,["modelValue","onUpdate:modelValue","readonly","type","placeholder","disabled","showPassword","clearable","onKeyup"])]),_:2},1032,["label","rules","prop"])):l.type==="line"?(e.openBlock(),e.createBlock(n,{key:15,label:l.label},{default:e.withCtx(()=>[z]),_:2},1032,["label"])):e.createCommentVNode("",!0)],6))),128)),e.createVNode(n,{class:"btnsItem"},{default:e.withCtx(()=>[e.renderSlot(d.$slots,"buttons",{model:a.value,formRef:_.value},()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(r).btnConfig,(l,w)=>(e.openBlock(),e.createElementBlock("div",{key:w},[l.isShow?(e.openBlock(),e.createBlock(M,{key:0,size:15,width:l.size,btnCode:l.btnCode,onHandleClick:o=>{g(o,_.value,l.isRule,l.emitName)},style:e.normalizeStyle(l.style)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.name),1)]),_:2},1032,["width","btnCode","onHandleClick","style"])):e.createCommentVNode("",!0)]))),128))],!0)]),_:3})]),_:3},16,["model","label-position"])]),_:3})}}}),H="",x=((c,V)=>{const h=c.__vccOpts||c;for(const[f,a]of V)h[f]=a;return h})($,[["__scopeId","data-v-9f1d3121"]]);function B(c,V={}){B.installed||(B.installed=!0,c.component("common-el-form",x))}return x.install=B,x});
|
|
1
|
+
(function(e,_){typeof exports=="object"&&typeof module<"u"?module.exports=_(require("vue")):typeof define=="function"&&define.amd?define(["vue"],_):(e=typeof globalThis<"u"?globalThis:e||self,e.Form=_(e.Vue))})(this,function(e){"use strict";const _=b=>(e.pushScopeId("data-v-f02dc9c8"),b=b(),e.popScopeId(),b),S={class:"header-title"},q={class:"title-content"},U={key:0,class:"custom-required"},K={key:0,class:"custom-required"},F=["src"],I={key:0,class:"custom-required"},z={class:"lable"},L={class:"lable_note"},$={key:0,class:"custom-required"},T={key:0,class:"custom-required"},Y={key:0,class:"custom-required"},M={key:0,class:"custom-required"},P={key:0,class:"custom-required"},j={key:0,class:"custom-required"},H={key:0,class:"custom-required"},O={key:0,class:"custom-required"},R={key:0,class:"custom-required"},A={key:0,class:"custom-required"},G={key:0,class:"custom-required"},J={key:0,class:"custom-required"},Q=_(()=>e.createElementVNode("div",{class:"line",style:{"border-top":"1px solid #e8e8e8",width:"100%",height:"0px",margin:"20px 0"}},null,-1)),W=e.defineComponent({__name:"Index",props:{fieldList:{},model:{},options:{}},emits:["submit","reset","cancel"],setup(b,{expose:V,emit:k}){const p=b,a=e.ref({}),h=e.ref(),d=e.computed(()=>Object.assign([],p==null?void 0:p.options)),X=(t,y)=>{k("selectChange",t,y)};V({formRef:h}),(()=>{p.fieldList.map(t=>{const y=t.type==="checkbox"?[]:"";if(t.field&&typeof t.field=="object")for(let r of Object.keys(t.field))p.model?a.value=p.model:a.value[t.field[r]]=t.value||y;p.model?a.value=p.model:a.value[t.field]=t.value||y,t.type==="address"&&t.field.objectName&&(a.value[t.field.objectName][t.field]=t.value)})})(),console.log("pppp",p.model,a.value);const x=(t,y,r)=>{h.value&&(y?h.value.validate(f=>{if(f)k(r,a.value,t);else return!1}):r==="reset"?h.value.resetFields():k(r,a.value,t))},u=t=>{t&&x("",h.value,!0)};return(t,y)=>{const r=e.resolveComponent("el-form-item"),f=e.resolveComponent("el-input"),m=e.resolveComponent("el-radio"),N=e.resolveComponent("el-radio-group"),Z=e.resolveComponent("el-checkbox"),v=e.resolveComponent("el-checkbox-group"),g=e.resolveComponent("el-option"),E=e.resolveComponent("el-select"),D=e.resolveComponent("el-date-picker"),ee=e.resolveComponent("sinosoft-common-button"),le=e.resolveComponent("el-form"),oe=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(oe,{class:"mb-5"},{default:e.withCtx(()=>[e.createVNode(le,e.mergeProps({"hide-required-asterisk":"",onSubmit:y[0]||(y[0]=e.withModifiers(()=>{},["prevent"])),model:a.value},d.value,{"label-position":d.value.labelPosition,ref_key:"formRef",ref:h}),{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.fieldList,(l,w)=>(e.openBlock(),e.createElementBlock("div",{key:w,class:e.normalizeClass(l.type==="title"||l.type==="name"?"form-item-title":"form-item"),style:e.normalizeStyle(l.style)},[l.type==="title"?(e.openBlock(),e.createBlock(r,{key:0},{default:e.withCtx(()=>[e.createElementVNode("div",S,[e.createElementVNode("span",q,e.toDisplayString(l.title),1)])]),_:2},1024)):l.type==="name"?(e.openBlock(),e.createBlock(r,{key:1,label:l.label,disabled:l.disabled||d.value.isDisabled,class:"container_name",rules:l.rules.nameEnFamily},{label:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(l.label),1),l.required?(e.openBlock(),e.createElementBlock("span",U,"*")):e.createCommentVNode("",!0)]),default:e.withCtx(()=>[e.createVNode(r,{rules:l.rules.nameEnFamily,prop:[l.field.nameEnFamily],class:"item-name"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:a.value[l.field.nameEnFamily],"onUpdate:modelValue":o=>a.value[l.field.nameEnFamily]=o,readonly:l.readonly,type:l.type?l.type:"text",placeholder:l.placeholderNameEnFamily,disabled:l.disabled||d.value.isDisabled,onKeyup:e.withKeys(o=>u(l.enterable),["enter"])},null,8,["modelValue","onUpdate:modelValue","readonly","type","placeholder","disabled","onKeyup"])]),_:2},1032,["rules","prop"]),e.createVNode(r,{rules:l.rules.nameChFamily,prop:[l.field.nameChFamily],class:"item-name-right"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:a.value[l.field.nameChFamily],"onUpdate:modelValue":o=>a.value[l.field.nameChFamily]=o,readonly:l.readonly,type:l.type?l.type:"text",placeholder:l.placeholderNameChFamily,disabled:l.disabled||d.value.isDisabled,onKeyup:e.withKeys(o=>u(l.enterable),["enter"])},null,8,["modelValue","onUpdate:modelValue","readonly","type","placeholder","disabled","onKeyup"])]),_:2},1032,["rules","prop"]),e.createVNode(r,{rules:l.rules.nameEn,prop:[l.field.nameEn],class:"item-name"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:a.value[l.field.nameEn],"onUpdate:modelValue":o=>a.value[l.field.nameEn]=o,readonly:l.readonly,type:l.type?l.type:"text",placeholder:l.placeholderNameEn,disabled:l.disabled||d.value.isDisabled,onKeyup:e.withKeys(o=>u(l.enterable),["enter"])},null,8,["modelValue","onUpdate:modelValue","readonly","type","placeholder","disabled","onKeyup"])]),_:2},1032,["rules","prop"]),e.createVNode(r,{rules:l.rules.nameCh,prop:[l.field.nameCh],class:"item-name-right"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:a.value[l.field.nameCh],"onUpdate:modelValue":o=>a.value[l.field.nameCh]=o,readonly:l.readonly,type:l.type?l.type:"text",placeholder:l.placeholderNameCh,disabled:l.disabled||d.value.isDisabled,onKeyup:e.withKeys(o=>u(l.enterable),["enter"])},null,8,["modelValue","onUpdate:modelValue","readonly","type","placeholder","disabled","onKeyup"])]),_:2},1032,["rules","prop"])]),_:2},1032,["label","disabled","rules"])):l.type==="gender"?(e.openBlock(),e.createBlock(r,{key:2,label:l.label,rules:l.rules,prop:[l.field]},{label:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(l.label),1),l.required?(e.openBlock(),e.createElementBlock("span",K,"*")):e.createCommentVNode("",!0)]),default:e.withCtx(()=>[e.createVNode(N,{modelValue:a.value[l.field],"onUpdate:modelValue":o=>a.value[l.field]=o,disabled:l.disabled||d.value.isDisabled},{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 s,c;return e.openBlock(),e.createBlock(m,{label:n[((s=l.options)==null?void 0:s.valueKey)||"code"],size:"large",key:n[((c=l.options)==null?void 0:c.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,F)]),_:2},1032,["label"])}),128))]}),_:2},1032,["modelValue","onUpdate:modelValue","disabled"])]),_:2},1032,["label","rules","prop"])):l.type==="radio"?(e.openBlock(),e.createBlock(r,{key:3,label:l.label,rules:l.rules,prop:[l.field],class:e.normalizeClass([l.labelNode?"radio_Note":"rule_err"])},{label:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(l.label),1),l.required?(e.openBlock(),e.createElementBlock("span",I,"*")):e.createCommentVNode("",!0)]),default:e.withCtx(()=>[e.createVNode(N,{modelValue:a.value[l.field],"onUpdate:modelValue":o=>a.value[l.field]=o,disabled:l.disabled||d.value.isDisabled},{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 s,c;return e.openBlock(),e.createBlock(m,{size:"large",label:n[((s=l.options)==null?void 0:s.valueKey)||"code"],key:n[((c=l.options)==null?void 0:c.valueKey)||"code"]},{default:e.withCtx(()=>{var i;return[e.createTextVNode(e.toDisplayString(n[((i=l.options)==null?void 0:i.labelkey)||"name"]),1)]}),_:2},1032,["label"])}),128))]}),_:2},1032,["modelValue","onUpdate:modelValue","disabled"])]),_:2},1032,["label","rules","prop","class"])):l.type==="radioNote"?(e.openBlock(),e.createBlock(r,{key:4,label:l.label,rules:l.rules,prop:[l.field],class:e.normalizeClass([l.labelNode?"radio_Note":"rule_err"])},{default:e.withCtx(()=>[e.createElementVNode("div",null,[e.createElementVNode("span",z,e.toDisplayString(l.labelBefore),1),e.createElementVNode("span",L,e.toDisplayString(l.labelNode),1),l.required?(e.openBlock(),e.createElementBlock("span",$,"*")):e.createCommentVNode("",!0)]),e.createVNode(N,{modelValue:a.value[l.field],"onUpdate:modelValue":o=>a.value[l.field]=o,disabled:l.disabled||d.value.isDisabled},{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 s,c;return e.openBlock(),e.createBlock(m,{size:"large",label:n[((s=l.options)==null?void 0:s.valueKey)||"code"],key:n[((c=l.options)==null?void 0:c.valueKey)||"code"]},{default:e.withCtx(()=>{var i;return[e.createTextVNode(e.toDisplayString(n[((i=l.options)==null?void 0:i.labelkey)||"name"]),1)]}),_:2},1032,["label"])}),128))]}),_:2},1032,["modelValue","onUpdate:modelValue","disabled"])]),_:2},1032,["label","rules","prop","class"])):l.type==="checkbox"?(e.openBlock(),e.createBlock(r,{key:5,label:l.label,rules:l.rules,prop:[l.field]},{label:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(l.label),1),l.required?(e.openBlock(),e.createElementBlock("span",T,"*")):e.createCommentVNode("",!0)]),default:e.withCtx(()=>[e.createVNode(v,{modelValue:a.value[l.field],"onUpdate:modelValue":o=>a.value[l.field]=o,disabled:l.disabled||d.value.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 s,c;return e.openBlock(),e.createBlock(Z,{key:n[((s=l.options)==null?void 0:s.valueKey)||"code"],label:n[((c=l.options)==null?void 0:c.valueKey)||"code"]},{default:e.withCtx(()=>{var i;return[e.createTextVNode(e.toDisplayString(n[((i=l.options)==null?void 0:i.labelkey)||"name"]),1)]}),_:2},1032,["label"])}),128))]}),_:2},1032,["modelValue","onUpdate:modelValue","disabled","style"])]),_:2},1032,["label","rules","prop"])):l.type==="select"?(e.openBlock(),e.createBlock(r,{key:6,label:l.label,rules:l.rules,disabled:l.disabled||d.value.isDisabled,prop:[l.field]},{label:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(l.label),1),l.required?(e.openBlock(),e.createElementBlock("span",Y,"*")):e.createCommentVNode("",!0)]),default:e.withCtx(()=>[e.createVNode(E,{onChange:o=>X(o,l.field),modelValue:a.value[l.field],"onUpdate:modelValue":o=>a.value[l.field]=o,disabled:l.disabled||d.value.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 s,c,i;return e.openBlock(),e.createBlock(g,{key:n[((s=l.options)==null?void 0:s.valueKey)||"code"],label:n[((c=l.options)==null?void 0:c.labelkey)||"name"],value:n[((i=l.options)==null?void 0:i.valueKey)||"code"]},null,8,["label","value"])}),128))]}),_:2},1032,["onChange","modelValue","onUpdate:modelValue","disabled","placeholder","clearable"])]),_:2},1032,["label","rules","disabled","prop"])):l.type==="date"?(e.openBlock(),e.createBlock(r,{key:7,label:l.label,rules:l.rules,prop:[l.field]},{label:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(l.label),1),l.required?(e.openBlock(),e.createElementBlock("span",M,"*")):e.createCommentVNode("",!0)]),default:e.withCtx(()=>[e.createVNode(D,{modelValue:a.value[l.field],"onUpdate:modelValue":o=>a.value[l.field]=o,disabled:l.disabled||d.value.isDisabled,readonly:l.readonly,type:l.type,placeholder:l.placeholder||l.label,"value-format":l.format||"YYYY-MM-DD HH:mm:ss"},null,8,["modelValue","onUpdate:modelValue","disabled","readonly","type","placeholder","value-format"])]),_:2},1032,["label","rules","prop"])):l.type==="daterange"?(e.openBlock(),e.createBlock(r,{key:8,label:l.label,rules:l.rules,prop:[l.field]},{label:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(l.label),1),l.required?(e.openBlock(),e.createElementBlock("span",P,"*")):e.createCommentVNode("",!0)]),default:e.withCtx(()=>[e.createVNode(D,{modelValue:a.value[l.field],"onUpdate:modelValue":o=>a.value[l.field]=o,type:"daterange","range-separator":"To","start-placeholder":l.startPlaceholder,"end-placeholder":l.endPlaceholder,"value-format":l.format||"YYYY-MM-DD HH:mm:ss",size:"large"},null,8,["modelValue","onUpdate:modelValue","start-placeholder","end-placeholder","value-format"])]),_:2},1032,["label","rules","prop"])):l.type==="slotItem1"?(e.openBlock(),e.createBlock(r,{key:9,label:l.label,rules:l.rules,prop:[l.field],class:"rule_err"},{label:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(l.label),1),l.required?(e.openBlock(),e.createElementBlock("span",j,"*")):e.createCommentVNode("",!0)]),default:e.withCtx(()=>[e.renderSlot(t.$slots,"slotItem1",{},void 0,!0)]),_:2},1032,["label","rules","prop"])):l.type==="slotItem2"?(e.openBlock(),e.createBlock(r,{key:10,label:l.label,rules:l.rules,prop:[l.field],class:"rule_err"},{label:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(l.label),1),l.required?(e.openBlock(),e.createElementBlock("span",H,"*")):e.createCommentVNode("",!0)]),default:e.withCtx(()=>[e.renderSlot(t.$slots,"slotItem2",{},void 0,!0)]),_:2},1032,["label","rules","prop"])):l.type==="slotItem3"?(e.openBlock(),e.createBlock(r,{key:11,label:l.label,rules:l.rules,prop:[l.field],class:"rule_err"},{label:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(l.label),1),l.required?(e.openBlock(),e.createElementBlock("span",O,"*")):e.createCommentVNode("",!0)]),default:e.withCtx(()=>[e.renderSlot(t.$slots,"slotItem3",{},void 0,!0)]),_:2},1032,["label","rules","prop"])):l.type==="slotItem4"?(e.openBlock(),e.createBlock(r,{key:12,label:l.label,rules:l.rules,prop:[l.field],class:"rule_err"},{label:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(l.label),1),l.required?(e.openBlock(),e.createElementBlock("span",R,"*")):e.createCommentVNode("",!0)]),default:e.withCtx(()=>[e.renderSlot(t.$slots,"slotItem4",{},void 0,!0)]),_:2},1032,["label","rules","prop"])):l.type==="slotItem5"?(e.openBlock(),e.createBlock(r,{key:13,label:l.label,rules:l.rules,prop:[l.field],class:"rule_err"},{label:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(l.label),1),l.required?(e.openBlock(),e.createElementBlock("span",A,"*")):e.createCommentVNode("",!0)]),default:e.withCtx(()=>[e.renderSlot(t.$slots,"slotItem5",{},void 0,!0)]),_:2},1032,["label","rules","prop"])):l.type==="phone"?(e.openBlock(),e.createBlock(r,{key:14,label:l.label,rules:l.rules.phoneNumber,prop:[l.field.phoneNumber]},{label:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(l.label),1),l.required?(e.openBlock(),e.createElementBlock("span",G,"*")):e.createCommentVNode("",!0)]),default:e.withCtx(()=>[e.createVNode(f,{modelValue:a.value[l.field.phoneNumber],"onUpdate:modelValue":o=>a.value[l.field.phoneNumber]=o,disabled:l.disabled||d.value.isDisabled,placeholder:l.placeholder||"请选择",clearable:l.clearable},{prepend:e.withCtx(()=>{var o;return[e.createVNode(E,{disabled:l.disabled||d.value.isDisabled,modelValue:a.value[l.field.areaCode],"onUpdate:modelValue":n=>a.value[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,(s,c)=>(e.openBlock(),e.createBlock(g,{label:s.name,value:s.code,key:c},null,8,["label","value"]))),128))]}),_:2},1032,["disabled","modelValue","onUpdate:modelValue","placeholder"])]}),_:2},1032,["modelValue","onUpdate:modelValue","disabled","placeholder","clearable"])]),_:2},1032,["label","rules","prop"])):l.type==="input"?(e.openBlock(),e.createBlock(r,{key:15,label:l.label,rules:l.rules,prop:[l.field]},{label:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(l.label),1),l.required?(e.openBlock(),e.createElementBlock("span",J,"*")):e.createCommentVNode("",!0)]),default:e.withCtx(()=>[e.createVNode(f,{modelValue:a.value[l.field],"onUpdate:modelValue":o=>a.value[l.field]=o,readonly:l.readonly,type:l.type?l.type:"text",placeholder:l.placeholder||l.label,disabled:l.disabled||d.value.isDisabled,showPassword:l.showPassword,clearable:l.clearable,onKeyup:e.withKeys(o=>u(l.enterable),["enter"])},e.createSlots({_:2},[l.prepend?{name:"prepend",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.field),1)]),key:"0"}:void 0,l.append?{name:"append",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.append),1)]),key:"1"}:void 0]),1032,["modelValue","onUpdate:modelValue","readonly","type","placeholder","disabled","showPassword","clearable","onKeyup"])]),_:2},1032,["label","rules","prop"])):l.type==="line"?(e.openBlock(),e.createBlock(r,{key:16,label:l.label},{default:e.withCtx(()=>[Q]),_:2},1032,["label"])):e.createCommentVNode("",!0)],6))),128)),e.createVNode(r,{class:"btnsItem"},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"buttons",{model:a.value,onBtnClick:x},()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.btnConfig,(l,w)=>(e.openBlock(),e.createElementBlock("div",{key:w},[l.isShow?(e.openBlock(),e.createBlock(ee,{key:0,size:15,width:l.size,btnCode:l.btnCode,onHandleClick:o=>{x(o,l.isRule,l.emitName)},style:e.normalizeStyle(l.style)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.name),1)]),_:2},1032,["width","btnCode","onHandleClick","style"])):e.createCommentVNode("",!0)]))),128))],!0)]),_:3})]),_:3},16,["model","label-position"])]),_:3})}}}),ae="",C=((b,V)=>{const k=b.__vccOpts||b;for(const[p,a]of V)k[p]=a;return k})(W,[["__scopeId","data-v-f02dc9c8"]]);function B(b,V={}){B.installed||(B.installed=!0,b.component("common-el-form",C))}return C.install=B,C});
|
package/package.json
CHANGED
package/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@charset "UTF-8";[data-v-
|
|
1
|
+
@charset "UTF-8";[data-v-f02dc9c8] .el-date-editor{height:60px!important;width:100%!important}.form-item[data-v-f02dc9c8]{width:50%;display:inline-block;padding-right:0;box-sizing:border-box}[data-v-f02dc9c8] .el-input__inner{height:42px;color:#1d1d1d}[data-v-f02dc9c8] .el-card__body{padding:0}[data-v-f02dc9c8] .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-f02dc9c8] .el-form-item__label{font-size:16px;line-height:22px;color:#1d1d1d;font-weight:400;font-family:Roboto Medium}.form-item-title[data-v-f02dc9c8]{width:100%}.rule_err[data-v-f02dc9c8] .el-form-item__content,.radio_Note[data-v-f02dc9c8] .el-form-item__content{display:block}.radio_Note .lable[data-v-f02dc9c8]{font-size:16px;line-height:22px;color:#1d1d1d;font-weight:400;font-family:Roboto Medium}.radio_Note .lable_note[data-v-f02dc9c8]{font-size:16px;line-height:22px;color:#6e6e73;font-weight:400;font-family:Roboto Medium}.container_name[data-v-f02dc9c8] .el-form-item__content{align-items:start}[data-v-f02dc9c8] .el-form-item__error{position:relative}.item-name[data-v-f02dc9c8]{width:51%;padding-right:20px;padding-bottom:12px;box-sizing:border-box}.item-name-right[data-v-f02dc9c8]{width:49%;padding-bottom:12px;padding-right:0}.btnsItem[data-v-f02dc9c8]{width:100%;margin:0 auto;justify-content:right}.btnsItem[data-v-f02dc9c8] .el-form-item__content{justify-content:right}label[data-v-f02dc9c8]{display:block}.title-content[data-v-f02dc9c8]{font-size:22px;line-height:30px;color:#1d1d1d;font-weight:300;font-family:Roboto Medium}[data-v-f02dc9c8] .el-input-group--prepend .el-input-group__prepend .el-select .el-input .el-input__wrapper{background-color:#fff;width:80px}[data-v-f02dc9c8] .el-input__wrapper{height:60px;border-radius:8px;border:1px;border-color:#c7c8ca}[data-v-f02dc9c8] .el-select{width:100%}.custom-required[data-v-f02dc9c8]{content:"*";color:#e2a650;margin-left:4px}
|