fitful-form 0.0.7 → 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/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,7 +1443,7 @@ 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
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, {
|
|
@@ -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-0081d6f3"]]),
|
|
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) {
|
|
@@ -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",
|
|
@@ -1549,17 +1682,17 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
1549
1682
|
}
|
|
1550
1683
|
let H = t(() => E.value?.children ?? w.value), U = g({}), re = t(() => JSON.stringify(U.value, null, 2));
|
|
1551
1684
|
x(w, () => {
|
|
1552
|
-
U.value = V(L.value), d(
|
|
1685
|
+
U.value = V(L.value), d(J);
|
|
1553
1686
|
}, {
|
|
1554
1687
|
deep: !0,
|
|
1555
1688
|
immediate: !0
|
|
1556
|
-
}), x(T, () => d(
|
|
1689
|
+
}), x(T, () => d(J), { deep: !0 });
|
|
1557
1690
|
let ie = t(() => p.includes(T.value?.type ?? ""));
|
|
1558
1691
|
function ae(e) {
|
|
1559
|
-
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);
|
|
1560
1693
|
}
|
|
1561
1694
|
function oe(e) {
|
|
1562
|
-
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);
|
|
1563
1696
|
}
|
|
1564
1697
|
function se() {
|
|
1565
1698
|
E.value = null;
|
|
@@ -1569,16 +1702,16 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
1569
1702
|
if (!t?.closest(".field-drag-handle, .block-drag-handle, .form-item-label, .form-block-header-title")) return;
|
|
1570
1703
|
let n = t?.closest("[data-field-key]");
|
|
1571
1704
|
if (n?.dataset.fieldKey) {
|
|
1572
|
-
let e =
|
|
1705
|
+
let e = Ee(n.dataset.fieldKey);
|
|
1573
1706
|
if (e) {
|
|
1574
|
-
let t =
|
|
1707
|
+
let t = De(e.key);
|
|
1575
1708
|
t && t.key !== "root" && (E.value = t), ae(e), N.value = !0;
|
|
1576
1709
|
return;
|
|
1577
1710
|
}
|
|
1578
1711
|
}
|
|
1579
1712
|
let r = t?.closest("[data-block-path]");
|
|
1580
1713
|
if (r?.dataset.blockPath) {
|
|
1581
|
-
let e =
|
|
1714
|
+
let e = we(r.dataset.blockPath.split("/"));
|
|
1582
1715
|
e && (ae(e), N.value = !0);
|
|
1583
1716
|
}
|
|
1584
1717
|
}
|
|
@@ -1586,7 +1719,7 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
1586
1719
|
let e = T.value;
|
|
1587
1720
|
if (!e) return;
|
|
1588
1721
|
let t = H.value.indexOf(e);
|
|
1589
|
-
t >= 0 &&
|
|
1722
|
+
t >= 0 && Ne(t), T.value || (N.value = !1);
|
|
1590
1723
|
}
|
|
1591
1724
|
function ue() {
|
|
1592
1725
|
T.value && (N.value = !0);
|
|
@@ -1601,7 +1734,7 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
1601
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;
|
|
1602
1735
|
}
|
|
1603
1736
|
};
|
|
1604
|
-
e(w.value), d(
|
|
1737
|
+
e(w.value), d(J);
|
|
1605
1738
|
}
|
|
1606
1739
|
function de() {
|
|
1607
1740
|
T.value && (Array.isArray(T.value.linkage) || (T.value.linkage = []), T.value.linkage.push({
|
|
@@ -1630,68 +1763,68 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
1630
1763
|
D.value = e;
|
|
1631
1764
|
}
|
|
1632
1765
|
function ge() {
|
|
1633
|
-
D.value = null,
|
|
1766
|
+
D.value = null, ke();
|
|
1634
1767
|
}
|
|
1635
|
-
function
|
|
1768
|
+
function G(e, t) {
|
|
1636
1769
|
h += 1, F.value = `${e}_${h}`, I.value = u.find((t) => t.type === e)?.label ?? e, j.value = {
|
|
1637
1770
|
type: e,
|
|
1638
1771
|
target: t
|
|
1639
1772
|
}, M.value = !0;
|
|
1640
1773
|
}
|
|
1641
|
-
function
|
|
1774
|
+
function _e() {
|
|
1642
1775
|
if (!j.value) return;
|
|
1643
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;
|
|
1644
|
-
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);
|
|
1645
1778
|
}
|
|
1646
|
-
function
|
|
1779
|
+
function ve() {
|
|
1647
1780
|
M.value = !1, j.value = null;
|
|
1648
1781
|
}
|
|
1649
|
-
function
|
|
1782
|
+
function K() {
|
|
1650
1783
|
if (!D.value) return;
|
|
1651
1784
|
let e = D.value, t = E.value;
|
|
1652
|
-
D.value = null,
|
|
1785
|
+
D.value = null, G(e, t);
|
|
1653
1786
|
}
|
|
1654
|
-
function
|
|
1787
|
+
function q(e, t) {
|
|
1655
1788
|
if (D.value) return;
|
|
1656
|
-
let n =
|
|
1789
|
+
let n = Ee(e.key);
|
|
1657
1790
|
if (!n) return;
|
|
1658
|
-
let r =
|
|
1791
|
+
let r = De(n.key);
|
|
1659
1792
|
r && r.key !== "root" && (E.value = r), O.value = n, t.dataTransfer?.setData("text/plain", n.key);
|
|
1660
1793
|
}
|
|
1661
|
-
function
|
|
1794
|
+
function ye(e, t) {
|
|
1662
1795
|
let n = t.getBoundingClientRect();
|
|
1663
1796
|
return e.clientX < n.left + n.width / 2 ? "before" : "after";
|
|
1664
1797
|
}
|
|
1665
|
-
function
|
|
1798
|
+
function be(e) {
|
|
1666
1799
|
let t = O.value;
|
|
1667
1800
|
if (!t || t === e) return;
|
|
1668
1801
|
let n = H.value, r = n.indexOf(t), i = n.indexOf(e);
|
|
1669
1802
|
if (r < 0 || i < 0) return;
|
|
1670
1803
|
let [a] = n.splice(r, 1), o = k.value === "after" ? r < i ? i : i + 1 : r < i ? i - 1 : i;
|
|
1671
|
-
n.splice(o, 0, a),
|
|
1804
|
+
n.splice(o, 0, a), xe();
|
|
1672
1805
|
}
|
|
1673
|
-
function
|
|
1806
|
+
function xe() {
|
|
1674
1807
|
O.value = null, k.value = null;
|
|
1675
1808
|
}
|
|
1676
|
-
function
|
|
1809
|
+
function Se(e) {
|
|
1677
1810
|
return l("span", {
|
|
1678
1811
|
class: "field-drag-handle",
|
|
1679
1812
|
draggable: !0,
|
|
1680
1813
|
title: "拖拽调整顺序",
|
|
1681
|
-
onDragstart: (t) =>
|
|
1682
|
-
onDragend: () =>
|
|
1814
|
+
onDragstart: (t) => q(e, t),
|
|
1815
|
+
onDragend: () => xe()
|
|
1683
1816
|
}, "⠿");
|
|
1684
1817
|
}
|
|
1685
|
-
function
|
|
1818
|
+
function Ce(e) {
|
|
1686
1819
|
return e.key === "root" ? null : l("span", {
|
|
1687
1820
|
class: "block-drag-handle",
|
|
1688
1821
|
draggable: !0,
|
|
1689
1822
|
title: "拖拽调整顺序",
|
|
1690
|
-
onDragstart: (t) =>
|
|
1691
|
-
onDragend: () =>
|
|
1823
|
+
onDragstart: (t) => q(e, t),
|
|
1824
|
+
onDragend: () => xe()
|
|
1692
1825
|
}, "⠿");
|
|
1693
1826
|
}
|
|
1694
|
-
function
|
|
1827
|
+
function we(e) {
|
|
1695
1828
|
let t = L.value[0];
|
|
1696
1829
|
if (!t) return null;
|
|
1697
1830
|
let n = null, r = 0;
|
|
@@ -1699,11 +1832,11 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
1699
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;
|
|
1700
1833
|
return n;
|
|
1701
1834
|
}
|
|
1702
|
-
function
|
|
1835
|
+
function Te(e, t = [], n = !1) {
|
|
1703
1836
|
let r = [];
|
|
1704
1837
|
for (let i of e) if (i.type === "block") {
|
|
1705
1838
|
let e = n ? [...t, i.key] : t;
|
|
1706
|
-
r.push(...
|
|
1839
|
+
r.push(...Te(i.children ?? [], e, !0));
|
|
1707
1840
|
} else if (i.type !== "slot") {
|
|
1708
1841
|
let e = [...t, i.key].join(".");
|
|
1709
1842
|
r.push({
|
|
@@ -1713,33 +1846,33 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
1713
1846
|
}
|
|
1714
1847
|
return r;
|
|
1715
1848
|
}
|
|
1716
|
-
function
|
|
1849
|
+
function Ee(e, t = L.value[0]?.children ?? []) {
|
|
1717
1850
|
for (let n of t) {
|
|
1718
1851
|
if (n.key === e) return n;
|
|
1719
|
-
let t =
|
|
1852
|
+
let t = Ee(e, n.children ?? []);
|
|
1720
1853
|
if (t) return t;
|
|
1721
1854
|
}
|
|
1722
1855
|
return null;
|
|
1723
1856
|
}
|
|
1724
|
-
function
|
|
1857
|
+
function De(e, t = L.value[0]?.children ?? [], n = null) {
|
|
1725
1858
|
for (let r of t) {
|
|
1726
1859
|
if (r.key === e) return n;
|
|
1727
1860
|
if (r.type === "block") {
|
|
1728
|
-
let t =
|
|
1861
|
+
let t = De(e, r.children ?? [], r);
|
|
1729
1862
|
if (t) return t;
|
|
1730
1863
|
}
|
|
1731
1864
|
}
|
|
1732
1865
|
return null;
|
|
1733
1866
|
}
|
|
1734
|
-
function
|
|
1735
|
-
|
|
1867
|
+
function Oe(e) {
|
|
1868
|
+
ke();
|
|
1736
1869
|
let t = e.target;
|
|
1737
1870
|
if (O.value) {
|
|
1738
1871
|
let e = t?.closest("[data-block-path]");
|
|
1739
1872
|
if (e?.dataset.blockPath) {
|
|
1740
|
-
let t =
|
|
1873
|
+
let t = we(e.dataset.blockPath.split("/"));
|
|
1741
1874
|
if (t && H.value.includes(t)) {
|
|
1742
|
-
|
|
1875
|
+
be(t);
|
|
1743
1876
|
return;
|
|
1744
1877
|
}
|
|
1745
1878
|
}
|
|
@@ -1747,7 +1880,7 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
1747
1880
|
if (n?.dataset.fieldKey) {
|
|
1748
1881
|
let e = H.value.find((e) => e.key === n.dataset.fieldKey);
|
|
1749
1882
|
if (e) {
|
|
1750
|
-
|
|
1883
|
+
be(e);
|
|
1751
1884
|
return;
|
|
1752
1885
|
}
|
|
1753
1886
|
}
|
|
@@ -1756,31 +1889,31 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
1756
1889
|
if (n === "root") {
|
|
1757
1890
|
if (D.value) {
|
|
1758
1891
|
let e = D.value;
|
|
1759
|
-
D.value = null,
|
|
1892
|
+
D.value = null, G(e, null);
|
|
1760
1893
|
}
|
|
1761
1894
|
return;
|
|
1762
1895
|
}
|
|
1763
1896
|
if (n) {
|
|
1764
|
-
let e =
|
|
1897
|
+
let e = we(n.split("/"));
|
|
1765
1898
|
if (e) {
|
|
1766
|
-
|
|
1899
|
+
Me(e);
|
|
1767
1900
|
return;
|
|
1768
1901
|
}
|
|
1769
1902
|
}
|
|
1770
|
-
|
|
1903
|
+
K();
|
|
1771
1904
|
}
|
|
1772
|
-
function
|
|
1905
|
+
function ke() {
|
|
1773
1906
|
document.querySelectorAll("[data-block-path], [data-field-key]").forEach((e) => {
|
|
1774
1907
|
e.classList.remove("drop-active", "drop-before", "drop-after");
|
|
1775
1908
|
});
|
|
1776
1909
|
}
|
|
1777
|
-
function
|
|
1910
|
+
function Ae() {
|
|
1778
1911
|
document.querySelectorAll(".node-selected").forEach((e) => {
|
|
1779
1912
|
e.classList.remove("node-selected");
|
|
1780
1913
|
});
|
|
1781
1914
|
}
|
|
1782
|
-
function
|
|
1783
|
-
if (
|
|
1915
|
+
function J() {
|
|
1916
|
+
if (Ae(), !T.value) return;
|
|
1784
1917
|
let e = T.value.key;
|
|
1785
1918
|
document.querySelectorAll("[data-field-key]").forEach((t) => {
|
|
1786
1919
|
t.getAttribute("data-field-key") === e && t.classList.add("node-selected");
|
|
@@ -1788,58 +1921,58 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
1788
1921
|
t.getAttribute("data-block-path")?.split("/").pop() === e && t.classList.add("node-selected");
|
|
1789
1922
|
});
|
|
1790
1923
|
}
|
|
1791
|
-
function
|
|
1792
|
-
|
|
1924
|
+
function je(e) {
|
|
1925
|
+
ke();
|
|
1793
1926
|
let t = e.target;
|
|
1794
1927
|
if (O.value) {
|
|
1795
1928
|
let n = t?.closest("[data-field-key]");
|
|
1796
|
-
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"));
|
|
1797
1930
|
let r = t?.closest("[data-block-path]");
|
|
1798
1931
|
if (r?.dataset.blockPath) {
|
|
1799
|
-
let t =
|
|
1800
|
-
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"));
|
|
1801
1934
|
}
|
|
1802
1935
|
return;
|
|
1803
1936
|
}
|
|
1804
1937
|
(t?.closest("[data-block-path]"))?.classList.add("drop-active");
|
|
1805
1938
|
}
|
|
1806
|
-
function
|
|
1939
|
+
function Me(e) {
|
|
1807
1940
|
if (!D.value) return;
|
|
1808
1941
|
let t = D.value;
|
|
1809
|
-
D.value = null,
|
|
1942
|
+
D.value = null, G(t, e);
|
|
1810
1943
|
}
|
|
1811
|
-
function
|
|
1944
|
+
function Ne(e) {
|
|
1812
1945
|
let t = H.value, n = t[e];
|
|
1813
|
-
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);
|
|
1814
1947
|
}
|
|
1815
|
-
function
|
|
1948
|
+
function Pe(e) {
|
|
1816
1949
|
let t = document.createElement("textarea");
|
|
1817
1950
|
t.value = e, t.style.position = "fixed", t.style.opacity = "0", document.body.appendChild(t), t.select(), document.execCommand("copy"), t.remove();
|
|
1818
1951
|
}
|
|
1819
|
-
async function
|
|
1952
|
+
async function Fe(e, t) {
|
|
1820
1953
|
try {
|
|
1821
|
-
navigator.clipboard?.writeText ? await navigator.clipboard.writeText(e) :
|
|
1954
|
+
navigator.clipboard?.writeText ? await navigator.clipboard.writeText(e) : Pe(e);
|
|
1822
1955
|
} catch {
|
|
1823
|
-
|
|
1956
|
+
Pe(e);
|
|
1824
1957
|
}
|
|
1825
1958
|
A.value = t, window.setTimeout(() => {
|
|
1826
1959
|
A.value = null;
|
|
1827
1960
|
}, 1600);
|
|
1828
1961
|
}
|
|
1829
1962
|
return (t, c) => {
|
|
1830
|
-
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"),
|
|
1831
|
-
return m(), i("div",
|
|
1832
|
-
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, {
|
|
1833
1966
|
type: "primary",
|
|
1834
|
-
onClick: c[0] ||= (e) =>
|
|
1967
|
+
onClick: c[0] ||= (e) => Fe(R.value, "config")
|
|
1835
1968
|
}, {
|
|
1836
1969
|
default: S(() => [o(b(A.value === "config" ? "已复制 config" : "复制 config"), 1)]),
|
|
1837
1970
|
_: 1
|
|
1838
|
-
}), s(l, { onClick: c[1] ||= (e) =>
|
|
1971
|
+
}), s(l, { onClick: c[1] ||= (e) => Fe(re.value, "data") }, {
|
|
1839
1972
|
default: S(() => [o(b(A.value === "data" ? "已复制 data" : "复制 data"), 1)]),
|
|
1840
1973
|
_: 1
|
|
1841
1974
|
})])]),
|
|
1842
|
-
a("section",
|
|
1975
|
+
a("section", Ji, [c[34] ||= a("h3", null, "全局配置", -1), s(w, {
|
|
1843
1976
|
inline: "",
|
|
1844
1977
|
"label-position": "top"
|
|
1845
1978
|
}, {
|
|
@@ -1930,14 +2063,14 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
1930
2063
|
]),
|
|
1931
2064
|
_: 1
|
|
1932
2065
|
})]),
|
|
1933
|
-
a("div",
|
|
2066
|
+
a("div", Yi, [a("aside", Xi, [c[36] ||= a("h3", null, "字段库", -1), (m(), i(e, null, _(u, (t) => a("div", {
|
|
1934
2067
|
key: t.type,
|
|
1935
2068
|
class: "palette-item",
|
|
1936
2069
|
draggable: "true",
|
|
1937
2070
|
onDragstart: (e) => he(t.type),
|
|
1938
2071
|
onDragend: ge
|
|
1939
2072
|
}, [s(p, { label: t.label }, {
|
|
1940
|
-
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, {
|
|
1941
2074
|
key: 1,
|
|
1942
2075
|
placeholder: "请输入"
|
|
1943
2076
|
})) : t.type === "textarea" ? (m(), n(x, {
|
|
@@ -1989,56 +2122,56 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
1989
2122
|
})) : t.type === "inputTag" ? (m(), n(V, {
|
|
1990
2123
|
key: 11,
|
|
1991
2124
|
"model-value": ["标签"]
|
|
1992
|
-
})) : t.type === "transfer" ? (m(), i("div",
|
|
2125
|
+
})) : t.type === "transfer" ? (m(), i("div", $i, "穿梭框")) : t.type === "rate" ? (m(), n(H, {
|
|
1993
2126
|
key: 13,
|
|
1994
2127
|
"model-value": 3
|
|
1995
2128
|
})) : t.type === "slider" ? (m(), n(ae, {
|
|
1996
2129
|
key: 14,
|
|
1997
2130
|
"model-value": 40
|
|
1998
|
-
})) : t.type === "cascader" ? (m(), n(
|
|
2131
|
+
})) : t.type === "cascader" ? (m(), n(G, {
|
|
1999
2132
|
key: 15,
|
|
2000
2133
|
placeholder: "请选择"
|
|
2001
|
-
})) : t.type === "treeSelect" ? (m(), n(
|
|
2134
|
+
})) : t.type === "treeSelect" ? (m(), n(K, {
|
|
2002
2135
|
key: 16,
|
|
2003
2136
|
placeholder: "请选择"
|
|
2004
2137
|
})) : r("", !0)]),
|
|
2005
2138
|
_: 2
|
|
2006
|
-
}, 1032, ["label"])], 40,
|
|
2139
|
+
}, 1032, ["label"])], 40, Zi)), 64))]), a("section", {
|
|
2007
2140
|
class: "preview",
|
|
2008
|
-
onDragover: C(
|
|
2009
|
-
onDragleave:
|
|
2010
|
-
onDrop: C(
|
|
2141
|
+
onDragover: C(je, ["prevent"]),
|
|
2142
|
+
onDragleave: ke,
|
|
2143
|
+
onDrop: C(Oe, ["prevent"]),
|
|
2011
2144
|
onClick: ce
|
|
2012
|
-
}, [a("div",
|
|
2145
|
+
}, [a("div", ea, [c[39] ||= a("h3", null, "实时表单", -1), a("div", ta, [c[38] ||= a("span", null, "将左侧字段拖到这里", -1), s(l, {
|
|
2013
2146
|
size: "small",
|
|
2014
2147
|
onClick: ue
|
|
2015
2148
|
}, {
|
|
2016
2149
|
default: S(() => [...c[37] ||= [o("字段配置", -1)]]),
|
|
2017
2150
|
_: 1
|
|
2018
|
-
})])]), s(
|
|
2151
|
+
})])]), s(Wi, {
|
|
2019
2152
|
config: L.value,
|
|
2020
2153
|
modelValue: U.value,
|
|
2021
2154
|
"onUpdate:modelValue": c[10] ||= (e) => U.value = e,
|
|
2022
2155
|
"show-submit": "",
|
|
2023
2156
|
"show-reset": "",
|
|
2024
|
-
"field-action":
|
|
2025
|
-
"block-action":
|
|
2157
|
+
"field-action": Se,
|
|
2158
|
+
"block-action": Ce
|
|
2026
2159
|
}, null, 8, ["config", "modelValue"])], 32)]),
|
|
2027
|
-
s(
|
|
2160
|
+
s(ye, {
|
|
2028
2161
|
modelValue: N.value,
|
|
2029
2162
|
"onUpdate:modelValue": c[28] ||= (e) => N.value = e,
|
|
2030
2163
|
title: "字段配置",
|
|
2031
2164
|
size: "560px"
|
|
2032
2165
|
}, {
|
|
2033
|
-
default: S(() => [s(
|
|
2166
|
+
default: S(() => [s(q, {
|
|
2034
2167
|
class: "drawer-scrollbar",
|
|
2035
2168
|
"view-style": "padding: 0 20px 20px 0;"
|
|
2036
2169
|
}, {
|
|
2037
|
-
default: S(() => [a("div",
|
|
2170
|
+
default: S(() => [a("div", na, [a("button", {
|
|
2038
2171
|
type: "button",
|
|
2039
2172
|
class: f({ active: !E.value }),
|
|
2040
2173
|
onClick: se
|
|
2041
|
-
}, " 根 ", 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, {
|
|
2042
2175
|
key: 0,
|
|
2043
2176
|
"label-position": "top"
|
|
2044
2177
|
}, {
|
|
@@ -2178,11 +2311,11 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
2178
2311
|
_: 1
|
|
2179
2312
|
})) : r("", !0),
|
|
2180
2313
|
s(p, { label: "联动配置" }, {
|
|
2181
|
-
default: S(() => [a("div",
|
|
2314
|
+
default: S(() => [a("div", ia, [(m(!0), i(e, null, _(ee.value, (t, r) => (m(), i("div", {
|
|
2182
2315
|
key: r,
|
|
2183
2316
|
class: "linkage-rule"
|
|
2184
2317
|
}, [
|
|
2185
|
-
a("div",
|
|
2318
|
+
a("div", aa, [a("span", null, "规则 " + b(r + 1), 1), s(l, {
|
|
2186
2319
|
link: "",
|
|
2187
2320
|
type: "danger",
|
|
2188
2321
|
onClick: (e) => fe(r)
|
|
@@ -2190,7 +2323,7 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
2190
2323
|
default: S(() => [...c[41] ||= [o(" 删除 ", -1)]]),
|
|
2191
2324
|
_: 1
|
|
2192
2325
|
}, 8, ["onClick"])]),
|
|
2193
|
-
a("div",
|
|
2326
|
+
a("div", oa, [
|
|
2194
2327
|
s(g, {
|
|
2195
2328
|
modelValue: t.when.field,
|
|
2196
2329
|
"onUpdate:modelValue": (e) => t.when.field = e,
|
|
@@ -2220,7 +2353,7 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
2220
2353
|
placeholder: "条件值"
|
|
2221
2354
|
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
2222
2355
|
]),
|
|
2223
|
-
a("div",
|
|
2356
|
+
a("div", sa, [
|
|
2224
2357
|
s(k, {
|
|
2225
2358
|
modelValue: t.effects.visible,
|
|
2226
2359
|
"onUpdate:modelValue": (e) => t.effects.visible = e
|
|
@@ -2275,7 +2408,7 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
2275
2408
|
key: 4,
|
|
2276
2409
|
label: "选项"
|
|
2277
2410
|
}, {
|
|
2278
|
-
default: S(() => [a("div",
|
|
2411
|
+
default: S(() => [a("div", ca, [(m(!0), i(e, null, _(T.value.options ?? [], (e, t) => (m(), i("div", {
|
|
2279
2412
|
key: t,
|
|
2280
2413
|
class: "option-row"
|
|
2281
2414
|
}, [
|
|
@@ -2321,24 +2454,24 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
2321
2454
|
})
|
|
2322
2455
|
]),
|
|
2323
2456
|
_: 1
|
|
2324
|
-
})) : (m(), i("div",
|
|
2457
|
+
})) : (m(), i("div", la, "点击右侧表单中的字段进行配置"))]),
|
|
2325
2458
|
_: 1
|
|
2326
2459
|
})]),
|
|
2327
2460
|
_: 1
|
|
2328
2461
|
}, 8, ["modelValue"]),
|
|
2329
|
-
a("section",
|
|
2330
|
-
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, {
|
|
2331
2464
|
modelValue: M.value,
|
|
2332
2465
|
"onUpdate:modelValue": c[31] ||= (e) => M.value = e,
|
|
2333
2466
|
title: j.value?.type === "block" ? "添加 block" : "添加字段",
|
|
2334
2467
|
width: "420px"
|
|
2335
2468
|
}, {
|
|
2336
|
-
footer: S(() => [s(l, { onClick:
|
|
2469
|
+
footer: S(() => [s(l, { onClick: ve }, {
|
|
2337
2470
|
default: S(() => [...c[52] ||= [o("取消", -1)]]),
|
|
2338
2471
|
_: 1
|
|
2339
2472
|
}), s(l, {
|
|
2340
2473
|
type: "primary",
|
|
2341
|
-
onClick:
|
|
2474
|
+
onClick: _e
|
|
2342
2475
|
}, {
|
|
2343
2476
|
default: S(() => [...c[53] ||= [o("确定", -1)]]),
|
|
2344
2477
|
_: 1
|
|
@@ -2372,8 +2505,8 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
2372
2505
|
]);
|
|
2373
2506
|
};
|
|
2374
2507
|
}
|
|
2375
|
-
}), [["__scopeId", "data-v-23272e71"]]),
|
|
2376
|
-
e.component("FitfulForm",
|
|
2508
|
+
}), [["__scopeId", "data-v-23272e71"]]), ma = { install(e) {
|
|
2509
|
+
e.component("FitfulForm", Wi), e.component("FitfulCreateForm", pa), e.component("FitfulDynamicField", Di);
|
|
2377
2510
|
} };
|
|
2378
2511
|
//#endregion
|
|
2379
|
-
export {
|
|
2512
|
+
export { pa as CreateForm, Di as DynamicField, ma as FitfulFormPlugin, ma as default, Wi as Form };
|