fitful-form 0.0.6 → 0.0.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/README.md +33 -25
- package/dist/fitful-form.css +1 -1
- package/dist/types/create-form/CreateForm.vue.d.ts.map +1 -1
- package/dist/types/form/Form.vue.d.ts +1 -1
- package/dist/types/form/Form.vue.d.ts.map +1 -1
- package/dist/types/form/items/DynamicField.vue.d.ts.map +1 -1
- package/dist/types/index.d.ts +3 -3
- package/dist/types/types.d.ts +0 -1
- package/dist/types/types.d.ts.map +1 -1
- package/dist/vue-form.js +520 -398
- package/dist/vue-form.umd.cjs +1 -1
- package/package.json +1 -1
package/dist/vue-form.js
CHANGED
|
@@ -70,28 +70,28 @@ function W(e) {
|
|
|
70
70
|
}
|
|
71
71
|
//#endregion
|
|
72
72
|
//#region node_modules/lodash-es/_baseIsNative.js
|
|
73
|
-
var de = /[\\^$.*+?()[\]{}|]/g, fe = /^\[object .+?Constructor\]$/, pe = Function.prototype, me = Object.prototype, he = pe.toString, ge = me.hasOwnProperty,
|
|
74
|
-
function
|
|
75
|
-
return !H(e) || le(e) ? !1 : (oe(e) ?
|
|
73
|
+
var de = /[\\^$.*+?()[\]{}|]/g, fe = /^\[object .+?Constructor\]$/, pe = Function.prototype, me = Object.prototype, he = pe.toString, ge = me.hasOwnProperty, G = RegExp("^" + he.call(ge).replace(de, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
|
|
74
|
+
function _e(e) {
|
|
75
|
+
return !H(e) || le(e) ? !1 : (oe(e) ? G : fe).test(W(e));
|
|
76
76
|
}
|
|
77
77
|
//#endregion
|
|
78
78
|
//#region node_modules/lodash-es/_getValue.js
|
|
79
|
-
function
|
|
79
|
+
function ve(e, t) {
|
|
80
80
|
return e?.[t];
|
|
81
81
|
}
|
|
82
82
|
//#endregion
|
|
83
83
|
//#region node_modules/lodash-es/_getNative.js
|
|
84
|
-
function
|
|
85
|
-
var n =
|
|
86
|
-
return
|
|
84
|
+
function K(e, t) {
|
|
85
|
+
var n = ve(e, t);
|
|
86
|
+
return _e(n) ? n : void 0;
|
|
87
87
|
}
|
|
88
88
|
//#endregion
|
|
89
89
|
//#region node_modules/lodash-es/_WeakMap.js
|
|
90
|
-
var
|
|
90
|
+
var q = K(A, "WeakMap"), ye = Object.create, be = function() {
|
|
91
91
|
function e() {}
|
|
92
92
|
return function(t) {
|
|
93
93
|
if (!H(t)) return {};
|
|
94
|
-
if (
|
|
94
|
+
if (ye) return ye(t);
|
|
95
95
|
e.prototype = t;
|
|
96
96
|
var n = new e();
|
|
97
97
|
return e.prototype = void 0, n;
|
|
@@ -99,36 +99,36 @@ var K = G(A, "WeakMap"), be = Object.create, xe = function() {
|
|
|
99
99
|
}();
|
|
100
100
|
//#endregion
|
|
101
101
|
//#region node_modules/lodash-es/_copyArray.js
|
|
102
|
-
function
|
|
102
|
+
function xe(e, t) {
|
|
103
103
|
var n = -1, r = e.length;
|
|
104
104
|
for (t ||= Array(r); ++n < r;) t[n] = e[n];
|
|
105
105
|
return t;
|
|
106
106
|
}
|
|
107
107
|
//#endregion
|
|
108
108
|
//#region node_modules/lodash-es/_defineProperty.js
|
|
109
|
-
var
|
|
109
|
+
var Se = function() {
|
|
110
110
|
try {
|
|
111
|
-
var e =
|
|
111
|
+
var e = K(Object, "defineProperty");
|
|
112
112
|
return e({}, "", {}), e;
|
|
113
113
|
} catch {}
|
|
114
114
|
}();
|
|
115
115
|
//#endregion
|
|
116
116
|
//#region node_modules/lodash-es/_arrayEach.js
|
|
117
|
-
function
|
|
117
|
+
function Ce(e, t) {
|
|
118
118
|
for (var n = -1, r = e == null ? 0 : e.length; ++n < r && t(e[n], n, e) !== !1;);
|
|
119
119
|
return e;
|
|
120
120
|
}
|
|
121
121
|
//#endregion
|
|
122
122
|
//#region node_modules/lodash-es/_isIndex.js
|
|
123
|
-
var
|
|
124
|
-
function
|
|
123
|
+
var we = 9007199254740991, Te = /^(?:0|[1-9]\d*)$/;
|
|
124
|
+
function Ee(e, t) {
|
|
125
125
|
var n = typeof e;
|
|
126
|
-
return t ??=
|
|
126
|
+
return t ??= we, !!t && (n == "number" || n != "symbol" && Te.test(e)) && e > -1 && e % 1 == 0 && e < t;
|
|
127
127
|
}
|
|
128
128
|
//#endregion
|
|
129
129
|
//#region node_modules/lodash-es/_baseAssignValue.js
|
|
130
|
-
function
|
|
131
|
-
t == "__proto__" &&
|
|
130
|
+
function De(e, t, n) {
|
|
131
|
+
t == "__proto__" && Se ? Se(e, t, {
|
|
132
132
|
configurable: !0,
|
|
133
133
|
enumerable: !0,
|
|
134
134
|
value: n,
|
|
@@ -137,93 +137,93 @@ function Oe(e, t, n) {
|
|
|
137
137
|
}
|
|
138
138
|
//#endregion
|
|
139
139
|
//#region node_modules/lodash-es/eq.js
|
|
140
|
-
function
|
|
140
|
+
function Oe(e, t) {
|
|
141
141
|
return e === t || e !== e && t !== t;
|
|
142
142
|
}
|
|
143
143
|
//#endregion
|
|
144
144
|
//#region node_modules/lodash-es/_assignValue.js
|
|
145
|
-
var
|
|
146
|
-
function
|
|
145
|
+
var ke = Object.prototype.hasOwnProperty;
|
|
146
|
+
function Ae(e, t, n) {
|
|
147
147
|
var r = e[t];
|
|
148
|
-
(!(
|
|
148
|
+
(!(ke.call(e, t) && Oe(r, n)) || n === void 0 && !(t in e)) && De(e, t, n);
|
|
149
149
|
}
|
|
150
150
|
//#endregion
|
|
151
151
|
//#region node_modules/lodash-es/_copyObject.js
|
|
152
|
-
function
|
|
152
|
+
function J(e, t, n, r) {
|
|
153
153
|
var i = !n;
|
|
154
154
|
n ||= {};
|
|
155
155
|
for (var a = -1, o = t.length; ++a < o;) {
|
|
156
156
|
var s = t[a], c = r ? r(n[s], e[s], s, n, e) : void 0;
|
|
157
|
-
c === void 0 && (c = e[s]), i ?
|
|
157
|
+
c === void 0 && (c = e[s]), i ? De(n, s, c) : Ae(n, s, c);
|
|
158
158
|
}
|
|
159
159
|
return n;
|
|
160
160
|
}
|
|
161
161
|
//#endregion
|
|
162
162
|
//#region node_modules/lodash-es/isLength.js
|
|
163
|
-
var
|
|
164
|
-
function
|
|
165
|
-
return typeof e == "number" && e > -1 && e % 1 == 0 && e <=
|
|
163
|
+
var je = 9007199254740991;
|
|
164
|
+
function Me(e) {
|
|
165
|
+
return typeof e == "number" && e > -1 && e % 1 == 0 && e <= je;
|
|
166
166
|
}
|
|
167
167
|
//#endregion
|
|
168
168
|
//#region node_modules/lodash-es/isArrayLike.js
|
|
169
|
-
function
|
|
170
|
-
return e != null &&
|
|
169
|
+
function Ne(e) {
|
|
170
|
+
return e != null && Me(e.length) && !oe(e);
|
|
171
171
|
}
|
|
172
172
|
//#endregion
|
|
173
173
|
//#region node_modules/lodash-es/_isPrototype.js
|
|
174
|
-
var
|
|
175
|
-
function
|
|
174
|
+
var Pe = Object.prototype;
|
|
175
|
+
function Fe(e) {
|
|
176
176
|
var t = e && e.constructor;
|
|
177
|
-
return e === (typeof t == "function" && t.prototype ||
|
|
177
|
+
return e === (typeof t == "function" && t.prototype || Pe);
|
|
178
178
|
}
|
|
179
179
|
//#endregion
|
|
180
180
|
//#region node_modules/lodash-es/_baseTimes.js
|
|
181
|
-
function
|
|
181
|
+
function Ie(e, t) {
|
|
182
182
|
for (var n = -1, r = Array(e); ++n < e;) r[n] = t(n);
|
|
183
183
|
return r;
|
|
184
184
|
}
|
|
185
185
|
//#endregion
|
|
186
186
|
//#region node_modules/lodash-es/_baseIsArguments.js
|
|
187
|
-
var
|
|
188
|
-
function
|
|
189
|
-
return B(e) && z(e) ==
|
|
187
|
+
var Le = "[object Arguments]";
|
|
188
|
+
function Re(e) {
|
|
189
|
+
return B(e) && z(e) == Le;
|
|
190
190
|
}
|
|
191
191
|
//#endregion
|
|
192
192
|
//#region node_modules/lodash-es/isArguments.js
|
|
193
|
-
var
|
|
193
|
+
var ze = Object.prototype, Be = ze.hasOwnProperty, Ve = ze.propertyIsEnumerable, He = Re(function() {
|
|
194
194
|
return arguments;
|
|
195
|
-
}()) ?
|
|
196
|
-
return B(e) &&
|
|
195
|
+
}()) ? Re : function(e) {
|
|
196
|
+
return B(e) && Be.call(e, "callee") && !Ve.call(e, "callee");
|
|
197
197
|
};
|
|
198
198
|
//#endregion
|
|
199
199
|
//#region node_modules/lodash-es/stubFalse.js
|
|
200
|
-
function
|
|
200
|
+
function Ue() {
|
|
201
201
|
return !1;
|
|
202
202
|
}
|
|
203
203
|
//#endregion
|
|
204
204
|
//#region node_modules/lodash-es/isBuffer.js
|
|
205
|
-
var
|
|
206
|
-
|
|
207
|
-
function
|
|
208
|
-
return B(e) &&
|
|
205
|
+
var We = typeof exports == "object" && exports && !exports.nodeType && exports, Ge = We && typeof module == "object" && module && !module.nodeType && module, Ke = Ge && Ge.exports === We ? A.Buffer : void 0, qe = (Ke ? Ke.isBuffer : void 0) || Ue, Je = "[object Arguments]", Ye = "[object Array]", Xe = "[object Boolean]", Ze = "[object Date]", Qe = "[object Error]", $e = "[object Function]", et = "[object Map]", tt = "[object Number]", nt = "[object Object]", rt = "[object RegExp]", it = "[object Set]", at = "[object String]", ot = "[object WeakMap]", st = "[object ArrayBuffer]", ct = "[object DataView]", lt = "[object Float32Array]", ut = "[object Float64Array]", dt = "[object Int8Array]", ft = "[object Int16Array]", pt = "[object Int32Array]", mt = "[object Uint8Array]", ht = "[object Uint8ClampedArray]", gt = "[object Uint16Array]", _t = "[object Uint32Array]", Y = {};
|
|
206
|
+
Y[lt] = Y[ut] = Y[dt] = Y[ft] = Y[pt] = Y[mt] = Y[ht] = Y[gt] = Y[_t] = !0, Y[Je] = Y[Ye] = Y[st] = Y[Xe] = Y[ct] = Y[Ze] = Y[Qe] = Y[$e] = Y[et] = Y[tt] = Y[nt] = Y[rt] = Y[it] = Y[at] = Y[ot] = !1;
|
|
207
|
+
function vt(e) {
|
|
208
|
+
return B(e) && Me(e.length) && !!Y[z(e)];
|
|
209
209
|
}
|
|
210
210
|
//#endregion
|
|
211
211
|
//#region node_modules/lodash-es/_baseUnary.js
|
|
212
|
-
function
|
|
212
|
+
function yt(e) {
|
|
213
213
|
return function(t) {
|
|
214
214
|
return e(t);
|
|
215
215
|
};
|
|
216
216
|
}
|
|
217
217
|
//#endregion
|
|
218
218
|
//#region node_modules/lodash-es/_nodeUtil.js
|
|
219
|
-
var
|
|
219
|
+
var bt = typeof exports == "object" && exports && !exports.nodeType && exports, xt = bt && typeof module == "object" && module && !module.nodeType && module, St = xt && xt.exports === bt && O.process, Ct = function() {
|
|
220
220
|
try {
|
|
221
|
-
return
|
|
221
|
+
return xt && xt.require && xt.require("util").types || St && St.binding && St.binding("util");
|
|
222
222
|
} catch {}
|
|
223
|
-
}(), wt =
|
|
223
|
+
}(), wt = Ct && Ct.isTypedArray, Tt = wt ? yt(wt) : vt, Et = Object.prototype.hasOwnProperty;
|
|
224
224
|
function Dt(e, t) {
|
|
225
|
-
var n = V(e), r = !n &&
|
|
226
|
-
for (var l in e) (t || Et.call(e, l)) && !(o && (l == "length" || i && (l == "offset" || l == "parent") || a && (l == "buffer" || l == "byteLength" || l == "byteOffset") ||
|
|
225
|
+
var n = V(e), r = !n && He(e), i = !n && !r && qe(e), a = !n && !r && !i && Tt(e), o = n || r || i || a, s = o ? Ie(e.length, String) : [], c = s.length;
|
|
226
|
+
for (var l in e) (t || Et.call(e, l)) && !(o && (l == "length" || i && (l == "offset" || l == "parent") || a && (l == "buffer" || l == "byteLength" || l == "byteOffset") || Ee(l, c))) && s.push(l);
|
|
227
227
|
return s;
|
|
228
228
|
}
|
|
229
229
|
//#endregion
|
|
@@ -237,7 +237,7 @@ function Ot(e, t) {
|
|
|
237
237
|
//#region node_modules/lodash-es/_nativeKeys.js
|
|
238
238
|
var kt = Ot(Object.keys, Object), At = Object.prototype.hasOwnProperty;
|
|
239
239
|
function jt(e) {
|
|
240
|
-
if (!
|
|
240
|
+
if (!Fe(e)) return kt(e);
|
|
241
241
|
var t = [];
|
|
242
242
|
for (var n in Object(e)) At.call(e, n) && n != "constructor" && t.push(n);
|
|
243
243
|
return t;
|
|
@@ -245,7 +245,7 @@ function jt(e) {
|
|
|
245
245
|
//#endregion
|
|
246
246
|
//#region node_modules/lodash-es/keys.js
|
|
247
247
|
function Mt(e) {
|
|
248
|
-
return
|
|
248
|
+
return Ne(e) ? Dt(e) : jt(e);
|
|
249
249
|
}
|
|
250
250
|
//#endregion
|
|
251
251
|
//#region node_modules/lodash-es/_nativeKeysIn.js
|
|
@@ -259,18 +259,18 @@ function Nt(e) {
|
|
|
259
259
|
var Pt = Object.prototype.hasOwnProperty;
|
|
260
260
|
function Ft(e) {
|
|
261
261
|
if (!H(e)) return Nt(e);
|
|
262
|
-
var t =
|
|
262
|
+
var t = Fe(e), n = [];
|
|
263
263
|
for (var r in e) r == "constructor" && (t || !Pt.call(e, r)) || n.push(r);
|
|
264
264
|
return n;
|
|
265
265
|
}
|
|
266
266
|
//#endregion
|
|
267
267
|
//#region node_modules/lodash-es/keysIn.js
|
|
268
268
|
function It(e) {
|
|
269
|
-
return
|
|
269
|
+
return Ne(e) ? Dt(e, !0) : Ft(e);
|
|
270
270
|
}
|
|
271
271
|
//#endregion
|
|
272
272
|
//#region node_modules/lodash-es/_nativeCreate.js
|
|
273
|
-
var Lt =
|
|
273
|
+
var Lt = K(Object, "create");
|
|
274
274
|
//#endregion
|
|
275
275
|
//#region node_modules/lodash-es/_hashClear.js
|
|
276
276
|
function Rt() {
|
|
@@ -325,7 +325,7 @@ function qt() {
|
|
|
325
325
|
//#endregion
|
|
326
326
|
//#region node_modules/lodash-es/_assocIndexOf.js
|
|
327
327
|
function Jt(e, t) {
|
|
328
|
-
for (var n = e.length; n--;) if (
|
|
328
|
+
for (var n = e.length; n--;) if (Oe(e[n][0], t)) return n;
|
|
329
329
|
return -1;
|
|
330
330
|
}
|
|
331
331
|
//#endregion
|
|
@@ -364,7 +364,7 @@ function Z(e) {
|
|
|
364
364
|
Z.prototype.clear = qt, Z.prototype.delete = Xt, Z.prototype.get = Zt, Z.prototype.has = Qt, Z.prototype.set = $t;
|
|
365
365
|
//#endregion
|
|
366
366
|
//#region node_modules/lodash-es/_Map.js
|
|
367
|
-
var en =
|
|
367
|
+
var en = K(A, "Map");
|
|
368
368
|
//#endregion
|
|
369
369
|
//#region node_modules/lodash-es/_mapCacheClear.js
|
|
370
370
|
function tn() {
|
|
@@ -470,12 +470,12 @@ vn.prototype.clear = fn, vn.prototype.delete = pn, vn.prototype.get = mn, vn.pro
|
|
|
470
470
|
//#endregion
|
|
471
471
|
//#region node_modules/lodash-es/_baseAssign.js
|
|
472
472
|
function yn(e, t) {
|
|
473
|
-
return e &&
|
|
473
|
+
return e && J(t, Mt(t), e);
|
|
474
474
|
}
|
|
475
475
|
//#endregion
|
|
476
476
|
//#region node_modules/lodash-es/_baseAssignIn.js
|
|
477
477
|
function bn(e, t) {
|
|
478
|
-
return e &&
|
|
478
|
+
return e && J(t, It(t), e);
|
|
479
479
|
}
|
|
480
480
|
//#endregion
|
|
481
481
|
//#region node_modules/lodash-es/_cloneBuffer.js
|
|
@@ -509,7 +509,7 @@ var On = Object.prototype.propertyIsEnumerable, kn = Object.getOwnPropertySymbol
|
|
|
509
509
|
//#endregion
|
|
510
510
|
//#region node_modules/lodash-es/_copySymbols.js
|
|
511
511
|
function jn(e, t) {
|
|
512
|
-
return
|
|
512
|
+
return J(e, An(e), t);
|
|
513
513
|
}
|
|
514
514
|
//#endregion
|
|
515
515
|
//#region node_modules/lodash-es/_getSymbolsIn.js
|
|
@@ -520,7 +520,7 @@ var Mn = Object.getOwnPropertySymbols ? function(e) {
|
|
|
520
520
|
//#endregion
|
|
521
521
|
//#region node_modules/lodash-es/_copySymbolsIn.js
|
|
522
522
|
function Nn(e, t) {
|
|
523
|
-
return
|
|
523
|
+
return J(e, Mn(e), t);
|
|
524
524
|
}
|
|
525
525
|
//#endregion
|
|
526
526
|
//#region node_modules/lodash-es/_baseGetAllKeys.js
|
|
@@ -540,8 +540,8 @@ function In(e) {
|
|
|
540
540
|
}
|
|
541
541
|
//#endregion
|
|
542
542
|
//#region node_modules/lodash-es/_DataView.js
|
|
543
|
-
var Ln =
|
|
544
|
-
(Ln && Q(new Ln(/* @__PURE__ */ new ArrayBuffer(1))) != Gn || en && Q(new en()) != Bn || Rn && Q(Rn.resolve()) != Hn || zn && Q(new zn()) != Un ||
|
|
543
|
+
var Ln = K(A, "DataView"), Rn = K(A, "Promise"), zn = K(A, "Set"), Bn = "[object Map]", Vn = "[object Object]", Hn = "[object Promise]", Un = "[object Set]", Wn = "[object WeakMap]", Gn = "[object DataView]", Kn = W(Ln), qn = W(en), Jn = W(Rn), Yn = W(zn), Xn = W(q), Q = z;
|
|
544
|
+
(Ln && Q(new Ln(/* @__PURE__ */ new ArrayBuffer(1))) != Gn || en && Q(new en()) != Bn || Rn && Q(Rn.resolve()) != Hn || zn && Q(new zn()) != Un || q && Q(new q()) != Wn) && (Q = function(e) {
|
|
545
545
|
var t = z(e), n = t == Vn ? e.constructor : void 0, r = n ? W(n) : "";
|
|
546
546
|
if (r) switch (r) {
|
|
547
547
|
case Kn: return Gn;
|
|
@@ -621,7 +621,7 @@ function Or(e, t, n) {
|
|
|
621
621
|
//#endregion
|
|
622
622
|
//#region node_modules/lodash-es/_initCloneObject.js
|
|
623
623
|
function kr(e) {
|
|
624
|
-
return typeof e.constructor == "function" && !
|
|
624
|
+
return typeof e.constructor == "function" && !Fe(e) ? be(dn(e)) : {};
|
|
625
625
|
}
|
|
626
626
|
//#endregion
|
|
627
627
|
//#region node_modules/lodash-es/_baseIsMap.js
|
|
@@ -631,13 +631,13 @@ function jr(e) {
|
|
|
631
631
|
}
|
|
632
632
|
//#endregion
|
|
633
633
|
//#region node_modules/lodash-es/isMap.js
|
|
634
|
-
var Mr =
|
|
634
|
+
var Mr = Ct && Ct.isMap, Nr = Mr ? yt(Mr) : jr, Pr = "[object Set]";
|
|
635
635
|
function Fr(e) {
|
|
636
636
|
return B(e) && Zn(e) == Pr;
|
|
637
637
|
}
|
|
638
638
|
//#endregion
|
|
639
639
|
//#region node_modules/lodash-es/isSet.js
|
|
640
|
-
var Ir =
|
|
640
|
+
var Ir = Ct && Ct.isSet, Lr = Ir ? yt(Ir) : Fr, Rr = 1, zr = 2, Br = 4, Vr = "[object Arguments]", Hr = "[object Array]", Ur = "[object Boolean]", Wr = "[object Date]", Gr = "[object Error]", Kr = "[object Function]", qr = "[object GeneratorFunction]", Jr = "[object Map]", Yr = "[object Number]", Xr = "[object Object]", Zr = "[object RegExp]", Qr = "[object Set]", $r = "[object String]", ei = "[object Symbol]", ti = "[object WeakMap]", ni = "[object ArrayBuffer]", ri = "[object DataView]", ii = "[object Float32Array]", ai = "[object Float64Array]", oi = "[object Int8Array]", si = "[object Int16Array]", ci = "[object Int32Array]", li = "[object Uint8Array]", ui = "[object Uint8ClampedArray]", di = "[object Uint16Array]", fi = "[object Uint32Array]", $ = {};
|
|
641
641
|
$[Vr] = $[Hr] = $[ni] = $[ri] = $[Ur] = $[Wr] = $[ii] = $[ai] = $[oi] = $[si] = $[ci] = $[Jr] = $[Yr] = $[Xr] = $[Zr] = $[Qr] = $[$r] = $[ei] = $[li] = $[ui] = $[di] = $[fi] = !0, $[Gr] = $[Kr] = $[ti] = !1;
|
|
642
642
|
function pi(e, t, n, r, i, a) {
|
|
643
643
|
var o, s = t & Rr, c = t & zr, l = t & Br;
|
|
@@ -645,10 +645,10 @@ function pi(e, t, n, r, i, a) {
|
|
|
645
645
|
if (!H(e)) return e;
|
|
646
646
|
var u = V(e);
|
|
647
647
|
if (u) {
|
|
648
|
-
if (o = $n(e), !s) return
|
|
648
|
+
if (o = $n(e), !s) return xe(e, o);
|
|
649
649
|
} else {
|
|
650
650
|
var d = Zn(e), f = d == Kr || d == qr;
|
|
651
|
-
if (
|
|
651
|
+
if (qe(e)) return Tn(e, s);
|
|
652
652
|
if (d == Xr || d == Vr || f && !i) {
|
|
653
653
|
if (o = c || f ? {} : kr(e), !s) return c ? Nn(e, bn(o, e)) : jn(e, yn(o, e));
|
|
654
654
|
} else {
|
|
@@ -665,8 +665,8 @@ function pi(e, t, n, r, i, a) {
|
|
|
665
665
|
o.set(i, pi(r, t, n, i, e, a));
|
|
666
666
|
});
|
|
667
667
|
var m = u ? void 0 : (l ? c ? In : Fn : c ? It : Mt)(e);
|
|
668
|
-
return
|
|
669
|
-
m && (i = r, r = e[i]),
|
|
668
|
+
return Ce(m || e, function(r, i) {
|
|
669
|
+
m && (i = r, r = e[i]), Ae(o, i, pi(r, t, n, i, e, a));
|
|
670
670
|
}), o;
|
|
671
671
|
}
|
|
672
672
|
//#endregion
|
|
@@ -679,8 +679,14 @@ function gi(e) {
|
|
|
679
679
|
//#region src/packages/form/items/DynamicField.vue?vue&type=script&setup=true&lang.ts
|
|
680
680
|
var _i = ["data-field-key"], vi = { class: "form-item-label" }, yi = {
|
|
681
681
|
key: 0,
|
|
682
|
+
class: "upload-field"
|
|
683
|
+
}, bi = {
|
|
684
|
+
key: 1,
|
|
685
|
+
class: "upload-list"
|
|
686
|
+
}, xi = ["title", "onClick"], Si = ["title"], Ci = ["onClick"], wi = {
|
|
687
|
+
key: 1,
|
|
682
688
|
class: "text-field"
|
|
683
|
-
},
|
|
689
|
+
}, Ti = /*@__PURE__*/ c({
|
|
684
690
|
name: "DynamicField",
|
|
685
691
|
__name: "DynamicField",
|
|
686
692
|
props: {
|
|
@@ -697,30 +703,110 @@ var _i = ["data-field-key"], vi = { class: "form-item-label" }, yi = {
|
|
|
697
703
|
] }
|
|
698
704
|
},
|
|
699
705
|
emits: ["update:modelValue"],
|
|
700
|
-
setup(
|
|
701
|
-
let
|
|
702
|
-
function
|
|
706
|
+
setup(c, { emit: l }) {
|
|
707
|
+
let d = c, f = l;
|
|
708
|
+
function p(e, t) {
|
|
709
|
+
if (typeof e == "string") return e;
|
|
710
|
+
if (!e || typeof e != "object") return "";
|
|
711
|
+
let n = e;
|
|
712
|
+
for (let e of t) {
|
|
713
|
+
let t = n[e];
|
|
714
|
+
if (typeof t == "string" && t) return t;
|
|
715
|
+
}
|
|
716
|
+
for (let e of [
|
|
717
|
+
"response",
|
|
718
|
+
"upload",
|
|
719
|
+
"raw"
|
|
720
|
+
]) {
|
|
721
|
+
let r = n[e], i = p(r, t);
|
|
722
|
+
if (i) return i;
|
|
723
|
+
}
|
|
724
|
+
return "";
|
|
725
|
+
}
|
|
726
|
+
function h(e, t) {
|
|
727
|
+
let n = e[t];
|
|
728
|
+
return typeof n == "string" || typeof n == "number" ? n : void 0;
|
|
729
|
+
}
|
|
730
|
+
function g(e) {
|
|
731
|
+
if (typeof e == "string") return {
|
|
732
|
+
name: "",
|
|
733
|
+
url: e
|
|
734
|
+
};
|
|
735
|
+
if (!e || typeof e != "object") return {
|
|
736
|
+
name: "",
|
|
737
|
+
url: ""
|
|
738
|
+
};
|
|
739
|
+
let t = e;
|
|
740
|
+
return {
|
|
741
|
+
id: h(t, "id"),
|
|
742
|
+
uid: h(t, "uid"),
|
|
743
|
+
name: p(t, [
|
|
744
|
+
"name",
|
|
745
|
+
"originalName",
|
|
746
|
+
"fileName"
|
|
747
|
+
]) || "文件",
|
|
748
|
+
url: p(t, [
|
|
749
|
+
"url",
|
|
750
|
+
"src",
|
|
751
|
+
"path"
|
|
752
|
+
]),
|
|
753
|
+
uploadType: p(t, ["uploadType"]),
|
|
754
|
+
mimeType: p(t, [
|
|
755
|
+
"mimeType",
|
|
756
|
+
"type",
|
|
757
|
+
"contentType"
|
|
758
|
+
])
|
|
759
|
+
};
|
|
760
|
+
}
|
|
761
|
+
function x(e) {
|
|
762
|
+
return Array.isArray(e) ? e.map((e) => g(e)) : typeof e == "string" && e || e && typeof e == "object" ? [g(e)] : [];
|
|
763
|
+
}
|
|
764
|
+
function w(e) {
|
|
765
|
+
let t = `${e.uploadType ?? ""} ${e.mimeType ?? ""}`.toLowerCase(), n = `${e.name} ${e.url}`.toLowerCase();
|
|
766
|
+
return t.includes("image/") || t === "image" || /\.(png|jpe?g|gif|webp|bmp|svg|avif|heic|heif)(?:[?#].*)?$/.test(n);
|
|
767
|
+
}
|
|
768
|
+
function T(e, t) {
|
|
769
|
+
return String(e.uid ?? e.id ?? `${e.url}-${t}`);
|
|
770
|
+
}
|
|
771
|
+
function E(e) {
|
|
772
|
+
return I.value.slice(0, e).filter((e) => !!e.url && w(e)).length;
|
|
773
|
+
}
|
|
774
|
+
function D(e) {
|
|
775
|
+
f("update:modelValue", e);
|
|
776
|
+
}
|
|
777
|
+
function O(e) {
|
|
778
|
+
let t = d.modelValue;
|
|
779
|
+
if (Array.isArray(t)) {
|
|
780
|
+
f("update:modelValue", t.filter((t, n) => n !== e));
|
|
781
|
+
return;
|
|
782
|
+
}
|
|
783
|
+
f("update:modelValue", []);
|
|
784
|
+
}
|
|
785
|
+
function k(e) {
|
|
786
|
+
e.url && window.open(e.url, "_blank", "noopener,noreferrer");
|
|
787
|
+
}
|
|
788
|
+
function A(e, t = d.child.options ?? []) {
|
|
703
789
|
for (let n of t) {
|
|
704
790
|
if (!n || typeof n != "object") continue;
|
|
705
791
|
let t = n.value ?? n.key ?? n;
|
|
706
792
|
if (Object.is(t, e)) return String(n.label ?? e);
|
|
707
793
|
if (t && typeof t == "object" && e && typeof e == "object") {
|
|
708
|
-
let r =
|
|
794
|
+
let r = d.child.valueKey ?? "value";
|
|
709
795
|
if (t[r] === e[r]) return String(n.label ?? e);
|
|
710
796
|
}
|
|
711
797
|
if (n.children) {
|
|
712
|
-
let t =
|
|
798
|
+
let t = A(e, n.children);
|
|
713
799
|
if (t !== null) return t;
|
|
714
800
|
}
|
|
715
801
|
}
|
|
716
802
|
return null;
|
|
717
803
|
}
|
|
718
|
-
function
|
|
804
|
+
function j(e) {
|
|
719
805
|
if (e == null || e === "") return "-";
|
|
720
806
|
if (e instanceof Date) return e.toLocaleString();
|
|
721
807
|
if (typeof e == "boolean") return e ? "是" : "否";
|
|
722
808
|
if (typeof e == "object") {
|
|
723
|
-
let t =
|
|
809
|
+
let t = A(e);
|
|
724
810
|
if (t !== null) return t;
|
|
725
811
|
try {
|
|
726
812
|
return JSON.stringify(e);
|
|
@@ -730,21 +816,24 @@ var _i = ["data-field-key"], vi = { class: "form-item-label" }, yi = {
|
|
|
730
816
|
}
|
|
731
817
|
return String(e);
|
|
732
818
|
}
|
|
733
|
-
function
|
|
734
|
-
return e.map((e) =>
|
|
819
|
+
function M(e) {
|
|
820
|
+
return e.map((e) => A(e) ?? j(e));
|
|
735
821
|
}
|
|
736
|
-
let
|
|
737
|
-
let e =
|
|
822
|
+
let N = t(() => {
|
|
823
|
+
let e = d.child.placeholder ?? R(d.child.type) ?? `${d.child.label ?? d.child.key}不能为空`, t = (d.child.rules ?? []).map((t) => {
|
|
738
824
|
let n = { ...t };
|
|
739
825
|
return n.required && !n.message && (n.message = e), n;
|
|
740
826
|
});
|
|
741
|
-
return
|
|
827
|
+
return d.child.required && !t.some((e) => e.required) && t.push({
|
|
742
828
|
required: !0,
|
|
743
829
|
message: e,
|
|
744
830
|
trigger: ["blur", "change"]
|
|
745
831
|
}), t;
|
|
746
|
-
})
|
|
747
|
-
|
|
832
|
+
}), P = t(() => !!(d.child.isText || z.value.readonly || z.value.disabled)), F = t(() => !P.value), I = t(() => x(d.modelValue ?? "")), ee = t(() => Array.isArray(d.modelValue) ? d.modelValue : []), te = t(() => I.value.filter((e) => !!e.url && w(e)).map((e) => e.url)), ne = t(() => {
|
|
833
|
+
let e = Number(d.child.limit ?? z.value.limit);
|
|
834
|
+
return Number.isFinite(e) && e > 0 ? e : Infinity;
|
|
835
|
+
}), L = t(() => I.value.length < ne.value);
|
|
836
|
+
function R(e) {
|
|
748
837
|
if ([
|
|
749
838
|
"select",
|
|
750
839
|
"cascader",
|
|
@@ -765,8 +854,8 @@ var _i = ["data-field-key"], vi = { class: "form-item-label" }, yi = {
|
|
|
765
854
|
"mention"
|
|
766
855
|
].includes(e)) return "请输入";
|
|
767
856
|
}
|
|
768
|
-
let
|
|
769
|
-
let e = { ...
|
|
857
|
+
let z = t(() => {
|
|
858
|
+
let e = { ...d.child.props ?? {} }, t = [
|
|
770
859
|
"key",
|
|
771
860
|
"label",
|
|
772
861
|
"type",
|
|
@@ -790,100 +879,159 @@ var _i = ["data-field-key"], vi = { class: "form-item-label" }, yi = {
|
|
|
790
879
|
"dictCode",
|
|
791
880
|
"utc"
|
|
792
881
|
];
|
|
793
|
-
for (let [n, r] of Object.entries(
|
|
794
|
-
if (
|
|
795
|
-
let t =
|
|
882
|
+
for (let [n, r] of Object.entries(d.child)) t.includes(n) || (e[n] = r);
|
|
883
|
+
if (d.child.placeholder === void 0 && !e.placeholder) {
|
|
884
|
+
let t = R(d.child.type);
|
|
796
885
|
t && (e.placeholder = t);
|
|
797
886
|
}
|
|
798
887
|
return e;
|
|
799
888
|
});
|
|
800
|
-
return (t,
|
|
801
|
-
let
|
|
802
|
-
return m(), n(
|
|
889
|
+
return (t, l) => {
|
|
890
|
+
let d = y("el-text"), p = y("el-image"), h = y("el-button"), g = y("el-upload"), x = y("el-tag"), A = y("el-input"), ne = y("el-option"), R = y("el-select"), B = y("el-cascader"), V = y("el-checkbox"), H = y("el-color-picker"), U = y("el-date-picker"), re = y("el-input-number"), ie = y("el-input-tag"), ae = y("el-input-otp"), oe = y("el-mention"), se = y("el-radio"), ce = y("el-radio-group"), le = y("el-rate"), ue = y("el-select-v2"), W = y("el-slider"), de = y("el-switch"), fe = y("el-time-picker"), pe = y("el-time-select"), me = y("el-transfer"), he = y("el-tree-select"), ge = y("el-form-item"), G = y("el-col");
|
|
891
|
+
return m(), n(G, {
|
|
803
892
|
class: "dynamic-field-col",
|
|
804
|
-
span:
|
|
805
|
-
offset:
|
|
893
|
+
span: c.child.span ?? 6,
|
|
894
|
+
offset: c.child.offset
|
|
806
895
|
}, {
|
|
807
896
|
default: S(() => [a("div", {
|
|
808
897
|
class: "form-node",
|
|
809
|
-
"data-field-key":
|
|
810
|
-
}, [s(
|
|
811
|
-
"label-width":
|
|
812
|
-
prop:
|
|
813
|
-
required:
|
|
814
|
-
rules:
|
|
898
|
+
"data-field-key": c.child.key
|
|
899
|
+
}, [s(ge, {
|
|
900
|
+
"label-width": c.child.labelWidth ?? c.child["label-width"],
|
|
901
|
+
prop: c.prop ?? c.child.key,
|
|
902
|
+
required: c.child.required,
|
|
903
|
+
rules: N.value
|
|
815
904
|
}, {
|
|
816
|
-
label: S(() => [a("span", vi, [v(t.$slots, "action", {}, void 0, !0), a("span", null, b(
|
|
817
|
-
default: S(() => [
|
|
905
|
+
label: S(() => [a("span", vi, [v(t.$slots, "action", {}, void 0, !0), a("span", null, b(c.child.label), 1)])]),
|
|
906
|
+
default: S(() => [c.child.type === "upload" ? (m(), i("div", yi, [
|
|
907
|
+
P.value && !I.value.length ? (m(), n(d, { key: 0 }, {
|
|
908
|
+
default: S(() => [...l[21] ||= [o("-", -1)]]),
|
|
909
|
+
_: 1
|
|
910
|
+
})) : r("", !0),
|
|
911
|
+
I.value.length ? (m(), i("div", bi, [(m(!0), i(e, null, _(I.value, (e, t) => (m(), i("div", {
|
|
912
|
+
key: T(e, t),
|
|
913
|
+
class: "upload-list-item"
|
|
914
|
+
}, [e.url ? (m(), n(p, {
|
|
915
|
+
key: 0,
|
|
916
|
+
class: "upload-list-image",
|
|
917
|
+
src: e.url,
|
|
918
|
+
alt: e.name,
|
|
919
|
+
"preview-src-list": w(e) ? te.value : [],
|
|
920
|
+
"initial-index": w(e) ? E(t) : 0,
|
|
921
|
+
fit: "cover",
|
|
922
|
+
"preview-teleported": "",
|
|
923
|
+
"z-index": 3e3
|
|
924
|
+
}, {
|
|
925
|
+
error: S(() => [a("div", {
|
|
926
|
+
class: "upload-list-file",
|
|
927
|
+
title: e.name,
|
|
928
|
+
onClick: C((t) => k(e), ["stop"])
|
|
929
|
+
}, [a("span", null, b(e.name || "文件"), 1)], 8, xi)]),
|
|
930
|
+
_: 2
|
|
931
|
+
}, 1032, [
|
|
932
|
+
"src",
|
|
933
|
+
"alt",
|
|
934
|
+
"preview-src-list",
|
|
935
|
+
"initial-index"
|
|
936
|
+
])) : (m(), i("div", {
|
|
937
|
+
key: 1,
|
|
938
|
+
class: "upload-list-file",
|
|
939
|
+
title: e.name
|
|
940
|
+
}, [a("span", null, b(e.name || "文件"), 1)], 8, Si)), F.value ? (m(), i("button", {
|
|
941
|
+
key: 2,
|
|
942
|
+
class: "upload-list-remove",
|
|
943
|
+
type: "button",
|
|
944
|
+
"aria-label": "移除文件",
|
|
945
|
+
onClick: C((e) => O(t), ["stop"])
|
|
946
|
+
}, " × ", 8, Ci)) : r("", !0)]))), 128))])) : r("", !0),
|
|
947
|
+
F.value && L.value ? (m(), n(g, u({ key: 2 }, z.value, {
|
|
948
|
+
class: "upload-field-trigger",
|
|
949
|
+
action: z.value.action ?? "#",
|
|
950
|
+
"auto-upload": z.value.autoUpload ?? !1,
|
|
951
|
+
"file-list": ee.value,
|
|
952
|
+
"show-file-list": !1,
|
|
953
|
+
"onUpdate:fileList": D
|
|
954
|
+
}), {
|
|
955
|
+
default: S(() => [s(h, null, {
|
|
956
|
+
default: S(() => [...l[22] ||= [o("上传文件", -1)]]),
|
|
957
|
+
_: 1
|
|
958
|
+
})]),
|
|
959
|
+
_: 1
|
|
960
|
+
}, 16, [
|
|
961
|
+
"action",
|
|
962
|
+
"auto-upload",
|
|
963
|
+
"file-list"
|
|
964
|
+
])) : r("", !0)
|
|
965
|
+
])) : c.child.isText ? (m(), i("div", wi, [Array.isArray(c.modelValue) ? (m(), i(e, { key: 0 }, [c.modelValue.length ? (m(!0), i(e, { key: 0 }, _(M(c.modelValue), (e, t) => (m(), n(x, {
|
|
818
966
|
key: t,
|
|
819
967
|
class: "text-field-tag"
|
|
820
968
|
}, {
|
|
821
969
|
default: S(() => [o(b(e), 1)]),
|
|
822
970
|
_: 2
|
|
823
|
-
}, 1024))), 128)) : (m(), n(
|
|
824
|
-
default: S(() => [...
|
|
971
|
+
}, 1024))), 128)) : (m(), n(d, { key: 1 }, {
|
|
972
|
+
default: S(() => [...l[23] ||= [o("-", -1)]]),
|
|
825
973
|
_: 1
|
|
826
|
-
}))], 64)) : (m(), n(
|
|
827
|
-
default: S(() => [o(b(
|
|
974
|
+
}))], 64)) : (m(), n(d, { key: 1 }, {
|
|
975
|
+
default: S(() => [o(b(j(c.modelValue)), 1)]),
|
|
828
976
|
_: 1
|
|
829
|
-
}))])) :
|
|
830
|
-
"model-value":
|
|
831
|
-
"onUpdate:modelValue":
|
|
832
|
-
}), null, 16, ["model-value"])) :
|
|
833
|
-
"model-value":
|
|
834
|
-
"value-key":
|
|
835
|
-
"onUpdate:modelValue":
|
|
977
|
+
}))])) : c.child.type === "input" ? (m(), n(A, u({ key: 2 }, z.value, {
|
|
978
|
+
"model-value": c.modelValue ?? "",
|
|
979
|
+
"onUpdate:modelValue": l[0] ||= (e) => f("update:modelValue", e)
|
|
980
|
+
}), null, 16, ["model-value"])) : c.child.type === "select" ? (m(), n(R, u({ key: 3 }, z.value, {
|
|
981
|
+
"model-value": c.modelValue,
|
|
982
|
+
"value-key": c.child.valueKey ?? "value",
|
|
983
|
+
"onUpdate:modelValue": l[1] ||= (e) => f("update:modelValue", e)
|
|
836
984
|
}), {
|
|
837
|
-
default: S(() => [(m(!0), i(e, null, _(
|
|
985
|
+
default: S(() => [(m(!0), i(e, null, _(c.child.options ?? [], (e) => (m(), n(ne, {
|
|
838
986
|
key: e.label,
|
|
839
987
|
label: e.label,
|
|
840
988
|
value: e.value
|
|
841
989
|
}, null, 8, ["label", "value"]))), 128))]),
|
|
842
990
|
_: 1
|
|
843
|
-
}, 16, ["model-value", "value-key"])) :
|
|
844
|
-
"model-value":
|
|
845
|
-
options:
|
|
846
|
-
"onUpdate:modelValue":
|
|
847
|
-
}), null, 16, ["model-value", "options"])) :
|
|
848
|
-
"model-value": !!
|
|
849
|
-
"onUpdate:modelValue":
|
|
850
|
-
}), null, 16, ["model-value"])) :
|
|
851
|
-
"model-value":
|
|
852
|
-
"onUpdate:modelValue":
|
|
853
|
-
}), null, 16, ["model-value"])) :
|
|
991
|
+
}, 16, ["model-value", "value-key"])) : c.child.type === "cascader" ? (m(), n(B, u({ key: 4 }, z.value, {
|
|
992
|
+
"model-value": c.modelValue,
|
|
993
|
+
options: c.child.options ?? [],
|
|
994
|
+
"onUpdate:modelValue": l[2] ||= (e) => f("update:modelValue", e)
|
|
995
|
+
}), null, 16, ["model-value", "options"])) : c.child.type === "checkbox" ? (m(), n(V, u({ key: 5 }, z.value, {
|
|
996
|
+
"model-value": !!c.modelValue,
|
|
997
|
+
"onUpdate:modelValue": l[3] ||= (e) => f("update:modelValue", e)
|
|
998
|
+
}), null, 16, ["model-value"])) : c.child.type === "colorPicker" ? (m(), n(H, u({ key: 6 }, z.value, {
|
|
999
|
+
"model-value": c.modelValue ?? "",
|
|
1000
|
+
"onUpdate:modelValue": l[4] ||= (e) => f("update:modelValue", e)
|
|
1001
|
+
}), null, 16, ["model-value"])) : c.child.type === "datePicker" ? (m(), n(U, u({ key: 7 }, z.value, {
|
|
854
1002
|
type: "date",
|
|
855
|
-
"model-value":
|
|
856
|
-
"onUpdate:modelValue":
|
|
857
|
-
}), null, 16, ["model-value"])) :
|
|
1003
|
+
"model-value": c.modelValue,
|
|
1004
|
+
"onUpdate:modelValue": l[5] ||= (e) => f("update:modelValue", e)
|
|
1005
|
+
}), null, 16, ["model-value"])) : c.child.type === "datetimePicker" ? (m(), n(U, u({ key: 8 }, z.value, {
|
|
858
1006
|
type: "datetime",
|
|
859
|
-
"model-value":
|
|
860
|
-
"onUpdate:modelValue":
|
|
861
|
-
}), null, 16, ["model-value"])) :
|
|
862
|
-
"model-value":
|
|
863
|
-
min:
|
|
864
|
-
max:
|
|
865
|
-
step:
|
|
866
|
-
"onUpdate:modelValue":
|
|
1007
|
+
"model-value": c.modelValue,
|
|
1008
|
+
"onUpdate:modelValue": l[6] ||= (e) => f("update:modelValue", e)
|
|
1009
|
+
}), null, 16, ["model-value"])) : c.child.type === "inputNumber" ? (m(), n(re, u({ key: 9 }, z.value, {
|
|
1010
|
+
"model-value": c.modelValue,
|
|
1011
|
+
min: c.child.min,
|
|
1012
|
+
max: c.child.max,
|
|
1013
|
+
step: c.child.step,
|
|
1014
|
+
"onUpdate:modelValue": l[7] ||= (e) => f("update:modelValue", e)
|
|
867
1015
|
}), null, 16, [
|
|
868
1016
|
"model-value",
|
|
869
1017
|
"min",
|
|
870
1018
|
"max",
|
|
871
1019
|
"step"
|
|
872
|
-
])) :
|
|
873
|
-
"model-value": Array.isArray(
|
|
874
|
-
"onUpdate:modelValue":
|
|
875
|
-
}), null, 16, ["model-value"])) :
|
|
876
|
-
"model-value":
|
|
877
|
-
"onUpdate:modelValue":
|
|
878
|
-
}), null, 16, ["model-value"])) :
|
|
879
|
-
"model-value":
|
|
880
|
-
options:
|
|
881
|
-
"onUpdate:modelValue":
|
|
882
|
-
}), null, 16, ["model-value", "options"])) :
|
|
883
|
-
"model-value":
|
|
884
|
-
"onUpdate:modelValue":
|
|
1020
|
+
])) : c.child.type === "inputTag" ? (m(), n(ie, u({ key: 10 }, z.value, {
|
|
1021
|
+
"model-value": Array.isArray(c.modelValue) ? c.modelValue : [],
|
|
1022
|
+
"onUpdate:modelValue": l[8] ||= (e) => f("update:modelValue", e)
|
|
1023
|
+
}), null, 16, ["model-value"])) : c.child.type === "inputOTP" ? (m(), n(ae, u({ key: 11 }, z.value, {
|
|
1024
|
+
"model-value": c.modelValue ?? "",
|
|
1025
|
+
"onUpdate:modelValue": l[9] ||= (e) => f("update:modelValue", e)
|
|
1026
|
+
}), null, 16, ["model-value"])) : c.child.type === "mention" ? (m(), n(oe, u({ key: 12 }, z.value, {
|
|
1027
|
+
"model-value": c.modelValue ?? "",
|
|
1028
|
+
options: c.child.options ?? [],
|
|
1029
|
+
"onUpdate:modelValue": l[10] ||= (e) => f("update:modelValue", e)
|
|
1030
|
+
}), null, 16, ["model-value", "options"])) : c.child.type === "radio" ? (m(), n(ce, u({ key: 13 }, z.value, {
|
|
1031
|
+
"model-value": c.modelValue,
|
|
1032
|
+
"onUpdate:modelValue": l[11] ||= (e) => f("update:modelValue", e)
|
|
885
1033
|
}), {
|
|
886
|
-
default: S(() => [(m(!0), i(e, null, _(
|
|
1034
|
+
default: S(() => [(m(!0), i(e, null, _(c.child.options ?? [], (e) => (m(), n(se, {
|
|
887
1035
|
key: e.value,
|
|
888
1036
|
value: e.value
|
|
889
1037
|
}, {
|
|
@@ -891,64 +1039,49 @@ var _i = ["data-field-key"], vi = { class: "form-item-label" }, yi = {
|
|
|
891
1039
|
_: 2
|
|
892
1040
|
}, 1032, ["value"]))), 128))]),
|
|
893
1041
|
_: 1
|
|
894
|
-
}, 16, ["model-value"])) :
|
|
895
|
-
"model-value":
|
|
896
|
-
"onUpdate:modelValue":
|
|
897
|
-
}), null, 16, ["model-value"])) :
|
|
898
|
-
"model-value":
|
|
899
|
-
"value-key":
|
|
900
|
-
options:
|
|
901
|
-
"onUpdate:modelValue":
|
|
1042
|
+
}, 16, ["model-value"])) : c.child.type === "rate" ? (m(), n(le, u({ key: 14 }, z.value, {
|
|
1043
|
+
"model-value": c.modelValue,
|
|
1044
|
+
"onUpdate:modelValue": l[12] ||= (e) => f("update:modelValue", e)
|
|
1045
|
+
}), null, 16, ["model-value"])) : c.child.type === "virtualizedSelect" ? (m(), n(ue, u({ key: 15 }, z.value, {
|
|
1046
|
+
"model-value": c.modelValue,
|
|
1047
|
+
"value-key": c.child.valueKey ?? "value",
|
|
1048
|
+
options: c.child.options ?? [],
|
|
1049
|
+
"onUpdate:modelValue": l[13] ||= (e) => f("update:modelValue", e)
|
|
902
1050
|
}), null, 16, [
|
|
903
1051
|
"model-value",
|
|
904
1052
|
"value-key",
|
|
905
1053
|
"options"
|
|
906
|
-
])) :
|
|
907
|
-
"model-value":
|
|
908
|
-
min:
|
|
909
|
-
max:
|
|
910
|
-
step:
|
|
911
|
-
"onUpdate:modelValue":
|
|
1054
|
+
])) : c.child.type === "slider" ? (m(), n(W, u({ key: 16 }, z.value, {
|
|
1055
|
+
"model-value": c.modelValue,
|
|
1056
|
+
min: c.child.min,
|
|
1057
|
+
max: c.child.max,
|
|
1058
|
+
step: c.child.step,
|
|
1059
|
+
"onUpdate:modelValue": l[14] ||= (e) => f("update:modelValue", e)
|
|
912
1060
|
}), null, 16, [
|
|
913
1061
|
"model-value",
|
|
914
1062
|
"min",
|
|
915
1063
|
"max",
|
|
916
1064
|
"step"
|
|
917
|
-
])) :
|
|
918
|
-
"model-value":
|
|
919
|
-
"onUpdate:modelValue":
|
|
920
|
-
}), null, 16, ["model-value"])) :
|
|
921
|
-
"model-value":
|
|
922
|
-
"onUpdate:modelValue":
|
|
923
|
-
}), null, 16, ["model-value"])) :
|
|
924
|
-
"model-value":
|
|
925
|
-
"onUpdate:modelValue":
|
|
926
|
-
}), null, 16, ["model-value"])) :
|
|
927
|
-
data:
|
|
928
|
-
"model-value": Array.isArray(
|
|
929
|
-
"onUpdate:modelValue":
|
|
930
|
-
}), null, 16, ["data", "model-value"])) :
|
|
931
|
-
"model-value":
|
|
932
|
-
data:
|
|
933
|
-
"onUpdate:modelValue":
|
|
934
|
-
}), null, 16, ["model-value", "data"])) :
|
|
935
|
-
|
|
936
|
-
"
|
|
937
|
-
"file-list": Array.isArray(r.modelValue) ? r.modelValue : [],
|
|
938
|
-
"onUpdate:fileList": c[20] ||= (e) => d("update:modelValue", e)
|
|
939
|
-
}), {
|
|
940
|
-
default: S(() => [s(V, null, {
|
|
941
|
-
default: S(() => [...c[23] ||= [o("上传文件", -1)]]),
|
|
942
|
-
_: 1
|
|
943
|
-
})]),
|
|
944
|
-
_: 1
|
|
945
|
-
}, 16, [
|
|
946
|
-
"action",
|
|
947
|
-
"auto-upload",
|
|
948
|
-
"file-list"
|
|
949
|
-
])) : (m(), n(x, u({ key: 22 }, C.value, {
|
|
950
|
-
"model-value": r.modelValue ?? "",
|
|
951
|
-
"onUpdate:modelValue": c[21] ||= (e) => d("update:modelValue", e)
|
|
1065
|
+
])) : c.child.type === "switch" ? (m(), n(de, u({ key: 17 }, z.value, {
|
|
1066
|
+
"model-value": c.modelValue,
|
|
1067
|
+
"onUpdate:modelValue": l[15] ||= (e) => f("update:modelValue", e)
|
|
1068
|
+
}), null, 16, ["model-value"])) : c.child.type === "timePicker" ? (m(), n(fe, u({ key: 18 }, z.value, {
|
|
1069
|
+
"model-value": c.modelValue,
|
|
1070
|
+
"onUpdate:modelValue": l[16] ||= (e) => f("update:modelValue", e)
|
|
1071
|
+
}), null, 16, ["model-value"])) : c.child.type === "timeSelect" ? (m(), n(pe, u({ key: 19 }, z.value, {
|
|
1072
|
+
"model-value": c.modelValue,
|
|
1073
|
+
"onUpdate:modelValue": l[17] ||= (e) => f("update:modelValue", e)
|
|
1074
|
+
}), null, 16, ["model-value"])) : c.child.type === "transfer" ? (m(), n(me, u({ key: 20 }, z.value, {
|
|
1075
|
+
data: c.child.options ?? [],
|
|
1076
|
+
"model-value": Array.isArray(c.modelValue) ? c.modelValue : [],
|
|
1077
|
+
"onUpdate:modelValue": l[18] ||= (e) => f("update:modelValue", e)
|
|
1078
|
+
}), null, 16, ["data", "model-value"])) : c.child.type === "treeSelect" ? (m(), n(he, u({ key: 21 }, z.value, {
|
|
1079
|
+
"model-value": c.modelValue,
|
|
1080
|
+
data: c.child.options ?? [],
|
|
1081
|
+
"onUpdate:modelValue": l[19] ||= (e) => f("update:modelValue", e)
|
|
1082
|
+
}), null, 16, ["model-value", "data"])) : (m(), n(A, u({ key: 22 }, z.value, {
|
|
1083
|
+
"model-value": c.modelValue ?? "",
|
|
1084
|
+
"onUpdate:modelValue": l[20] ||= (e) => f("update:modelValue", e)
|
|
952
1085
|
}), null, 16, ["model-value"]))]),
|
|
953
1086
|
_: 3
|
|
954
1087
|
}, 8, [
|
|
@@ -961,60 +1094,60 @@ var _i = ["data-field-key"], vi = { class: "form-item-label" }, yi = {
|
|
|
961
1094
|
}, 8, ["span", "offset"]);
|
|
962
1095
|
};
|
|
963
1096
|
}
|
|
964
|
-
}),
|
|
1097
|
+
}), Ei = (e, t) => {
|
|
965
1098
|
let n = e.__vccOpts || e;
|
|
966
1099
|
for (let [e, r] of t) n[e] = r;
|
|
967
1100
|
return n;
|
|
968
|
-
},
|
|
1101
|
+
}, Di = /*#__PURE__*/ Ei(Ti, [["__scopeId", "data-v-4716227b"]]);
|
|
969
1102
|
//#endregion
|
|
970
1103
|
//#region src/packages/form/linkage.ts
|
|
971
|
-
function
|
|
1104
|
+
function Oi(e) {
|
|
972
1105
|
return Array.isArray(e) ? e : e.split(".").filter(Boolean);
|
|
973
1106
|
}
|
|
974
|
-
function
|
|
1107
|
+
function ki(e, t) {
|
|
975
1108
|
let n = e;
|
|
976
|
-
for (let e of
|
|
1109
|
+
for (let e of Oi(t)) {
|
|
977
1110
|
if (!n || typeof n != "object" || !(e in n)) return;
|
|
978
1111
|
n = n[e];
|
|
979
1112
|
}
|
|
980
1113
|
return n;
|
|
981
1114
|
}
|
|
982
|
-
function
|
|
1115
|
+
function Ai(e) {
|
|
983
1116
|
return e == null || e === "" || Array.isArray(e) && e.length === 0;
|
|
984
1117
|
}
|
|
985
|
-
function
|
|
1118
|
+
function ji(e, t) {
|
|
986
1119
|
let n = typeof e == "number" ? e : Number(e), r = typeof t == "number" ? t : Number(t);
|
|
987
1120
|
return !Number.isFinite(n) || !Number.isFinite(r) ? null : n < r ? -1 : +(n > r);
|
|
988
1121
|
}
|
|
989
|
-
function
|
|
1122
|
+
function Mi(e, t) {
|
|
990
1123
|
return typeof e == "string" ? e.includes(String(t)) : Array.isArray(e) ? e.includes(t) : !1;
|
|
991
1124
|
}
|
|
992
|
-
function
|
|
993
|
-
let n = t.field ?
|
|
1125
|
+
function Ni(e, t) {
|
|
1126
|
+
let n = t.field ? ki(e.model, t.field) : e.value, r = t.value;
|
|
994
1127
|
switch (t.operator ?? "eq") {
|
|
995
1128
|
case "eq": return n === r;
|
|
996
1129
|
case "neq": return n !== r;
|
|
997
1130
|
case "in": return Array.isArray(r) && r.includes(n);
|
|
998
1131
|
case "notIn": return !Array.isArray(r) || !r.includes(n);
|
|
999
|
-
case "contains": return
|
|
1000
|
-
case "notContains": return !
|
|
1001
|
-
case "gt": return
|
|
1002
|
-
case "gte": return (
|
|
1003
|
-
case "lt": return
|
|
1004
|
-
case "lte": return (
|
|
1005
|
-
case "empty": return
|
|
1006
|
-
case "notEmpty": return !
|
|
1132
|
+
case "contains": return Mi(n, r);
|
|
1133
|
+
case "notContains": return !Mi(n, r);
|
|
1134
|
+
case "gt": return ji(n, r) === 1;
|
|
1135
|
+
case "gte": return (ji(n, r) ?? -1) >= 0;
|
|
1136
|
+
case "lt": return ji(n, r) === -1;
|
|
1137
|
+
case "lte": return (ji(n, r) ?? 1) <= 0;
|
|
1138
|
+
case "empty": return Ai(n);
|
|
1139
|
+
case "notEmpty": return !Ai(n);
|
|
1007
1140
|
default: return !1;
|
|
1008
1141
|
}
|
|
1009
1142
|
}
|
|
1010
|
-
function
|
|
1011
|
-
return typeof e == "boolean" ? e : typeof e == "function" ? e(t) === !0 :
|
|
1143
|
+
function Pi(e, t) {
|
|
1144
|
+
return typeof e == "boolean" ? e : typeof e == "function" ? e(t) === !0 : Ni(t, e);
|
|
1012
1145
|
}
|
|
1013
|
-
function
|
|
1146
|
+
function Fi(e, t) {
|
|
1014
1147
|
let n = { ...e };
|
|
1015
1148
|
return t.visible !== void 0 && (n.visible = t.visible), t.disabled !== void 0 && (n.disabled = t.disabled), t.required !== void 0 && (n.required = t.required), t.options !== void 0 && (n.options = t.options), t.value !== void 0 && (n.value = t.value), t.clearOnHide !== void 0 && (n.clearOnHide = t.clearOnHide), n;
|
|
1016
1149
|
}
|
|
1017
|
-
function
|
|
1150
|
+
function Ii(e, t, n, r, i) {
|
|
1018
1151
|
let a = r ? [...n, e.key] : n, o = {
|
|
1019
1152
|
...e,
|
|
1020
1153
|
visible: e.visible ?? !0,
|
|
@@ -1024,80 +1157,80 @@ function ji(e, t, n, r, i) {
|
|
|
1024
1157
|
e.dictCode && i[e.dictCode] && (o.options = i[e.dictCode]);
|
|
1025
1158
|
let s = {
|
|
1026
1159
|
model: t,
|
|
1027
|
-
value:
|
|
1028
|
-
getValue: (e) =>
|
|
1160
|
+
value: ki(t, a),
|
|
1161
|
+
getValue: (e) => ki(t, e)
|
|
1029
1162
|
}, c = o;
|
|
1030
|
-
for (let t of e.linkage ?? [])
|
|
1163
|
+
for (let t of e.linkage ?? []) Pi(t.when, s) && (c = Fi(c, t.effects));
|
|
1031
1164
|
delete c.linkage;
|
|
1032
1165
|
let l = c;
|
|
1033
1166
|
if (e.type === "block") {
|
|
1034
1167
|
let a = r ? [...n, e.key] : n;
|
|
1035
|
-
l.children = (e.children ?? []).map((e) =>
|
|
1168
|
+
l.children = (e.children ?? []).map((e) => Ii(e, t, a, !0, i));
|
|
1036
1169
|
}
|
|
1037
1170
|
return l;
|
|
1038
1171
|
}
|
|
1039
|
-
function
|
|
1040
|
-
return e.map((e) =>
|
|
1172
|
+
function Li(e, t, n = {}) {
|
|
1173
|
+
return e.map((e) => Ii(e, t, [], e.type !== "block", n));
|
|
1041
1174
|
}
|
|
1042
|
-
function
|
|
1175
|
+
function Ri(e, t, n, r) {
|
|
1043
1176
|
for (let i of e) {
|
|
1044
1177
|
let e = n || !i.visible;
|
|
1045
1178
|
if (i.type === "block") {
|
|
1046
|
-
|
|
1179
|
+
Ri(i.children ?? [], [...t, i.key], e, r);
|
|
1047
1180
|
continue;
|
|
1048
1181
|
}
|
|
1049
1182
|
i.type !== "slot" && e && i.clearOnHide && r.push([...t, i.key]);
|
|
1050
1183
|
}
|
|
1051
1184
|
}
|
|
1052
|
-
function
|
|
1053
|
-
let n =
|
|
1185
|
+
function zi(e, t) {
|
|
1186
|
+
let n = Li(e, t), r = [];
|
|
1054
1187
|
for (let e of n) {
|
|
1055
1188
|
if (e.type === "block") {
|
|
1056
|
-
|
|
1189
|
+
Ri(e.children ?? [], [], !e.visible, r);
|
|
1057
1190
|
continue;
|
|
1058
1191
|
}
|
|
1059
1192
|
e.type !== "slot" && !e.visible && e.clearOnHide && r.push([e.key]);
|
|
1060
1193
|
}
|
|
1061
1194
|
return r;
|
|
1062
1195
|
}
|
|
1063
|
-
function
|
|
1196
|
+
function Bi(e, t, n) {
|
|
1064
1197
|
let r = {
|
|
1065
1198
|
model: t,
|
|
1066
|
-
value:
|
|
1067
|
-
getValue: (e) =>
|
|
1199
|
+
value: ki(t, n),
|
|
1200
|
+
getValue: (e) => ki(t, e)
|
|
1068
1201
|
}, i, a = e.linkage ?? [];
|
|
1069
1202
|
for (let e = 0; e < a.length; e++) {
|
|
1070
1203
|
let t = a[e];
|
|
1071
|
-
|
|
1204
|
+
Pi(t.when, r) && t.effects.value !== void 0 && (i = {
|
|
1072
1205
|
value: t.effects.value,
|
|
1073
1206
|
ruleIndex: e
|
|
1074
1207
|
});
|
|
1075
1208
|
}
|
|
1076
1209
|
return i;
|
|
1077
1210
|
}
|
|
1078
|
-
function
|
|
1211
|
+
function Vi(e, t, n, r) {
|
|
1079
1212
|
for (let i of e) {
|
|
1080
1213
|
if (i.type === "block") {
|
|
1081
|
-
|
|
1214
|
+
Vi(i.children ?? [], t, [...n, i.key], r);
|
|
1082
1215
|
continue;
|
|
1083
1216
|
}
|
|
1084
1217
|
if (i.type === "slot") continue;
|
|
1085
|
-
let e = [...n, i.key], a =
|
|
1218
|
+
let e = [...n, i.key], a = Bi(i, t, e);
|
|
1086
1219
|
a && r.push({
|
|
1087
1220
|
path: e,
|
|
1088
1221
|
...a
|
|
1089
1222
|
});
|
|
1090
1223
|
}
|
|
1091
1224
|
}
|
|
1092
|
-
function
|
|
1225
|
+
function Hi(e, t) {
|
|
1093
1226
|
let n = [];
|
|
1094
1227
|
for (let r of e) {
|
|
1095
1228
|
if (r.type === "block") {
|
|
1096
|
-
|
|
1229
|
+
Vi(r.children ?? [], t, [], n);
|
|
1097
1230
|
continue;
|
|
1098
1231
|
}
|
|
1099
1232
|
if (r.type === "slot") continue;
|
|
1100
|
-
let e =
|
|
1233
|
+
let e = Bi(r, t, [r.key]);
|
|
1101
1234
|
e && n.push({
|
|
1102
1235
|
path: [r.key],
|
|
1103
1236
|
...e
|
|
@@ -1105,7 +1238,7 @@ function Li(e, t) {
|
|
|
1105
1238
|
}
|
|
1106
1239
|
return n;
|
|
1107
1240
|
}
|
|
1108
|
-
function
|
|
1241
|
+
function Ui(e) {
|
|
1109
1242
|
let t = /* @__PURE__ */ new Set(), n = (e) => {
|
|
1110
1243
|
for (let r of e) r.dictCode && t.add(r.dictCode), r.children && n(r.children);
|
|
1111
1244
|
};
|
|
@@ -1113,7 +1246,7 @@ function Ri(e) {
|
|
|
1113
1246
|
}
|
|
1114
1247
|
//#endregion
|
|
1115
1248
|
//#region src/packages/form/Form.vue
|
|
1116
|
-
var
|
|
1249
|
+
var Wi = /*#__PURE__*/ Ei(c({
|
|
1117
1250
|
name: "Form",
|
|
1118
1251
|
props: {
|
|
1119
1252
|
config: {
|
|
@@ -1160,7 +1293,7 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
1160
1293
|
let a = g(), o = h({}), s = h(/* @__PURE__ */ new Set()), c = t(() => ({
|
|
1161
1294
|
...o,
|
|
1162
1295
|
...e.dicts
|
|
1163
|
-
})), u = t(() =>
|
|
1296
|
+
})), u = t(() => Ui(e.config)), d = t(() => Li(e.config, e.modelValue, c.value)), f = gi(e.modelValue), m = h(/* @__PURE__ */ new Set()), _ = /* @__PURE__ */ new Map();
|
|
1164
1297
|
function v(e) {
|
|
1165
1298
|
m.has(e) ? m.delete(e) : m.add(e);
|
|
1166
1299
|
}
|
|
@@ -1253,12 +1386,12 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
1253
1386
|
}
|
|
1254
1387
|
function I() {
|
|
1255
1388
|
let t = gi(e.modelValue), r = !1, i = /* @__PURE__ */ new Map();
|
|
1256
|
-
for (let n of
|
|
1389
|
+
for (let n of Hi(e.config, e.modelValue)) {
|
|
1257
1390
|
let e = F(n.value), a = `${n.path.join("/")}:${n.ruleIndex}:${e}`;
|
|
1258
1391
|
i.set(a, e), _.get(a) !== e && k(t, n.path) !== n.value && (t = j(t, n.path, n.value), r = !0);
|
|
1259
1392
|
}
|
|
1260
1393
|
_ = i;
|
|
1261
|
-
let a =
|
|
1394
|
+
let a = zi(e.config, t);
|
|
1262
1395
|
for (let e of a) k(t, e) !== void 0 && (t = P(t, e), r = !0);
|
|
1263
1396
|
r && (f = gi(t), n("update:modelValue", t), n("change", t));
|
|
1264
1397
|
}
|
|
@@ -1310,10 +1443,10 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
1310
1443
|
modelValue: r,
|
|
1311
1444
|
"onUpdate:modelValue": (e) => N(n, e)
|
|
1312
1445
|
}, a = e.fieldAction?.(t) ?? null;
|
|
1313
|
-
return l(
|
|
1446
|
+
return l(Di, i, a ? { action: () => [a] } : void 0);
|
|
1314
1447
|
}
|
|
1315
1448
|
function H(t, n, r) {
|
|
1316
|
-
let i = [...n, t.key].join("/"), a = m.has(i), o = r ? [...n, t.key] : n, s = (t.children ?? []).map((e) => U(e, o)).filter((e) => e !== null), c = e.blockAction?.(t) ?? null, u = ["form-block-header"
|
|
1449
|
+
let i = [...n, t.key].join("/"), a = m.has(i), o = r ? [...n, t.key] : n, s = (t.children ?? []).map((e) => U(e, o)).filter((e) => e !== null), c = e.blockAction?.(t) ?? null, u = ["form-block-header"], d = l(T, {
|
|
1317
1450
|
key: `${t.key}-header`,
|
|
1318
1451
|
span: 24
|
|
1319
1452
|
}, () => [l("div", { class: u }, [l("div", { class: "form-block-header-content" }, [l("div", { class: "form-block-header-title" }, [c, t.label ? l("h3", { class: "form-block-title" }, t.label) : null].filter(Boolean)), t.description ? l("p", { class: "form-block-description" }, t.description) : null].filter(Boolean)), l("div", { class: "form-block-header-actions" }, [e.showCollapse ? l("button", {
|
|
@@ -1369,16 +1502,16 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
1369
1502
|
return l("div", { class: "form-wrapper" }, () => [i, o].filter(Boolean));
|
|
1370
1503
|
};
|
|
1371
1504
|
}
|
|
1372
|
-
}), [["__scopeId", "data-v-
|
|
1505
|
+
}), [["__scopeId", "data-v-0081d6f3"]]), Gi = { class: "create-form" }, Ki = { class: "builder-header" }, qi = { class: "header-actions" }, Ji = { class: "global-config" }, Yi = { class: "builder-grid" }, Xi = { class: "palette" }, Zi = ["onDragstart"], Qi = {
|
|
1373
1506
|
key: 0,
|
|
1374
1507
|
class: "palette-compact"
|
|
1375
|
-
},
|
|
1508
|
+
}, $i = {
|
|
1376
1509
|
key: 12,
|
|
1377
1510
|
class: "palette-compact"
|
|
1378
|
-
},
|
|
1511
|
+
}, ea = { class: "preview-header" }, ta = { class: "preview-header-actions" }, na = { class: "breadcrumb" }, ra = { key: 0 }, ia = { class: "linkage-editor" }, aa = { class: "linkage-rule-title" }, oa = { class: "linkage-when" }, sa = { class: "linkage-effects" }, ca = { class: "option-editor" }, la = {
|
|
1379
1512
|
key: 1,
|
|
1380
1513
|
class: "editor-empty"
|
|
1381
|
-
},
|
|
1514
|
+
}, ua = { class: "code-panels" }, da = { class: "code-panel" }, fa = { class: "code-panel" }, pa = /*#__PURE__*/ Ei(/* @__PURE__ */ c({
|
|
1382
1515
|
name: "CreateForm",
|
|
1383
1516
|
__name: "CreateForm",
|
|
1384
1517
|
setup(c) {
|
|
@@ -1486,7 +1619,7 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
1486
1619
|
return e === "textarea" && (r.props = {
|
|
1487
1620
|
type: "textarea",
|
|
1488
1621
|
rows: 3
|
|
1489
|
-
}), e === "block" && (r.children = [], r.border = !0, r.span = 24, r.indent = 0,
|
|
1622
|
+
}), e === "block" && (r.children = [], r.border = !0, r.span = 24, r.indent = 0, delete r.default), (e === "switch" || e === "checkbox") && (r.default = !1), (e === "inputNumber" || e === "rate" || e === "slider") && (r.default = 0), (e === "inputTag" || e === "transfer") && (r.default = []), p.includes(e) && (r.options = e === "select" || e === "radio" ? [{
|
|
1490
1623
|
label: "选项一",
|
|
1491
1624
|
value: "1"
|
|
1492
1625
|
}, {
|
|
@@ -1503,7 +1636,7 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
1503
1636
|
labelWidth: "",
|
|
1504
1637
|
border: !0,
|
|
1505
1638
|
isText: !1
|
|
1506
|
-
}), F = g(""), I = g(""), ee = t(() => T.value?.linkage ?? []), te = t(() =>
|
|
1639
|
+
}), F = g(""), I = g(""), ee = t(() => T.value?.linkage ?? []), te = t(() => Te(L.value[0]?.children ?? [])), ne = [
|
|
1507
1640
|
"eq",
|
|
1508
1641
|
"neq",
|
|
1509
1642
|
"in",
|
|
@@ -1522,7 +1655,6 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
1522
1655
|
type: "block",
|
|
1523
1656
|
border: !1,
|
|
1524
1657
|
indent: 0,
|
|
1525
|
-
headerLine: !1,
|
|
1526
1658
|
children: w.value
|
|
1527
1659
|
}]), R = t(() => JSON.stringify(L.value, null, 2));
|
|
1528
1660
|
function z(e) {
|
|
@@ -1550,17 +1682,17 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
1550
1682
|
}
|
|
1551
1683
|
let H = t(() => E.value?.children ?? w.value), U = g({}), re = t(() => JSON.stringify(U.value, null, 2));
|
|
1552
1684
|
x(w, () => {
|
|
1553
|
-
U.value = V(L.value), d(
|
|
1685
|
+
U.value = V(L.value), d(J);
|
|
1554
1686
|
}, {
|
|
1555
1687
|
deep: !0,
|
|
1556
1688
|
immediate: !0
|
|
1557
|
-
}), x(T, () => d(
|
|
1689
|
+
}), x(T, () => d(J), { deep: !0 });
|
|
1558
1690
|
let ie = t(() => p.includes(T.value?.type ?? ""));
|
|
1559
1691
|
function ae(e) {
|
|
1560
|
-
T.value = e, ie.value && !Array.isArray(e.options) && (e.options = []), d(
|
|
1692
|
+
T.value = e, ie.value && !Array.isArray(e.options) && (e.options = []), d(J);
|
|
1561
1693
|
}
|
|
1562
1694
|
function oe(e) {
|
|
1563
|
-
Array.isArray(e.children) || (e.children = []), E.value = e, T.value = e, d(
|
|
1695
|
+
Array.isArray(e.children) || (e.children = []), E.value = e, T.value = e, d(J);
|
|
1564
1696
|
}
|
|
1565
1697
|
function se() {
|
|
1566
1698
|
E.value = null;
|
|
@@ -1570,16 +1702,16 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
1570
1702
|
if (!t?.closest(".field-drag-handle, .block-drag-handle, .form-item-label, .form-block-header-title")) return;
|
|
1571
1703
|
let n = t?.closest("[data-field-key]");
|
|
1572
1704
|
if (n?.dataset.fieldKey) {
|
|
1573
|
-
let e =
|
|
1705
|
+
let e = Ee(n.dataset.fieldKey);
|
|
1574
1706
|
if (e) {
|
|
1575
|
-
let t =
|
|
1707
|
+
let t = De(e.key);
|
|
1576
1708
|
t && t.key !== "root" && (E.value = t), ae(e), N.value = !0;
|
|
1577
1709
|
return;
|
|
1578
1710
|
}
|
|
1579
1711
|
}
|
|
1580
1712
|
let r = t?.closest("[data-block-path]");
|
|
1581
1713
|
if (r?.dataset.blockPath) {
|
|
1582
|
-
let e =
|
|
1714
|
+
let e = we(r.dataset.blockPath.split("/"));
|
|
1583
1715
|
e && (ae(e), N.value = !0);
|
|
1584
1716
|
}
|
|
1585
1717
|
}
|
|
@@ -1587,7 +1719,7 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
1587
1719
|
let e = T.value;
|
|
1588
1720
|
if (!e) return;
|
|
1589
1721
|
let t = H.value.indexOf(e);
|
|
1590
|
-
t >= 0 &&
|
|
1722
|
+
t >= 0 && Ne(t), T.value || (N.value = !1);
|
|
1591
1723
|
}
|
|
1592
1724
|
function ue() {
|
|
1593
1725
|
T.value && (N.value = !0);
|
|
@@ -1602,7 +1734,7 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
1602
1734
|
n.required = P.value.required, n.labelPosition = P.value.labelPosition, n.span = P.value.span, n.clearable = P.value.clearable, p.includes(n.type) && (n.filterable = P.value.filterable), n.isText = P.value.isText, P.value.labelWidth ? n.labelWidth = P.value.labelWidth : delete n.labelWidth;
|
|
1603
1735
|
}
|
|
1604
1736
|
};
|
|
1605
|
-
e(w.value), d(
|
|
1737
|
+
e(w.value), d(J);
|
|
1606
1738
|
}
|
|
1607
1739
|
function de() {
|
|
1608
1740
|
T.value && (Array.isArray(T.value.linkage) || (T.value.linkage = []), T.value.linkage.push({
|
|
@@ -1631,68 +1763,68 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
1631
1763
|
D.value = e;
|
|
1632
1764
|
}
|
|
1633
1765
|
function ge() {
|
|
1634
|
-
D.value = null,
|
|
1766
|
+
D.value = null, ke();
|
|
1635
1767
|
}
|
|
1636
|
-
function
|
|
1768
|
+
function G(e, t) {
|
|
1637
1769
|
h += 1, F.value = `${e}_${h}`, I.value = u.find((t) => t.type === e)?.label ?? e, j.value = {
|
|
1638
1770
|
type: e,
|
|
1639
1771
|
target: t
|
|
1640
1772
|
}, M.value = !0;
|
|
1641
1773
|
}
|
|
1642
|
-
function
|
|
1774
|
+
function _e() {
|
|
1643
1775
|
if (!j.value) return;
|
|
1644
1776
|
let e = F.value.trim() || `${j.value.type}_${h}`, t = I.value.trim() || u.find((e) => e.type === j.value?.type)?.label || j.value.type, n = v(j.value.type, e, t), r = j.value.target;
|
|
1645
|
-
r ? (Array.isArray(r.children) || (r.children = []), r.children.push(n), E.value = r) : w.value.push(n), T.value = n, M.value = !1, j.value = null, d(
|
|
1777
|
+
r ? (Array.isArray(r.children) || (r.children = []), r.children.push(n), E.value = r) : w.value.push(n), T.value = n, M.value = !1, j.value = null, d(J);
|
|
1646
1778
|
}
|
|
1647
|
-
function
|
|
1779
|
+
function ve() {
|
|
1648
1780
|
M.value = !1, j.value = null;
|
|
1649
1781
|
}
|
|
1650
|
-
function
|
|
1782
|
+
function K() {
|
|
1651
1783
|
if (!D.value) return;
|
|
1652
1784
|
let e = D.value, t = E.value;
|
|
1653
|
-
D.value = null,
|
|
1785
|
+
D.value = null, G(e, t);
|
|
1654
1786
|
}
|
|
1655
|
-
function
|
|
1787
|
+
function q(e, t) {
|
|
1656
1788
|
if (D.value) return;
|
|
1657
|
-
let n =
|
|
1789
|
+
let n = Ee(e.key);
|
|
1658
1790
|
if (!n) return;
|
|
1659
|
-
let r =
|
|
1791
|
+
let r = De(n.key);
|
|
1660
1792
|
r && r.key !== "root" && (E.value = r), O.value = n, t.dataTransfer?.setData("text/plain", n.key);
|
|
1661
1793
|
}
|
|
1662
|
-
function
|
|
1794
|
+
function ye(e, t) {
|
|
1663
1795
|
let n = t.getBoundingClientRect();
|
|
1664
1796
|
return e.clientX < n.left + n.width / 2 ? "before" : "after";
|
|
1665
1797
|
}
|
|
1666
|
-
function
|
|
1798
|
+
function be(e) {
|
|
1667
1799
|
let t = O.value;
|
|
1668
1800
|
if (!t || t === e) return;
|
|
1669
1801
|
let n = H.value, r = n.indexOf(t), i = n.indexOf(e);
|
|
1670
1802
|
if (r < 0 || i < 0) return;
|
|
1671
1803
|
let [a] = n.splice(r, 1), o = k.value === "after" ? r < i ? i : i + 1 : r < i ? i - 1 : i;
|
|
1672
|
-
n.splice(o, 0, a),
|
|
1804
|
+
n.splice(o, 0, a), xe();
|
|
1673
1805
|
}
|
|
1674
|
-
function
|
|
1806
|
+
function xe() {
|
|
1675
1807
|
O.value = null, k.value = null;
|
|
1676
1808
|
}
|
|
1677
|
-
function
|
|
1809
|
+
function Se(e) {
|
|
1678
1810
|
return l("span", {
|
|
1679
1811
|
class: "field-drag-handle",
|
|
1680
1812
|
draggable: !0,
|
|
1681
1813
|
title: "拖拽调整顺序",
|
|
1682
|
-
onDragstart: (t) =>
|
|
1683
|
-
onDragend: () =>
|
|
1814
|
+
onDragstart: (t) => q(e, t),
|
|
1815
|
+
onDragend: () => xe()
|
|
1684
1816
|
}, "⠿");
|
|
1685
1817
|
}
|
|
1686
|
-
function
|
|
1818
|
+
function Ce(e) {
|
|
1687
1819
|
return e.key === "root" ? null : l("span", {
|
|
1688
1820
|
class: "block-drag-handle",
|
|
1689
1821
|
draggable: !0,
|
|
1690
1822
|
title: "拖拽调整顺序",
|
|
1691
|
-
onDragstart: (t) =>
|
|
1692
|
-
onDragend: () =>
|
|
1823
|
+
onDragstart: (t) => q(e, t),
|
|
1824
|
+
onDragend: () => xe()
|
|
1693
1825
|
}, "⠿");
|
|
1694
1826
|
}
|
|
1695
|
-
function
|
|
1827
|
+
function we(e) {
|
|
1696
1828
|
let t = L.value[0];
|
|
1697
1829
|
if (!t) return null;
|
|
1698
1830
|
let n = null, r = 0;
|
|
@@ -1700,11 +1832,11 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
1700
1832
|
for (let t = r; t < e.length; t++) if (n = n.children?.find((n) => n.type === "block" && n.key === e[t]) ?? null, !n) return null;
|
|
1701
1833
|
return n;
|
|
1702
1834
|
}
|
|
1703
|
-
function
|
|
1835
|
+
function Te(e, t = [], n = !1) {
|
|
1704
1836
|
let r = [];
|
|
1705
1837
|
for (let i of e) if (i.type === "block") {
|
|
1706
1838
|
let e = n ? [...t, i.key] : t;
|
|
1707
|
-
r.push(...
|
|
1839
|
+
r.push(...Te(i.children ?? [], e, !0));
|
|
1708
1840
|
} else if (i.type !== "slot") {
|
|
1709
1841
|
let e = [...t, i.key].join(".");
|
|
1710
1842
|
r.push({
|
|
@@ -1714,33 +1846,33 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
1714
1846
|
}
|
|
1715
1847
|
return r;
|
|
1716
1848
|
}
|
|
1717
|
-
function
|
|
1849
|
+
function Ee(e, t = L.value[0]?.children ?? []) {
|
|
1718
1850
|
for (let n of t) {
|
|
1719
1851
|
if (n.key === e) return n;
|
|
1720
|
-
let t =
|
|
1852
|
+
let t = Ee(e, n.children ?? []);
|
|
1721
1853
|
if (t) return t;
|
|
1722
1854
|
}
|
|
1723
1855
|
return null;
|
|
1724
1856
|
}
|
|
1725
|
-
function
|
|
1857
|
+
function De(e, t = L.value[0]?.children ?? [], n = null) {
|
|
1726
1858
|
for (let r of t) {
|
|
1727
1859
|
if (r.key === e) return n;
|
|
1728
1860
|
if (r.type === "block") {
|
|
1729
|
-
let t =
|
|
1861
|
+
let t = De(e, r.children ?? [], r);
|
|
1730
1862
|
if (t) return t;
|
|
1731
1863
|
}
|
|
1732
1864
|
}
|
|
1733
1865
|
return null;
|
|
1734
1866
|
}
|
|
1735
|
-
function
|
|
1736
|
-
|
|
1867
|
+
function Oe(e) {
|
|
1868
|
+
ke();
|
|
1737
1869
|
let t = e.target;
|
|
1738
1870
|
if (O.value) {
|
|
1739
1871
|
let e = t?.closest("[data-block-path]");
|
|
1740
1872
|
if (e?.dataset.blockPath) {
|
|
1741
|
-
let t =
|
|
1873
|
+
let t = we(e.dataset.blockPath.split("/"));
|
|
1742
1874
|
if (t && H.value.includes(t)) {
|
|
1743
|
-
|
|
1875
|
+
be(t);
|
|
1744
1876
|
return;
|
|
1745
1877
|
}
|
|
1746
1878
|
}
|
|
@@ -1748,7 +1880,7 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
1748
1880
|
if (n?.dataset.fieldKey) {
|
|
1749
1881
|
let e = H.value.find((e) => e.key === n.dataset.fieldKey);
|
|
1750
1882
|
if (e) {
|
|
1751
|
-
|
|
1883
|
+
be(e);
|
|
1752
1884
|
return;
|
|
1753
1885
|
}
|
|
1754
1886
|
}
|
|
@@ -1757,31 +1889,31 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
1757
1889
|
if (n === "root") {
|
|
1758
1890
|
if (D.value) {
|
|
1759
1891
|
let e = D.value;
|
|
1760
|
-
D.value = null,
|
|
1892
|
+
D.value = null, G(e, null);
|
|
1761
1893
|
}
|
|
1762
1894
|
return;
|
|
1763
1895
|
}
|
|
1764
1896
|
if (n) {
|
|
1765
|
-
let e =
|
|
1897
|
+
let e = we(n.split("/"));
|
|
1766
1898
|
if (e) {
|
|
1767
|
-
|
|
1899
|
+
Me(e);
|
|
1768
1900
|
return;
|
|
1769
1901
|
}
|
|
1770
1902
|
}
|
|
1771
|
-
|
|
1903
|
+
K();
|
|
1772
1904
|
}
|
|
1773
|
-
function
|
|
1905
|
+
function ke() {
|
|
1774
1906
|
document.querySelectorAll("[data-block-path], [data-field-key]").forEach((e) => {
|
|
1775
1907
|
e.classList.remove("drop-active", "drop-before", "drop-after");
|
|
1776
1908
|
});
|
|
1777
1909
|
}
|
|
1778
|
-
function
|
|
1910
|
+
function Ae() {
|
|
1779
1911
|
document.querySelectorAll(".node-selected").forEach((e) => {
|
|
1780
1912
|
e.classList.remove("node-selected");
|
|
1781
1913
|
});
|
|
1782
1914
|
}
|
|
1783
|
-
function
|
|
1784
|
-
if (
|
|
1915
|
+
function J() {
|
|
1916
|
+
if (Ae(), !T.value) return;
|
|
1785
1917
|
let e = T.value.key;
|
|
1786
1918
|
document.querySelectorAll("[data-field-key]").forEach((t) => {
|
|
1787
1919
|
t.getAttribute("data-field-key") === e && t.classList.add("node-selected");
|
|
@@ -1789,58 +1921,58 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
1789
1921
|
t.getAttribute("data-block-path")?.split("/").pop() === e && t.classList.add("node-selected");
|
|
1790
1922
|
});
|
|
1791
1923
|
}
|
|
1792
|
-
function
|
|
1793
|
-
|
|
1924
|
+
function je(e) {
|
|
1925
|
+
ke();
|
|
1794
1926
|
let t = e.target;
|
|
1795
1927
|
if (O.value) {
|
|
1796
1928
|
let n = t?.closest("[data-field-key]");
|
|
1797
|
-
n?.dataset.fieldKey && H.value.find((e) => e.key === n.dataset.fieldKey) && (k.value =
|
|
1929
|
+
n?.dataset.fieldKey && H.value.find((e) => e.key === n.dataset.fieldKey) && (k.value = ye(e, n), n.classList.add("drop-active"), n.classList.add(k.value === "before" ? "drop-before" : "drop-after"));
|
|
1798
1930
|
let r = t?.closest("[data-block-path]");
|
|
1799
1931
|
if (r?.dataset.blockPath) {
|
|
1800
|
-
let t =
|
|
1801
|
-
t && H.value.includes(t) && (k.value =
|
|
1932
|
+
let t = we(r.dataset.blockPath.split("/"));
|
|
1933
|
+
t && H.value.includes(t) && (k.value = ye(e, r), r.classList.add("drop-active"), r.classList.add(k.value === "before" ? "drop-before" : "drop-after"));
|
|
1802
1934
|
}
|
|
1803
1935
|
return;
|
|
1804
1936
|
}
|
|
1805
1937
|
(t?.closest("[data-block-path]"))?.classList.add("drop-active");
|
|
1806
1938
|
}
|
|
1807
|
-
function
|
|
1939
|
+
function Me(e) {
|
|
1808
1940
|
if (!D.value) return;
|
|
1809
1941
|
let t = D.value;
|
|
1810
|
-
D.value = null,
|
|
1942
|
+
D.value = null, G(t, e);
|
|
1811
1943
|
}
|
|
1812
|
-
function
|
|
1944
|
+
function Ne(e) {
|
|
1813
1945
|
let t = H.value, n = t[e];
|
|
1814
|
-
t.splice(e, 1), E.value === n && (E.value = null), T.value === n && (T.value = null), d(
|
|
1946
|
+
t.splice(e, 1), E.value === n && (E.value = null), T.value === n && (T.value = null), d(J);
|
|
1815
1947
|
}
|
|
1816
|
-
function
|
|
1948
|
+
function Pe(e) {
|
|
1817
1949
|
let t = document.createElement("textarea");
|
|
1818
1950
|
t.value = e, t.style.position = "fixed", t.style.opacity = "0", document.body.appendChild(t), t.select(), document.execCommand("copy"), t.remove();
|
|
1819
1951
|
}
|
|
1820
|
-
async function
|
|
1952
|
+
async function Fe(e, t) {
|
|
1821
1953
|
try {
|
|
1822
|
-
navigator.clipboard?.writeText ? await navigator.clipboard.writeText(e) :
|
|
1954
|
+
navigator.clipboard?.writeText ? await navigator.clipboard.writeText(e) : Pe(e);
|
|
1823
1955
|
} catch {
|
|
1824
|
-
|
|
1956
|
+
Pe(e);
|
|
1825
1957
|
}
|
|
1826
1958
|
A.value = t, window.setTimeout(() => {
|
|
1827
1959
|
A.value = null;
|
|
1828
1960
|
}, 1600);
|
|
1829
1961
|
}
|
|
1830
1962
|
return (t, c) => {
|
|
1831
|
-
let l = y("el-button"), d = y("el-switch"), p = y("el-form-item"), h = y("el-option"), g = y("el-select"), v = y("el-input-number"), x = y("el-input"), w = y("el-form"), D = y("el-radio"), O = y("el-radio-group"), k = y("el-checkbox"), z = y("el-date-picker"), B = y("el-time-picker"), V = y("el-input-tag"), H = y("el-rate"), ae = y("el-slider"),
|
|
1832
|
-
return m(), i("div",
|
|
1833
|
-
a("header",
|
|
1963
|
+
let l = y("el-button"), d = y("el-switch"), p = y("el-form-item"), h = y("el-option"), g = y("el-select"), v = y("el-input-number"), x = y("el-input"), w = y("el-form"), D = y("el-radio"), O = y("el-radio-group"), k = y("el-checkbox"), z = y("el-date-picker"), B = y("el-time-picker"), V = y("el-input-tag"), H = y("el-rate"), ae = y("el-slider"), G = y("el-cascader"), K = y("el-tree-select"), q = y("el-scrollbar"), ye = y("el-drawer"), be = y("el-dialog");
|
|
1964
|
+
return m(), i("div", Gi, [
|
|
1965
|
+
a("header", Ki, [c[32] ||= a("div", null, [a("h2", null, "创建表单"), a("p", null, "从左侧拖拽字段到右侧表单,生成 config 和 data。")], -1), a("div", qi, [s(l, {
|
|
1834
1966
|
type: "primary",
|
|
1835
|
-
onClick: c[0] ||= (e) =>
|
|
1967
|
+
onClick: c[0] ||= (e) => Fe(R.value, "config")
|
|
1836
1968
|
}, {
|
|
1837
1969
|
default: S(() => [o(b(A.value === "config" ? "已复制 config" : "复制 config"), 1)]),
|
|
1838
1970
|
_: 1
|
|
1839
|
-
}), s(l, { onClick: c[1] ||= (e) =>
|
|
1971
|
+
}), s(l, { onClick: c[1] ||= (e) => Fe(re.value, "data") }, {
|
|
1840
1972
|
default: S(() => [o(b(A.value === "data" ? "已复制 data" : "复制 data"), 1)]),
|
|
1841
1973
|
_: 1
|
|
1842
1974
|
})])]),
|
|
1843
|
-
a("section",
|
|
1975
|
+
a("section", Ji, [c[34] ||= a("h3", null, "全局配置", -1), s(w, {
|
|
1844
1976
|
inline: "",
|
|
1845
1977
|
"label-position": "top"
|
|
1846
1978
|
}, {
|
|
@@ -1925,20 +2057,20 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
1925
2057
|
type: "primary",
|
|
1926
2058
|
onClick: W
|
|
1927
2059
|
}, {
|
|
1928
|
-
default: S(() => [...c[
|
|
2060
|
+
default: S(() => [...c[33] ||= [o("应用全局配置", -1)]]),
|
|
1929
2061
|
_: 1
|
|
1930
2062
|
})
|
|
1931
2063
|
]),
|
|
1932
2064
|
_: 1
|
|
1933
2065
|
})]),
|
|
1934
|
-
a("div",
|
|
2066
|
+
a("div", Yi, [a("aside", Xi, [c[36] ||= a("h3", null, "字段库", -1), (m(), i(e, null, _(u, (t) => a("div", {
|
|
1935
2067
|
key: t.type,
|
|
1936
2068
|
class: "palette-item",
|
|
1937
2069
|
draggable: "true",
|
|
1938
2070
|
onDragstart: (e) => he(t.type),
|
|
1939
2071
|
onDragend: ge
|
|
1940
2072
|
}, [s(p, { label: t.label }, {
|
|
1941
|
-
default: S(() => [t.type === "block" ? (m(), i("div",
|
|
2073
|
+
default: S(() => [t.type === "block" ? (m(), i("div", Qi, "block 块")) : t.type === "input" ? (m(), n(x, {
|
|
1942
2074
|
key: 1,
|
|
1943
2075
|
placeholder: "请输入"
|
|
1944
2076
|
})) : t.type === "textarea" ? (m(), n(x, {
|
|
@@ -1970,7 +2102,7 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
1970
2102
|
}, 1032, ["value"]))), 128))]),
|
|
1971
2103
|
_: 2
|
|
1972
2104
|
}, 1024)) : t.type === "checkbox" ? (m(), n(k, { key: 5 }, {
|
|
1973
|
-
default: S(() => [...c[
|
|
2105
|
+
default: S(() => [...c[35] ||= [o("复选框", -1)]]),
|
|
1974
2106
|
_: 1
|
|
1975
2107
|
})) : t.type === "switch" ? (m(), n(d, { key: 6 })) : t.type === "inputNumber" ? (m(), n(v, {
|
|
1976
2108
|
key: 7,
|
|
@@ -1990,56 +2122,56 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
1990
2122
|
})) : t.type === "inputTag" ? (m(), n(V, {
|
|
1991
2123
|
key: 11,
|
|
1992
2124
|
"model-value": ["标签"]
|
|
1993
|
-
})) : t.type === "transfer" ? (m(), i("div",
|
|
2125
|
+
})) : t.type === "transfer" ? (m(), i("div", $i, "穿梭框")) : t.type === "rate" ? (m(), n(H, {
|
|
1994
2126
|
key: 13,
|
|
1995
2127
|
"model-value": 3
|
|
1996
2128
|
})) : t.type === "slider" ? (m(), n(ae, {
|
|
1997
2129
|
key: 14,
|
|
1998
2130
|
"model-value": 40
|
|
1999
|
-
})) : t.type === "cascader" ? (m(), n(
|
|
2131
|
+
})) : t.type === "cascader" ? (m(), n(G, {
|
|
2000
2132
|
key: 15,
|
|
2001
2133
|
placeholder: "请选择"
|
|
2002
|
-
})) : t.type === "treeSelect" ? (m(), n(
|
|
2134
|
+
})) : t.type === "treeSelect" ? (m(), n(K, {
|
|
2003
2135
|
key: 16,
|
|
2004
2136
|
placeholder: "请选择"
|
|
2005
2137
|
})) : r("", !0)]),
|
|
2006
2138
|
_: 2
|
|
2007
|
-
}, 1032, ["label"])], 40,
|
|
2139
|
+
}, 1032, ["label"])], 40, Zi)), 64))]), a("section", {
|
|
2008
2140
|
class: "preview",
|
|
2009
|
-
onDragover: C(
|
|
2010
|
-
onDragleave:
|
|
2011
|
-
onDrop: C(
|
|
2141
|
+
onDragover: C(je, ["prevent"]),
|
|
2142
|
+
onDragleave: ke,
|
|
2143
|
+
onDrop: C(Oe, ["prevent"]),
|
|
2012
2144
|
onClick: ce
|
|
2013
|
-
}, [a("div",
|
|
2145
|
+
}, [a("div", ea, [c[39] ||= a("h3", null, "实时表单", -1), a("div", ta, [c[38] ||= a("span", null, "将左侧字段拖到这里", -1), s(l, {
|
|
2014
2146
|
size: "small",
|
|
2015
2147
|
onClick: ue
|
|
2016
2148
|
}, {
|
|
2017
|
-
default: S(() => [...c[
|
|
2149
|
+
default: S(() => [...c[37] ||= [o("字段配置", -1)]]),
|
|
2018
2150
|
_: 1
|
|
2019
|
-
})])]), s(
|
|
2151
|
+
})])]), s(Wi, {
|
|
2020
2152
|
config: L.value,
|
|
2021
2153
|
modelValue: U.value,
|
|
2022
2154
|
"onUpdate:modelValue": c[10] ||= (e) => U.value = e,
|
|
2023
2155
|
"show-submit": "",
|
|
2024
2156
|
"show-reset": "",
|
|
2025
|
-
"field-action":
|
|
2026
|
-
"block-action":
|
|
2157
|
+
"field-action": Se,
|
|
2158
|
+
"block-action": Ce
|
|
2027
2159
|
}, null, 8, ["config", "modelValue"])], 32)]),
|
|
2028
|
-
s(
|
|
2160
|
+
s(ye, {
|
|
2029
2161
|
modelValue: N.value,
|
|
2030
|
-
"onUpdate:modelValue": c[
|
|
2162
|
+
"onUpdate:modelValue": c[28] ||= (e) => N.value = e,
|
|
2031
2163
|
title: "字段配置",
|
|
2032
2164
|
size: "560px"
|
|
2033
2165
|
}, {
|
|
2034
|
-
default: S(() => [s(
|
|
2166
|
+
default: S(() => [s(q, {
|
|
2035
2167
|
class: "drawer-scrollbar",
|
|
2036
2168
|
"view-style": "padding: 0 20px 20px 0;"
|
|
2037
2169
|
}, {
|
|
2038
|
-
default: S(() => [a("div",
|
|
2170
|
+
default: S(() => [a("div", na, [a("button", {
|
|
2039
2171
|
type: "button",
|
|
2040
2172
|
class: f({ active: !E.value }),
|
|
2041
2173
|
onClick: se
|
|
2042
|
-
}, " 根 ", 2), E.value ? (m(), i("span",
|
|
2174
|
+
}, " 根 ", 2), E.value ? (m(), i("span", ra, "/ " + b(E.value.label || E.value.key), 1)) : r("", !0)]), T.value ? (m(), n(w, {
|
|
2043
2175
|
key: 0,
|
|
2044
2176
|
"label-position": "top"
|
|
2045
2177
|
}, {
|
|
@@ -2075,7 +2207,7 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
2075
2207
|
size: "small",
|
|
2076
2208
|
onClick: c[14] ||= (e) => oe(T.value)
|
|
2077
2209
|
}, {
|
|
2078
|
-
default: S(() => [...c[
|
|
2210
|
+
default: S(() => [...c[40] ||= [o("进入 block", -1)]]),
|
|
2079
2211
|
_: 1
|
|
2080
2212
|
})]),
|
|
2081
2213
|
_: 1
|
|
@@ -2094,28 +2226,18 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
2094
2226
|
})) : r("", !0),
|
|
2095
2227
|
T.value.type === "block" ? (m(), n(p, {
|
|
2096
2228
|
key: 2,
|
|
2097
|
-
label: "标题下划线"
|
|
2098
|
-
}, {
|
|
2099
|
-
default: S(() => [s(d, {
|
|
2100
|
-
modelValue: T.value.headerLine,
|
|
2101
|
-
"onUpdate:modelValue": c[16] ||= (e) => T.value.headerLine = e
|
|
2102
|
-
}, null, 8, ["modelValue"])]),
|
|
2103
|
-
_: 1
|
|
2104
|
-
})) : r("", !0),
|
|
2105
|
-
T.value.type === "block" ? (m(), n(p, {
|
|
2106
|
-
key: 3,
|
|
2107
2229
|
label: "显示边框"
|
|
2108
2230
|
}, {
|
|
2109
2231
|
default: S(() => [s(d, {
|
|
2110
2232
|
modelValue: T.value.border,
|
|
2111
|
-
"onUpdate:modelValue": c[
|
|
2233
|
+
"onUpdate:modelValue": c[16] ||= (e) => T.value.border = e
|
|
2112
2234
|
}, null, 8, ["modelValue"])]),
|
|
2113
2235
|
_: 1
|
|
2114
2236
|
})) : r("", !0),
|
|
2115
2237
|
s(p, { label: "placeholder" }, {
|
|
2116
2238
|
default: S(() => [s(x, {
|
|
2117
2239
|
modelValue: T.value.placeholder,
|
|
2118
|
-
"onUpdate:modelValue": c[
|
|
2240
|
+
"onUpdate:modelValue": c[17] ||= (e) => T.value.placeholder = e
|
|
2119
2241
|
}, null, 8, ["modelValue"])]),
|
|
2120
2242
|
_: 1
|
|
2121
2243
|
}),
|
|
@@ -2127,50 +2249,50 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
2127
2249
|
].includes(T.value.type) ? (m(), n(v, {
|
|
2128
2250
|
key: 0,
|
|
2129
2251
|
modelValue: T.value.default,
|
|
2130
|
-
"onUpdate:modelValue": c[
|
|
2252
|
+
"onUpdate:modelValue": c[18] ||= (e) => T.value.default = e
|
|
2131
2253
|
}, null, 8, ["modelValue"])) : ["switch", "checkbox"].includes(T.value.type) ? (m(), n(d, {
|
|
2132
2254
|
key: 1,
|
|
2133
2255
|
modelValue: T.value.default,
|
|
2134
|
-
"onUpdate:modelValue": c[
|
|
2256
|
+
"onUpdate:modelValue": c[19] ||= (e) => T.value.default = e
|
|
2135
2257
|
}, null, 8, ["modelValue"])) : (m(), n(x, {
|
|
2136
2258
|
key: 2,
|
|
2137
2259
|
modelValue: T.value.default,
|
|
2138
|
-
"onUpdate:modelValue": c[
|
|
2260
|
+
"onUpdate:modelValue": c[20] ||= (e) => T.value.default = e
|
|
2139
2261
|
}, null, 8, ["modelValue"]))]),
|
|
2140
2262
|
_: 1
|
|
2141
2263
|
}),
|
|
2142
2264
|
s(p, { label: "必填" }, {
|
|
2143
2265
|
default: S(() => [s(d, {
|
|
2144
2266
|
modelValue: T.value.required,
|
|
2145
|
-
"onUpdate:modelValue": c[
|
|
2267
|
+
"onUpdate:modelValue": c[21] ||= (e) => T.value.required = e
|
|
2146
2268
|
}, null, 8, ["modelValue"])]),
|
|
2147
2269
|
_: 1
|
|
2148
2270
|
}),
|
|
2149
2271
|
s(p, { label: "禁用" }, {
|
|
2150
2272
|
default: S(() => [s(d, {
|
|
2151
2273
|
modelValue: T.value.disabled,
|
|
2152
|
-
"onUpdate:modelValue": c[
|
|
2274
|
+
"onUpdate:modelValue": c[22] ||= (e) => T.value.disabled = e
|
|
2153
2275
|
}, null, 8, ["modelValue"])]),
|
|
2154
2276
|
_: 1
|
|
2155
2277
|
}),
|
|
2156
2278
|
s(p, { label: "只读展示" }, {
|
|
2157
2279
|
default: S(() => [s(d, {
|
|
2158
2280
|
modelValue: T.value.isText,
|
|
2159
|
-
"onUpdate:modelValue": c[
|
|
2281
|
+
"onUpdate:modelValue": c[23] ||= (e) => T.value.isText = e
|
|
2160
2282
|
}, null, 8, ["modelValue"])]),
|
|
2161
2283
|
_: 1
|
|
2162
2284
|
}),
|
|
2163
2285
|
s(p, { label: "隐藏字段" }, {
|
|
2164
2286
|
default: S(() => [s(d, {
|
|
2165
2287
|
modelValue: T.value.visible,
|
|
2166
|
-
"onUpdate:modelValue": c[
|
|
2288
|
+
"onUpdate:modelValue": c[24] ||= (e) => T.value.visible = e
|
|
2167
2289
|
}, null, 8, ["modelValue"])]),
|
|
2168
2290
|
_: 1
|
|
2169
2291
|
}),
|
|
2170
2292
|
s(p, { label: "隐藏时清空" }, {
|
|
2171
2293
|
default: S(() => [s(d, {
|
|
2172
2294
|
modelValue: T.value.clearOnHide,
|
|
2173
|
-
"onUpdate:modelValue": c[
|
|
2295
|
+
"onUpdate:modelValue": c[25] ||= (e) => T.value.clearOnHide = e
|
|
2174
2296
|
}, null, 8, ["modelValue"])]),
|
|
2175
2297
|
_: 1
|
|
2176
2298
|
}),
|
|
@@ -2179,29 +2301,29 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
2179
2301
|
"datetimePicker",
|
|
2180
2302
|
"timePicker"
|
|
2181
2303
|
].includes(T.value.type) ? (m(), n(p, {
|
|
2182
|
-
key:
|
|
2304
|
+
key: 3,
|
|
2183
2305
|
label: "UTC时间"
|
|
2184
2306
|
}, {
|
|
2185
2307
|
default: S(() => [s(d, {
|
|
2186
2308
|
modelValue: T.value.utc,
|
|
2187
|
-
"onUpdate:modelValue": c[
|
|
2309
|
+
"onUpdate:modelValue": c[26] ||= (e) => T.value.utc = e
|
|
2188
2310
|
}, null, 8, ["modelValue"])]),
|
|
2189
2311
|
_: 1
|
|
2190
2312
|
})) : r("", !0),
|
|
2191
2313
|
s(p, { label: "联动配置" }, {
|
|
2192
|
-
default: S(() => [a("div",
|
|
2314
|
+
default: S(() => [a("div", ia, [(m(!0), i(e, null, _(ee.value, (t, r) => (m(), i("div", {
|
|
2193
2315
|
key: r,
|
|
2194
2316
|
class: "linkage-rule"
|
|
2195
2317
|
}, [
|
|
2196
|
-
a("div",
|
|
2318
|
+
a("div", aa, [a("span", null, "规则 " + b(r + 1), 1), s(l, {
|
|
2197
2319
|
link: "",
|
|
2198
2320
|
type: "danger",
|
|
2199
2321
|
onClick: (e) => fe(r)
|
|
2200
2322
|
}, {
|
|
2201
|
-
default: S(() => [...c[
|
|
2323
|
+
default: S(() => [...c[41] ||= [o(" 删除 ", -1)]]),
|
|
2202
2324
|
_: 1
|
|
2203
2325
|
}, 8, ["onClick"])]),
|
|
2204
|
-
a("div",
|
|
2326
|
+
a("div", oa, [
|
|
2205
2327
|
s(g, {
|
|
2206
2328
|
modelValue: t.when.field,
|
|
2207
2329
|
"onUpdate:modelValue": (e) => t.when.field = e,
|
|
@@ -2231,33 +2353,33 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
2231
2353
|
placeholder: "条件值"
|
|
2232
2354
|
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
2233
2355
|
]),
|
|
2234
|
-
a("div",
|
|
2356
|
+
a("div", sa, [
|
|
2235
2357
|
s(k, {
|
|
2236
2358
|
modelValue: t.effects.visible,
|
|
2237
2359
|
"onUpdate:modelValue": (e) => t.effects.visible = e
|
|
2238
2360
|
}, {
|
|
2239
|
-
default: S(() => [...c[
|
|
2361
|
+
default: S(() => [...c[42] ||= [o("显示", -1)]]),
|
|
2240
2362
|
_: 1
|
|
2241
2363
|
}, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
2242
2364
|
s(k, {
|
|
2243
2365
|
modelValue: t.effects.disabled,
|
|
2244
2366
|
"onUpdate:modelValue": (e) => t.effects.disabled = e
|
|
2245
2367
|
}, {
|
|
2246
|
-
default: S(() => [...c[
|
|
2368
|
+
default: S(() => [...c[43] ||= [o("禁用", -1)]]),
|
|
2247
2369
|
_: 1
|
|
2248
2370
|
}, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
2249
2371
|
s(k, {
|
|
2250
2372
|
modelValue: t.effects.required,
|
|
2251
2373
|
"onUpdate:modelValue": (e) => t.effects.required = e
|
|
2252
2374
|
}, {
|
|
2253
|
-
default: S(() => [...c[
|
|
2375
|
+
default: S(() => [...c[44] ||= [o("必填", -1)]]),
|
|
2254
2376
|
_: 1
|
|
2255
2377
|
}, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
2256
2378
|
s(k, {
|
|
2257
2379
|
modelValue: t.effects.clearOnHide,
|
|
2258
2380
|
"onUpdate:modelValue": (e) => t.effects.clearOnHide = e
|
|
2259
2381
|
}, {
|
|
2260
|
-
default: S(() => [...c[
|
|
2382
|
+
default: S(() => [...c[45] ||= [o("隐藏清空", -1)]]),
|
|
2261
2383
|
_: 1
|
|
2262
2384
|
}, 8, ["modelValue", "onUpdate:modelValue"])
|
|
2263
2385
|
]),
|
|
@@ -2277,16 +2399,16 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
2277
2399
|
size: "small",
|
|
2278
2400
|
onClick: de
|
|
2279
2401
|
}, {
|
|
2280
|
-
default: S(() => [...c[
|
|
2402
|
+
default: S(() => [...c[46] ||= [o("添加联动规则", -1)]]),
|
|
2281
2403
|
_: 1
|
|
2282
2404
|
})])]),
|
|
2283
2405
|
_: 1
|
|
2284
2406
|
}),
|
|
2285
2407
|
ie.value ? (m(), n(p, {
|
|
2286
|
-
key:
|
|
2408
|
+
key: 4,
|
|
2287
2409
|
label: "选项"
|
|
2288
2410
|
}, {
|
|
2289
|
-
default: S(() => [a("div",
|
|
2411
|
+
default: S(() => [a("div", ca, [(m(!0), i(e, null, _(T.value.options ?? [], (e, t) => (m(), i("div", {
|
|
2290
2412
|
key: t,
|
|
2291
2413
|
class: "option-row"
|
|
2292
2414
|
}, [
|
|
@@ -2305,17 +2427,17 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
2305
2427
|
type: "danger",
|
|
2306
2428
|
onClick: (e) => T.value.options?.splice(t, 1)
|
|
2307
2429
|
}, {
|
|
2308
|
-
default: S(() => [...c[
|
|
2430
|
+
default: S(() => [...c[47] ||= [o(" 删除 ", -1)]]),
|
|
2309
2431
|
_: 1
|
|
2310
2432
|
}, 8, ["onClick"])
|
|
2311
2433
|
]))), 128)), s(l, {
|
|
2312
2434
|
size: "small",
|
|
2313
|
-
onClick: c[
|
|
2435
|
+
onClick: c[27] ||= (e) => T.value.options?.push({
|
|
2314
2436
|
label: "",
|
|
2315
2437
|
value: ""
|
|
2316
2438
|
})
|
|
2317
2439
|
}, {
|
|
2318
|
-
default: S(() => [...c[
|
|
2440
|
+
default: S(() => [...c[48] ||= [o(" 添加选项 ", -1)]]),
|
|
2319
2441
|
_: 1
|
|
2320
2442
|
})])]),
|
|
2321
2443
|
_: 1
|
|
@@ -2325,33 +2447,33 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
2325
2447
|
type: "danger",
|
|
2326
2448
|
onClick: le
|
|
2327
2449
|
}, {
|
|
2328
|
-
default: S(() => [...c[
|
|
2450
|
+
default: S(() => [...c[49] ||= [o("删除字段", -1)]]),
|
|
2329
2451
|
_: 1
|
|
2330
2452
|
})]),
|
|
2331
2453
|
_: 1
|
|
2332
2454
|
})
|
|
2333
2455
|
]),
|
|
2334
2456
|
_: 1
|
|
2335
|
-
})) : (m(), i("div",
|
|
2457
|
+
})) : (m(), i("div", la, "点击右侧表单中的字段进行配置"))]),
|
|
2336
2458
|
_: 1
|
|
2337
2459
|
})]),
|
|
2338
2460
|
_: 1
|
|
2339
2461
|
}, 8, ["modelValue"]),
|
|
2340
|
-
a("section",
|
|
2341
|
-
s(
|
|
2462
|
+
a("section", ua, [a("div", da, [c[50] ||= a("h3", null, "config", -1), a("pre", null, b(R.value), 1)]), a("div", fa, [c[51] ||= a("h3", null, "data", -1), a("pre", null, b(re.value), 1)])]),
|
|
2463
|
+
s(be, {
|
|
2342
2464
|
modelValue: M.value,
|
|
2343
|
-
"onUpdate:modelValue": c[
|
|
2465
|
+
"onUpdate:modelValue": c[31] ||= (e) => M.value = e,
|
|
2344
2466
|
title: j.value?.type === "block" ? "添加 block" : "添加字段",
|
|
2345
2467
|
width: "420px"
|
|
2346
2468
|
}, {
|
|
2347
|
-
footer: S(() => [s(l, { onClick:
|
|
2348
|
-
default: S(() => [...c[
|
|
2469
|
+
footer: S(() => [s(l, { onClick: ve }, {
|
|
2470
|
+
default: S(() => [...c[52] ||= [o("取消", -1)]]),
|
|
2349
2471
|
_: 1
|
|
2350
2472
|
}), s(l, {
|
|
2351
2473
|
type: "primary",
|
|
2352
|
-
onClick:
|
|
2474
|
+
onClick: _e
|
|
2353
2475
|
}, {
|
|
2354
|
-
default: S(() => [...c[
|
|
2476
|
+
default: S(() => [...c[53] ||= [o("确定", -1)]]),
|
|
2355
2477
|
_: 1
|
|
2356
2478
|
})]),
|
|
2357
2479
|
default: S(() => [s(w, { "label-position": "top" }, {
|
|
@@ -2361,7 +2483,7 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
2361
2483
|
}, {
|
|
2362
2484
|
default: S(() => [s(x, {
|
|
2363
2485
|
modelValue: F.value,
|
|
2364
|
-
"onUpdate:modelValue": c[
|
|
2486
|
+
"onUpdate:modelValue": c[29] ||= (e) => F.value = e,
|
|
2365
2487
|
placeholder: "请输入 key"
|
|
2366
2488
|
}, null, 8, ["modelValue"])]),
|
|
2367
2489
|
_: 1
|
|
@@ -2371,7 +2493,7 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
2371
2493
|
}, {
|
|
2372
2494
|
default: S(() => [s(x, {
|
|
2373
2495
|
modelValue: I.value,
|
|
2374
|
-
"onUpdate:modelValue": c[
|
|
2496
|
+
"onUpdate:modelValue": c[30] ||= (e) => I.value = e,
|
|
2375
2497
|
placeholder: "请输入 label"
|
|
2376
2498
|
}, null, 8, ["modelValue"])]),
|
|
2377
2499
|
_: 1
|
|
@@ -2383,8 +2505,8 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
2383
2505
|
]);
|
|
2384
2506
|
};
|
|
2385
2507
|
}
|
|
2386
|
-
}), [["__scopeId", "data-v-
|
|
2387
|
-
e.component("
|
|
2508
|
+
}), [["__scopeId", "data-v-23272e71"]]), ma = { install(e) {
|
|
2509
|
+
e.component("FitfulForm", Wi), e.component("FitfulCreateForm", pa), e.component("FitfulDynamicField", Di);
|
|
2388
2510
|
} };
|
|
2389
2511
|
//#endregion
|
|
2390
|
-
export {
|
|
2512
|
+
export { pa as CreateForm, Di as DynamicField, ma as FitfulFormPlugin, ma as default, Wi as Form };
|