sinosoft-common-form 1.2.7 → 1.2.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 CHANGED
@@ -1,4 +1,4 @@
1
- import { reactive as T, ref as A, computed as G, onMounted as J, watch as Q, toRefs as X, resolveComponent as v, openBlock as d, createBlock as n, mergeProps as Z, withModifiers as $, withCtx as o, createVNode as u, createElementBlock as t, Fragment as K, renderList as D, withDirectives as g, createElementVNode as i, normalizeStyle as k, toDisplayString as p, vShow as x, createTextVNode as h, createCommentVNode as w, withKeys as N, normalizeClass as W, renderSlot as R, createSlots as ee, pushScopeId as le, popScopeId as ae } from "vue";
1
+ import { reactive as T, ref as A, computed as G, onMounted as J, watch as Q, toRefs as X, resolveComponent as v, openBlock as d, createBlock as n, mergeProps as Z, withModifiers as $, withCtx as o, createVNode as b, createElementBlock as p, Fragment as K, renderList as D, withDirectives as g, createElementVNode as y, normalizeStyle as k, toDisplayString as c, vShow as x, createTextVNode as f, createCommentVNode as w, withKeys as N, normalizeClass as W, renderSlot as R, createSlots as ee, pushScopeId as le, popScopeId as ae } from "vue";
2
2
  const oe = {
3
3
  props: {
4
4
  fieldList: {
@@ -14,35 +14,35 @@ const oe = {
14
14
  model: {}
15
15
  }), l = A(null), H = G(() => Object.assign([], _.options)), I = () => {
16
16
  C.model = _.model;
17
- }, r = (y, c, S) => {
18
- l.value && (c ? l.value.validate((m) => {
17
+ }, r = (t, u, S) => {
18
+ l.value && (u ? l.value.validate((m) => {
19
19
  if (m)
20
- U(S || "submit", C.model, y);
20
+ U(S || "submit", C.model, t);
21
21
  else
22
22
  return !1;
23
- }) : S === "reset" ? l.value.resetFields() : U(S || "submit", C.model, y));
24
- }, O = (y, c) => {
25
- U("selectChange", y, c);
26
- }, q = (y, c) => {
27
- U("radioChange", y, c);
28
- }, F = (y, c) => {
29
- U("checkChange", y, c);
30
- }, E = (y, c) => {
31
- const S = C.model[c].length;
32
- S !== 1 && (S > 1 && C.model[c].shift(), U("checkChange", y, c));
33
- }, Y = (y, c, S) => {
34
- r(y, c, S);
35
- }, z = (y, c) => {
36
- y && (c == null ? void 0 : c.key) === "Enter" && r(void 0, !0, "submit");
37
- }, M = () => {
38
- l.value.resetFields();
39
- }, B = () => {
40
- l.value.clearValidate();
23
+ }) : S === "reset" ? l.value.resetFields() : U(S || "submit", C.model, t));
24
+ }, O = (t, u) => {
25
+ U("selectChange", t, u);
26
+ }, q = (t, u) => {
27
+ U("radioChange", t, u);
28
+ }, F = (t, u) => {
29
+ U("checkChange", t, u);
30
+ }, E = (t, u) => {
31
+ const S = C.model[u].length;
32
+ S !== 1 && (S > 1 && C.model[u].shift(), U("checkChange", t, u));
33
+ }, Y = (t, u, S) => {
34
+ r(t, u, S);
35
+ }, z = (t, u) => {
36
+ t && (u == null ? void 0 : u.key) === "Enter" && r(void 0, !0, "submit");
37
+ }, M = (t) => {
38
+ l.value.resetFields(t);
39
+ }, B = (t) => {
40
+ l.value.clearValidate(t);
41
41
  };
42
42
  return J(() => {
43
43
  I(), l.value.resetFields();
44
- }), Q(() => _.fieldList, (y, c) => {
45
- y !== c && I();
44
+ }), Q(() => _.fieldList, (t, u) => {
45
+ t !== u && I();
46
46
  }), {
47
47
  ...X(C),
48
48
  formRef: l,
@@ -65,7 +65,7 @@ const de = (_, U) => {
65
65
  for (const [l, H] of U)
66
66
  C[l] = H;
67
67
  return C;
68
- }, se = (_) => (le("data-v-15f750a4"), _ = _(), ae(), _), ne = { class: "header-title" }, re = { class: "title-content" }, te = {
68
+ }, se = (_) => (le("data-v-7c0893c7"), _ = _(), ae(), _), ne = { class: "header-title" }, re = { class: "title-content" }, te = {
69
69
  key: 0,
70
70
  class: "custom-required"
71
71
  }, pe = {
@@ -77,10 +77,10 @@ const de = (_, U) => {
77
77
  }, be = { class: "lable" }, ie = { class: "lable_note" }, ye = {
78
78
  key: 0,
79
79
  class: "custom-required"
80
- }, fe = {
80
+ }, he = {
81
81
  key: 0,
82
82
  class: "custom-required"
83
- }, he = {
83
+ }, fe = {
84
84
  key: 0,
85
85
  class: "custom-required"
86
86
  }, _e = {
@@ -98,7 +98,7 @@ const de = (_, U) => {
98
98
  }, Ce = {
99
99
  key: 0,
100
100
  class: "custom-required"
101
- }, Ve = /* @__PURE__ */ se(() => /* @__PURE__ */ i("div", {
101
+ }, Ve = /* @__PURE__ */ se(() => /* @__PURE__ */ y("div", {
102
102
  class: "line",
103
103
  style: { "border-top": "1px solid #e8e8e8", width: "100%", height: "0px", margin: "20px 0" }
104
104
  }, null, -1)), ve = {
@@ -106,7 +106,7 @@ const de = (_, U) => {
106
106
  class: "custom-required"
107
107
  };
108
108
  function we(_, U, C, l, H, I) {
109
- const r = v("el-form-item"), O = v("el-input"), q = v("el-radio"), F = v("el-radio-group"), E = v("el-checkbox"), Y = v("el-checkbox-group"), z = v("el-option"), M = v("el-select"), B = v("el-date-picker"), y = v("el-col"), c = v("el-row"), S = v("sinosoft-common-button"), m = v("el-form");
109
+ const r = v("el-form-item"), O = v("el-input"), q = v("el-radio"), F = v("el-radio-group"), E = v("el-checkbox"), Y = v("el-checkbox-group"), z = v("el-option"), M = v("el-select"), B = v("el-date-picker"), t = v("el-col"), u = v("el-row"), S = v("sinosoft-common-button"), m = v("el-form");
110
110
  return d(), n(m, Z({
111
111
  "hide-required-asterisk": "",
112
112
  onSubmit: U[0] || (U[0] = $(() => {
@@ -117,9 +117,9 @@ function we(_, U, C, l, H, I) {
117
117
  ref: "formRef"
118
118
  }), {
119
119
  default: o(() => [
120
- u(c, { gutter: 10 }, {
120
+ b(u, { gutter: 10 }, {
121
121
  default: o(() => [
122
- (d(!0), t(K, null, D(C.fieldList, (e, P) => g((d(), n(y, {
122
+ (d(!0), p(K, null, D(C.fieldList, (e, P) => g((d(), n(t, {
123
123
  xs: e.xs ? e.xs : 24,
124
124
  sm: e.sm ? e.sm : 24,
125
125
  md: e.md ? e.md : 8,
@@ -128,13 +128,13 @@ function we(_, U, C, l, H, I) {
128
128
  key: P
129
129
  }, {
130
130
  default: o(() => [
131
- i("div", {
131
+ y("div", {
132
132
  style: k(e.style)
133
133
  }, [
134
134
  e.type === "title" ? g((d(), n(r, { key: 0 }, {
135
135
  default: o(() => [
136
- i("div", ne, [
137
- i("span", re, p(e.title), 1)
136
+ y("div", ne, [
137
+ y("span", re, c(e.title), 1)
138
138
  ])
139
139
  ]),
140
140
  _: 2
@@ -148,21 +148,21 @@ function we(_, U, C, l, H, I) {
148
148
  rules: e.rules.nameEnFamily
149
149
  }, {
150
150
  label: o(() => [
151
- i("div", {
151
+ y("div", {
152
152
  style: k([{ display: "inline-block" }, e.labelStyle])
153
153
  }, [
154
- h(p(e.label) + " ", 1),
155
- e.required ? (d(), t("span", te, "*")) : w("", !0)
154
+ f(c(e.label) + " ", 1),
155
+ e.required ? (d(), p("span", te, "*")) : w("", !0)
156
156
  ], 4)
157
157
  ]),
158
158
  default: o(() => [
159
- u(r, {
159
+ b(r, {
160
160
  rules: e.rules.nameEnFamily,
161
- prop: [e.field.nameEnFamily],
161
+ prop: e.field.nameEnFamily,
162
162
  class: "item-name"
163
163
  }, {
164
164
  default: o(() => [
165
- u(O, {
165
+ b(O, {
166
166
  maxlength: e.maxlength,
167
167
  modelValue: l.states.model[e.field.nameEnFamily],
168
168
  "onUpdate:modelValue": (a) => l.states.model[e.field.nameEnFamily] = a,
@@ -176,13 +176,13 @@ function we(_, U, C, l, H, I) {
176
176
  ]),
177
177
  _: 2
178
178
  }, 1032, ["rules", "prop"]),
179
- u(r, {
179
+ b(r, {
180
180
  rules: e.rules.nameEn,
181
- prop: [e.field.nameEn],
181
+ prop: e.field.nameEn,
182
182
  class: "item-name-right"
183
183
  }, {
184
184
  default: o(() => [
185
- u(O, {
185
+ b(O, {
186
186
  maxlength: e.maxlength,
187
187
  modelValue: l.states.model[e.field.nameEn],
188
188
  "onUpdate:modelValue": (a) => l.states.model[e.field.nameEn] = a,
@@ -195,13 +195,13 @@ function we(_, U, C, l, H, I) {
195
195
  ]),
196
196
  _: 2
197
197
  }, 1032, ["rules", "prop"]),
198
- u(r, {
198
+ b(r, {
199
199
  rules: e.rules.nameChFamily,
200
- prop: [e.field.nameChFamily],
200
+ prop: e.field.nameChFamily,
201
201
  class: "item-name"
202
202
  }, {
203
203
  default: o(() => [
204
- u(O, {
204
+ b(O, {
205
205
  maxlength: e.maxlength,
206
206
  modelValue: l.states.model[e.field.nameChFamily],
207
207
  "onUpdate:modelValue": (a) => l.states.model[e.field.nameChFamily] = a,
@@ -214,13 +214,13 @@ function we(_, U, C, l, H, I) {
214
214
  ]),
215
215
  _: 2
216
216
  }, 1032, ["rules", "prop"]),
217
- u(r, {
217
+ b(r, {
218
218
  rules: e.rules.nameCh,
219
- prop: [e.field.nameCh],
219
+ prop: e.field.nameCh,
220
220
  class: "item-name-right"
221
221
  }, {
222
222
  default: o(() => [
223
- u(O, {
223
+ b(O, {
224
224
  maxlength: e.maxlength,
225
225
  modelValue: l.states.model[e.field.nameCh],
226
226
  "onUpdate:modelValue": (a) => l.states.model[e.field.nameCh] = a,
@@ -241,18 +241,18 @@ function we(_, U, C, l, H, I) {
241
241
  key: 2,
242
242
  label: e.label,
243
243
  rules: e.rules,
244
- prop: [e.field]
244
+ prop: e.field
245
245
  }, {
246
246
  label: o(() => [
247
- i("div", {
247
+ y("div", {
248
248
  style: k([{ display: "inline-block" }, e.labelStyle])
249
249
  }, [
250
- h(p(e.label) + " ", 1),
251
- e.required ? (d(), t("span", pe, "*")) : w("", !0)
250
+ f(c(e.label) + " ", 1),
251
+ e.required ? (d(), p("span", pe, "*")) : w("", !0)
252
252
  ], 4)
253
253
  ]),
254
254
  default: o(() => [
255
- u(F, {
255
+ b(F, {
256
256
  modelValue: l.states.model[e.field],
257
257
  "onUpdate:modelValue": (a) => l.states.model[e.field] = a,
258
258
  disabled: e.disabled || l.formOptions.isDisabled,
@@ -261,15 +261,15 @@ function we(_, U, C, l, H, I) {
261
261
  default: o(() => {
262
262
  var a;
263
263
  return [
264
- (d(!0), t(K, null, D((a = e.options) == null ? void 0 : a.data, (s) => {
265
- var b, f;
264
+ (d(!0), p(K, null, D((a = e.options) == null ? void 0 : a.data, (s) => {
265
+ var i, h;
266
266
  return d(), n(q, {
267
- label: s[((b = e.options) == null ? void 0 : b.valueKey) || "code"],
267
+ label: s[((i = e.options) == null ? void 0 : i.valueKey) || "code"],
268
268
  size: "large",
269
- key: s[((f = e.options) == null ? void 0 : f.valueKey) || "code"]
269
+ key: s[((h = e.options) == null ? void 0 : h.valueKey) || "code"]
270
270
  }, {
271
271
  default: o(() => [
272
- i("img", {
272
+ y("img", {
273
273
  src: s.code === "M" ? "http://192.168.5.200:9000/test/sex_img_M.png" : "http://192.168.5.200:9000/test/sex_img_F.png",
274
274
  style: { width: "44px", height: "44px", "margin-bottom": "-15px", "margin-left": "4px" },
275
275
  alt: ""
@@ -290,19 +290,19 @@ function we(_, U, C, l, H, I) {
290
290
  key: 3,
291
291
  label: e.label,
292
292
  rules: e.rules,
293
- prop: [e.field],
293
+ prop: e.field,
294
294
  class: W([e.labelNode ? "radio_Note" : "rule_err"])
295
295
  }, {
296
296
  label: o(() => [
297
- i("div", {
297
+ y("div", {
298
298
  style: k([{ display: "inline-block" }, e.labelStyle])
299
299
  }, [
300
- h(p(e.label) + " ", 1),
301
- e.required ? (d(), t("span", ue, "*")) : w("", !0)
300
+ f(c(e.label) + " ", 1),
301
+ e.required ? (d(), p("span", ue, "*")) : w("", !0)
302
302
  ], 4)
303
303
  ]),
304
304
  default: o(() => [
305
- u(F, {
305
+ b(F, {
306
306
  modelValue: l.states.model[e.field],
307
307
  "onUpdate:modelValue": (a) => l.states.model[e.field] = a,
308
308
  disabled: e.disabled || l.formOptions.isDisabled,
@@ -311,17 +311,17 @@ function we(_, U, C, l, H, I) {
311
311
  default: o(() => {
312
312
  var a;
313
313
  return [
314
- (d(!0), t(K, null, D((a = e.options) == null ? void 0 : a.data, (s) => {
315
- var b, f;
314
+ (d(!0), p(K, null, D((a = e.options) == null ? void 0 : a.data, (s) => {
315
+ var i, h;
316
316
  return d(), n(q, {
317
317
  size: "large",
318
- label: s[((b = e.options) == null ? void 0 : b.valueKey) || "code"],
319
- key: s[((f = e.options) == null ? void 0 : f.valueKey) || "code"]
318
+ label: s[((i = e.options) == null ? void 0 : i.valueKey) || "code"],
319
+ key: s[((h = e.options) == null ? void 0 : h.valueKey) || "code"]
320
320
  }, {
321
321
  default: o(() => {
322
322
  var V;
323
323
  return [
324
- h(p(s[((V = e.options) == null ? void 0 : V.labelkey) || "name"]), 1)
324
+ f(c(s[((V = e.options) == null ? void 0 : V.labelkey) || "name"]), 1)
325
325
  ];
326
326
  }),
327
327
  _: 2
@@ -339,16 +339,16 @@ function we(_, U, C, l, H, I) {
339
339
  key: 4,
340
340
  label: e.label,
341
341
  rules: e.rules,
342
- prop: [e.field],
342
+ prop: e.field,
343
343
  class: W([e.labelNode ? "radio_Note" : "rule_err"])
344
344
  }, {
345
345
  default: o(() => [
346
- i("div", null, [
347
- i("span", be, p(e.labelBefore), 1),
348
- i("span", ie, p(e.labelNode), 1),
349
- e.required ? (d(), t("span", ye, "*")) : w("", !0)
346
+ y("div", null, [
347
+ y("span", be, c(e.labelBefore), 1),
348
+ y("span", ie, c(e.labelNode), 1),
349
+ e.required ? (d(), p("span", ye, "*")) : w("", !0)
350
350
  ]),
351
- u(F, {
351
+ b(F, {
352
352
  modelValue: l.states.model[e.field],
353
353
  "onUpdate:modelValue": (a) => l.states.model[e.field] = a,
354
354
  disabled: e.disabled || l.formOptions.isDisabled,
@@ -357,17 +357,17 @@ function we(_, U, C, l, H, I) {
357
357
  default: o(() => {
358
358
  var a;
359
359
  return [
360
- (d(!0), t(K, null, D((a = e.options) == null ? void 0 : a.data, (s) => {
361
- var b, f;
360
+ (d(!0), p(K, null, D((a = e.options) == null ? void 0 : a.data, (s) => {
361
+ var i, h;
362
362
  return d(), n(q, {
363
363
  size: "large",
364
- label: s[((b = e.options) == null ? void 0 : b.valueKey) || "code"],
365
- key: s[((f = e.options) == null ? void 0 : f.valueKey) || "code"]
364
+ label: s[((i = e.options) == null ? void 0 : i.valueKey) || "code"],
365
+ key: s[((h = e.options) == null ? void 0 : h.valueKey) || "code"]
366
366
  }, {
367
367
  default: o(() => {
368
368
  var V;
369
369
  return [
370
- h(p(s[((V = e.options) == null ? void 0 : V.labelkey) || "name"]), 1)
370
+ f(c(s[((V = e.options) == null ? void 0 : V.labelkey) || "name"]), 1)
371
371
  ];
372
372
  }),
373
373
  _: 2
@@ -385,18 +385,18 @@ function we(_, U, C, l, H, I) {
385
385
  key: 5,
386
386
  label: e.label,
387
387
  rules: e.rules,
388
- prop: [e.field]
388
+ prop: e.field
389
389
  }, {
390
390
  label: o(() => [
391
- i("div", {
391
+ y("div", {
392
392
  style: k([{ display: "inline-block" }, e.labelStyle])
393
393
  }, [
394
- h(p(e.label) + " ", 1),
395
- e.required ? (d(), t("span", fe, "*")) : w("", !0)
394
+ f(c(e.label) + " ", 1),
395
+ e.required ? (d(), p("span", he, "*")) : w("", !0)
396
396
  ], 4)
397
397
  ]),
398
398
  default: o(() => [
399
- u(Y, {
399
+ b(Y, {
400
400
  modelValue: l.states.model[e.field],
401
401
  "onUpdate:modelValue": (a) => l.states.model[e.field] = a,
402
402
  onChange: (a) => l.checkChange(a, e.field),
@@ -408,16 +408,16 @@ function we(_, U, C, l, H, I) {
408
408
  default: o(() => {
409
409
  var a;
410
410
  return [
411
- (d(!0), t(K, null, D((a = e.options) == null ? void 0 : a.data, (s) => {
412
- var b, f;
411
+ (d(!0), p(K, null, D((a = e.options) == null ? void 0 : a.data, (s) => {
412
+ var i, h;
413
413
  return d(), n(E, {
414
- key: s[((b = e.options) == null ? void 0 : b.valueKey) || "code"],
415
- label: s[((f = e.options) == null ? void 0 : f.valueKey) || "code"]
414
+ key: s[((i = e.options) == null ? void 0 : i.valueKey) || "code"],
415
+ label: s[((h = e.options) == null ? void 0 : h.valueKey) || "code"]
416
416
  }, {
417
417
  default: o(() => {
418
418
  var V;
419
419
  return [
420
- h(p(s[((V = e.options) == null ? void 0 : V.labelkey) || "name"]), 1)
420
+ f(c(s[((V = e.options) == null ? void 0 : V.labelkey) || "name"]), 1)
421
421
  ];
422
422
  }),
423
423
  _: 2
@@ -435,18 +435,18 @@ function we(_, U, C, l, H, I) {
435
435
  key: 6,
436
436
  label: e.label,
437
437
  rules: e.rules,
438
- prop: [e.field]
438
+ prop: e.field
439
439
  }, {
440
440
  label: o(() => [
441
- i("div", {
441
+ y("div", {
442
442
  style: k([{ display: "inline-block" }, e.labelStyle])
443
443
  }, [
444
- h(p(e.label) + " ", 1),
445
- e.required ? (d(), t("span", he, "*")) : w("", !0)
444
+ f(c(e.label) + " ", 1),
445
+ e.required ? (d(), p("span", fe, "*")) : w("", !0)
446
446
  ], 4)
447
447
  ]),
448
448
  default: o(() => [
449
- u(Y, {
449
+ b(Y, {
450
450
  modelValue: l.states.model[e.field],
451
451
  "onUpdate:modelValue": (a) => l.states.model[e.field] = a,
452
452
  onChange: (a) => l.handleCheckedChange(a, e.field),
@@ -458,16 +458,16 @@ function we(_, U, C, l, H, I) {
458
458
  default: o(() => {
459
459
  var a;
460
460
  return [
461
- (d(!0), t(K, null, D((a = e.options) == null ? void 0 : a.data, (s) => {
462
- var b, f;
461
+ (d(!0), p(K, null, D((a = e.options) == null ? void 0 : a.data, (s) => {
462
+ var i, h;
463
463
  return d(), n(E, {
464
- key: s[((b = e.options) == null ? void 0 : b.valueKey) || "code"],
465
- label: s[((f = e.options) == null ? void 0 : f.valueKey) || "code"]
464
+ key: s[((i = e.options) == null ? void 0 : i.valueKey) || "code"],
465
+ label: s[((h = e.options) == null ? void 0 : h.valueKey) || "code"]
466
466
  }, {
467
467
  default: o(() => {
468
468
  var V;
469
469
  return [
470
- h(p(s[((V = e.options) == null ? void 0 : V.labelkey) || "name"]), 1)
470
+ f(c(s[((V = e.options) == null ? void 0 : V.labelkey) || "name"]), 1)
471
471
  ];
472
472
  }),
473
473
  _: 2
@@ -486,18 +486,18 @@ function we(_, U, C, l, H, I) {
486
486
  label: e.label,
487
487
  rules: e.rules,
488
488
  disabled: e.disabled || l.formOptions.isDisabled,
489
- prop: [e.field]
489
+ prop: e.field
490
490
  }, {
491
491
  label: o(() => [
492
- i("div", {
492
+ y("div", {
493
493
  style: k([{ display: "inline-block" }, e.labelStyle])
494
494
  }, [
495
- h(p(e.label) + " ", 1),
496
- e.required ? (d(), t("span", _e, "*")) : w("", !0)
495
+ f(c(e.label) + " ", 1),
496
+ e.required ? (d(), p("span", _e, "*")) : w("", !0)
497
497
  ], 4)
498
498
  ]),
499
499
  default: o(() => [
500
- u(M, {
500
+ b(M, {
501
501
  onChange: (a) => l.selectChange(a, e.field),
502
502
  modelValue: l.states.model[e.field],
503
503
  "onUpdate:modelValue": (a) => l.states.model[e.field] = a,
@@ -508,11 +508,11 @@ function we(_, U, C, l, H, I) {
508
508
  default: o(() => {
509
509
  var a;
510
510
  return [
511
- (d(!0), t(K, null, D((a = e.options) == null ? void 0 : a.data, (s) => {
512
- var b, f, V;
511
+ (d(!0), p(K, null, D((a = e.options) == null ? void 0 : a.data, (s) => {
512
+ var i, h, V;
513
513
  return d(), n(z, {
514
- key: s[((b = e.options) == null ? void 0 : b.valueKey) || "code"],
515
- label: s[((f = e.options) == null ? void 0 : f.labelkey) || "name"],
514
+ key: s[((i = e.options) == null ? void 0 : i.valueKey) || "code"],
515
+ label: s[((h = e.options) == null ? void 0 : h.labelkey) || "name"],
516
516
  value: s[((V = e.options) == null ? void 0 : V.valueKey) || "code"]
517
517
  }, null, 8, ["label", "value"]);
518
518
  }), 128))
@@ -520,10 +520,10 @@ function we(_, U, C, l, H, I) {
520
520
  }),
521
521
  _: 2
522
522
  }, 1032, ["onChange", "modelValue", "onUpdate:modelValue", "disabled", "placeholder", "clearable"]),
523
- i("div", {
523
+ y("div", {
524
524
  class: "item_tips_blow",
525
525
  style: k(e.tipsBlowStyle)
526
- }, p(e.tipsBlow), 5)
526
+ }, c(e.tipsBlow), 5)
527
527
  ]),
528
528
  _: 2
529
529
  }, 1032, ["label", "rules", "disabled", "prop"])), [
@@ -532,18 +532,18 @@ function we(_, U, C, l, H, I) {
532
532
  key: 8,
533
533
  label: e.label,
534
534
  rules: e.rules,
535
- prop: [e.field]
535
+ prop: e.field
536
536
  }, {
537
537
  label: o(() => [
538
- i("div", {
538
+ y("div", {
539
539
  style: k([{ display: "inline-block" }, e.labelStyle])
540
540
  }, [
541
- h(p(e.label) + " ", 1),
542
- e.required ? (d(), t("span", ge, "*")) : w("", !0)
541
+ f(c(e.label) + " ", 1),
542
+ e.required ? (d(), p("span", ge, "*")) : w("", !0)
543
543
  ], 4)
544
544
  ]),
545
545
  default: o(() => [
546
- u(B, {
546
+ b(B, {
547
547
  format: "DD/MM/YYYY",
548
548
  "value-format": "DD/MM/YYYY",
549
549
  "disabled-date": e.disabledDate,
@@ -562,18 +562,18 @@ function we(_, U, C, l, H, I) {
562
562
  key: 9,
563
563
  label: e.label,
564
564
  rules: e.rules,
565
- prop: [e.field]
565
+ prop: e.field
566
566
  }, {
567
567
  label: o(() => [
568
- i("div", {
568
+ y("div", {
569
569
  style: k([{ display: "inline-block" }, e.labelStyle])
570
570
  }, [
571
- h(p(e.label) + " ", 1),
572
- e.required ? (d(), t("span", ke, "*")) : w("", !0)
571
+ f(c(e.label) + " ", 1),
572
+ e.required ? (d(), p("span", ke, "*")) : w("", !0)
573
573
  ], 4)
574
574
  ]),
575
575
  default: o(() => [
576
- u(B, {
576
+ b(B, {
577
577
  format: "DD/MM/YYYY",
578
578
  "value-format": "DD/MM/YYYY",
579
579
  "disabled-date": e.disabledDate,
@@ -593,15 +593,15 @@ function we(_, U, C, l, H, I) {
593
593
  key: 10,
594
594
  label: e.label,
595
595
  rules: e.rules,
596
- prop: [e.field],
596
+ prop: e.field,
597
597
  class: "rule_err"
598
598
  }, {
599
599
  label: o(() => [
600
- i("div", {
600
+ y("div", {
601
601
  style: k([{ display: "inline-block" }, e.labelStyle])
602
602
  }, [
603
- h(p(e.label) + " ", 1),
604
- e.required ? (d(), t("span", xe, "*")) : w("", !0)
603
+ f(c(e.label) + " ", 1),
604
+ e.required ? (d(), p("span", xe, "*")) : w("", !0)
605
605
  ], 4)
606
606
  ]),
607
607
  default: o(() => [
@@ -614,19 +614,19 @@ function we(_, U, C, l, H, I) {
614
614
  key: 11,
615
615
  label: e.label,
616
616
  rules: e.rules.phoneNumber,
617
- prop: [e.field.phoneNumber],
617
+ prop: e.field.phoneNumber,
618
618
  class: "phone_item"
619
619
  }, {
620
620
  label: o(() => [
621
- i("div", {
621
+ y("div", {
622
622
  style: k([{ display: "inline-block" }, e.labelStyle])
623
623
  }, [
624
- h(p(e.label) + " ", 1),
625
- e.required ? (d(), t("span", Ce, "*")) : w("", !0)
624
+ f(c(e.label) + " ", 1),
625
+ e.required ? (d(), p("span", Ce, "*")) : w("", !0)
626
626
  ], 4)
627
627
  ]),
628
628
  default: o(() => [
629
- u(O, {
629
+ b(O, {
630
630
  maxlength: e.maxlength,
631
631
  modelValue: l.states.model[e.field.phoneNumber],
632
632
  "onUpdate:modelValue": (a) => l.states.model[e.field.phoneNumber] = a,
@@ -637,7 +637,7 @@ function we(_, U, C, l, H, I) {
637
637
  prepend: o(() => {
638
638
  var a;
639
639
  return [
640
- u(M, {
640
+ b(M, {
641
641
  disabled: e.disabled || l.formOptions.isDisabled,
642
642
  modelValue: l.states.model[e.field.areaCode],
643
643
  "onUpdate:modelValue": (s) => l.states.model[e.field.areaCode] = s,
@@ -647,10 +647,10 @@ function we(_, U, C, l, H, I) {
647
647
  default: o(() => {
648
648
  var s;
649
649
  return [
650
- (d(!0), t(K, null, D((s = e.options) == null ? void 0 : s.data, (b, f) => (d(), n(z, {
651
- label: b.name,
652
- value: b.code,
653
- key: f
650
+ (d(!0), p(K, null, D((s = e.options) == null ? void 0 : s.data, (i, h) => (d(), n(z, {
651
+ label: i.name,
652
+ value: i.code,
653
+ key: h
654
654
  }, null, 8, ["label", "value"]))), 128))
655
655
  ];
656
656
  }),
@@ -678,18 +678,18 @@ function we(_, U, C, l, H, I) {
678
678
  key: 13,
679
679
  label: e.label,
680
680
  rules: e.rules,
681
- prop: [e.field]
681
+ prop: e.field
682
682
  }, {
683
683
  label: o(() => [
684
- i("div", {
684
+ y("div", {
685
685
  style: k([{ display: "inline-block" }, e.labelStyle])
686
686
  }, [
687
- h(p(e.label) + " ", 1),
688
- e.required ? (d(), t("span", ve, "*")) : w("", !0)
687
+ f(c(e.label) + " ", 1),
688
+ e.required ? (d(), p("span", ve, "*")) : w("", !0)
689
689
  ], 4)
690
690
  ]),
691
691
  default: o(() => [
692
- u(O, {
692
+ b(O, {
693
693
  maxlength: e.maxlength,
694
694
  modelValue: l.states.model[e.field],
695
695
  "onUpdate:modelValue": (a) => l.states.model[e.field] = a,
@@ -704,14 +704,14 @@ function we(_, U, C, l, H, I) {
704
704
  e.prepend ? {
705
705
  name: "prepend",
706
706
  fn: o(() => [
707
- h(p(e.field), 1)
707
+ f(c(e.field), 1)
708
708
  ]),
709
709
  key: "0"
710
710
  } : void 0,
711
711
  e.append ? {
712
712
  name: "append",
713
713
  fn: o(() => [
714
- h(p(e.append), 1)
714
+ f(c(e.append), 1)
715
715
  ]),
716
716
  key: "1"
717
717
  } : void 0
@@ -730,13 +730,13 @@ function we(_, U, C, l, H, I) {
730
730
  ]),
731
731
  _: 3
732
732
  }),
733
- u(r, { class: "btnsItem" }, {
733
+ b(r, { class: "btnsItem" }, {
734
734
  default: o(() => [
735
735
  R(_.$slots, "buttons", {
736
736
  model: C.model,
737
737
  onBtnClick: l.onSubmit
738
738
  }, () => [
739
- (d(!0), t(K, null, D(l.formOptions.btnConfig, (e, P) => (d(), t("div", { key: P }, [
739
+ (d(!0), p(K, null, D(l.formOptions.btnConfig, (e, P) => (d(), p("div", { key: P }, [
740
740
  e.isShow ? (d(), n(S, {
741
741
  key: 0,
742
742
  btnCode: e.btnCode,
@@ -764,7 +764,7 @@ function we(_, U, C, l, H, I) {
764
764
  onHandleClick: (a) => l.handleClick(a, e.isRule, e.emitName)
765
765
  }, {
766
766
  default: o(() => [
767
- h(p(e.name), 1)
767
+ f(c(e.name), 1)
768
768
  ]),
769
769
  _: 2
770
770
  }, 1032, ["btnCode", "plain", "primary", "info", "text", "link", "loading", "loadingColor", "width", "height", "circle", "color", "bgColor", "borderColor", "borderStyle", "borderWidth", "icon", "size", "fontSize", "fontWeight", "styleObj", "class", "onHandleClick"])) : w("", !0)
@@ -777,7 +777,7 @@ function we(_, U, C, l, H, I) {
777
777
  _: 3
778
778
  }, 16, ["model", "label-position"]);
779
779
  }
780
- const L = /* @__PURE__ */ de(oe, [["render", we], ["__scopeId", "data-v-15f750a4"]]);
780
+ const L = /* @__PURE__ */ de(oe, [["render", we], ["__scopeId", "data-v-7c0893c7"]]);
781
781
  function j(_, U = {}) {
782
782
  j.installed || (j.installed = !0, _.component("common-el-form", L));
783
783
  }
@@ -1 +1 @@
1
- (function(e,k){typeof exports=="object"&&typeof module<"u"?module.exports=k(require("vue")):typeof define=="function"&&define.amd?define(["vue"],k):(e=typeof globalThis<"u"?globalThis:e||self,e.Form=k(e.Vue))})(this,function(e){"use strict";const k={props:{fieldList:{type:Array,required:!0},model:Object,options:Object},emits:["selectChange","radioChange","checkChange","submit","reset"],setup(i,{emit:y}){const p=e.reactive({model:{}}),o=e.ref(null),V=e.computed(()=>Object.assign([],i.options)),D=()=>{p.model=i.model},t=(s,n,b)=>{o.value&&(n?o.value.validate(E=>{if(E)y(b||"submit",p.model,s);else return!1}):b==="reset"?o.value.resetFields():y(b||"submit",p.model,s))},f=(s,n)=>{y("selectChange",s,n)},_=(s,n)=>{y("radioChange",s,n)},C=(s,n)=>{y("checkChange",s,n)},x=(s,n)=>{const b=p.model[n].length;b!==1&&(b>1&&p.model[n].shift(),y("checkChange",s,n))},g=(s,n,b)=>{t(s,n,b)},w=(s,n)=>{s&&(n==null?void 0:n.key)==="Enter"&&t(void 0,!0,"submit")},m=()=>{o.value.resetFields()},B=()=>{o.value.clearValidate()};return e.onMounted(()=>{D(),o.value.resetFields()}),e.watch(()=>i.fieldList,(s,n)=>{s!==n&&D()}),{...e.toRefs(p),formRef:o,states:p,formOptions:V,onSubmit:t,selectChange:f,radioChange:_,checkChange:C,handleCheckedChange:x,handleClick:g,handleKeyUp:w,resetFieldsTest:m,clearValidateTest:B}}},$="",K=(i,y)=>{const p=i.__vccOpts||i;for(const[o,V]of y)p[o]=V;return p},z=i=>(e.pushScopeId("data-v-15f750a4"),i=i(),e.popScopeId(),i),F={class:"header-title"},O={class:"title-content"},q={key:0,class:"custom-required"},T={key:0,class:"custom-required"},H=["src"],Y={key:0,class:"custom-required"},L={class:"lable"},M={class:"lable_note"},I={key:0,class:"custom-required"},P={key:0,class:"custom-required"},j={key:0,class:"custom-required"},W={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=z(()=>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 Z(i,y,p,o,V,D){const t=e.resolveComponent("el-form-item"),f=e.resolveComponent("el-input"),_=e.resolveComponent("el-radio"),C=e.resolveComponent("el-radio-group"),x=e.resolveComponent("el-checkbox"),g=e.resolveComponent("el-checkbox-group"),w=e.resolveComponent("el-option"),m=e.resolveComponent("el-select"),B=e.resolveComponent("el-date-picker"),s=e.resolveComponent("el-col"),n=e.resolveComponent("el-row"),b=e.resolveComponent("sinosoft-common-button"),E=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(E,e.mergeProps({"hide-required-asterisk":"",onSubmit:y[0]||(y[0]=e.withModifiers(()=>{},["prevent"])),model:p.model},o.formOptions,{"label-position":o.formOptions.labelPosition,ref:"formRef"}),{default:e.withCtx(()=>[e.createVNode(n,{gutter:10},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.fieldList,(l,U)=>e.withDirectives((e.openBlock(),e.createBlock(s,{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:U},{default:e.withCtx(()=>[e.createElementVNode("div",{style:e.normalizeStyle(l.style)},[l.type==="title"?e.withDirectives((e.openBlock(),e.createBlock(t,{key:0},{default:e.withCtx(()=>[e.createElementVNode("div",F,[e.createElementVNode("span",O,e.toDisplayString(l.title),1)])]),_:2},1536)),[[e.vShow,!l.isHide]]):l.type==="name"?e.withDirectives((e.openBlock(),e.createBlock(t,{key:1,label:l.label,disabled:l.disabled||o.formOptions.isDisabled,class:"container_name",rules:l.rules.nameEnFamily},{label:e.withCtx(()=>[e.createElementVNode("div",{style:e.normalizeStyle([{display:"inline-block"},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(t,{rules:l.rules.nameEnFamily,prop:[l.field.nameEnFamily],class:"item-name"},{default:e.withCtx(()=>[e.createVNode(f,{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.rules.nameEn,prop:[l.field.nameEn],class:"item-name-right"},{default:e.withCtx(()=>[e.createVNode(f,{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.rules.nameChFamily,prop:[l.field.nameChFamily],class:"item-name"},{default:e.withCtx(()=>[e.createVNode(f,{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.rules.nameCh,prop:[l.field.nameCh],class:"item-name-right"},{default:e.withCtx(()=>[e.createVNode(f,{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","rules"])),[[e.vShow,!l.isHide]]):l.type==="gender"?e.withDirectives((e.openBlock(),e.createBlock(t,{key:2,label:l.label,rules:l.rules,prop:[l.field]},{label:e.withCtx(()=>[e.createElementVNode("div",{style:e.normalizeStyle([{display:"inline-block"},l.labelStyle])},[e.createTextVNode(e.toDisplayString(l.label)+" ",1),l.required?(e.openBlock(),e.createElementBlock("span",T,"*")):e.createCommentVNode("",!0)],4)]),default:e.withCtx(()=>[e.createVNode(C,{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 r,c;return e.openBlock(),e.createBlock(_,{label:d[((r=l.options)==null?void 0:r.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,H)]),_:2},1032,["label"])}),128))]}),_:2},1032,["modelValue","onUpdate:modelValue","disabled","onChange"])]),_:2},1032,["label","rules","prop"])),[[e.vShow,!l.isHide]]):l.type==="radio"?e.withDirectives((e.openBlock(),e.createBlock(t,{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("div",{style:e.normalizeStyle([{display:"inline-block"},l.labelStyle])},[e.createTextVNode(e.toDisplayString(l.label)+" ",1),l.required?(e.openBlock(),e.createElementBlock("span",Y,"*")):e.createCommentVNode("",!0)],4)]),default:e.withCtx(()=>[e.createVNode(C,{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 r,c;return e.openBlock(),e.createBlock(_,{size:"large",label:d[((r=l.options)==null?void 0:r.valueKey)||"code"],key:d[((c=l.options)==null?void 0:c.valueKey)||"code"]},{default:e.withCtx(()=>{var h;return[e.createTextVNode(e.toDisplayString(d[((h=l.options)==null?void 0:h.labelkey)||"name"]),1)]}),_:2},1032,["label"])}),128))]}),_:2},1032,["modelValue","onUpdate:modelValue","disabled","onChange"])]),_:2},1032,["label","rules","prop","class"])),[[e.vShow,!l.isHide]]):l.type==="radioNote"?e.withDirectives((e.openBlock(),e.createBlock(t,{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",L,e.toDisplayString(l.labelBefore),1),e.createElementVNode("span",M,e.toDisplayString(l.labelNode),1),l.required?(e.openBlock(),e.createElementBlock("span",I,"*")):e.createCommentVNode("",!0)]),e.createVNode(C,{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 r,c;return e.openBlock(),e.createBlock(_,{size:"large",label:d[((r=l.options)==null?void 0:r.valueKey)||"code"],key:d[((c=l.options)==null?void 0:c.valueKey)||"code"]},{default:e.withCtx(()=>{var h;return[e.createTextVNode(e.toDisplayString(d[((h=l.options)==null?void 0:h.labelkey)||"name"]),1)]}),_:2},1032,["label"])}),128))]}),_:2},1032,["modelValue","onUpdate:modelValue","disabled","onChange"])]),_:2},1032,["label","rules","prop","class"])),[[e.vShow,!l.isHide]]):l.type==="checkbox"?e.withDirectives((e.openBlock(),e.createBlock(t,{key:5,label:l.label,rules:l.rules,prop:[l.field]},{label:e.withCtx(()=>[e.createElementVNode("div",{style:e.normalizeStyle([{display:"inline-block"},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(g,{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 r,c;return e.openBlock(),e.createBlock(x,{key:d[((r=l.options)==null?void 0:r.valueKey)||"code"],label:d[((c=l.options)==null?void 0:c.valueKey)||"code"]},{default:e.withCtx(()=>{var h;return[e.createTextVNode(e.toDisplayString(d[((h=l.options)==null?void 0:h.labelkey)||"name"]),1)]}),_:2},1032,["label"])}),128))]}),_:2},1032,["modelValue","onUpdate:modelValue","onChange","disabled","style"])]),_:2},1032,["label","rules","prop"])),[[e.vShow,!l.isHide]]):l.type==="checkboxRadio"?e.withDirectives((e.openBlock(),e.createBlock(t,{key:6,label:l.label,rules:l.rules,prop:[l.field]},{label:e.withCtx(()=>[e.createElementVNode("div",{style:e.normalizeStyle([{display:"inline-block"},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(g,{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 r,c;return e.openBlock(),e.createBlock(x,{key:d[((r=l.options)==null?void 0:r.valueKey)||"code"],label:d[((c=l.options)==null?void 0:c.valueKey)||"code"]},{default:e.withCtx(()=>{var h;return[e.createTextVNode(e.toDisplayString(d[((h=l.options)==null?void 0:h.labelkey)||"name"]),1)]}),_:2},1032,["label"])}),128))]}),_:2},1032,["modelValue","onUpdate:modelValue","onChange","disabled","style"])]),_:2},1032,["label","rules","prop"])),[[e.vShow,!l.isHide]]):l.type==="select"?e.withDirectives((e.openBlock(),e.createBlock(t,{key:7,label:l.label,rules:l.rules,disabled:l.disabled||o.formOptions.isDisabled,prop:[l.field]},{label:e.withCtx(()=>[e.createElementVNode("div",{style:e.normalizeStyle([{display:"inline-block"},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,{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 r,c,h;return e.openBlock(),e.createBlock(w,{key:d[((r=l.options)==null?void 0:r.valueKey)||"code"],label:d[((c=l.options)==null?void 0:c.labelkey)||"name"],value:d[((h=l.options)==null?void 0:h.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"])),[[e.vShow,!l.isHide]]):l.type==="date"?e.withDirectives((e.openBlock(),e.createBlock(t,{key:8,label:l.label,rules:l.rules,prop:[l.field]},{label:e.withCtx(()=>[e.createElementVNode("div",{style:e.normalizeStyle([{display:"inline-block"},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(B,{format:"DD/MM/YYYY","value-format":"DD/MM/YYYY","disabled-date":l.disabledDate,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","modelValue","onUpdate:modelValue","disabled","readonly","type","placeholder"])]),_:2},1032,["label","rules","prop"])),[[e.vShow,!l.isHide]]):l.type==="daterange"?e.withDirectives((e.openBlock(),e.createBlock(t,{key:9,label:l.label,rules:l.rules,prop:[l.field]},{label:e.withCtx(()=>[e.createElementVNode("div",{style:e.normalizeStyle([{display:"inline-block"},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(B,{format:"DD/MM/YYYY","value-format":"DD/MM/YYYY","disabled-date":l.disabledDate,modelValue:o.states.model[l.field],"onUpdate:modelValue":a=>o.states.model[l.field]=a,type:"daterange","range-separator":"To","start-placeholder":l.startPlaceholder,"end-placeholder":l.endPlaceholder,size:"large"},null,8,["disabled-date","modelValue","onUpdate:modelValue","start-placeholder","end-placeholder"])]),_:2},1032,["label","rules","prop"])),[[e.vShow,!l.isHide]]):l.type==="slotItem"?e.withDirectives((e.openBlock(),e.createBlock(t,{key:10,label:l.label,rules:l.rules,prop:[l.field],class:"rule_err"},{label:e.withCtx(()=>[e.createElementVNode("div",{style:e.normalizeStyle([{display:"inline-block"},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.renderSlot(i.$slots,l.slotItemName,{},void 0,!0)]),_:2},1032,["label","rules","prop"])),[[e.vShow,!l.isHide]]):l.type==="phone"?e.withDirectives((e.openBlock(),e.createBlock(t,{key:11,label:l.label,rules:l.rules.phoneNumber,prop:[l.field.phoneNumber],class:"phone_item"},{label:e.withCtx(()=>[e.createElementVNode("div",{style:e.normalizeStyle([{display:"inline-block"},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(f,{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(m,{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,(r,c)=>(e.openBlock(),e.createBlock(w,{label:r.name,value:r.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"])),[[e.vShow,!l.isHide]]):l.type==="line"?e.withDirectives((e.openBlock(),e.createBlock(t,{key:12,label:l.label},{default:e.withCtx(()=>[Q]),_:2},1032,["label"])),[[e.vShow,!l.isHide]]):e.withDirectives((e.openBlock(),e.createBlock(t,{key:13,label:l.label,rules:l.rules,prop:[l.field]},{label:e.withCtx(()=>[e.createElementVNode("div",{style:e.normalizeStyle([{display:"inline-block"},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(f,{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.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,["maxlength","modelValue","onUpdate:modelValue","readonly","type","placeholder","disabled","showPassword","clearable","onKeyup"])]),_:2},1032,["label","rules","prop"])),[[e.vShow,!l.isHide]])],4)]),_:2},1032,["xs","sm","md","lg","xl"])),[[e.vShow,!l.isHide]])),128))]),_:3}),e.createVNode(t,{class:"btnsItem"},{default:e.withCtx(()=>[e.renderSlot(i.$slots,"buttons",{model:p.model,onBtnClick:o.onSubmit},()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.formOptions.btnConfig,(l,U)=>(e.openBlock(),e.createElementBlock("div",{key:U},[l.isShow?(e.openBlock(),e.createBlock(b,{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 N=K(k,[["render",Z],["__scopeId","data-v-15f750a4"]]);function S(i,y={}){S.installed||(S.installed=!0,i.component("common-el-form",N))}return N.install=S,N});
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={props:{fieldList:{type:Array,required:!0},model:Object,options:Object},emits:["selectChange","radioChange","checkChange","submit","reset"],setup(i,{emit:y}){const p=e.reactive({model:{}}),o=e.ref(null),V=e.computed(()=>Object.assign([],i.options)),D=()=>{p.model=i.model},t=(n,r,b)=>{o.value&&(r?o.value.validate(E=>{if(E)y(b||"submit",p.model,n);else return!1}):b==="reset"?o.value.resetFields():y(b||"submit",p.model,n))},f=(n,r)=>{y("selectChange",n,r)},_=(n,r)=>{y("radioChange",n,r)},C=(n,r)=>{y("checkChange",n,r)},x=(n,r)=>{const b=p.model[r].length;b!==1&&(b>1&&p.model[r].shift(),y("checkChange",n,r))},g=(n,r,b)=>{t(n,r,b)},w=(n,r)=>{n&&(r==null?void 0:r.key)==="Enter"&&t(void 0,!0,"submit")},m=n=>{o.value.resetFields(n)},B=n=>{o.value.clearValidate(n)};return e.onMounted(()=>{D(),o.value.resetFields()}),e.watch(()=>i.fieldList,(n,r)=>{n!==r&&D()}),{...e.toRefs(p),formRef:o,states:p,formOptions:V,onSubmit:t,selectChange:f,radioChange:_,checkChange:C,handleCheckedChange:x,handleClick:g,handleKeyUp:w,resetFieldsTest:m,clearValidateTest:B}}},$="",K=(i,y)=>{const p=i.__vccOpts||i;for(const[o,V]of y)p[o]=V;return p},z=i=>(e.pushScopeId("data-v-7c0893c7"),i=i(),e.popScopeId(),i),F={class:"header-title"},O={class:"title-content"},q={key:0,class:"custom-required"},T={key:0,class:"custom-required"},H=["src"],Y={key:0,class:"custom-required"},L={class:"lable"},M={class:"lable_note"},I={key:0,class:"custom-required"},P={key:0,class:"custom-required"},j={key:0,class:"custom-required"},W={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=z(()=>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 Z(i,y,p,o,V,D){const t=e.resolveComponent("el-form-item"),f=e.resolveComponent("el-input"),_=e.resolveComponent("el-radio"),C=e.resolveComponent("el-radio-group"),x=e.resolveComponent("el-checkbox"),g=e.resolveComponent("el-checkbox-group"),w=e.resolveComponent("el-option"),m=e.resolveComponent("el-select"),B=e.resolveComponent("el-date-picker"),n=e.resolveComponent("el-col"),r=e.resolveComponent("el-row"),b=e.resolveComponent("sinosoft-common-button"),E=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(E,e.mergeProps({"hide-required-asterisk":"",onSubmit:y[0]||(y[0]=e.withModifiers(()=>{},["prevent"])),model:p.model},o.formOptions,{"label-position":o.formOptions.labelPosition,ref:"formRef"}),{default:e.withCtx(()=>[e.createVNode(r,{gutter:10},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.fieldList,(l,U)=>e.withDirectives((e.openBlock(),e.createBlock(n,{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:U},{default:e.withCtx(()=>[e.createElementVNode("div",{style:e.normalizeStyle(l.style)},[l.type==="title"?e.withDirectives((e.openBlock(),e.createBlock(t,{key:0},{default:e.withCtx(()=>[e.createElementVNode("div",F,[e.createElementVNode("span",O,e.toDisplayString(l.title),1)])]),_:2},1536)),[[e.vShow,!l.isHide]]):l.type==="name"?e.withDirectives((e.openBlock(),e.createBlock(t,{key:1,label:l.label,disabled:l.disabled||o.formOptions.isDisabled,class:"container_name",rules:l.rules.nameEnFamily},{label:e.withCtx(()=>[e.createElementVNode("div",{style:e.normalizeStyle([{display:"inline-block"},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(t,{rules:l.rules.nameEnFamily,prop:l.field.nameEnFamily,class:"item-name"},{default:e.withCtx(()=>[e.createVNode(f,{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.rules.nameEn,prop:l.field.nameEn,class:"item-name-right"},{default:e.withCtx(()=>[e.createVNode(f,{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.rules.nameChFamily,prop:l.field.nameChFamily,class:"item-name"},{default:e.withCtx(()=>[e.createVNode(f,{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.rules.nameCh,prop:l.field.nameCh,class:"item-name-right"},{default:e.withCtx(()=>[e.createVNode(f,{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","rules"])),[[e.vShow,!l.isHide]]):l.type==="gender"?e.withDirectives((e.openBlock(),e.createBlock(t,{key:2,label:l.label,rules:l.rules,prop:l.field},{label:e.withCtx(()=>[e.createElementVNode("div",{style:e.normalizeStyle([{display:"inline-block"},l.labelStyle])},[e.createTextVNode(e.toDisplayString(l.label)+" ",1),l.required?(e.openBlock(),e.createElementBlock("span",T,"*")):e.createCommentVNode("",!0)],4)]),default:e.withCtx(()=>[e.createVNode(C,{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(_,{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,H)]),_:2},1032,["label"])}),128))]}),_:2},1032,["modelValue","onUpdate:modelValue","disabled","onChange"])]),_:2},1032,["label","rules","prop"])),[[e.vShow,!l.isHide]]):l.type==="radio"?e.withDirectives((e.openBlock(),e.createBlock(t,{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("div",{style:e.normalizeStyle([{display:"inline-block"},l.labelStyle])},[e.createTextVNode(e.toDisplayString(l.label)+" ",1),l.required?(e.openBlock(),e.createElementBlock("span",Y,"*")):e.createCommentVNode("",!0)],4)]),default:e.withCtx(()=>[e.createVNode(C,{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(_,{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 h;return[e.createTextVNode(e.toDisplayString(d[((h=l.options)==null?void 0:h.labelkey)||"name"]),1)]}),_:2},1032,["label"])}),128))]}),_:2},1032,["modelValue","onUpdate:modelValue","disabled","onChange"])]),_:2},1032,["label","rules","prop","class"])),[[e.vShow,!l.isHide]]):l.type==="radioNote"?e.withDirectives((e.openBlock(),e.createBlock(t,{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",L,e.toDisplayString(l.labelBefore),1),e.createElementVNode("span",M,e.toDisplayString(l.labelNode),1),l.required?(e.openBlock(),e.createElementBlock("span",I,"*")):e.createCommentVNode("",!0)]),e.createVNode(C,{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(_,{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 h;return[e.createTextVNode(e.toDisplayString(d[((h=l.options)==null?void 0:h.labelkey)||"name"]),1)]}),_:2},1032,["label"])}),128))]}),_:2},1032,["modelValue","onUpdate:modelValue","disabled","onChange"])]),_:2},1032,["label","rules","prop","class"])),[[e.vShow,!l.isHide]]):l.type==="checkbox"?e.withDirectives((e.openBlock(),e.createBlock(t,{key:5,label:l.label,rules:l.rules,prop:l.field},{label:e.withCtx(()=>[e.createElementVNode("div",{style:e.normalizeStyle([{display:"inline-block"},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(g,{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(x,{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 h;return[e.createTextVNode(e.toDisplayString(d[((h=l.options)==null?void 0:h.labelkey)||"name"]),1)]}),_:2},1032,["label"])}),128))]}),_:2},1032,["modelValue","onUpdate:modelValue","onChange","disabled","style"])]),_:2},1032,["label","rules","prop"])),[[e.vShow,!l.isHide]]):l.type==="checkboxRadio"?e.withDirectives((e.openBlock(),e.createBlock(t,{key:6,label:l.label,rules:l.rules,prop:l.field},{label:e.withCtx(()=>[e.createElementVNode("div",{style:e.normalizeStyle([{display:"inline-block"},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(g,{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(x,{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 h;return[e.createTextVNode(e.toDisplayString(d[((h=l.options)==null?void 0:h.labelkey)||"name"]),1)]}),_:2},1032,["label"])}),128))]}),_:2},1032,["modelValue","onUpdate:modelValue","onChange","disabled","style"])]),_:2},1032,["label","rules","prop"])),[[e.vShow,!l.isHide]]):l.type==="select"?e.withDirectives((e.openBlock(),e.createBlock(t,{key:7,label:l.label,rules:l.rules,disabled:l.disabled||o.formOptions.isDisabled,prop:l.field},{label:e.withCtx(()=>[e.createElementVNode("div",{style:e.normalizeStyle([{display:"inline-block"},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,{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,h;return e.openBlock(),e.createBlock(w,{key:d[((s=l.options)==null?void 0:s.valueKey)||"code"],label:d[((c=l.options)==null?void 0:c.labelkey)||"name"],value:d[((h=l.options)==null?void 0:h.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"])),[[e.vShow,!l.isHide]]):l.type==="date"?e.withDirectives((e.openBlock(),e.createBlock(t,{key:8,label:l.label,rules:l.rules,prop:l.field},{label:e.withCtx(()=>[e.createElementVNode("div",{style:e.normalizeStyle([{display:"inline-block"},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(B,{format:"DD/MM/YYYY","value-format":"DD/MM/YYYY","disabled-date":l.disabledDate,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","modelValue","onUpdate:modelValue","disabled","readonly","type","placeholder"])]),_:2},1032,["label","rules","prop"])),[[e.vShow,!l.isHide]]):l.type==="daterange"?e.withDirectives((e.openBlock(),e.createBlock(t,{key:9,label:l.label,rules:l.rules,prop:l.field},{label:e.withCtx(()=>[e.createElementVNode("div",{style:e.normalizeStyle([{display:"inline-block"},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(B,{format:"DD/MM/YYYY","value-format":"DD/MM/YYYY","disabled-date":l.disabledDate,modelValue:o.states.model[l.field],"onUpdate:modelValue":a=>o.states.model[l.field]=a,type:"daterange","range-separator":"To","start-placeholder":l.startPlaceholder,"end-placeholder":l.endPlaceholder,size:"large"},null,8,["disabled-date","modelValue","onUpdate:modelValue","start-placeholder","end-placeholder"])]),_:2},1032,["label","rules","prop"])),[[e.vShow,!l.isHide]]):l.type==="slotItem"?e.withDirectives((e.openBlock(),e.createBlock(t,{key:10,label:l.label,rules:l.rules,prop:l.field,class:"rule_err"},{label:e.withCtx(()=>[e.createElementVNode("div",{style:e.normalizeStyle([{display:"inline-block"},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.renderSlot(i.$slots,l.slotItemName,{},void 0,!0)]),_:2},1032,["label","rules","prop"])),[[e.vShow,!l.isHide]]):l.type==="phone"?e.withDirectives((e.openBlock(),e.createBlock(t,{key:11,label:l.label,rules:l.rules.phoneNumber,prop:l.field.phoneNumber,class:"phone_item"},{label:e.withCtx(()=>[e.createElementVNode("div",{style:e.normalizeStyle([{display:"inline-block"},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(f,{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(m,{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(w,{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"])),[[e.vShow,!l.isHide]]):l.type==="line"?e.withDirectives((e.openBlock(),e.createBlock(t,{key:12,label:l.label},{default:e.withCtx(()=>[Q]),_:2},1032,["label"])),[[e.vShow,!l.isHide]]):e.withDirectives((e.openBlock(),e.createBlock(t,{key:13,label:l.label,rules:l.rules,prop:l.field},{label:e.withCtx(()=>[e.createElementVNode("div",{style:e.normalizeStyle([{display:"inline-block"},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(f,{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.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,["maxlength","modelValue","onUpdate:modelValue","readonly","type","placeholder","disabled","showPassword","clearable","onKeyup"])]),_:2},1032,["label","rules","prop"])),[[e.vShow,!l.isHide]])],4)]),_:2},1032,["xs","sm","md","lg","xl"])),[[e.vShow,!l.isHide]])),128))]),_:3}),e.createVNode(t,{class:"btnsItem"},{default:e.withCtx(()=>[e.renderSlot(i.$slots,"buttons",{model:p.model,onBtnClick:o.onSubmit},()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.formOptions.btnConfig,(l,U)=>(e.openBlock(),e.createElementBlock("div",{key:U},[l.isShow?(e.openBlock(),e.createBlock(b,{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 N=K(k,[["render",Z],["__scopeId","data-v-7c0893c7"]]);function S(i,y={}){S.installed||(S.installed=!0,i.component("common-el-form",N))}return N.install=S,N});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sinosoft-common-form",
3
- "version": "1.2.7",
3
+ "version": "1.2.8",
4
4
  "description": "",
5
5
  "main": "common-form.es.js",
6
6
  "scripts": {
package/style.css CHANGED
@@ -1 +1 @@
1
- @charset "UTF-8";[data-v-15f750a4] .el-date-editor{height:60px!important;width:100%!important}.form-item[data-v-15f750a4]{width:50%;display:inline-block;padding-right:0;box-sizing:border-box}[data-v-15f750a4] .el-input__inner{height:42px;color:#1d1d1d}[data-v-15f750a4] .el-card__body{padding:0}[data-v-15f750a4] .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-15f750a4] .el-form-item__label{font-size:16px;line-height:22px;color:#1d1d1d;font-weight:400;font-family:Roboto Medium;min-height:22px!important}.form-item-title[data-v-15f750a4]{width:100%}[data-v-15f750a4] .el-checkbox-group,[data-v-15f750a4] .el-radio-group{height:62px;line-height:62px}[data-v-15f750a4] .el-radio-group .el-radio{height:auto}.rule_err[data-v-15f750a4] .el-form-item__content,.radio_Note[data-v-15f750a4] .el-form-item__content{display:block}.radio_Note .lable[data-v-15f750a4]{font-size:16px;line-height:22px;color:#1d1d1d;font-weight:400;font-family:Roboto Medium}.radio_Note .lable_note[data-v-15f750a4]{font-size:16px;line-height:22px;color:#6e6e73;font-weight:400;font-family:Roboto Medium}.container_name[data-v-15f750a4] .el-form-item__content{align-items:start}[data-v-15f750a4] .el-form-item__error{position:relative}.item-name[data-v-15f750a4]{width:51%;padding-right:20px;padding-bottom:12px;box-sizing:border-box}.item-name-right[data-v-15f750a4]{width:49%;padding-bottom:12px;padding-right:0}.btnsItem[data-v-15f750a4]{width:100%;margin:0 auto;justify-content:right}.btnsItem[data-v-15f750a4] .el-form-item__content{justify-content:right}label[data-v-15f750a4]{display:block}.title-content[data-v-15f750a4]{font-size:22px;line-height:30px;color:#1d1d1d;font-weight:300;font-family:Roboto Medium}[data-v-15f750a4] .el-input-group--prepend .el-input-group__prepend .el-select .el-input .el-input__wrapper{background-color:#fff;width:80px}[data-v-15f750a4] .el-input__wrapper{height:60px;border-radius:8px;border:1px solid #c7c8ca;box-shadow:none!important}.phone_item[data-v-15f750a4] .el-input__wrapper{border-left:0px!important}.phone_item[data-v-15f750a4] .el-input-group__prepend{box-shadow:none!important}.phone_item[data-v-15f750a4] .el-input-group__prepend .el-input__wrapper{height:60px;border-radius:8px;border:1px solid #c7c8ca!important;border-right:0px!important;box-shadow:none!important}.phone_item[data-v-15f750a4] .el-input-group__prepend .el-input__wrapper .el-input__suffix{display:none;width:0!important}.phone_item[data-v-15f750a4] .el-input-group__prepend:hover{box-shadow:none!important}.phone_item[data-v-15f750a4] .el-input-group__prepend:hover .el-input__wrapper:hover{border:none;border-right:0px!important;box-shadow:none!important}.phone_item[data-v-15f750a4] .el-input-group__prepend:hover .el-input__wrapper:hover .el-input__suffix{display:none;width:0!important}[data-v-15f750a4] .el-select{width:100%}.custom-required[data-v-15f750a4]{content:"*";color:#e2a650;margin-left:4px}.item_tips_blow[data-v-15f750a4]{font-size:14px;line-height:22px;color:#00000073;font-weight:400;font-family:Roboto Medium;width:100%;word-wrap:break-word;white-space:normal}
1
+ @charset "UTF-8";[data-v-7c0893c7] .el-date-editor{height:60px!important;width:100%!important}.form-item[data-v-7c0893c7]{width:50%;display:inline-block;padding-right:0;box-sizing:border-box}[data-v-7c0893c7] .el-input__inner{height:42px;color:#1d1d1d}[data-v-7c0893c7] .el-card__body{padding:0}[data-v-7c0893c7] .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-7c0893c7] .el-form-item__label{font-size:16px;line-height:22px;color:#1d1d1d;font-weight:400;font-family:Roboto Medium;min-height:22px!important}.form-item-title[data-v-7c0893c7]{width:100%}[data-v-7c0893c7] .el-checkbox-group,[data-v-7c0893c7] .el-radio-group{height:62px;line-height:62px}[data-v-7c0893c7] .el-radio-group .el-radio{height:auto}.rule_err[data-v-7c0893c7] .el-form-item__content,.radio_Note[data-v-7c0893c7] .el-form-item__content{display:block}.radio_Note .lable[data-v-7c0893c7]{font-size:16px;line-height:22px;color:#1d1d1d;font-weight:400;font-family:Roboto Medium}.radio_Note .lable_note[data-v-7c0893c7]{font-size:16px;line-height:22px;color:#6e6e73;font-weight:400;font-family:Roboto Medium}.container_name[data-v-7c0893c7] .el-form-item__content{align-items:start}[data-v-7c0893c7] .el-form-item__error{position:relative}.item-name[data-v-7c0893c7]{width:51%;padding-right:20px;padding-bottom:12px;box-sizing:border-box}.item-name-right[data-v-7c0893c7]{width:49%;padding-bottom:12px;padding-right:0}.btnsItem[data-v-7c0893c7]{width:100%;margin:0 auto;justify-content:right}.btnsItem[data-v-7c0893c7] .el-form-item__content{justify-content:right}label[data-v-7c0893c7]{display:block}.title-content[data-v-7c0893c7]{font-size:22px;line-height:30px;color:#1d1d1d;font-weight:300;font-family:Roboto Medium}[data-v-7c0893c7] .el-input-group--prepend .el-input-group__prepend .el-select .el-input .el-input__wrapper{background-color:#fff;width:80px}[data-v-7c0893c7] .el-input__wrapper{height:60px;border-radius:8px;border:1px solid #c7c8ca;box-shadow:none!important}.phone_item[data-v-7c0893c7] .el-input__wrapper{border-left:0px!important}.phone_item[data-v-7c0893c7] .el-input-group__prepend{box-shadow:none!important}.phone_item[data-v-7c0893c7] .el-input-group__prepend .el-input__wrapper{height:60px;border-radius:8px;border:1px solid #c7c8ca!important;border-right:0px!important;box-shadow:none!important}.phone_item[data-v-7c0893c7] .el-input-group__prepend .el-input__wrapper .el-input__suffix{display:none;width:0!important}.phone_item[data-v-7c0893c7] .el-input-group__prepend:hover{box-shadow:none!important}.phone_item[data-v-7c0893c7] .el-input-group__prepend:hover .el-input__wrapper:hover{border:none;border-right:0px!important;box-shadow:none!important}.phone_item[data-v-7c0893c7] .el-input-group__prepend:hover .el-input__wrapper:hover .el-input__suffix{display:none;width:0!important}[data-v-7c0893c7] .el-select{width:100%}.custom-required[data-v-7c0893c7]{content:"*";color:#e2a650;margin-left:4px}.item_tips_blow[data-v-7c0893c7]{font-size:14px;line-height:22px;color:#00000073;font-weight:400;font-family:Roboto Medium;width:100%;word-wrap:break-word;white-space:normal}