sinosoft-common-form 1.0.0 → 1.0.2
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 +751 -217
- package/common-form.umd.js +1 -1
- package/download.png +0 -0
- package/man.png +0 -0
- package/package.json +1 -1
- package/style.css +1 -0
- package/woman.png +0 -0
- package/README.md +0 -29
package/common-form.es.js
CHANGED
|
@@ -1,247 +1,781 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as j, ref as W, computed as $, resolveComponent as k, openBlock as s, createBlock as y, withCtx as o, createVNode as d, mergeProps as D, withModifiers as Q, createElementBlock as _, Fragment as U, renderList as x, normalizeClass as m, createElementVNode as P, toDisplayString as K, createTextVNode as w, withKeys as h, createCommentVNode as z, normalizeStyle as ee, renderSlot as le, pushScopeId as ae, popScopeId as oe } from "vue";
|
|
2
|
+
const de = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAmCAYAAACoPemuAAAAAXNSR0IArs4c6QAAA+dJREFUWEftl1+IG1UUxr9zJ+6ubWkyM0oF6cIktRQsLUUUWiiWPllw8UFZEGtc9UERbBLXIhTEWR/KUtpNZgWrPli7FqUoKogKUrQ++GIptWsrVZoMtFpEyJ100do/yT0Sa2P+TJNJdrLtg/OYnHvO737nm3vPEG7Sh25SLvwP1m1nFlSxTTZHfvVKG5SABeZlTHRJMCRr9GN+T+xoPXzfwZiZ7kqXRirEDwN4EMzGNQAi/AxQ7lbSDp7MRuWCgVkvyjV0BXsZvKGpleeEoInlUf3twzaV/drcF8WqKiXS3k4GtgOsNShBOLR4SBv9YTLmtfNd6GC2zWLGk28x8HRzYQK9Pqzrqeup1LdWVqH2l7x9YE62QmFfwTGfCvp2hqqYlSk6UNjWAkU4NBwztgRRqvZiBN1BpzgrIzdC4RuAmzZL3sDg4Oqfdi0+1ylH6K3cZPPQmZI8zoyVzcWFEGP5rL6/G6hqbCitjKeLNjNe8TH7iaSur7VtUgsOtmKaB1XeO8vg232Kj7qO+UG3UKEoFk/Lx5j5gI/hfx+OGXd2Y/hQPRZPyW99TnYQialCTh/vRa15KxZ/SUb5EiSYRYvpNbE5P6V/fUPAEpniA0rhC5/iFxbphn7Spss3BMxKF18F42WfU/5IwTHv6xVq/q1My8+ZeUsLANGMmzOeWBCwFZniqALF64ux4hSAO3zADhPwZUNsBJ+5u43ZoLCBD9iV43O3lSvlj5h5Y9DktXuPMJHPGhNExEHXBgarJrzb5oG/PPkGA08GLHBRAGN5xzwYML4W1hXYtVWJlNyuCJN+x0QdwG8QkYfcbPS7bqFazG+li++AKXl1QiBPkHgkn4t95ZfYysgRUvweA0t8PPa9NjA0cnrXol+uB5VIlzYrVh8CrAPEIJ5xc+ZYrf31C62UVA1ji8C0mzWrBvd9/p3pP2Xw8H9+ok+WRPSts7vpz3ZKtc5uxK5j1A7qhlZaqWKjOYlec3NGy+DXsJkdfyzDhcsfg3k9gSbzOX1HEJNbaTkN5ufrc7mOWeOZN1g1cXXCgHv+/tPZWMMR0Vax+YAR0d5CzniuF/N2WhNPyepn3bM9KUag2aSur+tl0GsHdvVLyjvG4DU9gf3z2hK9r7HmKIFiJxWC/C8UzApVUsz8aHN8G4/JAsBWkALhx5DrOkbtymswfzwl32Xw1vCLds5IoAMFx3jc9xxLvFBczhWcYGBp51ThRRAwRxpW56fMs75g1R/j4+fv5XJ5BsCq8Eq3zXSKIpFkYU/0SH2U7115z5t8izw1t06o8lqQGOoLIKuLSkSOG6uWHjv6DF1prtHTJd4X0KakfwOtY3o2ZXuVHAAAAABJRU5ErkJggg==", Y = (g) => (ae("data-v-f2e8b0ed"), g = g(), oe(), g), re = { class: "header-title" }, se = /* @__PURE__ */ Y(() => /* @__PURE__ */ P("span", { class: "title-left" }, null, -1)), pe = { class: "title-content" }, ne = /* @__PURE__ */ Y(() => /* @__PURE__ */ P("img", {
|
|
3
|
+
src: de,
|
|
4
|
+
style: { width: "19px", "margin-right": "10px" },
|
|
5
|
+
alt: ""
|
|
6
|
+
}, null, -1)), ue = { class: "item-address" }, te = {
|
|
7
|
+
key: 0,
|
|
8
|
+
class: "item-address"
|
|
9
|
+
}, ce = {
|
|
10
|
+
key: 1,
|
|
11
|
+
class: "item-address"
|
|
12
|
+
}, ye = ["src"], be = /* @__PURE__ */ j({
|
|
3
13
|
__name: "Index",
|
|
4
14
|
props: {
|
|
5
|
-
fieldList:
|
|
6
|
-
model:
|
|
7
|
-
options:
|
|
15
|
+
fieldList: {},
|
|
16
|
+
model: {},
|
|
17
|
+
options: {}
|
|
8
18
|
},
|
|
9
19
|
emits: ["submit", "reset", "cancel"],
|
|
10
|
-
setup(
|
|
11
|
-
const
|
|
12
|
-
labelPosition: "
|
|
13
|
-
disabled: !1
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
20
|
+
setup(g, { expose: B, emit: S }) {
|
|
21
|
+
const b = g, a = W({}), C = W(), A = $(() => Object.assign({
|
|
22
|
+
labelPosition: "top",
|
|
23
|
+
disabled: !1
|
|
24
|
+
// showButtonText: true,
|
|
25
|
+
// showResetButton: true,
|
|
26
|
+
// submitButtonText: '提交',
|
|
27
|
+
// resetButtonText: '重置',
|
|
28
|
+
// cancelButtonText: '取消'
|
|
29
|
+
}, b == null ? void 0 : b.options));
|
|
30
|
+
console.log(b == null ? void 0 : b.options, "_oppppppppppp0ppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp", A), B({
|
|
31
|
+
formRef: C
|
|
32
|
+
}), (() => {
|
|
33
|
+
b.fieldList.map((u) => {
|
|
34
|
+
const V = u.type === "checkbox" ? [] : "";
|
|
35
|
+
if (console.log("itttttttt", u.field, u.field != null), u.field && typeof u.field == "object") {
|
|
36
|
+
console.log("it999999999999999999999999999t", u.field, typeof u.field);
|
|
37
|
+
for (let n of Object.keys(u.field))
|
|
38
|
+
b.model ? a.value = b.model : a.value[u.field[n]] = u.value || V;
|
|
39
|
+
}
|
|
40
|
+
b.model ? a.value = b.model : a.value[u.field] = u.value || V;
|
|
41
|
+
});
|
|
42
|
+
})();
|
|
43
|
+
const H = (u) => {
|
|
44
|
+
u && u.validate((V) => {
|
|
45
|
+
if (V)
|
|
46
|
+
S("submit", a.value);
|
|
28
47
|
else
|
|
29
48
|
return !1;
|
|
30
49
|
});
|
|
31
|
-
},
|
|
32
|
-
|
|
33
|
-
},
|
|
34
|
-
|
|
50
|
+
}, f = (u) => {
|
|
51
|
+
u && H(C.value);
|
|
52
|
+
}, I = (u) => {
|
|
53
|
+
u && (console.log("prossss", b.model, a.value), console.log("prossss", b.model, a.value), u.resetFields());
|
|
35
54
|
};
|
|
36
|
-
return (
|
|
37
|
-
const
|
|
38
|
-
return
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
]),
|
|
85
|
-
_: 2
|
|
86
|
-
}, 1032, ["label", "rules", "prop"])) : e.type === "checkbox" ? (o(), r(b, {
|
|
87
|
-
key: 1,
|
|
88
|
-
label: e.label,
|
|
89
|
-
rules: e.rules,
|
|
90
|
-
prop: [e.field]
|
|
91
|
-
}, {
|
|
92
|
-
default: a(() => [
|
|
93
|
-
i(N, {
|
|
94
|
-
modelValue: n.value[e.field],
|
|
95
|
-
"onUpdate:modelValue": (l) => n.value[e.field] = l,
|
|
96
|
-
disabled: e.disabled
|
|
97
|
-
}, {
|
|
98
|
-
default: a(() => {
|
|
99
|
-
var l;
|
|
100
|
-
return [
|
|
101
|
-
(o(!0), x(w, null, B((l = e.options) == null ? void 0 : l.data, (d) => {
|
|
102
|
-
var p, c;
|
|
103
|
-
return o(), r(M, {
|
|
104
|
-
key: d[((p = e.options) == null ? void 0 : p.valueKey) || "value"],
|
|
105
|
-
label: d[((c = e.options) == null ? void 0 : c.valueKey) || "value"]
|
|
106
|
-
}, {
|
|
107
|
-
default: a(() => {
|
|
108
|
-
var f;
|
|
109
|
-
return [
|
|
110
|
-
V(m(d[((f = e.options) == null ? void 0 : f.labelkey) || "label"]), 1)
|
|
111
|
-
];
|
|
112
|
-
}),
|
|
113
|
-
_: 2
|
|
114
|
-
}, 1032, ["label"]);
|
|
115
|
-
}), 128))
|
|
116
|
-
];
|
|
117
|
-
}),
|
|
118
|
-
_: 2
|
|
119
|
-
}, 1032, ["modelValue", "onUpdate:modelValue", "disabled"])
|
|
120
|
-
]),
|
|
121
|
-
_: 2
|
|
122
|
-
}, 1032, ["label", "rules", "prop"])) : e.type === "select" ? (o(), r(b, {
|
|
123
|
-
key: 2,
|
|
124
|
-
label: e.label,
|
|
125
|
-
rules: e.rules,
|
|
126
|
-
prop: [e.field]
|
|
127
|
-
}, {
|
|
128
|
-
default: a(() => {
|
|
129
|
-
var l;
|
|
130
|
-
return [
|
|
131
|
-
i(j, {
|
|
132
|
-
modelValue: n.value[e.field],
|
|
133
|
-
"onUpdate:modelValue": (d) => n.value[e.field] = d,
|
|
134
|
-
placeholder: ((l = e.options) == null ? void 0 : l.placeholder) || "请选择",
|
|
135
|
-
clearable: e.clearable
|
|
55
|
+
return (u, V) => {
|
|
56
|
+
const n = k("el-form-item"), L = k("el-button"), E = k("el-radio"), G = k("el-radio-group"), N = k("el-option"), F = k("el-select"), i = k("el-input"), O = k("el-checkbox"), M = k("el-checkbox-group"), X = k("el-date-picker"), T = k("el-form"), q = k("el-card");
|
|
57
|
+
return s(), y(q, { class: "mb-5" }, {
|
|
58
|
+
default: o(() => [
|
|
59
|
+
d(T, D({
|
|
60
|
+
onSubmit: V[3] || (V[3] = Q(() => {
|
|
61
|
+
}, ["prevent"])),
|
|
62
|
+
model: a.value
|
|
63
|
+
}, A.value, {
|
|
64
|
+
"label-position": A.value.labelPosition,
|
|
65
|
+
ref_key: "formRef",
|
|
66
|
+
ref: C
|
|
67
|
+
}), {
|
|
68
|
+
default: o(() => [
|
|
69
|
+
(s(!0), _(U, null, x(u.fieldList, (e, J) => (s(), _("div", {
|
|
70
|
+
key: J,
|
|
71
|
+
class: m(e.type === "title" || e.type === "address" ? "form-item-title" : "form-item")
|
|
72
|
+
}, [
|
|
73
|
+
e.type === "title" ? (s(), y(n, { key: 0 }, {
|
|
74
|
+
default: o(() => [
|
|
75
|
+
P("div", re, [
|
|
76
|
+
se,
|
|
77
|
+
P("span", pe, K(e.title), 1)
|
|
78
|
+
])
|
|
79
|
+
]),
|
|
80
|
+
_: 2
|
|
81
|
+
}, 1024)) : e.type === "address" ? (s(), y(n, {
|
|
82
|
+
key: 1,
|
|
83
|
+
rules: e.rules,
|
|
84
|
+
prop: [e.field],
|
|
85
|
+
class: "container-address"
|
|
86
|
+
}, {
|
|
87
|
+
default: o(() => [
|
|
88
|
+
d(L, {
|
|
89
|
+
style: { "margin-bottom": "20px", "margin-right": "60px" },
|
|
90
|
+
onClick: u.downLoad
|
|
91
|
+
}, {
|
|
92
|
+
default: o(() => [
|
|
93
|
+
ne,
|
|
94
|
+
w(" 載入已有地址 ")
|
|
95
|
+
]),
|
|
96
|
+
_: 1
|
|
97
|
+
}, 8, ["onClick"]),
|
|
98
|
+
d(G, {
|
|
99
|
+
style: { "margin-bottom": "20px" },
|
|
100
|
+
modelValue: a.value[e.field.addressLang],
|
|
101
|
+
"onUpdate:modelValue": (l) => a.value[e.field.addressLang] = l,
|
|
102
|
+
disabled: e.disabled
|
|
136
103
|
}, {
|
|
137
|
-
default:
|
|
138
|
-
var
|
|
104
|
+
default: o(() => {
|
|
105
|
+
var l;
|
|
139
106
|
return [
|
|
140
|
-
(
|
|
141
|
-
var
|
|
142
|
-
return
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
},
|
|
107
|
+
(s(!0), _(U, null, x((l = e.optionsLang) == null ? void 0 : l.data, (r) => {
|
|
108
|
+
var p, t;
|
|
109
|
+
return s(), y(E, {
|
|
110
|
+
label: r[((p = e.optionsLang) == null ? void 0 : p.valueKey) || "value"],
|
|
111
|
+
size: "large",
|
|
112
|
+
key: r[((t = e.optionsLang) == null ? void 0 : t.valueKey) || "value"]
|
|
113
|
+
}, {
|
|
114
|
+
default: o(() => {
|
|
115
|
+
var c;
|
|
116
|
+
return [
|
|
117
|
+
w(K(r[((c = e.optionsLang) == null ? void 0 : c.labelkey) || "label"]), 1)
|
|
118
|
+
];
|
|
119
|
+
}),
|
|
120
|
+
_: 2
|
|
121
|
+
}, 1032, ["label"]);
|
|
147
122
|
}), 128))
|
|
148
123
|
];
|
|
149
124
|
}),
|
|
150
125
|
_: 2
|
|
151
|
-
}, 1032, ["modelValue", "onUpdate:modelValue", "
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
126
|
+
}, 1032, ["modelValue", "onUpdate:modelValue", "disabled"]),
|
|
127
|
+
P("div", ue, [
|
|
128
|
+
d(n, {
|
|
129
|
+
rules: e.rules.addressNation,
|
|
130
|
+
prop: [e.field.addressNation],
|
|
131
|
+
style: { display: "inline-block!important", "margin-right": "40px", width: "20%" }
|
|
132
|
+
}, {
|
|
133
|
+
default: o(() => {
|
|
134
|
+
var l;
|
|
135
|
+
return [
|
|
136
|
+
d(F, {
|
|
137
|
+
modelValue: a.value[e.field.addressNation],
|
|
138
|
+
"onUpdate:modelValue": (r) => a.value[e.field.addressNation] = r,
|
|
139
|
+
placeholder: ((l = e.optionsSelectNation) == null ? void 0 : l.placeholder) || "请选择",
|
|
140
|
+
clearable: e.clearable
|
|
141
|
+
}, {
|
|
142
|
+
default: o(() => {
|
|
143
|
+
var r;
|
|
144
|
+
return [
|
|
145
|
+
(s(!0), _(U, null, x((r = e.optionsSelectNation) == null ? void 0 : r.data, (p) => {
|
|
146
|
+
var t, c, v;
|
|
147
|
+
return s(), y(N, {
|
|
148
|
+
key: p[((t = e.optionsSelectNation) == null ? void 0 : t.valueKey) || "value"],
|
|
149
|
+
label: p[((c = e.optionsSelectNation) == null ? void 0 : c.labelkey) || "label"],
|
|
150
|
+
value: p[((v = e.optionsSelectNation) == null ? void 0 : v.valueKey) || "value"]
|
|
151
|
+
}, null, 8, ["label", "value"]);
|
|
152
|
+
}), 128))
|
|
153
|
+
];
|
|
154
|
+
}),
|
|
155
|
+
_: 2
|
|
156
|
+
}, 1032, ["modelValue", "onUpdate:modelValue", "placeholder", "clearable"])
|
|
157
|
+
];
|
|
158
|
+
}),
|
|
159
|
+
_: 2
|
|
160
|
+
}, 1032, ["rules", "prop"]),
|
|
161
|
+
d(n, {
|
|
162
|
+
rules: e.rules.addressCity,
|
|
163
|
+
prop: [e.field.addressCity],
|
|
164
|
+
style: { display: "inline-block!important", "margin-right": "40px", width: "20%" }
|
|
165
|
+
}, {
|
|
166
|
+
default: o(() => {
|
|
167
|
+
var l;
|
|
168
|
+
return [
|
|
169
|
+
d(F, {
|
|
170
|
+
modelValue: a.value[e.field.addressCity],
|
|
171
|
+
"onUpdate:modelValue": (r) => a.value[e.field.addressCity] = r,
|
|
172
|
+
placeholder: ((l = e.optionsSelectCity) == null ? void 0 : l.placeholder) || "请选择",
|
|
173
|
+
clearable: e.clearable
|
|
174
|
+
}, {
|
|
175
|
+
default: o(() => {
|
|
176
|
+
var r;
|
|
177
|
+
return [
|
|
178
|
+
(s(!0), _(U, null, x((r = e.optionsSelectCity) == null ? void 0 : r.data, (p) => {
|
|
179
|
+
var t, c, v;
|
|
180
|
+
return s(), y(N, {
|
|
181
|
+
key: p[((t = e.optionsSelectCity) == null ? void 0 : t.valueKey) || "value"],
|
|
182
|
+
label: p[((c = e.optionsSelectCity) == null ? void 0 : c.labelkey) || "label"],
|
|
183
|
+
value: p[((v = e.optionsSelectCity) == null ? void 0 : v.valueKey) || "value"]
|
|
184
|
+
}, null, 8, ["label", "value"]);
|
|
185
|
+
}), 128))
|
|
186
|
+
];
|
|
187
|
+
}),
|
|
188
|
+
_: 2
|
|
189
|
+
}, 1032, ["modelValue", "onUpdate:modelValue", "placeholder", "clearable"])
|
|
190
|
+
];
|
|
191
|
+
}),
|
|
192
|
+
_: 2
|
|
193
|
+
}, 1032, ["rules", "prop"]),
|
|
194
|
+
d(n, {
|
|
195
|
+
rules: e.rules.addressArea,
|
|
196
|
+
prop: [e.field.addressArea],
|
|
197
|
+
style: { display: "inline-block!important", "margin-right": "40px", width: "20%" }
|
|
198
|
+
}, {
|
|
199
|
+
default: o(() => {
|
|
200
|
+
var l;
|
|
201
|
+
return [
|
|
202
|
+
d(F, {
|
|
203
|
+
modelValue: a.value[e.field.addressArea],
|
|
204
|
+
"onUpdate:modelValue": (r) => a.value[e.field.addressArea] = r,
|
|
205
|
+
placeholder: ((l = e.optionsSelectArea) == null ? void 0 : l.placeholder) || "请选择",
|
|
206
|
+
clearable: e.clearable
|
|
207
|
+
}, {
|
|
208
|
+
default: o(() => {
|
|
209
|
+
var r;
|
|
210
|
+
return [
|
|
211
|
+
(s(!0), _(U, null, x((r = e.optionsSelectArea) == null ? void 0 : r.data, (p) => {
|
|
212
|
+
var t, c, v;
|
|
213
|
+
return s(), y(N, {
|
|
214
|
+
key: p[((t = e.optionsSelectArea) == null ? void 0 : t.valueKey) || "value"],
|
|
215
|
+
label: p[((c = e.optionsSelectArea) == null ? void 0 : c.labelkey) || "label"],
|
|
216
|
+
value: p[((v = e.optionsSelectArea) == null ? void 0 : v.valueKey) || "value"]
|
|
217
|
+
}, null, 8, ["label", "value"]);
|
|
218
|
+
}), 128))
|
|
219
|
+
];
|
|
220
|
+
}),
|
|
221
|
+
_: 2
|
|
222
|
+
}, 1032, ["modelValue", "onUpdate:modelValue", "placeholder", "clearable"])
|
|
223
|
+
];
|
|
224
|
+
}),
|
|
225
|
+
_: 2
|
|
226
|
+
}, 1032, ["rules", "prop"]),
|
|
227
|
+
d(n, {
|
|
228
|
+
rules: e.rules.addressAreaC,
|
|
229
|
+
prop: [e.field.addressAreaC],
|
|
230
|
+
style: { display: "inline-block!important", "margin-right": "40px", width: "20%" }
|
|
231
|
+
}, {
|
|
232
|
+
default: o(() => {
|
|
233
|
+
var l;
|
|
234
|
+
return [
|
|
235
|
+
d(F, {
|
|
236
|
+
modelValue: a.value[e.field.addressAreaC],
|
|
237
|
+
"onUpdate:modelValue": (r) => a.value[e.field.addressAreaC] = r,
|
|
238
|
+
placeholder: ((l = e.optionsSelectAreaC) == null ? void 0 : l.placeholder) || "请选择",
|
|
239
|
+
clearable: e.clearable
|
|
240
|
+
}, {
|
|
241
|
+
default: o(() => {
|
|
242
|
+
var r;
|
|
243
|
+
return [
|
|
244
|
+
(s(!0), _(U, null, x((r = e.optionsSelectAreaC) == null ? void 0 : r.data, (p) => {
|
|
245
|
+
var t, c, v;
|
|
246
|
+
return s(), y(N, {
|
|
247
|
+
key: p[((t = e.optionsSelectAreaC) == null ? void 0 : t.valueKey) || "value"],
|
|
248
|
+
label: p[((c = e.optionsSelectAreaC) == null ? void 0 : c.labelkey) || "label"],
|
|
249
|
+
value: p[((v = e.optionsSelectAreaC) == null ? void 0 : v.valueKey) || "value"]
|
|
250
|
+
}, null, 8, ["label", "value"]);
|
|
251
|
+
}), 128))
|
|
252
|
+
];
|
|
253
|
+
}),
|
|
254
|
+
_: 2
|
|
255
|
+
}, 1032, ["modelValue", "onUpdate:modelValue", "placeholder", "clearable"])
|
|
256
|
+
];
|
|
257
|
+
}),
|
|
258
|
+
_: 2
|
|
259
|
+
}, 1032, ["rules", "prop"])
|
|
260
|
+
]),
|
|
261
|
+
d(n, {
|
|
262
|
+
rules: e.rules.addressStreet,
|
|
263
|
+
prop: [e.field.addressStreet],
|
|
264
|
+
class: "item-address"
|
|
265
|
+
}, {
|
|
266
|
+
default: o(() => [
|
|
267
|
+
d(i, {
|
|
268
|
+
modelValue: a.value[e.field.addressStreet],
|
|
269
|
+
"onUpdate:modelValue": (l) => a.value[e.field.addressStreet] = l,
|
|
270
|
+
readonly: e.readonly,
|
|
271
|
+
type: e.type ?? "text",
|
|
272
|
+
placeholder: e.field.placeholderAddressStreet,
|
|
273
|
+
disabled: e.disabled,
|
|
274
|
+
showPassword: e.showPassword,
|
|
275
|
+
clearable: e.clearable,
|
|
276
|
+
onKeyup: h((l) => f(e.enterable), ["enter"])
|
|
277
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "readonly", "type", "placeholder", "disabled", "showPassword", "clearable", "onKeyup"])
|
|
278
|
+
]),
|
|
279
|
+
_: 2
|
|
280
|
+
}, 1032, ["rules", "prop"]),
|
|
281
|
+
d(n, {
|
|
282
|
+
rules: e.rules.addressHouse,
|
|
283
|
+
prop: [e.field.addressHouse],
|
|
284
|
+
class: "item-address"
|
|
285
|
+
}, {
|
|
286
|
+
default: o(() => [
|
|
287
|
+
d(i, {
|
|
288
|
+
modelValue: a.value[e.field.addressHouse],
|
|
289
|
+
"onUpdate:modelValue": (l) => a.value[e.field.addressHouse] = l,
|
|
290
|
+
readonly: e.readonly,
|
|
291
|
+
type: e.type ?? "text",
|
|
292
|
+
placeholder: e.field.placeholderAddressHouse,
|
|
293
|
+
disabled: e.disabled,
|
|
294
|
+
showPassword: e.showPassword,
|
|
295
|
+
clearable: e.clearable,
|
|
296
|
+
onKeyup: h((l) => f(e.enterable), ["enter"])
|
|
297
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "readonly", "type", "placeholder", "disabled", "showPassword", "clearable", "onKeyup"])
|
|
298
|
+
]),
|
|
299
|
+
_: 2
|
|
300
|
+
}, 1032, ["rules", "prop"]),
|
|
301
|
+
d(n, {
|
|
302
|
+
rules: e.rules.addressMansion,
|
|
303
|
+
prop: [e.field.addressMansion],
|
|
304
|
+
class: "item-address"
|
|
305
|
+
}, {
|
|
306
|
+
default: o(() => [
|
|
307
|
+
d(i, {
|
|
308
|
+
class: "item-address",
|
|
309
|
+
modelValue: a.value[e.field.addressMansion],
|
|
310
|
+
"onUpdate:modelValue": (l) => a.value[e.field.addressMansion] = l,
|
|
311
|
+
readonly: e.readonly,
|
|
312
|
+
type: e.type ?? "text",
|
|
313
|
+
placeholder: e.field.placeholderAddressMansion,
|
|
314
|
+
disabled: e.disabled,
|
|
315
|
+
showPassword: e.showPassword,
|
|
316
|
+
clearable: e.clearable,
|
|
317
|
+
onKeyup: h((l) => f(e.enterable), ["enter"])
|
|
318
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "readonly", "type", "placeholder", "disabled", "showPassword", "clearable", "onKeyup"])
|
|
319
|
+
]),
|
|
320
|
+
_: 2
|
|
321
|
+
}, 1032, ["rules", "prop"]),
|
|
322
|
+
a.value.addressLang == "1" ? (s(), _("div", te, [
|
|
323
|
+
d(n, {
|
|
324
|
+
rules: e.rules.block,
|
|
325
|
+
prop: [e.field.block],
|
|
326
|
+
style: { display: "inline-block!important", width: "24%" }
|
|
327
|
+
}, {
|
|
328
|
+
default: o(() => [
|
|
329
|
+
d(i, {
|
|
330
|
+
modelValue: a.value[e.field.block],
|
|
331
|
+
"onUpdate:modelValue": (l) => a.value[e.field.block] = l,
|
|
332
|
+
readonly: e.readonly,
|
|
333
|
+
type: e.type ?? "text",
|
|
334
|
+
placeholder: e.field.placeholderBlock,
|
|
335
|
+
disabled: e.disabled,
|
|
336
|
+
showPassword: e.showPassword,
|
|
337
|
+
clearable: e.clearable,
|
|
338
|
+
onKeyup: h((l) => f(e.enterable), ["enter"])
|
|
339
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "readonly", "type", "placeholder", "disabled", "showPassword", "clearable", "onKeyup"])
|
|
340
|
+
]),
|
|
341
|
+
_: 2
|
|
342
|
+
}, 1032, ["rules", "prop"]),
|
|
343
|
+
w(" 座 "),
|
|
344
|
+
d(n, {
|
|
345
|
+
rules: e.rules.floor,
|
|
346
|
+
prop: [e.field.floor],
|
|
347
|
+
style: { display: "inline-block!important", width: "24%", "margin-left": "60px" }
|
|
348
|
+
}, {
|
|
349
|
+
default: o(() => [
|
|
350
|
+
d(i, {
|
|
351
|
+
modelValue: a.value[e.field.floor],
|
|
352
|
+
"onUpdate:modelValue": (l) => a.value[e.field.floor] = l,
|
|
353
|
+
readonly: e.readonly,
|
|
354
|
+
type: e.type ?? "text",
|
|
355
|
+
placeholder: e.field.placeholderFloor,
|
|
356
|
+
disabled: e.disabled,
|
|
357
|
+
showPassword: e.showPassword,
|
|
358
|
+
clearable: e.clearable,
|
|
359
|
+
onKeyup: h((l) => f(e.enterable), ["enter"])
|
|
360
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "readonly", "type", "placeholder", "disabled", "showPassword", "clearable", "onKeyup"])
|
|
361
|
+
]),
|
|
362
|
+
_: 2
|
|
363
|
+
}, 1032, ["rules", "prop"]),
|
|
364
|
+
w(" 樓 "),
|
|
365
|
+
d(n, {
|
|
366
|
+
rules: e.rules.flat,
|
|
367
|
+
prop: [e.field.flat],
|
|
368
|
+
style: { display: "inline-block!important", width: "24%", "margin-left": "60px" }
|
|
369
|
+
}, {
|
|
370
|
+
default: o(() => [
|
|
371
|
+
d(i, {
|
|
372
|
+
modelValue: a.value[e.field.flat],
|
|
373
|
+
"onUpdate:modelValue": (l) => a.value[e.field.flat] = l,
|
|
374
|
+
readonly: e.readonly,
|
|
375
|
+
type: e.type ?? "text",
|
|
376
|
+
placeholder: e.field.placeholderFlat,
|
|
377
|
+
disabled: e.disabled,
|
|
378
|
+
showPassword: e.showPassword,
|
|
379
|
+
clearable: e.clearable,
|
|
380
|
+
onKeyup: h((l) => f(e.enterable), ["enter"])
|
|
381
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "readonly", "type", "placeholder", "disabled", "showPassword", "clearable", "onKeyup"])
|
|
382
|
+
]),
|
|
383
|
+
_: 2
|
|
384
|
+
}, 1032, ["rules", "prop"]),
|
|
385
|
+
w(" 室 ")
|
|
386
|
+
])) : z("", !0),
|
|
387
|
+
a.value.addressLang == "2" ? (s(), _("div", ce, [
|
|
388
|
+
d(n, {
|
|
389
|
+
rules: e.rules.block,
|
|
390
|
+
prop: [e.field.block],
|
|
391
|
+
style: { display: "inline-block!important", width: "24%" }
|
|
392
|
+
}, {
|
|
393
|
+
default: o(() => [
|
|
394
|
+
d(i, {
|
|
395
|
+
modelValue: a.value[e.field.block],
|
|
396
|
+
"onUpdate:modelValue": (l) => a.value[e.field.block] = l,
|
|
397
|
+
readonly: e.readonly,
|
|
398
|
+
type: e.type ?? "text",
|
|
399
|
+
placeholder: e.field.placeholderBlock,
|
|
400
|
+
disabled: e.disabled,
|
|
401
|
+
showPassword: e.showPassword,
|
|
402
|
+
clearable: e.clearable,
|
|
403
|
+
onKeyup: h((l) => f(e.enterable), ["enter"])
|
|
404
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "readonly", "type", "placeholder", "disabled", "showPassword", "clearable", "onKeyup"])
|
|
405
|
+
]),
|
|
406
|
+
_: 2
|
|
407
|
+
}, 1032, ["rules", "prop"]),
|
|
408
|
+
w(" Block "),
|
|
409
|
+
d(n, {
|
|
410
|
+
rules: e.rules.floor,
|
|
411
|
+
prop: [e.field.floor],
|
|
412
|
+
style: { display: "inline-block!important", width: "24%", "margin-left": "60px" }
|
|
413
|
+
}, {
|
|
414
|
+
default: o(() => [
|
|
415
|
+
d(i, {
|
|
416
|
+
modelValue: a.value[e.field.floor],
|
|
417
|
+
"onUpdate:modelValue": (l) => a.value[e.field.floor] = l,
|
|
418
|
+
readonly: e.readonly,
|
|
419
|
+
type: e.type ?? "text",
|
|
420
|
+
placeholder: e.rules.placeholderFloor,
|
|
421
|
+
disabled: e.disabled,
|
|
422
|
+
showPassword: e.showPassword,
|
|
423
|
+
clearable: e.clearable,
|
|
424
|
+
onKeyup: h((l) => f(e.enterable), ["enter"])
|
|
425
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "readonly", "type", "placeholder", "disabled", "showPassword", "clearable", "onKeyup"])
|
|
426
|
+
]),
|
|
427
|
+
_: 2
|
|
428
|
+
}, 1032, ["rules", "prop"]),
|
|
429
|
+
w(" Floor "),
|
|
430
|
+
d(n, {
|
|
431
|
+
rules: e.rules.flat,
|
|
432
|
+
prop: [e.field.flat],
|
|
433
|
+
style: { display: "inline-block!important", width: "24%", "margin-left": "60px" }
|
|
434
|
+
}, {
|
|
435
|
+
default: o(() => [
|
|
436
|
+
d(i, {
|
|
437
|
+
modelValue: a.value[e.field.flat],
|
|
438
|
+
"onUpdate:modelValue": (l) => a.value[e.field.flat] = l,
|
|
439
|
+
readonly: e.readonly,
|
|
440
|
+
type: e.type ?? "text",
|
|
441
|
+
placeholder: e.rules.placeholderFlat,
|
|
442
|
+
disabled: e.disabled,
|
|
443
|
+
showPassword: e.showPassword,
|
|
444
|
+
clearable: e.clearable,
|
|
445
|
+
onKeyup: h((l) => f(e.enterable), ["enter"])
|
|
446
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "readonly", "type", "placeholder", "disabled", "showPassword", "clearable", "onKeyup"])
|
|
447
|
+
]),
|
|
448
|
+
_: 2
|
|
449
|
+
}, 1032, ["rules", "prop"]),
|
|
450
|
+
w(" Flat ")
|
|
451
|
+
])) : z("", !0)
|
|
452
|
+
]),
|
|
453
|
+
_: 2
|
|
454
|
+
}, 1032, ["rules", "prop"])) : e.type === "name" ? (s(), y(n, {
|
|
455
|
+
key: 2,
|
|
456
|
+
label: e.label,
|
|
457
|
+
class: "container"
|
|
458
|
+
}, {
|
|
459
|
+
default: o(() => [
|
|
460
|
+
d(n, {
|
|
461
|
+
rules: e.rules.nameEnFamily,
|
|
462
|
+
prop: [e.field.nameEnFamily],
|
|
463
|
+
class: "item-name"
|
|
464
|
+
}, {
|
|
465
|
+
default: o(() => [
|
|
466
|
+
d(i, {
|
|
467
|
+
modelValue: a.value[e.field.nameEnFamily],
|
|
468
|
+
"onUpdate:modelValue": (l) => a.value[e.field.nameEnFamily] = l,
|
|
469
|
+
readonly: e.readonly,
|
|
470
|
+
type: e.type ?? "text",
|
|
471
|
+
placeholder: e.placeholderNameEnFamily,
|
|
472
|
+
disabled: e.disabled,
|
|
473
|
+
onKeyup: h((l) => f(e.enterable), ["enter"])
|
|
474
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "readonly", "type", "placeholder", "disabled", "onKeyup"])
|
|
475
|
+
]),
|
|
476
|
+
_: 2
|
|
477
|
+
}, 1032, ["rules", "prop"]),
|
|
478
|
+
d(n, {
|
|
479
|
+
rules: e.rules.nameChFamily,
|
|
480
|
+
prop: [e.field.nameChFamily],
|
|
481
|
+
class: "item-name"
|
|
482
|
+
}, {
|
|
483
|
+
default: o(() => [
|
|
484
|
+
d(i, {
|
|
485
|
+
modelValue: a.value[e.field.nameChFamily],
|
|
486
|
+
"onUpdate:modelValue": (l) => a.value[e.field.nameChFamily] = l,
|
|
487
|
+
readonly: e.readonly,
|
|
488
|
+
type: e.type ?? "text",
|
|
489
|
+
placeholder: e.placeholderNameChFamily,
|
|
490
|
+
disabled: e.disabled,
|
|
491
|
+
onKeyup: h((l) => f(e.enterable), ["enter"])
|
|
492
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "readonly", "type", "placeholder", "disabled", "onKeyup"])
|
|
493
|
+
]),
|
|
494
|
+
_: 2
|
|
495
|
+
}, 1032, ["rules", "prop"]),
|
|
496
|
+
d(n, {
|
|
497
|
+
rules: e.rules.nameEn,
|
|
498
|
+
prop: [e.field.nameEn],
|
|
499
|
+
class: "item-name"
|
|
500
|
+
}, {
|
|
501
|
+
default: o(() => [
|
|
502
|
+
d(i, {
|
|
503
|
+
modelValue: a.value[e.field.nameEn],
|
|
504
|
+
"onUpdate:modelValue": (l) => a.value[e.field.nameEn] = l,
|
|
505
|
+
readonly: e.readonly,
|
|
506
|
+
type: e.type ?? "text",
|
|
507
|
+
placeholder: e.placeholderNameEn,
|
|
508
|
+
disabled: e.disabled,
|
|
509
|
+
onKeyup: h((l) => f(e.enterable), ["enter"])
|
|
510
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "readonly", "type", "placeholder", "disabled", "onKeyup"])
|
|
511
|
+
]),
|
|
512
|
+
_: 2
|
|
513
|
+
}, 1032, ["rules", "prop"]),
|
|
514
|
+
d(n, {
|
|
515
|
+
rules: e.rules.nameCh,
|
|
516
|
+
prop: [e.field.nameCh],
|
|
517
|
+
class: "item-name"
|
|
518
|
+
}, {
|
|
519
|
+
default: o(() => [
|
|
520
|
+
d(i, {
|
|
521
|
+
modelValue: a.value[e.field.nameCh],
|
|
522
|
+
"onUpdate:modelValue": (l) => a.value[e.field.nameCh] = l,
|
|
523
|
+
readonly: e.readonly,
|
|
524
|
+
type: e.type ?? "text",
|
|
525
|
+
placeholder: e.placeholderNameCh,
|
|
526
|
+
disabled: e.disabled,
|
|
527
|
+
onKeyup: h((l) => f(e.enterable), ["enter"])
|
|
528
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "readonly", "type", "placeholder", "disabled", "onKeyup"])
|
|
529
|
+
]),
|
|
530
|
+
_: 2
|
|
531
|
+
}, 1032, ["rules", "prop"])
|
|
532
|
+
]),
|
|
533
|
+
_: 2
|
|
534
|
+
}, 1032, ["label"])) : e.type === "gender" ? (s(), y(n, {
|
|
535
|
+
key: 3,
|
|
536
|
+
label: e.label,
|
|
537
|
+
rules: e.rules,
|
|
538
|
+
prop: [e.field]
|
|
539
|
+
}, {
|
|
540
|
+
default: o(() => [
|
|
541
|
+
d(G, {
|
|
542
|
+
modelValue: a.value[e.field],
|
|
543
|
+
"onUpdate:modelValue": (l) => a.value[e.field] = l,
|
|
544
|
+
disabled: e.disabled
|
|
545
|
+
}, {
|
|
546
|
+
default: o(() => {
|
|
547
|
+
var l;
|
|
548
|
+
return [
|
|
549
|
+
(s(!0), _(U, null, x((l = e.options) == null ? void 0 : l.data, (r) => {
|
|
550
|
+
var p, t;
|
|
551
|
+
return s(), y(E, {
|
|
552
|
+
label: r[((p = e.options) == null ? void 0 : p.valueKey) || "value"],
|
|
553
|
+
size: "large",
|
|
554
|
+
key: r[((t = e.options) == null ? void 0 : t.valueKey) || "value"]
|
|
555
|
+
}, {
|
|
556
|
+
default: o(() => [
|
|
557
|
+
P("img", {
|
|
558
|
+
src: r.label === "男" ? "../../public/man.png" : "../../public/woman.png",
|
|
559
|
+
style: { width: "44px", height: "44px", "margin-right": "4px" },
|
|
560
|
+
alt: ""
|
|
561
|
+
}, null, 8, ye)
|
|
562
|
+
]),
|
|
563
|
+
_: 2
|
|
564
|
+
}, 1032, ["label"]);
|
|
565
|
+
}), 128))
|
|
566
|
+
];
|
|
567
|
+
}),
|
|
568
|
+
_: 2
|
|
569
|
+
}, 1032, ["modelValue", "onUpdate:modelValue", "disabled"])
|
|
570
|
+
]),
|
|
571
|
+
_: 2
|
|
572
|
+
}, 1032, ["label", "rules", "prop"])) : e.type === "radio" ? (s(), y(n, {
|
|
573
|
+
key: 4,
|
|
574
|
+
label: e.label,
|
|
575
|
+
rules: e.rules,
|
|
576
|
+
prop: [e.field]
|
|
577
|
+
}, {
|
|
578
|
+
default: o(() => [
|
|
579
|
+
d(G, {
|
|
580
|
+
modelValue: a.value[e.field],
|
|
581
|
+
"onUpdate:modelValue": (l) => a.value[e.field] = l,
|
|
582
|
+
disabled: e.disabled
|
|
583
|
+
}, {
|
|
584
|
+
default: o(() => {
|
|
585
|
+
var l;
|
|
586
|
+
return [
|
|
587
|
+
(s(!0), _(U, null, x((l = e.options) == null ? void 0 : l.data, (r) => {
|
|
588
|
+
var p, t;
|
|
589
|
+
return s(), y(E, {
|
|
590
|
+
label: r[((p = e.options) == null ? void 0 : p.valueKey) || "value"],
|
|
591
|
+
size: "large",
|
|
592
|
+
key: r[((t = e.options) == null ? void 0 : t.valueKey) || "value"]
|
|
593
|
+
}, {
|
|
594
|
+
default: o(() => {
|
|
595
|
+
var c;
|
|
596
|
+
return [
|
|
597
|
+
w(K(r[((c = e.options) == null ? void 0 : c.labelkey) || "label"]), 1)
|
|
598
|
+
];
|
|
599
|
+
}),
|
|
600
|
+
_: 2
|
|
601
|
+
}, 1032, ["label"]);
|
|
602
|
+
}), 128))
|
|
603
|
+
];
|
|
604
|
+
}),
|
|
605
|
+
_: 2
|
|
606
|
+
}, 1032, ["modelValue", "onUpdate:modelValue", "disabled"])
|
|
607
|
+
]),
|
|
608
|
+
_: 2
|
|
609
|
+
}, 1032, ["label", "rules", "prop"])) : e.type === "checkbox" ? (s(), y(n, {
|
|
610
|
+
key: 5,
|
|
611
|
+
label: e.label,
|
|
612
|
+
rules: e.rules,
|
|
613
|
+
prop: [e.field]
|
|
206
614
|
}, {
|
|
207
|
-
default:
|
|
208
|
-
|
|
615
|
+
default: o(() => [
|
|
616
|
+
d(M, {
|
|
617
|
+
modelValue: a.value[e.field],
|
|
618
|
+
"onUpdate:modelValue": (l) => a.value[e.field] = l,
|
|
619
|
+
disabled: e.disabled,
|
|
620
|
+
style: ee(
|
|
621
|
+
e.ways === "row" ? "display: flex; align-items: flex-start;flex-flow: row nowrap; " : "display: flex; align-items: flex-start;flex-flow: column nowrap; "
|
|
622
|
+
)
|
|
623
|
+
}, {
|
|
624
|
+
default: o(() => {
|
|
625
|
+
var l;
|
|
626
|
+
return [
|
|
627
|
+
(s(!0), _(U, null, x((l = e.options) == null ? void 0 : l.data, (r) => {
|
|
628
|
+
var p, t;
|
|
629
|
+
return s(), y(O, {
|
|
630
|
+
key: r[((p = e.options) == null ? void 0 : p.valueKey) || "value"],
|
|
631
|
+
label: r[((t = e.options) == null ? void 0 : t.valueKey) || "value"]
|
|
632
|
+
}, {
|
|
633
|
+
default: o(() => {
|
|
634
|
+
var c;
|
|
635
|
+
return [
|
|
636
|
+
w(K(r[((c = e.options) == null ? void 0 : c.labelkey) || "label"]), 1)
|
|
637
|
+
];
|
|
638
|
+
}),
|
|
639
|
+
_: 2
|
|
640
|
+
}, 1032, ["label"]);
|
|
641
|
+
}), 128))
|
|
642
|
+
];
|
|
643
|
+
}),
|
|
644
|
+
_: 2
|
|
645
|
+
}, 1032, ["modelValue", "onUpdate:modelValue", "disabled", "style"])
|
|
209
646
|
]),
|
|
210
|
-
_:
|
|
211
|
-
}),
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
647
|
+
_: 2
|
|
648
|
+
}, 1032, ["label", "rules", "prop"])) : e.type === "select" ? (s(), y(n, {
|
|
649
|
+
key: 6,
|
|
650
|
+
label: e.label,
|
|
651
|
+
rules: e.rules,
|
|
652
|
+
prop: [e.field]
|
|
216
653
|
}, {
|
|
217
|
-
default:
|
|
218
|
-
|
|
654
|
+
default: o(() => {
|
|
655
|
+
var l;
|
|
656
|
+
return [
|
|
657
|
+
d(F, {
|
|
658
|
+
modelValue: a.value[e.field],
|
|
659
|
+
"onUpdate:modelValue": (r) => a.value[e.field] = r,
|
|
660
|
+
placeholder: ((l = e.options) == null ? void 0 : l.placeholder) || "请选择",
|
|
661
|
+
clearable: e.clearable
|
|
662
|
+
}, {
|
|
663
|
+
default: o(() => {
|
|
664
|
+
var r;
|
|
665
|
+
return [
|
|
666
|
+
(s(!0), _(U, null, x((r = e.options) == null ? void 0 : r.data, (p) => {
|
|
667
|
+
var t, c, v;
|
|
668
|
+
return s(), y(N, {
|
|
669
|
+
key: p[((t = e.options) == null ? void 0 : t.valueKey) || "value"],
|
|
670
|
+
label: p[((c = e.options) == null ? void 0 : c.labelkey) || "label"],
|
|
671
|
+
value: p[((v = e.options) == null ? void 0 : v.valueKey) || "value"]
|
|
672
|
+
}, null, 8, ["label", "value"]);
|
|
673
|
+
}), 128))
|
|
674
|
+
];
|
|
675
|
+
}),
|
|
676
|
+
_: 2
|
|
677
|
+
}, 1032, ["modelValue", "onUpdate:modelValue", "placeholder", "clearable"])
|
|
678
|
+
];
|
|
679
|
+
}),
|
|
680
|
+
_: 2
|
|
681
|
+
}, 1032, ["label", "rules", "prop"])) : e.type === "datetime" ? (s(), y(n, {
|
|
682
|
+
key: 7,
|
|
683
|
+
label: e.label,
|
|
684
|
+
rules: e.rules,
|
|
685
|
+
prop: [e.field]
|
|
686
|
+
}, {
|
|
687
|
+
default: o(() => [
|
|
688
|
+
d(X, {
|
|
689
|
+
modelValue: a.value[e.field],
|
|
690
|
+
"onUpdate:modelValue": (l) => a.value[e.field] = l,
|
|
691
|
+
readonly: e.readonly,
|
|
692
|
+
type: "datetime",
|
|
693
|
+
placeholder: e.placeholder || e.label,
|
|
694
|
+
"default-time": u.defaultTime,
|
|
695
|
+
"value-format": e.format || "YYYY-MM-DD HH:mm:ss"
|
|
696
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "readonly", "placeholder", "default-time", "value-format"])
|
|
219
697
|
]),
|
|
220
|
-
_:
|
|
221
|
-
})) :
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
698
|
+
_: 2
|
|
699
|
+
}, 1032, ["label", "rules", "prop"])) : (s(), y(n, {
|
|
700
|
+
key: 8,
|
|
701
|
+
label: e.label,
|
|
702
|
+
rules: e.rules,
|
|
703
|
+
prop: [e.field]
|
|
225
704
|
}, {
|
|
226
|
-
default:
|
|
227
|
-
|
|
705
|
+
default: o(() => [
|
|
706
|
+
d(i, {
|
|
707
|
+
modelValue: a.value[e.field],
|
|
708
|
+
"onUpdate:modelValue": (l) => a.value[e.field] = l,
|
|
709
|
+
readonly: e.readonly,
|
|
710
|
+
type: e.type ?? "text",
|
|
711
|
+
placeholder: e.placeholder || e.label,
|
|
712
|
+
disabled: e.disabled,
|
|
713
|
+
showPassword: e.showPassword,
|
|
714
|
+
clearable: e.clearable,
|
|
715
|
+
onKeyup: h((l) => f(e.enterable), ["enter"])
|
|
716
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "readonly", "type", "placeholder", "disabled", "showPassword", "clearable", "onKeyup"])
|
|
228
717
|
]),
|
|
229
|
-
_:
|
|
230
|
-
}
|
|
231
|
-
])
|
|
718
|
+
_: 2
|
|
719
|
+
}, 1032, ["label", "rules", "prop"]))
|
|
720
|
+
], 2))), 128)),
|
|
721
|
+
d(n, null, {
|
|
722
|
+
default: o(() => [
|
|
723
|
+
le(u.$slots, "buttons", {
|
|
724
|
+
model: a.value,
|
|
725
|
+
formRef: C.value
|
|
726
|
+
}, () => [
|
|
727
|
+
A.value.showButtonText ? (s(), y(L, {
|
|
728
|
+
key: 0,
|
|
729
|
+
type: "primary",
|
|
730
|
+
onClick: V[0] || (V[0] = (e) => H(C.value))
|
|
731
|
+
}, {
|
|
732
|
+
default: o(() => [
|
|
733
|
+
w(K(A.value.submitButtonText), 1)
|
|
734
|
+
]),
|
|
735
|
+
_: 1
|
|
736
|
+
})) : z("", !0),
|
|
737
|
+
A.value.showResetButton ? (s(), y(L, {
|
|
738
|
+
key: 1,
|
|
739
|
+
type: "info",
|
|
740
|
+
onClick: V[1] || (V[1] = (e) => I(C.value))
|
|
741
|
+
}, {
|
|
742
|
+
default: o(() => [
|
|
743
|
+
w(K(A.value.resetButtonText), 1)
|
|
744
|
+
]),
|
|
745
|
+
_: 1
|
|
746
|
+
})) : z("", !0),
|
|
747
|
+
A.value.showCancelButton ? (s(), y(L, {
|
|
748
|
+
key: 2,
|
|
749
|
+
onClick: V[2] || (V[2] = (e) => S("cancel"))
|
|
750
|
+
}, {
|
|
751
|
+
default: o(() => [
|
|
752
|
+
w(K(A.value.cancelButtonText), 1)
|
|
753
|
+
]),
|
|
754
|
+
_: 1
|
|
755
|
+
})) : z("", !0)
|
|
756
|
+
], !0)
|
|
757
|
+
]),
|
|
758
|
+
_: 3
|
|
759
|
+
})
|
|
232
760
|
]),
|
|
233
761
|
_: 3
|
|
234
|
-
})
|
|
762
|
+
}, 16, ["model", "label-position"])
|
|
235
763
|
]),
|
|
236
764
|
_: 3
|
|
237
|
-
}
|
|
765
|
+
});
|
|
238
766
|
};
|
|
239
767
|
}
|
|
240
768
|
});
|
|
241
|
-
|
|
242
|
-
g.
|
|
769
|
+
const fe = (g, B) => {
|
|
770
|
+
const S = g.__vccOpts || g;
|
|
771
|
+
for (const [b, a] of B)
|
|
772
|
+
S[b] = a;
|
|
773
|
+
return S;
|
|
774
|
+
}, Z = /* @__PURE__ */ fe(be, [["__scopeId", "data-v-f2e8b0ed"]]);
|
|
775
|
+
function R(g, B = {}) {
|
|
776
|
+
R.installed || (R.installed = !0, g.component("common-el-form", Z));
|
|
243
777
|
}
|
|
244
|
-
|
|
778
|
+
Z.install = R;
|
|
245
779
|
export {
|
|
246
|
-
|
|
780
|
+
Z as default
|
|
247
781
|
};
|
package/common-form.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(e,c){typeof exports=="object"&&typeof module<"u"?module.exports=c(require("vue")):typeof define=="function"&&define.amd?define(["vue"],c):(e=typeof globalThis<"u"?globalThis:e||self,e.Form=c(e.Vue))})(this,function(e){"use strict";const c=e.defineComponent({__name:"Index",props:{fieldList:null,model:null,options:null},emits:["submit","reset","cancel"],setup(k,{expose:m,emit:B}){const f=k,t=e.ref({}),u=e.ref(),b=e.computed(()=>Object.assign({labelPosition:"right",disabled:!1,submitButtonText:"提交",resetButtonText:"重置",cancelButtonText:"取消"},f==null?void 0:f.options));m({formRef:u}),f.fieldList.map(n=>{const a=n.type==="checkbox"?[]:"";f.model?t.value=f.model:t.value[n.field]=n.value||a});const h=n=>{n&&n.validate(a=>{if(a)B("submit",t.value);else return!1})},V=n=>{n&&h(u.value)},C=n=>{n&&n.resetFields()};return(n,a)=>{const w=e.resolveComponent("el-radio"),g=e.resolveComponent("el-radio-group"),i=e.resolveComponent("el-form-item"),N=e.resolveComponent("el-checkbox"),T=e.resolveComponent("el-checkbox-group"),U=e.resolveComponent("el-option"),K=e.resolveComponent("el-select"),S=e.resolveComponent("el-date-picker"),D=e.resolveComponent("el-input"),_=e.resolveComponent("el-button"),F=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(F,e.mergeProps({onSubmit:a[3]||(a[3]=e.withModifiers(()=>{},["prevent"])),model:t.value},e.unref(b),{ref_key:"formRef",ref:u}),{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.fieldList,(l,L)=>(e.openBlock(),e.createBlock(i,{key:L},{default:e.withCtx(()=>[l.type==="radio"?(e.openBlock(),e.createBlock(i,{key:0,label:l.label,rules:l.rules,prop:[l.field]},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:t.value[l.field],"onUpdate:modelValue":o=>t.value[l.field]=o,disabled:l.disabled},{default:e.withCtx(()=>{var o;return[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((o=l.options)==null?void 0:o.data,r=>{var d,s;return e.openBlock(),e.createBlock(w,{label:r[((d=l.options)==null?void 0:d.valueKey)||"value"],size:"large",key:r[((s=l.options)==null?void 0:s.valueKey)||"value"]},{default:e.withCtx(()=>{var p;return[e.createTextVNode(e.toDisplayString(r[((p=l.options)==null?void 0:p.labelkey)||"label"]),1)]}),_:2},1032,["label"])}),128))]}),_:2},1032,["modelValue","onUpdate:modelValue","disabled"])]),_:2},1032,["label","rules","prop"])):l.type==="checkbox"?(e.openBlock(),e.createBlock(i,{key:1,label:l.label,rules:l.rules,prop:[l.field]},{default:e.withCtx(()=>[e.createVNode(T,{modelValue:t.value[l.field],"onUpdate:modelValue":o=>t.value[l.field]=o,disabled:l.disabled},{default:e.withCtx(()=>{var o;return[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((o=l.options)==null?void 0:o.data,r=>{var d,s;return e.openBlock(),e.createBlock(N,{key:r[((d=l.options)==null?void 0:d.valueKey)||"value"],label:r[((s=l.options)==null?void 0:s.valueKey)||"value"]},{default:e.withCtx(()=>{var p;return[e.createTextVNode(e.toDisplayString(r[((p=l.options)==null?void 0:p.labelkey)||"label"]),1)]}),_:2},1032,["label"])}),128))]}),_:2},1032,["modelValue","onUpdate:modelValue","disabled"])]),_:2},1032,["label","rules","prop"])):l.type==="select"?(e.openBlock(),e.createBlock(i,{key:2,label:l.label,rules:l.rules,prop:[l.field]},{default:e.withCtx(()=>{var o;return[e.createVNode(K,{modelValue:t.value[l.field],"onUpdate:modelValue":r=>t.value[l.field]=r,placeholder:((o=l.options)==null?void 0:o.placeholder)||"请选择",clearable:l.clearable},{default:e.withCtx(()=>{var r;return[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((r=l.options)==null?void 0:r.data,d=>{var s,p,x;return e.openBlock(),e.createBlock(U,{key:d[((s=l.options)==null?void 0:s.valueKey)||"value"],label:d[((p=l.options)==null?void 0:p.labelkey)||"label"],value:d[((x=l.options)==null?void 0:x.valueKey)||"value"]},null,8,["label","value"])}),128))]}),_:2},1032,["modelValue","onUpdate:modelValue","placeholder","clearable"])]}),_:2},1032,["label","rules","prop"])):l.type==="datetime"?(e.openBlock(),e.createBlock(i,{key:3,label:l.label,rules:l.rules,prop:[l.field]},{default:e.withCtx(()=>[e.createVNode(S,{modelValue:t.value[l.field],"onUpdate:modelValue":o=>t.value[l.field]=o,readonly:l.readonly,type:"datetime",placeholder:l.placeholder||l.label,"default-time":n.defaultTime,"value-format":l.format||"YYYY-MM-DD HH:mm:ss"},null,8,["modelValue","onUpdate:modelValue","readonly","placeholder","default-time","value-format"])]),_:2},1032,["label","rules","prop"])):(e.openBlock(),e.createBlock(i,{key:4,label:l.label,rules:l.rules,prop:[l.field]},{default:e.withCtx(()=>[e.createVNode(D,{modelValue:t.value[l.field],"onUpdate:modelValue":o=>t.value[l.field]=o,readonly:l.readonly,type:l.type??"text",placeholder:l.placeholder||l.label,disabled:l.disabled,showPassword:l.showPassword,clearable:l.clearable,onKeyup:e.withKeys(o=>V(l.enterable),["enter"])},null,8,["modelValue","onUpdate:modelValue","readonly","type","placeholder","disabled","showPassword","clearable","onKeyup"])]),_:2},1032,["label","rules","prop"]))]),_:2},1024))),128)),e.createVNode(i,null,{default:e.withCtx(()=>[e.renderSlot(n.$slots,"buttons",{model:t.value,formRef:u.value},()=>[e.createVNode(_,{type:"primary",onClick:a[0]||(a[0]=l=>h(u.value))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(b).submitButtonText),1)]),_:1}),e.unref(b).showResetButton?(e.openBlock(),e.createBlock(_,{key:0,type:"info",onClick:a[1]||(a[1]=l=>C(u.value))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(b).resetButtonText),1)]),_:1})):e.createCommentVNode("",!0),e.unref(b).showCancelButton?(e.openBlock(),e.createBlock(_,{key:1,onClick:a[2]||(a[2]=l=>B("cancel"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(b).cancelButtonText),1)]),_:1})):e.createCommentVNode("",!0)])]),_:3})]),_:3},16,["model"])}}});function y(k,m={}){y.installed||(y.installed=!0,k.component("common-el-form",c))}return c.install=y,c});
|
|
1
|
+
(function(l,w){typeof exports=="object"&&typeof module<"u"?module.exports=w(require("vue")):typeof define=="function"&&define.amd?define(["vue"],w):(l=typeof globalThis<"u"?globalThis:l||self,l.Form=w(l.Vue))})(this,function(l){"use strict";const w="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAmCAYAAACoPemuAAAAAXNSR0IArs4c6QAAA+dJREFUWEftl1+IG1UUxr9zJ+6ubWkyM0oF6cIktRQsLUUUWiiWPllw8UFZEGtc9UERbBLXIhTEWR/KUtpNZgWrPli7FqUoKogKUrQ++GIptWsrVZoMtFpEyJ100do/yT0Sa2P+TJNJdrLtg/OYnHvO737nm3vPEG7Sh25SLvwP1m1nFlSxTTZHfvVKG5SABeZlTHRJMCRr9GN+T+xoPXzfwZiZ7kqXRirEDwN4EMzGNQAi/AxQ7lbSDp7MRuWCgVkvyjV0BXsZvKGpleeEoInlUf3twzaV/drcF8WqKiXS3k4GtgOsNShBOLR4SBv9YTLmtfNd6GC2zWLGk28x8HRzYQK9Pqzrqeup1LdWVqH2l7x9YE62QmFfwTGfCvp2hqqYlSk6UNjWAkU4NBwztgRRqvZiBN1BpzgrIzdC4RuAmzZL3sDg4Oqfdi0+1ylH6K3cZPPQmZI8zoyVzcWFEGP5rL6/G6hqbCitjKeLNjNe8TH7iaSur7VtUgsOtmKaB1XeO8vg232Kj7qO+UG3UKEoFk/Lx5j5gI/hfx+OGXd2Y/hQPRZPyW99TnYQialCTh/vRa15KxZ/SUb5EiSYRYvpNbE5P6V/fUPAEpniA0rhC5/iFxbphn7Spss3BMxKF18F42WfU/5IwTHv6xVq/q1My8+ZeUsLANGMmzOeWBCwFZniqALF64ux4hSAO3zADhPwZUNsBJ+5u43ZoLCBD9iV43O3lSvlj5h5Y9DktXuPMJHPGhNExEHXBgarJrzb5oG/PPkGA08GLHBRAGN5xzwYML4W1hXYtVWJlNyuCJN+x0QdwG8QkYfcbPS7bqFazG+li++AKXl1QiBPkHgkn4t95ZfYysgRUvweA0t8PPa9NjA0cnrXol+uB5VIlzYrVh8CrAPEIJ5xc+ZYrf31C62UVA1ji8C0mzWrBvd9/p3pP2Xw8H9+ok+WRPSts7vpz3ZKtc5uxK5j1A7qhlZaqWKjOYlec3NGy+DXsJkdfyzDhcsfg3k9gSbzOX1HEJNbaTkN5ufrc7mOWeOZN1g1cXXCgHv+/tPZWMMR0Vax+YAR0d5CzniuF/N2WhNPyepn3bM9KUag2aSur+tl0GsHdvVLyjvG4DU9gf3z2hK9r7HmKIFiJxWC/C8UzApVUsz8aHN8G4/JAsBWkALhx5DrOkbtymswfzwl32Xw1vCLds5IoAMFx3jc9xxLvFBczhWcYGBp51ThRRAwRxpW56fMs75g1R/j4+fv5XJ5BsCq8Eq3zXSKIpFkYU/0SH2U7115z5t8izw1t06o8lqQGOoLIKuLSkSOG6uWHjv6DF1prtHTJd4X0KakfwOtY3o2ZXuVHAAAAABJRU5ErkJggg==",A=b=>(l.pushScopeId("data-v-f2e8b0ed"),b=b(),l.popScopeId(),b),P={class:"header-title"},F=A(()=>l.createElementVNode("span",{class:"title-left"},null,-1)),E={class:"title-content"},L=A(()=>l.createElementVNode("img",{src:w,style:{width:"19px","margin-right":"10px"},alt:""},null,-1)),m={class:"item-address"},z={key:0,class:"item-address"},T={key:1,class:"item-address"},G=["src"],R=l.defineComponent({__name:"Index",props:{fieldList:{},model:{},options:{}},emits:["submit","reset","cancel"],setup(b,{expose:_,emit:k}){const c=b,o=l.ref({}),V=l.ref(),h=l.computed(()=>Object.assign({labelPosition:"top",disabled:!1},c==null?void 0:c.options));console.log(c==null?void 0:c.options,"_oppppppppppp0ppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp",h),_({formRef:V}),(()=>{c.fieldList.map(n=>{const f=n.type==="checkbox"?[]:"";if(console.log("itttttttt",n.field,n.field!=null),n.field&&typeof n.field=="object"){console.log("it999999999999999999999999999t",n.field,typeof n.field);for(let t of Object.keys(n.field))c.model?o.value=c.model:o.value[n.field[t]]=n.value||f}c.model?o.value=c.model:o.value[n.field]=n.value||f})})();const S=n=>{n&&n.validate(f=>{if(f)k("submit",o.value);else return!1})},i=n=>{n&&S(V.value)},H=n=>{n&&(console.log("prossss",c.model,o.value),console.log("prossss",c.model,o.value),n.resetFields())};return(n,f)=>{const t=l.resolveComponent("el-form-item"),N=l.resolveComponent("el-button"),K=l.resolveComponent("el-radio"),U=l.resolveComponent("el-radio-group"),x=l.resolveComponent("el-option"),C=l.resolveComponent("el-select"),y=l.resolveComponent("el-input"),W=l.resolveComponent("el-checkbox"),Y=l.resolveComponent("el-checkbox-group"),Z=l.resolveComponent("el-date-picker"),I=l.resolveComponent("el-form"),O=l.resolveComponent("el-card");return l.openBlock(),l.createBlock(O,{class:"mb-5"},{default:l.withCtx(()=>[l.createVNode(I,l.mergeProps({onSubmit:f[3]||(f[3]=l.withModifiers(()=>{},["prevent"])),model:o.value},h.value,{"label-position":h.value.labelPosition,ref_key:"formRef",ref:V}),{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(n.fieldList,(e,M)=>(l.openBlock(),l.createElementBlock("div",{key:M,class:l.normalizeClass(e.type==="title"||e.type==="address"?"form-item-title":"form-item")},[e.type==="title"?(l.openBlock(),l.createBlock(t,{key:0},{default:l.withCtx(()=>[l.createElementVNode("div",P,[F,l.createElementVNode("span",E,l.toDisplayString(e.title),1)])]),_:2},1024)):e.type==="address"?(l.openBlock(),l.createBlock(t,{key:1,rules:e.rules,prop:[e.field],class:"container-address"},{default:l.withCtx(()=>[l.createVNode(N,{style:{"margin-bottom":"20px","margin-right":"60px"},onClick:n.downLoad},{default:l.withCtx(()=>[L,l.createTextVNode(" 載入已有地址 ")]),_:1},8,["onClick"]),l.createVNode(U,{style:{"margin-bottom":"20px"},modelValue:o.value[e.field.addressLang],"onUpdate:modelValue":a=>o.value[e.field.addressLang]=a,disabled:e.disabled},{default:l.withCtx(()=>{var a;return[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList((a=e.optionsLang)==null?void 0:a.data,d=>{var r,s;return l.openBlock(),l.createBlock(K,{label:d[((r=e.optionsLang)==null?void 0:r.valueKey)||"value"],size:"large",key:d[((s=e.optionsLang)==null?void 0:s.valueKey)||"value"]},{default:l.withCtx(()=>{var p;return[l.createTextVNode(l.toDisplayString(d[((p=e.optionsLang)==null?void 0:p.labelkey)||"label"]),1)]}),_:2},1032,["label"])}),128))]}),_:2},1032,["modelValue","onUpdate:modelValue","disabled"]),l.createElementVNode("div",m,[l.createVNode(t,{rules:e.rules.addressNation,prop:[e.field.addressNation],style:{display:"inline-block!important","margin-right":"40px",width:"20%"}},{default:l.withCtx(()=>{var a;return[l.createVNode(C,{modelValue:o.value[e.field.addressNation],"onUpdate:modelValue":d=>o.value[e.field.addressNation]=d,placeholder:((a=e.optionsSelectNation)==null?void 0:a.placeholder)||"请选择",clearable:e.clearable},{default:l.withCtx(()=>{var d;return[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList((d=e.optionsSelectNation)==null?void 0:d.data,r=>{var s,p,u;return l.openBlock(),l.createBlock(x,{key:r[((s=e.optionsSelectNation)==null?void 0:s.valueKey)||"value"],label:r[((p=e.optionsSelectNation)==null?void 0:p.labelkey)||"label"],value:r[((u=e.optionsSelectNation)==null?void 0:u.valueKey)||"value"]},null,8,["label","value"])}),128))]}),_:2},1032,["modelValue","onUpdate:modelValue","placeholder","clearable"])]}),_:2},1032,["rules","prop"]),l.createVNode(t,{rules:e.rules.addressCity,prop:[e.field.addressCity],style:{display:"inline-block!important","margin-right":"40px",width:"20%"}},{default:l.withCtx(()=>{var a;return[l.createVNode(C,{modelValue:o.value[e.field.addressCity],"onUpdate:modelValue":d=>o.value[e.field.addressCity]=d,placeholder:((a=e.optionsSelectCity)==null?void 0:a.placeholder)||"请选择",clearable:e.clearable},{default:l.withCtx(()=>{var d;return[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList((d=e.optionsSelectCity)==null?void 0:d.data,r=>{var s,p,u;return l.openBlock(),l.createBlock(x,{key:r[((s=e.optionsSelectCity)==null?void 0:s.valueKey)||"value"],label:r[((p=e.optionsSelectCity)==null?void 0:p.labelkey)||"label"],value:r[((u=e.optionsSelectCity)==null?void 0:u.valueKey)||"value"]},null,8,["label","value"])}),128))]}),_:2},1032,["modelValue","onUpdate:modelValue","placeholder","clearable"])]}),_:2},1032,["rules","prop"]),l.createVNode(t,{rules:e.rules.addressArea,prop:[e.field.addressArea],style:{display:"inline-block!important","margin-right":"40px",width:"20%"}},{default:l.withCtx(()=>{var a;return[l.createVNode(C,{modelValue:o.value[e.field.addressArea],"onUpdate:modelValue":d=>o.value[e.field.addressArea]=d,placeholder:((a=e.optionsSelectArea)==null?void 0:a.placeholder)||"请选择",clearable:e.clearable},{default:l.withCtx(()=>{var d;return[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList((d=e.optionsSelectArea)==null?void 0:d.data,r=>{var s,p,u;return l.openBlock(),l.createBlock(x,{key:r[((s=e.optionsSelectArea)==null?void 0:s.valueKey)||"value"],label:r[((p=e.optionsSelectArea)==null?void 0:p.labelkey)||"label"],value:r[((u=e.optionsSelectArea)==null?void 0:u.valueKey)||"value"]},null,8,["label","value"])}),128))]}),_:2},1032,["modelValue","onUpdate:modelValue","placeholder","clearable"])]}),_:2},1032,["rules","prop"]),l.createVNode(t,{rules:e.rules.addressAreaC,prop:[e.field.addressAreaC],style:{display:"inline-block!important","margin-right":"40px",width:"20%"}},{default:l.withCtx(()=>{var a;return[l.createVNode(C,{modelValue:o.value[e.field.addressAreaC],"onUpdate:modelValue":d=>o.value[e.field.addressAreaC]=d,placeholder:((a=e.optionsSelectAreaC)==null?void 0:a.placeholder)||"请选择",clearable:e.clearable},{default:l.withCtx(()=>{var d;return[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList((d=e.optionsSelectAreaC)==null?void 0:d.data,r=>{var s,p,u;return l.openBlock(),l.createBlock(x,{key:r[((s=e.optionsSelectAreaC)==null?void 0:s.valueKey)||"value"],label:r[((p=e.optionsSelectAreaC)==null?void 0:p.labelkey)||"label"],value:r[((u=e.optionsSelectAreaC)==null?void 0:u.valueKey)||"value"]},null,8,["label","value"])}),128))]}),_:2},1032,["modelValue","onUpdate:modelValue","placeholder","clearable"])]}),_:2},1032,["rules","prop"])]),l.createVNode(t,{rules:e.rules.addressStreet,prop:[e.field.addressStreet],class:"item-address"},{default:l.withCtx(()=>[l.createVNode(y,{modelValue:o.value[e.field.addressStreet],"onUpdate:modelValue":a=>o.value[e.field.addressStreet]=a,readonly:e.readonly,type:e.type??"text",placeholder:e.field.placeholderAddressStreet,disabled:e.disabled,showPassword:e.showPassword,clearable:e.clearable,onKeyup:l.withKeys(a=>i(e.enterable),["enter"])},null,8,["modelValue","onUpdate:modelValue","readonly","type","placeholder","disabled","showPassword","clearable","onKeyup"])]),_:2},1032,["rules","prop"]),l.createVNode(t,{rules:e.rules.addressHouse,prop:[e.field.addressHouse],class:"item-address"},{default:l.withCtx(()=>[l.createVNode(y,{modelValue:o.value[e.field.addressHouse],"onUpdate:modelValue":a=>o.value[e.field.addressHouse]=a,readonly:e.readonly,type:e.type??"text",placeholder:e.field.placeholderAddressHouse,disabled:e.disabled,showPassword:e.showPassword,clearable:e.clearable,onKeyup:l.withKeys(a=>i(e.enterable),["enter"])},null,8,["modelValue","onUpdate:modelValue","readonly","type","placeholder","disabled","showPassword","clearable","onKeyup"])]),_:2},1032,["rules","prop"]),l.createVNode(t,{rules:e.rules.addressMansion,prop:[e.field.addressMansion],class:"item-address"},{default:l.withCtx(()=>[l.createVNode(y,{class:"item-address",modelValue:o.value[e.field.addressMansion],"onUpdate:modelValue":a=>o.value[e.field.addressMansion]=a,readonly:e.readonly,type:e.type??"text",placeholder:e.field.placeholderAddressMansion,disabled:e.disabled,showPassword:e.showPassword,clearable:e.clearable,onKeyup:l.withKeys(a=>i(e.enterable),["enter"])},null,8,["modelValue","onUpdate:modelValue","readonly","type","placeholder","disabled","showPassword","clearable","onKeyup"])]),_:2},1032,["rules","prop"]),o.value.addressLang=="1"?(l.openBlock(),l.createElementBlock("div",z,[l.createVNode(t,{rules:e.rules.block,prop:[e.field.block],style:{display:"inline-block!important",width:"24%"}},{default:l.withCtx(()=>[l.createVNode(y,{modelValue:o.value[e.field.block],"onUpdate:modelValue":a=>o.value[e.field.block]=a,readonly:e.readonly,type:e.type??"text",placeholder:e.field.placeholderBlock,disabled:e.disabled,showPassword:e.showPassword,clearable:e.clearable,onKeyup:l.withKeys(a=>i(e.enterable),["enter"])},null,8,["modelValue","onUpdate:modelValue","readonly","type","placeholder","disabled","showPassword","clearable","onKeyup"])]),_:2},1032,["rules","prop"]),l.createTextVNode(" 座 "),l.createVNode(t,{rules:e.rules.floor,prop:[e.field.floor],style:{display:"inline-block!important",width:"24%","margin-left":"60px"}},{default:l.withCtx(()=>[l.createVNode(y,{modelValue:o.value[e.field.floor],"onUpdate:modelValue":a=>o.value[e.field.floor]=a,readonly:e.readonly,type:e.type??"text",placeholder:e.field.placeholderFloor,disabled:e.disabled,showPassword:e.showPassword,clearable:e.clearable,onKeyup:l.withKeys(a=>i(e.enterable),["enter"])},null,8,["modelValue","onUpdate:modelValue","readonly","type","placeholder","disabled","showPassword","clearable","onKeyup"])]),_:2},1032,["rules","prop"]),l.createTextVNode(" 樓 "),l.createVNode(t,{rules:e.rules.flat,prop:[e.field.flat],style:{display:"inline-block!important",width:"24%","margin-left":"60px"}},{default:l.withCtx(()=>[l.createVNode(y,{modelValue:o.value[e.field.flat],"onUpdate:modelValue":a=>o.value[e.field.flat]=a,readonly:e.readonly,type:e.type??"text",placeholder:e.field.placeholderFlat,disabled:e.disabled,showPassword:e.showPassword,clearable:e.clearable,onKeyup:l.withKeys(a=>i(e.enterable),["enter"])},null,8,["modelValue","onUpdate:modelValue","readonly","type","placeholder","disabled","showPassword","clearable","onKeyup"])]),_:2},1032,["rules","prop"]),l.createTextVNode(" 室 ")])):l.createCommentVNode("",!0),o.value.addressLang=="2"?(l.openBlock(),l.createElementBlock("div",T,[l.createVNode(t,{rules:e.rules.block,prop:[e.field.block],style:{display:"inline-block!important",width:"24%"}},{default:l.withCtx(()=>[l.createVNode(y,{modelValue:o.value[e.field.block],"onUpdate:modelValue":a=>o.value[e.field.block]=a,readonly:e.readonly,type:e.type??"text",placeholder:e.field.placeholderBlock,disabled:e.disabled,showPassword:e.showPassword,clearable:e.clearable,onKeyup:l.withKeys(a=>i(e.enterable),["enter"])},null,8,["modelValue","onUpdate:modelValue","readonly","type","placeholder","disabled","showPassword","clearable","onKeyup"])]),_:2},1032,["rules","prop"]),l.createTextVNode(" Block "),l.createVNode(t,{rules:e.rules.floor,prop:[e.field.floor],style:{display:"inline-block!important",width:"24%","margin-left":"60px"}},{default:l.withCtx(()=>[l.createVNode(y,{modelValue:o.value[e.field.floor],"onUpdate:modelValue":a=>o.value[e.field.floor]=a,readonly:e.readonly,type:e.type??"text",placeholder:e.rules.placeholderFloor,disabled:e.disabled,showPassword:e.showPassword,clearable:e.clearable,onKeyup:l.withKeys(a=>i(e.enterable),["enter"])},null,8,["modelValue","onUpdate:modelValue","readonly","type","placeholder","disabled","showPassword","clearable","onKeyup"])]),_:2},1032,["rules","prop"]),l.createTextVNode(" Floor "),l.createVNode(t,{rules:e.rules.flat,prop:[e.field.flat],style:{display:"inline-block!important",width:"24%","margin-left":"60px"}},{default:l.withCtx(()=>[l.createVNode(y,{modelValue:o.value[e.field.flat],"onUpdate:modelValue":a=>o.value[e.field.flat]=a,readonly:e.readonly,type:e.type??"text",placeholder:e.rules.placeholderFlat,disabled:e.disabled,showPassword:e.showPassword,clearable:e.clearable,onKeyup:l.withKeys(a=>i(e.enterable),["enter"])},null,8,["modelValue","onUpdate:modelValue","readonly","type","placeholder","disabled","showPassword","clearable","onKeyup"])]),_:2},1032,["rules","prop"]),l.createTextVNode(" Flat ")])):l.createCommentVNode("",!0)]),_:2},1032,["rules","prop"])):e.type==="name"?(l.openBlock(),l.createBlock(t,{key:2,label:e.label,class:"container"},{default:l.withCtx(()=>[l.createVNode(t,{rules:e.rules.nameEnFamily,prop:[e.field.nameEnFamily],class:"item-name"},{default:l.withCtx(()=>[l.createVNode(y,{modelValue:o.value[e.field.nameEnFamily],"onUpdate:modelValue":a=>o.value[e.field.nameEnFamily]=a,readonly:e.readonly,type:e.type??"text",placeholder:e.placeholderNameEnFamily,disabled:e.disabled,onKeyup:l.withKeys(a=>i(e.enterable),["enter"])},null,8,["modelValue","onUpdate:modelValue","readonly","type","placeholder","disabled","onKeyup"])]),_:2},1032,["rules","prop"]),l.createVNode(t,{rules:e.rules.nameChFamily,prop:[e.field.nameChFamily],class:"item-name"},{default:l.withCtx(()=>[l.createVNode(y,{modelValue:o.value[e.field.nameChFamily],"onUpdate:modelValue":a=>o.value[e.field.nameChFamily]=a,readonly:e.readonly,type:e.type??"text",placeholder:e.placeholderNameChFamily,disabled:e.disabled,onKeyup:l.withKeys(a=>i(e.enterable),["enter"])},null,8,["modelValue","onUpdate:modelValue","readonly","type","placeholder","disabled","onKeyup"])]),_:2},1032,["rules","prop"]),l.createVNode(t,{rules:e.rules.nameEn,prop:[e.field.nameEn],class:"item-name"},{default:l.withCtx(()=>[l.createVNode(y,{modelValue:o.value[e.field.nameEn],"onUpdate:modelValue":a=>o.value[e.field.nameEn]=a,readonly:e.readonly,type:e.type??"text",placeholder:e.placeholderNameEn,disabled:e.disabled,onKeyup:l.withKeys(a=>i(e.enterable),["enter"])},null,8,["modelValue","onUpdate:modelValue","readonly","type","placeholder","disabled","onKeyup"])]),_:2},1032,["rules","prop"]),l.createVNode(t,{rules:e.rules.nameCh,prop:[e.field.nameCh],class:"item-name"},{default:l.withCtx(()=>[l.createVNode(y,{modelValue:o.value[e.field.nameCh],"onUpdate:modelValue":a=>o.value[e.field.nameCh]=a,readonly:e.readonly,type:e.type??"text",placeholder:e.placeholderNameCh,disabled:e.disabled,onKeyup:l.withKeys(a=>i(e.enterable),["enter"])},null,8,["modelValue","onUpdate:modelValue","readonly","type","placeholder","disabled","onKeyup"])]),_:2},1032,["rules","prop"])]),_:2},1032,["label"])):e.type==="gender"?(l.openBlock(),l.createBlock(t,{key:3,label:e.label,rules:e.rules,prop:[e.field]},{default:l.withCtx(()=>[l.createVNode(U,{modelValue:o.value[e.field],"onUpdate:modelValue":a=>o.value[e.field]=a,disabled:e.disabled},{default:l.withCtx(()=>{var a;return[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList((a=e.options)==null?void 0:a.data,d=>{var r,s;return l.openBlock(),l.createBlock(K,{label:d[((r=e.options)==null?void 0:r.valueKey)||"value"],size:"large",key:d[((s=e.options)==null?void 0:s.valueKey)||"value"]},{default:l.withCtx(()=>[l.createElementVNode("img",{src:d.label==="男"?"../../public/man.png":"../../public/woman.png",style:{width:"44px",height:"44px","margin-right":"4px"},alt:""},null,8,G)]),_:2},1032,["label"])}),128))]}),_:2},1032,["modelValue","onUpdate:modelValue","disabled"])]),_:2},1032,["label","rules","prop"])):e.type==="radio"?(l.openBlock(),l.createBlock(t,{key:4,label:e.label,rules:e.rules,prop:[e.field]},{default:l.withCtx(()=>[l.createVNode(U,{modelValue:o.value[e.field],"onUpdate:modelValue":a=>o.value[e.field]=a,disabled:e.disabled},{default:l.withCtx(()=>{var a;return[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList((a=e.options)==null?void 0:a.data,d=>{var r,s;return l.openBlock(),l.createBlock(K,{label:d[((r=e.options)==null?void 0:r.valueKey)||"value"],size:"large",key:d[((s=e.options)==null?void 0:s.valueKey)||"value"]},{default:l.withCtx(()=>{var p;return[l.createTextVNode(l.toDisplayString(d[((p=e.options)==null?void 0:p.labelkey)||"label"]),1)]}),_:2},1032,["label"])}),128))]}),_:2},1032,["modelValue","onUpdate:modelValue","disabled"])]),_:2},1032,["label","rules","prop"])):e.type==="checkbox"?(l.openBlock(),l.createBlock(t,{key:5,label:e.label,rules:e.rules,prop:[e.field]},{default:l.withCtx(()=>[l.createVNode(Y,{modelValue:o.value[e.field],"onUpdate:modelValue":a=>o.value[e.field]=a,disabled:e.disabled,style:l.normalizeStyle(e.ways==="row"?"display: flex; align-items: flex-start;flex-flow: row nowrap; ":"display: flex; align-items: flex-start;flex-flow: column nowrap; ")},{default:l.withCtx(()=>{var a;return[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList((a=e.options)==null?void 0:a.data,d=>{var r,s;return l.openBlock(),l.createBlock(W,{key:d[((r=e.options)==null?void 0:r.valueKey)||"value"],label:d[((s=e.options)==null?void 0:s.valueKey)||"value"]},{default:l.withCtx(()=>{var p;return[l.createTextVNode(l.toDisplayString(d[((p=e.options)==null?void 0:p.labelkey)||"label"]),1)]}),_:2},1032,["label"])}),128))]}),_:2},1032,["modelValue","onUpdate:modelValue","disabled","style"])]),_:2},1032,["label","rules","prop"])):e.type==="select"?(l.openBlock(),l.createBlock(t,{key:6,label:e.label,rules:e.rules,prop:[e.field]},{default:l.withCtx(()=>{var a;return[l.createVNode(C,{modelValue:o.value[e.field],"onUpdate:modelValue":d=>o.value[e.field]=d,placeholder:((a=e.options)==null?void 0:a.placeholder)||"请选择",clearable:e.clearable},{default:l.withCtx(()=>{var d;return[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList((d=e.options)==null?void 0:d.data,r=>{var s,p,u;return l.openBlock(),l.createBlock(x,{key:r[((s=e.options)==null?void 0:s.valueKey)||"value"],label:r[((p=e.options)==null?void 0:p.labelkey)||"label"],value:r[((u=e.options)==null?void 0:u.valueKey)||"value"]},null,8,["label","value"])}),128))]}),_:2},1032,["modelValue","onUpdate:modelValue","placeholder","clearable"])]}),_:2},1032,["label","rules","prop"])):e.type==="datetime"?(l.openBlock(),l.createBlock(t,{key:7,label:e.label,rules:e.rules,prop:[e.field]},{default:l.withCtx(()=>[l.createVNode(Z,{modelValue:o.value[e.field],"onUpdate:modelValue":a=>o.value[e.field]=a,readonly:e.readonly,type:"datetime",placeholder:e.placeholder||e.label,"default-time":n.defaultTime,"value-format":e.format||"YYYY-MM-DD HH:mm:ss"},null,8,["modelValue","onUpdate:modelValue","readonly","placeholder","default-time","value-format"])]),_:2},1032,["label","rules","prop"])):(l.openBlock(),l.createBlock(t,{key:8,label:e.label,rules:e.rules,prop:[e.field]},{default:l.withCtx(()=>[l.createVNode(y,{modelValue:o.value[e.field],"onUpdate:modelValue":a=>o.value[e.field]=a,readonly:e.readonly,type:e.type??"text",placeholder:e.placeholder||e.label,disabled:e.disabled,showPassword:e.showPassword,clearable:e.clearable,onKeyup:l.withKeys(a=>i(e.enterable),["enter"])},null,8,["modelValue","onUpdate:modelValue","readonly","type","placeholder","disabled","showPassword","clearable","onKeyup"])]),_:2},1032,["label","rules","prop"]))],2))),128)),l.createVNode(t,null,{default:l.withCtx(()=>[l.renderSlot(n.$slots,"buttons",{model:o.value,formRef:V.value},()=>[h.value.showButtonText?(l.openBlock(),l.createBlock(N,{key:0,type:"primary",onClick:f[0]||(f[0]=e=>S(V.value))},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(h.value.submitButtonText),1)]),_:1})):l.createCommentVNode("",!0),h.value.showResetButton?(l.openBlock(),l.createBlock(N,{key:1,type:"info",onClick:f[1]||(f[1]=e=>H(V.value))},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(h.value.resetButtonText),1)]),_:1})):l.createCommentVNode("",!0),h.value.showCancelButton?(l.openBlock(),l.createBlock(N,{key:2,onClick:f[2]||(f[2]=e=>k("cancel"))},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(h.value.cancelButtonText),1)]),_:1})):l.createCommentVNode("",!0)],!0)]),_:3})]),_:3},16,["model","label-position"])]),_:3})}}}),X="",B=((b,_)=>{const k=b.__vccOpts||b;for(const[c,o]of _)k[c]=o;return k})(R,[["__scopeId","data-v-f2e8b0ed"]]);function g(b,_={}){g.installed||(g.installed=!0,b.component("common-el-form",B))}return B.install=g,B});
|
package/download.png
ADDED
|
Binary file
|
package/man.png
ADDED
|
Binary file
|
package/package.json
CHANGED
package/style.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.form-item[data-v-f2e8b0ed]{width:50%;display:inline-block;padding-right:100px;box-sizing:border-box}.form-item-title[data-v-f2e8b0ed]{width:100%}.container[data-v-f2e8b0ed]{padding:10px}.item-name[data-v-f2e8b0ed]{width:50%;padding-right:10px;padding-bottom:20px;box-sizing:border-box}.container-address[data-v-f2e8b0ed]{display:flex;padding:10px}.item-address[data-v-f2e8b0ed]{width:100%;padding-right:10px;padding-bottom:20px;box-sizing:border-box}label[data-v-f2e8b0ed]{display:block}.title-left[data-v-f2e8b0ed]{border:2px solid #216FED;border-radius:2px;width:0px;height:18px;margin-right:8px}.title-content[data-v-f2e8b0ed]{font-size:16px;font-family:PingFangSC-Semibold,PingFang SC;font-weight:600;color:#2c3c4d;line-height:22px}
|
package/woman.png
ADDED
|
Binary file
|
package/README.md
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
参数介绍
|
|
2
|
-
|
|
3
|
-
Form 属性
|
|
4
|
-
|
|
5
|
-
| 参数 | 说明 | 类型 | 默认值 |
|
|
6
|
-
|-------------|------------------------------------------------|--------|--------|
|
|
7
|
-
| v-model | 表单数据,双向绑定(字段需与 prop 属性一样) | Object | - |
|
|
8
|
-
| form-column | 表单配置项,详情见下方 Column 属性 | Array | - |
|
|
9
|
-
| rules | 表单规则验证,校验规则请参考elementplus官方文档 | Array | - |
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
Column 配置项
|
|
14
|
-
|
|
15
|
-
| 参数 | 说明 | 类型 | 默认值 |
|
|
16
|
-
|---------|----------------------------------------------|--------|--------|
|
|
17
|
-
| type | 表单类型,elementplus的组件以及自己定义的组件 | String | - |
|
|
18
|
-
| label | el-form-item label 属性 | String | - |
|
|
19
|
-
| prop | el-form-item prop 属性 | String | - |
|
|
20
|
-
| field | el-form-item prop 属性 | String | - |
|
|
21
|
-
| options | elementplus的组件自定义的组件的props | Object | - |
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
Form 方法
|
|
26
|
-
|
|
27
|
-
| 事件名 | 说明 | 回调参数 |
|
|
28
|
-
|--------|--------------------------|----------|
|
|
29
|
-
| submit | 点击确认按钮拿到表单数据 | model |
|