fitful-form 0.0.7 → 0.0.9
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
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createTextVNode as o, createVNode as s, defineComponent as c, h as l, mergeProps as u, nextTick as d, normalizeClass as f, onMounted as p, openBlock as m, reactive as h, ref as g, renderList as _, renderSlot as v, resolveComponent as y, toDisplayString as b, watch as x, withCtx as S, withModifiers as
|
|
2
|
-
import { ElButton as
|
|
1
|
+
import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createTextVNode as o, createVNode as s, defineComponent as c, h as l, mergeProps as u, nextTick as d, normalizeClass as f, onMounted as p, openBlock as m, reactive as h, ref as g, renderList as _, renderSlot as v, resolveComponent as y, toDisplayString as b, watch as x, withCtx as S, withModifiers as ee } from "vue";
|
|
2
|
+
import { ElButton as C, ElCol as w, ElForm as T, ElRow as E } from "element-plus";
|
|
3
3
|
//#region node_modules/lodash-es/_freeGlobal.js
|
|
4
|
-
var
|
|
5
|
-
function
|
|
6
|
-
var t =
|
|
4
|
+
var D = typeof global == "object" && global && global.Object === Object && global, O = typeof self == "object" && self && self.Object === Object && self, k = D || O || Function("return this")(), A = k.Symbol, j = Object.prototype, M = j.hasOwnProperty, N = j.toString, P = A ? A.toStringTag : void 0;
|
|
5
|
+
function F(e) {
|
|
6
|
+
var t = M.call(e, P), n = e[P];
|
|
7
7
|
try {
|
|
8
|
-
e[
|
|
8
|
+
e[P] = void 0;
|
|
9
9
|
var r = !0;
|
|
10
10
|
} catch {}
|
|
11
|
-
var i =
|
|
12
|
-
return r && (t ? e[
|
|
11
|
+
var i = N.call(e);
|
|
12
|
+
return r && (t ? e[P] = n : delete e[P]), i;
|
|
13
13
|
}
|
|
14
14
|
//#endregion
|
|
15
15
|
//#region node_modules/lodash-es/_objectToString.js
|
|
16
|
-
var
|
|
16
|
+
var I = Object.prototype.toString;
|
|
17
17
|
function te(e) {
|
|
18
|
-
return
|
|
18
|
+
return I.call(e);
|
|
19
19
|
}
|
|
20
20
|
//#endregion
|
|
21
21
|
//#region node_modules/lodash-es/_baseGetTag.js
|
|
22
|
-
var ne = "[object Null]", L = "[object Undefined]", R =
|
|
22
|
+
var ne = "[object Null]", L = "[object Undefined]", R = A ? A.toStringTag : void 0;
|
|
23
23
|
function z(e) {
|
|
24
|
-
return e == null ? e === void 0 ? L : ne : R && R in Object(e) ?
|
|
24
|
+
return e == null ? e === void 0 ? L : ne : R && R in Object(e) ? F(e) : te(e);
|
|
25
25
|
}
|
|
26
26
|
//#endregion
|
|
27
27
|
//#region node_modules/lodash-es/isObjectLike.js
|
|
@@ -39,28 +39,28 @@ function H(e) {
|
|
|
39
39
|
}
|
|
40
40
|
//#endregion
|
|
41
41
|
//#region node_modules/lodash-es/isFunction.js
|
|
42
|
-
var U = "[object AsyncFunction]", re = "[object Function]",
|
|
43
|
-
function
|
|
42
|
+
var U = "[object AsyncFunction]", re = "[object Function]", W = "[object GeneratorFunction]", ie = "[object Proxy]";
|
|
43
|
+
function ae(e) {
|
|
44
44
|
if (!H(e)) return !1;
|
|
45
45
|
var t = z(e);
|
|
46
|
-
return t == re || t ==
|
|
46
|
+
return t == re || t == W || t == U || t == ie;
|
|
47
47
|
}
|
|
48
48
|
//#endregion
|
|
49
49
|
//#region node_modules/lodash-es/_coreJsData.js
|
|
50
|
-
var
|
|
51
|
-
var e = /[^.]+$/.exec(
|
|
50
|
+
var G = k["__core-js_shared__"], oe = function() {
|
|
51
|
+
var e = /[^.]+$/.exec(G && G.keys && G.keys.IE_PROTO || "");
|
|
52
52
|
return e ? "Symbol(src)_1." + e : "";
|
|
53
53
|
}();
|
|
54
|
-
function
|
|
55
|
-
return !!
|
|
54
|
+
function se(e) {
|
|
55
|
+
return !!oe && oe in e;
|
|
56
56
|
}
|
|
57
57
|
//#endregion
|
|
58
58
|
//#region node_modules/lodash-es/_toSource.js
|
|
59
|
-
var
|
|
60
|
-
function
|
|
59
|
+
var ce = Function.prototype.toString;
|
|
60
|
+
function K(e) {
|
|
61
61
|
if (e != null) {
|
|
62
62
|
try {
|
|
63
|
-
return
|
|
63
|
+
return ce.call(e);
|
|
64
64
|
} catch {}
|
|
65
65
|
try {
|
|
66
66
|
return e + "";
|
|
@@ -70,28 +70,28 @@ function W(e) {
|
|
|
70
70
|
}
|
|
71
71
|
//#endregion
|
|
72
72
|
//#region node_modules/lodash-es/_baseIsNative.js
|
|
73
|
-
var
|
|
74
|
-
function
|
|
75
|
-
return !H(e) ||
|
|
73
|
+
var le = /[\\^$.*+?()[\]{}|]/g, ue = /^\[object .+?Constructor\]$/, de = Function.prototype, fe = Object.prototype, pe = de.toString, me = fe.hasOwnProperty, he = RegExp("^" + pe.call(me).replace(le, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
|
|
74
|
+
function ge(e) {
|
|
75
|
+
return !H(e) || se(e) ? !1 : (ae(e) ? he : ue).test(K(e));
|
|
76
76
|
}
|
|
77
77
|
//#endregion
|
|
78
78
|
//#region node_modules/lodash-es/_getValue.js
|
|
79
|
-
function
|
|
79
|
+
function _e(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 q(e, t) {
|
|
85
|
+
var n = _e(e, t);
|
|
86
|
+
return ge(n) ? n : void 0;
|
|
87
87
|
}
|
|
88
88
|
//#endregion
|
|
89
89
|
//#region node_modules/lodash-es/_WeakMap.js
|
|
90
|
-
var
|
|
90
|
+
var ve = q(k, "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 = q(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,24 +137,24 @@ 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 je(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
|
}
|
|
@@ -166,64 +166,64 @@ function Ne(e) {
|
|
|
166
166
|
}
|
|
167
167
|
//#endregion
|
|
168
168
|
//#region node_modules/lodash-es/isArrayLike.js
|
|
169
|
-
function
|
|
170
|
-
return e != null && Ne(e.length) && !
|
|
169
|
+
function J(e) {
|
|
170
|
+
return e != null && Ne(e.length) && !ae(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) && Ne(e.length) && !!
|
|
205
|
+
var We = typeof exports == "object" && exports && !exports.nodeType && exports, Ge = We && typeof module == "object" && module && !module.nodeType && module, Ke = Ge && Ge.exports === We ? k.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) && Ne(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 && D.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 J(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 J(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 = q(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 = q(k, "Map");
|
|
368
368
|
//#endregion
|
|
369
369
|
//#region node_modules/lodash-es/_mapCacheClear.js
|
|
370
370
|
function tn() {
|
|
@@ -470,16 +470,16 @@ 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 && je(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 && je(t, It(t), e);
|
|
479
479
|
}
|
|
480
480
|
//#endregion
|
|
481
481
|
//#region node_modules/lodash-es/_cloneBuffer.js
|
|
482
|
-
var xn = typeof exports == "object" && exports && !exports.nodeType && exports, Sn = xn && typeof module == "object" && module && !module.nodeType && module, Cn = Sn && Sn.exports === xn ?
|
|
482
|
+
var xn = typeof exports == "object" && exports && !exports.nodeType && exports, Sn = xn && typeof module == "object" && module && !module.nodeType && module, Cn = Sn && Sn.exports === xn ? k.Buffer : void 0, wn = Cn ? Cn.allocUnsafe : void 0;
|
|
483
483
|
function Tn(e, t) {
|
|
484
484
|
if (t) return e.slice();
|
|
485
485
|
var n = e.length, r = wn ? wn(n) : new e.constructor(n);
|
|
@@ -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 je(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 je(e, Mn(e), t);
|
|
524
524
|
}
|
|
525
525
|
//#endregion
|
|
526
526
|
//#region node_modules/lodash-es/_baseGetAllKeys.js
|
|
@@ -540,9 +540,9 @@ 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 ||
|
|
545
|
-
var t = z(e), n = t == Vn ? e.constructor : void 0, r = n ?
|
|
543
|
+
var Ln = q(k, "DataView"), Rn = q(k, "Promise"), zn = q(k, "Set"), Bn = "[object Map]", Vn = "[object Object]", Hn = "[object Promise]", Un = "[object Set]", Wn = "[object WeakMap]", Gn = "[object DataView]", Kn = K(Ln), qn = K(en), Jn = K(Rn), Yn = K(zn), Xn = K(ve), 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 || ve && Q(new ve()) != Wn) && (Q = function(e) {
|
|
545
|
+
var t = z(e), n = t == Vn ? e.constructor : void 0, r = n ? K(n) : "";
|
|
546
546
|
if (r) switch (r) {
|
|
547
547
|
case Kn: return Gn;
|
|
548
548
|
case qn: return Bn;
|
|
@@ -559,7 +559,7 @@ function $n(e) {
|
|
|
559
559
|
}
|
|
560
560
|
//#endregion
|
|
561
561
|
//#region node_modules/lodash-es/_Uint8Array.js
|
|
562
|
-
var er =
|
|
562
|
+
var er = k.Uint8Array;
|
|
563
563
|
//#endregion
|
|
564
564
|
//#region node_modules/lodash-es/_cloneArrayBuffer.js
|
|
565
565
|
function tr(e) {
|
|
@@ -581,7 +581,7 @@ function ir(e) {
|
|
|
581
581
|
}
|
|
582
582
|
//#endregion
|
|
583
583
|
//#region node_modules/lodash-es/_cloneSymbol.js
|
|
584
|
-
var ar =
|
|
584
|
+
var ar = A ? A.prototype : void 0, or = ar ? ar.valueOf : void 0;
|
|
585
585
|
function sr(e) {
|
|
586
586
|
return or ? Object(or.call(e)) : {};
|
|
587
587
|
}
|
|
@@ -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 C(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 w(e, t) {
|
|
769
|
+
return String(e.uid ?? e.id ?? `${e.url}-${t}`);
|
|
770
|
+
}
|
|
771
|
+
function T(e) {
|
|
772
|
+
return F.value.slice(0, e).filter((e) => !!e.url && C(e)).length;
|
|
773
|
+
}
|
|
774
|
+
function E(e) {
|
|
775
|
+
f("update:modelValue", e);
|
|
776
|
+
}
|
|
777
|
+
function D(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 O(e) {
|
|
786
|
+
e.url && window.open(e.url, "_blank", "noopener,noreferrer");
|
|
787
|
+
}
|
|
788
|
+
function k(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 = k(e, n.children);
|
|
713
799
|
if (t !== null) return t;
|
|
714
800
|
}
|
|
715
801
|
}
|
|
716
802
|
return null;
|
|
717
803
|
}
|
|
718
|
-
function
|
|
804
|
+
function A(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 = k(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 j(e) {
|
|
820
|
+
return e.map((e) => k(e) ?? A(e));
|
|
735
821
|
}
|
|
736
|
-
let
|
|
737
|
-
let e =
|
|
822
|
+
let M = 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
|
+
}), N = t(() => !!d.child.isText), P = t(() => !N.value && z.value.disabled !== !0), F = t(() => x(d.modelValue ?? "")), I = t(() => Array.isArray(d.modelValue) ? d.modelValue : []), te = t(() => F.value.filter((e) => !!e.url && C(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(() => F.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"), k = 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"), W = y("el-input-tag"), ie = y("el-input-otp"), ae = y("el-mention"), G = y("el-radio"), oe = y("el-radio-group"), se = y("el-rate"), ce = y("el-select-v2"), K = y("el-slider"), le = y("el-switch"), ue = y("el-time-picker"), de = y("el-time-select"), fe = y("el-transfer"), pe = y("el-tree-select"), me = y("el-form-item"), he = y("el-col");
|
|
891
|
+
return m(), n(he, {
|
|
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(me, {
|
|
900
|
+
"label-width": c.child.labelWidth ?? c.child["label-width"],
|
|
901
|
+
prop: c.prop ?? c.child.key,
|
|
902
|
+
required: c.child.required,
|
|
903
|
+
rules: M.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
|
+
N.value && !F.value.length ? (m(), n(d, { key: 0 }, {
|
|
908
|
+
default: S(() => [...l[21] ||= [o("-", -1)]]),
|
|
909
|
+
_: 1
|
|
910
|
+
})) : r("", !0),
|
|
911
|
+
F.value.length ? (m(), i("div", bi, [(m(!0), i(e, null, _(F.value, (e, t) => (m(), i("div", {
|
|
912
|
+
key: w(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": C(e) ? te.value : [],
|
|
920
|
+
"initial-index": C(e) ? T(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: ee((t) => O(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)), P.value ? (m(), i("button", {
|
|
941
|
+
key: 2,
|
|
942
|
+
class: "upload-list-remove",
|
|
943
|
+
type: "button",
|
|
944
|
+
"aria-label": "移除文件",
|
|
945
|
+
onClick: ee((e) => D(t), ["stop"])
|
|
946
|
+
}, " × ", 8, Ci)) : r("", !0)]))), 128))])) : r("", !0),
|
|
947
|
+
P.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": I.value,
|
|
952
|
+
"show-file-list": !1,
|
|
953
|
+
"onUpdate:fileList": E
|
|
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 }, _(j(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(A(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(k, 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(W, 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(ie, 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(ae, 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(oe, 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(G, {
|
|
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(se, 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(ce, 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(K, 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(le, 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(ue, 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(de, 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(fe, 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(pe, 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(k, 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-96753d91"]]);
|
|
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
|
}
|
|
@@ -1181,10 +1314,10 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
1181
1314
|
function S() {
|
|
1182
1315
|
for (let e of y(d.value, [], !1)) m.add(e);
|
|
1183
1316
|
}
|
|
1184
|
-
function
|
|
1185
|
-
if (e.dictLoader) for (let t of u.value) e.dicts[t] || o[t] || s.has(t) ||
|
|
1317
|
+
function ee() {
|
|
1318
|
+
if (e.dictLoader) for (let t of u.value) e.dicts[t] || o[t] || s.has(t) || D(t);
|
|
1186
1319
|
}
|
|
1187
|
-
async function
|
|
1320
|
+
async function D(t) {
|
|
1188
1321
|
if (e.dictLoader) {
|
|
1189
1322
|
s.add(t);
|
|
1190
1323
|
try {
|
|
@@ -1195,8 +1328,8 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
1195
1328
|
}
|
|
1196
1329
|
}
|
|
1197
1330
|
}
|
|
1198
|
-
x(u, () =>
|
|
1199
|
-
function
|
|
1331
|
+
x(u, () => ee(), { immediate: !0 }), x(() => e.dictLoader, () => ee(), { immediate: !0 });
|
|
1332
|
+
function O(e, t) {
|
|
1200
1333
|
let n = e;
|
|
1201
1334
|
for (let e of t) {
|
|
1202
1335
|
if (!n || typeof n != "object" || !(e in n)) return;
|
|
@@ -1204,10 +1337,10 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
1204
1337
|
}
|
|
1205
1338
|
return n;
|
|
1206
1339
|
}
|
|
1207
|
-
function
|
|
1208
|
-
return
|
|
1340
|
+
function k(t) {
|
|
1341
|
+
return O(e.modelValue, t);
|
|
1209
1342
|
}
|
|
1210
|
-
function
|
|
1343
|
+
function A(e, t, n) {
|
|
1211
1344
|
let r = { ...e }, i = r;
|
|
1212
1345
|
for (let e = 0; e < t.length - 1; e++) {
|
|
1213
1346
|
let n = t[e], r = i[n];
|
|
@@ -1215,7 +1348,7 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
1215
1348
|
}
|
|
1216
1349
|
return i[t[t.length - 1]] = n, r;
|
|
1217
1350
|
}
|
|
1218
|
-
function
|
|
1351
|
+
function j(e, t) {
|
|
1219
1352
|
let n = gi(e), r = (e, t, i) => {
|
|
1220
1353
|
for (let a of e) {
|
|
1221
1354
|
if (a.type === "block") {
|
|
@@ -1224,18 +1357,18 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
1224
1357
|
continue;
|
|
1225
1358
|
}
|
|
1226
1359
|
if (a.utc) {
|
|
1227
|
-
let e = [...t, a.key], r =
|
|
1228
|
-
r instanceof Date && (n =
|
|
1360
|
+
let e = [...t, a.key], r = O(n, e);
|
|
1361
|
+
r instanceof Date && (n = A(n, e, r.toISOString()));
|
|
1229
1362
|
}
|
|
1230
1363
|
}
|
|
1231
1364
|
};
|
|
1232
1365
|
return r(t, [], !1), n;
|
|
1233
1366
|
}
|
|
1234
|
-
function
|
|
1235
|
-
let i =
|
|
1367
|
+
function M(t, r) {
|
|
1368
|
+
let i = A(e.modelValue, t, r);
|
|
1236
1369
|
n("update:modelValue", i), n("change", i, t.join("."), r);
|
|
1237
1370
|
}
|
|
1238
|
-
function
|
|
1371
|
+
function N(e, t) {
|
|
1239
1372
|
let n = { ...e }, r = n;
|
|
1240
1373
|
for (let e = 0; e < t.length - 1; e++) {
|
|
1241
1374
|
let i = t[e], a = r[i];
|
|
@@ -1244,33 +1377,33 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
1244
1377
|
}
|
|
1245
1378
|
return delete r[t[t.length - 1]], n;
|
|
1246
1379
|
}
|
|
1247
|
-
function
|
|
1380
|
+
function P(e) {
|
|
1248
1381
|
try {
|
|
1249
1382
|
return JSON.stringify(e);
|
|
1250
1383
|
} catch {
|
|
1251
1384
|
return String(e);
|
|
1252
1385
|
}
|
|
1253
1386
|
}
|
|
1254
|
-
function
|
|
1387
|
+
function F() {
|
|
1255
1388
|
let t = gi(e.modelValue), r = !1, i = /* @__PURE__ */ new Map();
|
|
1256
|
-
for (let n of
|
|
1257
|
-
let e =
|
|
1258
|
-
i.set(a, e), _.get(a) !== e &&
|
|
1389
|
+
for (let n of Hi(e.config, e.modelValue)) {
|
|
1390
|
+
let e = P(n.value), a = `${n.path.join("/")}:${n.ruleIndex}:${e}`;
|
|
1391
|
+
i.set(a, e), _.get(a) !== e && O(t, n.path) !== n.value && (t = A(t, n.path, n.value), r = !0);
|
|
1259
1392
|
}
|
|
1260
1393
|
_ = i;
|
|
1261
|
-
let a =
|
|
1262
|
-
for (let e of a)
|
|
1394
|
+
let a = zi(e.config, t);
|
|
1395
|
+
for (let e of a) O(t, e) !== void 0 && (t = N(t, e), r = !0);
|
|
1263
1396
|
r && (f = gi(t), n("update:modelValue", t), n("change", t));
|
|
1264
1397
|
}
|
|
1265
|
-
p(
|
|
1266
|
-
async function
|
|
1398
|
+
p(F), x(() => e.modelValue, () => F(), { deep: !0 });
|
|
1399
|
+
async function I() {
|
|
1267
1400
|
if (a.value) try {
|
|
1268
1401
|
await a.value.validate();
|
|
1269
1402
|
} catch (e) {
|
|
1270
1403
|
console.log(e);
|
|
1271
1404
|
return;
|
|
1272
1405
|
}
|
|
1273
|
-
let t =
|
|
1406
|
+
let t = j(e.modelValue, e.config);
|
|
1274
1407
|
console.log(t), n("submit", t);
|
|
1275
1408
|
}
|
|
1276
1409
|
function te() {
|
|
@@ -1297,23 +1430,23 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
1297
1430
|
}
|
|
1298
1431
|
function B(e) {
|
|
1299
1432
|
let t = r[e.key], n = t ? t({ node: e }) : [l("span", null, e.label || e.key)];
|
|
1300
|
-
return l(
|
|
1433
|
+
return l(w, {
|
|
1301
1434
|
key: e.key,
|
|
1302
1435
|
span: e.span ?? 6,
|
|
1303
1436
|
offset: e.offset
|
|
1304
1437
|
}, () => [l("div", { class: "form-slot" }, n)]);
|
|
1305
1438
|
}
|
|
1306
1439
|
function V(t, n) {
|
|
1307
|
-
let r =
|
|
1440
|
+
let r = k(n) ?? t.default ?? "", i = {
|
|
1308
1441
|
child: t,
|
|
1309
1442
|
prop: n.join("."),
|
|
1310
1443
|
modelValue: r,
|
|
1311
|
-
"onUpdate:modelValue": (e) =>
|
|
1444
|
+
"onUpdate:modelValue": (e) => M(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"], d = l(
|
|
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(w, {
|
|
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", {
|
|
@@ -1321,7 +1454,7 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
1321
1454
|
type: "button",
|
|
1322
1455
|
"aria-expanded": !a,
|
|
1323
1456
|
onClick: () => v(i)
|
|
1324
|
-
}, a ? "▸" : "▾") : null].filter(Boolean))])]), f = l("div", { class: ["form-block-body", { "is-collapsed": a }] }, () => [l("div", { class: "form-block-body-inner" }, () => [l(
|
|
1457
|
+
}, a ? "▸" : "▾") : null].filter(Boolean))])]), f = l("div", { class: ["form-block-body", { "is-collapsed": a }] }, () => [l("div", { class: "form-block-body-inner" }, () => [l(E, { gutter: 20 }, () => s.filter(Boolean))])]), p = [...n, t.key].join("/");
|
|
1325
1458
|
return l("div", {
|
|
1326
1459
|
class: "form-node",
|
|
1327
1460
|
key: t.key,
|
|
@@ -1329,27 +1462,27 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
1329
1462
|
}, [l("div", {
|
|
1330
1463
|
class: ["form-block", { "form-block--borderless": t.border === !1 }],
|
|
1331
1464
|
style: t.indent ? { marginLeft: `${t.indent}px` } : void 0
|
|
1332
|
-
}, [l(
|
|
1465
|
+
}, [l(E, { gutter: 20 }, () => [d].filter(Boolean)), f])]);
|
|
1333
1466
|
}
|
|
1334
1467
|
function U(e, t) {
|
|
1335
|
-
return e.visible ? e.type === "block" ? l(
|
|
1468
|
+
return e.visible ? e.type === "block" ? l(w, {
|
|
1336
1469
|
key: e.key,
|
|
1337
1470
|
span: e.span ?? 24,
|
|
1338
1471
|
offset: e.offset
|
|
1339
1472
|
}, () => [H(e, t, !0)]) : e.type === "slot" ? B(e) : V(e, [...t, e.key]) : null;
|
|
1340
1473
|
}
|
|
1341
1474
|
function re(e) {
|
|
1342
|
-
return e.visible ? e.type === "block" ? H(e, [], !1) : l(
|
|
1475
|
+
return e.visible ? e.type === "block" ? H(e, [], !1) : l(E, {
|
|
1343
1476
|
key: e.key,
|
|
1344
1477
|
gutter: 20
|
|
1345
1478
|
}, () => [U(e, [])]) : null;
|
|
1346
1479
|
}
|
|
1347
1480
|
return () => {
|
|
1348
|
-
let t = d.value.map(re).filter((e) => e !== null), n = [e.showSubmit ? l(
|
|
1481
|
+
let t = d.value.map(re).filter((e) => e !== null), n = [e.showSubmit ? l(C, {
|
|
1349
1482
|
type: "primary",
|
|
1350
1483
|
nativeType: "button",
|
|
1351
|
-
onClick:
|
|
1352
|
-
}, () => "提交") : null, e.showReset ? l(
|
|
1484
|
+
onClick: I
|
|
1485
|
+
}, () => "提交") : null, e.showReset ? l(C, {
|
|
1353
1486
|
nativeType: "button",
|
|
1354
1487
|
onClick: z
|
|
1355
1488
|
}, () => "重置") : null].filter((e) => e !== null), r = y(d.value, [], !1), i = e.showCollapse && r.length > 0 ? l("div", { class: "form-toolbar" }, [l("button", {
|
|
@@ -1360,7 +1493,7 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
1360
1493
|
class: "form-block-header-action",
|
|
1361
1494
|
type: "button",
|
|
1362
1495
|
onClick: S
|
|
1363
|
-
}, "全部收起")]) : null, o = l(
|
|
1496
|
+
}, "全部收起")]) : null, o = l(T, {
|
|
1364
1497
|
ref: a,
|
|
1365
1498
|
class: "form-engine",
|
|
1366
1499
|
model: e.modelValue,
|
|
@@ -1369,16 +1502,19 @@ 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 = {
|
|
1512
|
+
key: 13,
|
|
1513
|
+
class: "palette-compact"
|
|
1514
|
+
}, ta = { class: "preview-header" }, na = { class: "preview-header-actions" }, ra = { class: "breadcrumb" }, ia = { key: 0 }, aa = { class: "linkage-editor" }, oa = { class: "linkage-rule-title" }, sa = { class: "linkage-when" }, ca = { class: "linkage-effects" }, la = { class: "option-editor" }, ua = {
|
|
1379
1515
|
key: 1,
|
|
1380
1516
|
class: "editor-empty"
|
|
1381
|
-
},
|
|
1517
|
+
}, da = { class: "code-panels" }, fa = { class: "code-panel" }, pa = { class: "code-panel" }, ma = /*#__PURE__*/ Ei(/* @__PURE__ */ c({
|
|
1382
1518
|
name: "CreateForm",
|
|
1383
1519
|
__name: "CreateForm",
|
|
1384
1520
|
setup(c) {
|
|
@@ -1449,6 +1585,10 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
1449
1585
|
type: "transfer",
|
|
1450
1586
|
label: "穿梭框"
|
|
1451
1587
|
},
|
|
1588
|
+
{
|
|
1589
|
+
type: "upload",
|
|
1590
|
+
label: "附件"
|
|
1591
|
+
},
|
|
1452
1592
|
{
|
|
1453
1593
|
type: "rate",
|
|
1454
1594
|
label: "评分"
|
|
@@ -1474,7 +1614,15 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
1474
1614
|
"mention",
|
|
1475
1615
|
"virtualizedSelect"
|
|
1476
1616
|
], h = 0;
|
|
1477
|
-
function v(e
|
|
1617
|
+
function v(e) {
|
|
1618
|
+
let t = URL.createObjectURL(e.file), n = {
|
|
1619
|
+
id: `local-${Date.now()}`,
|
|
1620
|
+
url: t,
|
|
1621
|
+
path: t
|
|
1622
|
+
};
|
|
1623
|
+
return e.file.url = t, e.onSuccess(n, e.file), Promise.resolve(n);
|
|
1624
|
+
}
|
|
1625
|
+
function C(e, t, n) {
|
|
1478
1626
|
let r = {
|
|
1479
1627
|
key: t,
|
|
1480
1628
|
label: n,
|
|
@@ -1486,7 +1634,14 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
1486
1634
|
return e === "textarea" && (r.props = {
|
|
1487
1635
|
type: "textarea",
|
|
1488
1636
|
rows: 3
|
|
1489
|
-
}), e === "block" && (r.children = [], r.border = !0, r.span = 24, r.indent = 0, delete r.default),
|
|
1637
|
+
}), e === "block" && (r.children = [], r.border = !0, r.span = 24, r.indent = 0, delete r.default), e === "upload" && (r.default = [], r.span = 24, r.props = {
|
|
1638
|
+
action: "/api/v1/admin/upload",
|
|
1639
|
+
autoUpload: !0,
|
|
1640
|
+
multiple: !0,
|
|
1641
|
+
accept: "image/*,.pdf,.txt",
|
|
1642
|
+
"list-type": "picture-card",
|
|
1643
|
+
httpRequest: v
|
|
1644
|
+
}), (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
1645
|
label: "选项一",
|
|
1491
1646
|
value: "1"
|
|
1492
1647
|
}, {
|
|
@@ -1503,7 +1658,15 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
1503
1658
|
labelWidth: "",
|
|
1504
1659
|
border: !0,
|
|
1505
1660
|
isText: !1
|
|
1506
|
-
}), F = g(""), I = g(""),
|
|
1661
|
+
}), F = g(""), I = g(""), te = t(() => T.value?.linkage ?? []), ne = t(() => Oe(B.value[0]?.children ?? []));
|
|
1662
|
+
function L(e, t) {
|
|
1663
|
+
let n = T.value?.props;
|
|
1664
|
+
return !n || typeof n != "object" ? t : n[e] ?? t;
|
|
1665
|
+
}
|
|
1666
|
+
function R(e, t) {
|
|
1667
|
+
T.value && ((!T.value.props || typeof T.value.props != "object") && (T.value.props = {}), T.value.props[e] = t);
|
|
1668
|
+
}
|
|
1669
|
+
let z = [
|
|
1507
1670
|
"eq",
|
|
1508
1671
|
"neq",
|
|
1509
1672
|
"in",
|
|
@@ -1516,18 +1679,18 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
1516
1679
|
"lte",
|
|
1517
1680
|
"empty",
|
|
1518
1681
|
"notEmpty"
|
|
1519
|
-
],
|
|
1682
|
+
], B = t(() => [{
|
|
1520
1683
|
key: "root",
|
|
1521
1684
|
label: "根表单",
|
|
1522
1685
|
type: "block",
|
|
1523
1686
|
border: !1,
|
|
1524
1687
|
indent: 0,
|
|
1525
1688
|
children: w.value
|
|
1526
|
-
}]),
|
|
1527
|
-
function
|
|
1528
|
-
return e.default === void 0 ? e.type === "switch" || e.type === "checkbox" ? !1 : e.type === "inputNumber" || e.type === "rate" || e.type === "slider" ? 0 : e.type === "inputTag" || e.type === "transfer" ? [] : "" : e.default;
|
|
1689
|
+
}]), V = t(() => JSON.stringify(B.value, null, 2));
|
|
1690
|
+
function H(e) {
|
|
1691
|
+
return e.default === void 0 ? e.type === "switch" || e.type === "checkbox" ? !1 : e.type === "inputNumber" || e.type === "rate" || e.type === "slider" ? 0 : e.type === "inputTag" || e.type === "transfer" || e.type === "upload" ? [] : "" : e.default;
|
|
1529
1692
|
}
|
|
1530
|
-
function
|
|
1693
|
+
function U(e, t, n) {
|
|
1531
1694
|
let r = e;
|
|
1532
1695
|
for (let e = 0; e < t.length - 1; e++) {
|
|
1533
1696
|
let n = t[e];
|
|
@@ -1535,63 +1698,63 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
1535
1698
|
}
|
|
1536
1699
|
r[t[t.length - 1]] = n;
|
|
1537
1700
|
}
|
|
1538
|
-
function
|
|
1701
|
+
function re(e, t = [], n = !1) {
|
|
1539
1702
|
let r = {};
|
|
1540
1703
|
for (let i of e) {
|
|
1541
1704
|
if (i.type === "block") {
|
|
1542
1705
|
let e = n ? [...t, i.key] : t;
|
|
1543
|
-
Object.assign(r,
|
|
1706
|
+
Object.assign(r, re(i.children ?? [], e, !0));
|
|
1544
1707
|
continue;
|
|
1545
1708
|
}
|
|
1546
|
-
|
|
1709
|
+
U(r, [...t, i.key], H(i));
|
|
1547
1710
|
}
|
|
1548
1711
|
return r;
|
|
1549
1712
|
}
|
|
1550
|
-
let
|
|
1713
|
+
let W = t(() => E.value?.children ?? w.value), ie = g({}), ae = t(() => JSON.stringify(ie.value, null, 2));
|
|
1551
1714
|
x(w, () => {
|
|
1552
|
-
|
|
1715
|
+
ie.value = re(B.value), d(J);
|
|
1553
1716
|
}, {
|
|
1554
1717
|
deep: !0,
|
|
1555
1718
|
immediate: !0
|
|
1556
|
-
}), x(T, () => d(
|
|
1557
|
-
let
|
|
1558
|
-
function ae(e) {
|
|
1559
|
-
T.value = e, ie.value && !Array.isArray(e.options) && (e.options = []), d(q);
|
|
1560
|
-
}
|
|
1719
|
+
}), x(T, () => d(J), { deep: !0 });
|
|
1720
|
+
let G = t(() => p.includes(T.value?.type ?? ""));
|
|
1561
1721
|
function oe(e) {
|
|
1562
|
-
Array.isArray(e.
|
|
1722
|
+
T.value = e, G.value && !Array.isArray(e.options) && (e.options = []), d(J);
|
|
1563
1723
|
}
|
|
1564
|
-
function se() {
|
|
1724
|
+
function se(e) {
|
|
1725
|
+
Array.isArray(e.children) || (e.children = []), E.value = e, T.value = e, d(J);
|
|
1726
|
+
}
|
|
1727
|
+
function ce() {
|
|
1565
1728
|
E.value = null;
|
|
1566
1729
|
}
|
|
1567
|
-
function
|
|
1730
|
+
function K(e) {
|
|
1568
1731
|
let t = e.target;
|
|
1569
1732
|
if (!t?.closest(".field-drag-handle, .block-drag-handle, .form-item-label, .form-block-header-title")) return;
|
|
1570
1733
|
let n = t?.closest("[data-field-key]");
|
|
1571
1734
|
if (n?.dataset.fieldKey) {
|
|
1572
|
-
let e =
|
|
1735
|
+
let e = ke(n.dataset.fieldKey);
|
|
1573
1736
|
if (e) {
|
|
1574
|
-
let t =
|
|
1575
|
-
t && t.key !== "root" && (E.value = t),
|
|
1737
|
+
let t = Ae(e.key);
|
|
1738
|
+
t && t.key !== "root" && (E.value = t), oe(e), N.value = !0;
|
|
1576
1739
|
return;
|
|
1577
1740
|
}
|
|
1578
1741
|
}
|
|
1579
1742
|
let r = t?.closest("[data-block-path]");
|
|
1580
1743
|
if (r?.dataset.blockPath) {
|
|
1581
|
-
let e =
|
|
1582
|
-
e && (
|
|
1744
|
+
let e = De(r.dataset.blockPath.split("/"));
|
|
1745
|
+
e && (oe(e), N.value = !0);
|
|
1583
1746
|
}
|
|
1584
1747
|
}
|
|
1585
1748
|
function le() {
|
|
1586
1749
|
let e = T.value;
|
|
1587
1750
|
if (!e) return;
|
|
1588
|
-
let t =
|
|
1589
|
-
t >= 0 &&
|
|
1751
|
+
let t = W.value.indexOf(e);
|
|
1752
|
+
t >= 0 && Ie(t), T.value || (N.value = !1);
|
|
1590
1753
|
}
|
|
1591
1754
|
function ue() {
|
|
1592
1755
|
T.value && (N.value = !0);
|
|
1593
1756
|
}
|
|
1594
|
-
function
|
|
1757
|
+
function de() {
|
|
1595
1758
|
let e = (t) => {
|
|
1596
1759
|
for (let n of t) {
|
|
1597
1760
|
if (n.type === "block") {
|
|
@@ -1601,9 +1764,9 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
1601
1764
|
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
1765
|
}
|
|
1603
1766
|
};
|
|
1604
|
-
e(w.value), d(
|
|
1767
|
+
e(w.value), d(J);
|
|
1605
1768
|
}
|
|
1606
|
-
function
|
|
1769
|
+
function fe() {
|
|
1607
1770
|
T.value && (Array.isArray(T.value.linkage) || (T.value.linkage = []), T.value.linkage.push({
|
|
1608
1771
|
when: {
|
|
1609
1772
|
field: "",
|
|
@@ -1613,26 +1776,26 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
1613
1776
|
effects: {}
|
|
1614
1777
|
}));
|
|
1615
1778
|
}
|
|
1616
|
-
function
|
|
1779
|
+
function pe(e) {
|
|
1617
1780
|
Array.isArray(T.value?.linkage) && T.value.linkage.splice(e, 1);
|
|
1618
1781
|
}
|
|
1619
|
-
function
|
|
1782
|
+
function me(e) {
|
|
1620
1783
|
return e ? JSON.stringify(e, null, 2) : "";
|
|
1621
1784
|
}
|
|
1622
|
-
function
|
|
1785
|
+
function he(e, t) {
|
|
1623
1786
|
try {
|
|
1624
1787
|
e.effects.options = t.trim() ? JSON.parse(t) : [];
|
|
1625
1788
|
} catch {
|
|
1626
1789
|
e.effects.options = [];
|
|
1627
1790
|
}
|
|
1628
1791
|
}
|
|
1629
|
-
function
|
|
1792
|
+
function ge(e) {
|
|
1630
1793
|
D.value = e;
|
|
1631
1794
|
}
|
|
1632
|
-
function
|
|
1633
|
-
D.value = null,
|
|
1795
|
+
function _e() {
|
|
1796
|
+
D.value = null, Me();
|
|
1634
1797
|
}
|
|
1635
|
-
function
|
|
1798
|
+
function q(e, t) {
|
|
1636
1799
|
h += 1, F.value = `${e}_${h}`, I.value = u.find((t) => t.type === e)?.label ?? e, j.value = {
|
|
1637
1800
|
type: e,
|
|
1638
1801
|
target: t
|
|
@@ -1640,70 +1803,70 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
1640
1803
|
}
|
|
1641
1804
|
function ve() {
|
|
1642
1805
|
if (!j.value) return;
|
|
1643
|
-
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 =
|
|
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(
|
|
1806
|
+
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 = C(j.value.type, e, t), r = j.value.target;
|
|
1807
|
+
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
1808
|
}
|
|
1646
1809
|
function ye() {
|
|
1647
1810
|
M.value = !1, j.value = null;
|
|
1648
1811
|
}
|
|
1649
|
-
function
|
|
1812
|
+
function be() {
|
|
1650
1813
|
if (!D.value) return;
|
|
1651
1814
|
let e = D.value, t = E.value;
|
|
1652
|
-
D.value = null,
|
|
1815
|
+
D.value = null, q(e, t);
|
|
1653
1816
|
}
|
|
1654
|
-
function
|
|
1817
|
+
function xe(e, t) {
|
|
1655
1818
|
if (D.value) return;
|
|
1656
|
-
let n =
|
|
1819
|
+
let n = ke(e.key);
|
|
1657
1820
|
if (!n) return;
|
|
1658
|
-
let r =
|
|
1821
|
+
let r = Ae(n.key);
|
|
1659
1822
|
r && r.key !== "root" && (E.value = r), O.value = n, t.dataTransfer?.setData("text/plain", n.key);
|
|
1660
1823
|
}
|
|
1661
|
-
function
|
|
1824
|
+
function Se(e, t) {
|
|
1662
1825
|
let n = t.getBoundingClientRect();
|
|
1663
1826
|
return e.clientX < n.left + n.width / 2 ? "before" : "after";
|
|
1664
1827
|
}
|
|
1665
|
-
function
|
|
1828
|
+
function Ce(e) {
|
|
1666
1829
|
let t = O.value;
|
|
1667
1830
|
if (!t || t === e) return;
|
|
1668
|
-
let n =
|
|
1831
|
+
let n = W.value, r = n.indexOf(t), i = n.indexOf(e);
|
|
1669
1832
|
if (r < 0 || i < 0) return;
|
|
1670
1833
|
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),
|
|
1834
|
+
n.splice(o, 0, a), we();
|
|
1672
1835
|
}
|
|
1673
|
-
function
|
|
1836
|
+
function we() {
|
|
1674
1837
|
O.value = null, k.value = null;
|
|
1675
1838
|
}
|
|
1676
|
-
function
|
|
1839
|
+
function Te(e) {
|
|
1677
1840
|
return l("span", {
|
|
1678
1841
|
class: "field-drag-handle",
|
|
1679
1842
|
draggable: !0,
|
|
1680
1843
|
title: "拖拽调整顺序",
|
|
1681
|
-
onDragstart: (t) =>
|
|
1682
|
-
onDragend: () =>
|
|
1844
|
+
onDragstart: (t) => xe(e, t),
|
|
1845
|
+
onDragend: () => we()
|
|
1683
1846
|
}, "⠿");
|
|
1684
1847
|
}
|
|
1685
|
-
function
|
|
1848
|
+
function Ee(e) {
|
|
1686
1849
|
return e.key === "root" ? null : l("span", {
|
|
1687
1850
|
class: "block-drag-handle",
|
|
1688
1851
|
draggable: !0,
|
|
1689
1852
|
title: "拖拽调整顺序",
|
|
1690
|
-
onDragstart: (t) =>
|
|
1691
|
-
onDragend: () =>
|
|
1853
|
+
onDragstart: (t) => xe(e, t),
|
|
1854
|
+
onDragend: () => we()
|
|
1692
1855
|
}, "⠿");
|
|
1693
1856
|
}
|
|
1694
|
-
function
|
|
1695
|
-
let t =
|
|
1857
|
+
function De(e) {
|
|
1858
|
+
let t = B.value[0];
|
|
1696
1859
|
if (!t) return null;
|
|
1697
1860
|
let n = null, r = 0;
|
|
1698
1861
|
if (t.key === e[0] ? (n = t, r = 1) : (n = t.children?.find((t) => t.type === "block" && t.key === e[0]) ?? null, r = 1), !n) return null;
|
|
1699
1862
|
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
1863
|
return n;
|
|
1701
1864
|
}
|
|
1702
|
-
function
|
|
1865
|
+
function Oe(e, t = [], n = !1) {
|
|
1703
1866
|
let r = [];
|
|
1704
1867
|
for (let i of e) if (i.type === "block") {
|
|
1705
1868
|
let e = n ? [...t, i.key] : t;
|
|
1706
|
-
r.push(...
|
|
1869
|
+
r.push(...Oe(i.children ?? [], e, !0));
|
|
1707
1870
|
} else if (i.type !== "slot") {
|
|
1708
1871
|
let e = [...t, i.key].join(".");
|
|
1709
1872
|
r.push({
|
|
@@ -1713,41 +1876,41 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
1713
1876
|
}
|
|
1714
1877
|
return r;
|
|
1715
1878
|
}
|
|
1716
|
-
function
|
|
1879
|
+
function ke(e, t = B.value[0]?.children ?? []) {
|
|
1717
1880
|
for (let n of t) {
|
|
1718
1881
|
if (n.key === e) return n;
|
|
1719
|
-
let t =
|
|
1882
|
+
let t = ke(e, n.children ?? []);
|
|
1720
1883
|
if (t) return t;
|
|
1721
1884
|
}
|
|
1722
1885
|
return null;
|
|
1723
1886
|
}
|
|
1724
|
-
function
|
|
1887
|
+
function Ae(e, t = B.value[0]?.children ?? [], n = null) {
|
|
1725
1888
|
for (let r of t) {
|
|
1726
1889
|
if (r.key === e) return n;
|
|
1727
1890
|
if (r.type === "block") {
|
|
1728
|
-
let t =
|
|
1891
|
+
let t = Ae(e, r.children ?? [], r);
|
|
1729
1892
|
if (t) return t;
|
|
1730
1893
|
}
|
|
1731
1894
|
}
|
|
1732
1895
|
return null;
|
|
1733
1896
|
}
|
|
1734
|
-
function
|
|
1735
|
-
|
|
1897
|
+
function je(e) {
|
|
1898
|
+
Me();
|
|
1736
1899
|
let t = e.target;
|
|
1737
1900
|
if (O.value) {
|
|
1738
1901
|
let e = t?.closest("[data-block-path]");
|
|
1739
1902
|
if (e?.dataset.blockPath) {
|
|
1740
|
-
let t =
|
|
1741
|
-
if (t &&
|
|
1742
|
-
|
|
1903
|
+
let t = De(e.dataset.blockPath.split("/"));
|
|
1904
|
+
if (t && W.value.includes(t)) {
|
|
1905
|
+
Ce(t);
|
|
1743
1906
|
return;
|
|
1744
1907
|
}
|
|
1745
1908
|
}
|
|
1746
1909
|
let n = t?.closest("[data-field-key]");
|
|
1747
1910
|
if (n?.dataset.fieldKey) {
|
|
1748
|
-
let e =
|
|
1911
|
+
let e = W.value.find((e) => e.key === n.dataset.fieldKey);
|
|
1749
1912
|
if (e) {
|
|
1750
|
-
|
|
1913
|
+
Ce(e);
|
|
1751
1914
|
return;
|
|
1752
1915
|
}
|
|
1753
1916
|
}
|
|
@@ -1756,31 +1919,31 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
1756
1919
|
if (n === "root") {
|
|
1757
1920
|
if (D.value) {
|
|
1758
1921
|
let e = D.value;
|
|
1759
|
-
D.value = null,
|
|
1922
|
+
D.value = null, q(e, null);
|
|
1760
1923
|
}
|
|
1761
1924
|
return;
|
|
1762
1925
|
}
|
|
1763
1926
|
if (n) {
|
|
1764
|
-
let e =
|
|
1927
|
+
let e = De(n.split("/"));
|
|
1765
1928
|
if (e) {
|
|
1766
|
-
|
|
1929
|
+
Fe(e);
|
|
1767
1930
|
return;
|
|
1768
1931
|
}
|
|
1769
1932
|
}
|
|
1770
|
-
|
|
1933
|
+
be();
|
|
1771
1934
|
}
|
|
1772
|
-
function
|
|
1935
|
+
function Me() {
|
|
1773
1936
|
document.querySelectorAll("[data-block-path], [data-field-key]").forEach((e) => {
|
|
1774
1937
|
e.classList.remove("drop-active", "drop-before", "drop-after");
|
|
1775
1938
|
});
|
|
1776
1939
|
}
|
|
1777
|
-
function
|
|
1940
|
+
function Ne() {
|
|
1778
1941
|
document.querySelectorAll(".node-selected").forEach((e) => {
|
|
1779
1942
|
e.classList.remove("node-selected");
|
|
1780
1943
|
});
|
|
1781
1944
|
}
|
|
1782
|
-
function
|
|
1783
|
-
if (
|
|
1945
|
+
function J() {
|
|
1946
|
+
if (Ne(), !T.value) return;
|
|
1784
1947
|
let e = T.value.key;
|
|
1785
1948
|
document.querySelectorAll("[data-field-key]").forEach((t) => {
|
|
1786
1949
|
t.getAttribute("data-field-key") === e && t.classList.add("node-selected");
|
|
@@ -1788,58 +1951,58 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
1788
1951
|
t.getAttribute("data-block-path")?.split("/").pop() === e && t.classList.add("node-selected");
|
|
1789
1952
|
});
|
|
1790
1953
|
}
|
|
1791
|
-
function
|
|
1792
|
-
|
|
1954
|
+
function Pe(e) {
|
|
1955
|
+
Me();
|
|
1793
1956
|
let t = e.target;
|
|
1794
1957
|
if (O.value) {
|
|
1795
1958
|
let n = t?.closest("[data-field-key]");
|
|
1796
|
-
n?.dataset.fieldKey &&
|
|
1959
|
+
n?.dataset.fieldKey && W.value.find((e) => e.key === n.dataset.fieldKey) && (k.value = Se(e, n), n.classList.add("drop-active"), n.classList.add(k.value === "before" ? "drop-before" : "drop-after"));
|
|
1797
1960
|
let r = t?.closest("[data-block-path]");
|
|
1798
1961
|
if (r?.dataset.blockPath) {
|
|
1799
|
-
let t =
|
|
1800
|
-
t &&
|
|
1962
|
+
let t = De(r.dataset.blockPath.split("/"));
|
|
1963
|
+
t && W.value.includes(t) && (k.value = Se(e, r), r.classList.add("drop-active"), r.classList.add(k.value === "before" ? "drop-before" : "drop-after"));
|
|
1801
1964
|
}
|
|
1802
1965
|
return;
|
|
1803
1966
|
}
|
|
1804
1967
|
(t?.closest("[data-block-path]"))?.classList.add("drop-active");
|
|
1805
1968
|
}
|
|
1806
|
-
function
|
|
1969
|
+
function Fe(e) {
|
|
1807
1970
|
if (!D.value) return;
|
|
1808
1971
|
let t = D.value;
|
|
1809
|
-
D.value = null,
|
|
1972
|
+
D.value = null, q(t, e);
|
|
1810
1973
|
}
|
|
1811
|
-
function
|
|
1812
|
-
let t =
|
|
1813
|
-
t.splice(e, 1), E.value === n && (E.value = null), T.value === n && (T.value = null), d(
|
|
1974
|
+
function Ie(e) {
|
|
1975
|
+
let t = W.value, n = t[e];
|
|
1976
|
+
t.splice(e, 1), E.value === n && (E.value = null), T.value === n && (T.value = null), d(J);
|
|
1814
1977
|
}
|
|
1815
|
-
function
|
|
1978
|
+
function Le(e) {
|
|
1816
1979
|
let t = document.createElement("textarea");
|
|
1817
1980
|
t.value = e, t.style.position = "fixed", t.style.opacity = "0", document.body.appendChild(t), t.select(), document.execCommand("copy"), t.remove();
|
|
1818
1981
|
}
|
|
1819
|
-
async function
|
|
1982
|
+
async function Re(e, t) {
|
|
1820
1983
|
try {
|
|
1821
|
-
navigator.clipboard?.writeText ? await navigator.clipboard.writeText(e) :
|
|
1984
|
+
navigator.clipboard?.writeText ? await navigator.clipboard.writeText(e) : Le(e);
|
|
1822
1985
|
} catch {
|
|
1823
|
-
|
|
1986
|
+
Le(e);
|
|
1824
1987
|
}
|
|
1825
1988
|
A.value = t, window.setTimeout(() => {
|
|
1826
1989
|
A.value = null;
|
|
1827
1990
|
}, 1600);
|
|
1828
1991
|
}
|
|
1829
1992
|
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"),
|
|
1831
|
-
return m(), i("div",
|
|
1832
|
-
a("header",
|
|
1993
|
+
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"), C = y("el-form"), w = y("el-radio"), D = y("el-radio-group"), O = y("el-checkbox"), k = y("el-date-picker"), H = y("el-time-picker"), U = y("el-input-tag"), re = y("el-rate"), W = y("el-slider"), oe = y("el-cascader"), q = y("el-tree-select"), be = y("el-scrollbar"), xe = y("el-drawer"), Se = y("el-dialog");
|
|
1994
|
+
return m(), i("div", Gi, [
|
|
1995
|
+
a("header", Ki, [c[36] ||= a("div", null, [a("h2", null, "创建表单"), a("p", null, "从左侧拖拽字段到右侧表单,生成 config 和 data。")], -1), a("div", qi, [s(l, {
|
|
1833
1996
|
type: "primary",
|
|
1834
|
-
onClick: c[0] ||= (e) =>
|
|
1997
|
+
onClick: c[0] ||= (e) => Re(V.value, "config")
|
|
1835
1998
|
}, {
|
|
1836
1999
|
default: S(() => [o(b(A.value === "config" ? "已复制 config" : "复制 config"), 1)]),
|
|
1837
2000
|
_: 1
|
|
1838
|
-
}), s(l, { onClick: c[1] ||= (e) =>
|
|
2001
|
+
}), s(l, { onClick: c[1] ||= (e) => Re(ae.value, "data") }, {
|
|
1839
2002
|
default: S(() => [o(b(A.value === "data" ? "已复制 data" : "复制 data"), 1)]),
|
|
1840
2003
|
_: 1
|
|
1841
2004
|
})])]),
|
|
1842
|
-
a("section",
|
|
2005
|
+
a("section", Ji, [c[38] ||= a("h3", null, "全局配置", -1), s(C, {
|
|
1843
2006
|
inline: "",
|
|
1844
2007
|
"label-position": "top"
|
|
1845
2008
|
}, {
|
|
@@ -1922,22 +2085,22 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
1922
2085
|
}),
|
|
1923
2086
|
s(l, {
|
|
1924
2087
|
type: "primary",
|
|
1925
|
-
onClick:
|
|
2088
|
+
onClick: de
|
|
1926
2089
|
}, {
|
|
1927
|
-
default: S(() => [...c[
|
|
2090
|
+
default: S(() => [...c[37] ||= [o("应用全局配置", -1)]]),
|
|
1928
2091
|
_: 1
|
|
1929
2092
|
})
|
|
1930
2093
|
]),
|
|
1931
2094
|
_: 1
|
|
1932
2095
|
})]),
|
|
1933
|
-
a("div",
|
|
2096
|
+
a("div", Yi, [a("aside", Xi, [c[40] ||= a("h3", null, "字段库", -1), (m(), i(e, null, _(u, (t) => a("div", {
|
|
1934
2097
|
key: t.type,
|
|
1935
2098
|
class: "palette-item",
|
|
1936
2099
|
draggable: "true",
|
|
1937
|
-
onDragstart: (e) =>
|
|
1938
|
-
onDragend:
|
|
2100
|
+
onDragstart: (e) => ge(t.type),
|
|
2101
|
+
onDragend: _e
|
|
1939
2102
|
}, [s(p, { label: t.label }, {
|
|
1940
|
-
default: S(() => [t.type === "block" ? (m(), i("div",
|
|
2103
|
+
default: S(() => [t.type === "block" ? (m(), i("div", Qi, "block 块")) : t.type === "input" ? (m(), n(x, {
|
|
1941
2104
|
key: 1,
|
|
1942
2105
|
placeholder: "请输入"
|
|
1943
2106
|
})) : t.type === "textarea" ? (m(), n(x, {
|
|
@@ -1956,11 +2119,11 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
1956
2119
|
value: e.value
|
|
1957
2120
|
}, null, 8, ["label", "value"]))), 128))]),
|
|
1958
2121
|
_: 2
|
|
1959
|
-
}, 1024)) : t.type === "radio" ? (m(), n(
|
|
2122
|
+
}, 1024)) : t.type === "radio" ? (m(), n(D, {
|
|
1960
2123
|
key: 4,
|
|
1961
2124
|
"model-value": ""
|
|
1962
2125
|
}, {
|
|
1963
|
-
default: S(() => [(m(!0), i(e, null, _(t.options ?? [], (e) => (m(), n(
|
|
2126
|
+
default: S(() => [(m(!0), i(e, null, _(t.options ?? [], (e) => (m(), n(w, {
|
|
1964
2127
|
key: e.value,
|
|
1965
2128
|
value: e.value
|
|
1966
2129
|
}, {
|
|
@@ -1968,77 +2131,77 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
1968
2131
|
_: 2
|
|
1969
2132
|
}, 1032, ["value"]))), 128))]),
|
|
1970
2133
|
_: 2
|
|
1971
|
-
}, 1024)) : t.type === "checkbox" ? (m(), n(
|
|
1972
|
-
default: S(() => [...c[
|
|
2134
|
+
}, 1024)) : t.type === "checkbox" ? (m(), n(O, { key: 5 }, {
|
|
2135
|
+
default: S(() => [...c[39] ||= [o("复选框", -1)]]),
|
|
1973
2136
|
_: 1
|
|
1974
2137
|
})) : t.type === "switch" ? (m(), n(d, { key: 6 })) : t.type === "inputNumber" ? (m(), n(v, {
|
|
1975
2138
|
key: 7,
|
|
1976
2139
|
"model-value": 0,
|
|
1977
2140
|
controls: !1
|
|
1978
|
-
})) : t.type === "datePicker" ? (m(), n(
|
|
2141
|
+
})) : t.type === "datePicker" ? (m(), n(k, {
|
|
1979
2142
|
key: 8,
|
|
1980
2143
|
type: "date",
|
|
1981
2144
|
placeholder: "选择日期"
|
|
1982
|
-
})) : t.type === "datetimePicker" ? (m(), n(
|
|
2145
|
+
})) : t.type === "datetimePicker" ? (m(), n(k, {
|
|
1983
2146
|
key: 9,
|
|
1984
2147
|
type: "datetime",
|
|
1985
2148
|
placeholder: "选择日期时间"
|
|
1986
|
-
})) : t.type === "timePicker" ? (m(), n(
|
|
2149
|
+
})) : t.type === "timePicker" ? (m(), n(H, {
|
|
1987
2150
|
key: 10,
|
|
1988
2151
|
placeholder: "选择时间"
|
|
1989
|
-
})) : t.type === "inputTag" ? (m(), n(
|
|
2152
|
+
})) : t.type === "inputTag" ? (m(), n(U, {
|
|
1990
2153
|
key: 11,
|
|
1991
2154
|
"model-value": ["标签"]
|
|
1992
|
-
})) : t.type === "transfer" ? (m(), i("div",
|
|
1993
|
-
key: 13,
|
|
1994
|
-
"model-value": 3
|
|
1995
|
-
})) : t.type === "slider" ? (m(), n(ae, {
|
|
2155
|
+
})) : t.type === "transfer" ? (m(), i("div", $i, "穿梭框")) : t.type === "upload" ? (m(), i("div", ea, "附件")) : t.type === "rate" ? (m(), n(re, {
|
|
1996
2156
|
key: 14,
|
|
1997
|
-
"model-value":
|
|
1998
|
-
})) : t.type === "
|
|
2157
|
+
"model-value": 3
|
|
2158
|
+
})) : t.type === "slider" ? (m(), n(W, {
|
|
1999
2159
|
key: 15,
|
|
2000
|
-
|
|
2001
|
-
})) : t.type === "
|
|
2160
|
+
"model-value": 40
|
|
2161
|
+
})) : t.type === "cascader" ? (m(), n(oe, {
|
|
2002
2162
|
key: 16,
|
|
2003
2163
|
placeholder: "请选择"
|
|
2164
|
+
})) : t.type === "treeSelect" ? (m(), n(q, {
|
|
2165
|
+
key: 17,
|
|
2166
|
+
placeholder: "请选择"
|
|
2004
2167
|
})) : r("", !0)]),
|
|
2005
2168
|
_: 2
|
|
2006
|
-
}, 1032, ["label"])], 40,
|
|
2169
|
+
}, 1032, ["label"])], 40, Zi)), 64))]), a("section", {
|
|
2007
2170
|
class: "preview",
|
|
2008
|
-
onDragover:
|
|
2009
|
-
onDragleave:
|
|
2010
|
-
onDrop:
|
|
2011
|
-
onClick:
|
|
2012
|
-
}, [a("div",
|
|
2171
|
+
onDragover: ee(Pe, ["prevent"]),
|
|
2172
|
+
onDragleave: Me,
|
|
2173
|
+
onDrop: ee(je, ["prevent"]),
|
|
2174
|
+
onClick: K
|
|
2175
|
+
}, [a("div", ta, [c[43] ||= a("h3", null, "实时表单", -1), a("div", na, [c[42] ||= a("span", null, "将左侧字段拖到这里", -1), s(l, {
|
|
2013
2176
|
size: "small",
|
|
2014
2177
|
onClick: ue
|
|
2015
2178
|
}, {
|
|
2016
|
-
default: S(() => [...c[
|
|
2179
|
+
default: S(() => [...c[41] ||= [o("字段配置", -1)]]),
|
|
2017
2180
|
_: 1
|
|
2018
|
-
})])]), s(
|
|
2019
|
-
config:
|
|
2020
|
-
modelValue:
|
|
2021
|
-
"onUpdate:modelValue": c[10] ||= (e) =>
|
|
2181
|
+
})])]), s(Wi, {
|
|
2182
|
+
config: B.value,
|
|
2183
|
+
modelValue: ie.value,
|
|
2184
|
+
"onUpdate:modelValue": c[10] ||= (e) => ie.value = e,
|
|
2022
2185
|
"show-submit": "",
|
|
2023
2186
|
"show-reset": "",
|
|
2024
|
-
"field-action":
|
|
2025
|
-
"block-action":
|
|
2187
|
+
"field-action": Te,
|
|
2188
|
+
"block-action": Ee
|
|
2026
2189
|
}, null, 8, ["config", "modelValue"])], 32)]),
|
|
2027
|
-
s(
|
|
2190
|
+
s(xe, {
|
|
2028
2191
|
modelValue: N.value,
|
|
2029
|
-
"onUpdate:modelValue": c[
|
|
2192
|
+
"onUpdate:modelValue": c[32] ||= (e) => N.value = e,
|
|
2030
2193
|
title: "字段配置",
|
|
2031
2194
|
size: "560px"
|
|
2032
2195
|
}, {
|
|
2033
|
-
default: S(() => [s(
|
|
2196
|
+
default: S(() => [s(be, {
|
|
2034
2197
|
class: "drawer-scrollbar",
|
|
2035
2198
|
"view-style": "padding: 0 20px 20px 0;"
|
|
2036
2199
|
}, {
|
|
2037
|
-
default: S(() => [a("div",
|
|
2200
|
+
default: S(() => [a("div", ra, [a("button", {
|
|
2038
2201
|
type: "button",
|
|
2039
2202
|
class: f({ active: !E.value }),
|
|
2040
|
-
onClick:
|
|
2041
|
-
}, " 根 ", 2), E.value ? (m(), i("span",
|
|
2203
|
+
onClick: ce
|
|
2204
|
+
}, " 根 ", 2), E.value ? (m(), i("span", ia, "/ " + b(E.value.label || E.value.key), 1)) : r("", !0)]), T.value ? (m(), n(C, {
|
|
2042
2205
|
key: 0,
|
|
2043
2206
|
"label-position": "top"
|
|
2044
2207
|
}, {
|
|
@@ -2072,9 +2235,9 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
2072
2235
|
}, {
|
|
2073
2236
|
default: S(() => [s(l, {
|
|
2074
2237
|
size: "small",
|
|
2075
|
-
onClick: c[14] ||= (e) =>
|
|
2238
|
+
onClick: c[14] ||= (e) => se(T.value)
|
|
2076
2239
|
}, {
|
|
2077
|
-
default: S(() => [...c[
|
|
2240
|
+
default: S(() => [...c[44] ||= [o("进入 block", -1)]]),
|
|
2078
2241
|
_: 1
|
|
2079
2242
|
})]),
|
|
2080
2243
|
_: 1
|
|
@@ -2108,7 +2271,10 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
2108
2271
|
}, null, 8, ["modelValue"])]),
|
|
2109
2272
|
_: 1
|
|
2110
2273
|
}),
|
|
2111
|
-
|
|
2274
|
+
T.value.type === "upload" ? r("", !0) : (m(), n(p, {
|
|
2275
|
+
key: 3,
|
|
2276
|
+
label: "默认值"
|
|
2277
|
+
}, {
|
|
2112
2278
|
default: S(() => [[
|
|
2113
2279
|
"inputNumber",
|
|
2114
2280
|
"rate",
|
|
@@ -2127,39 +2293,69 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
2127
2293
|
"onUpdate:modelValue": c[20] ||= (e) => T.value.default = e
|
|
2128
2294
|
}, null, 8, ["modelValue"]))]),
|
|
2129
2295
|
_: 1
|
|
2130
|
-
}),
|
|
2296
|
+
})),
|
|
2297
|
+
T.value.type === "upload" ? (m(), i(e, { key: 4 }, [
|
|
2298
|
+
s(p, { label: "上传地址" }, {
|
|
2299
|
+
default: S(() => [s(x, {
|
|
2300
|
+
"model-value": String(L("action", "/api/v1/admin/upload")),
|
|
2301
|
+
"onUpdate:modelValue": c[21] ||= (e) => R("action", e)
|
|
2302
|
+
}, null, 8, ["model-value"])]),
|
|
2303
|
+
_: 1
|
|
2304
|
+
}),
|
|
2305
|
+
s(p, { label: "自动上传" }, {
|
|
2306
|
+
default: S(() => [s(d, {
|
|
2307
|
+
"model-value": !!L("autoUpload", !0),
|
|
2308
|
+
"onUpdate:modelValue": c[22] ||= (e) => R("autoUpload", e)
|
|
2309
|
+
}, null, 8, ["model-value"])]),
|
|
2310
|
+
_: 1
|
|
2311
|
+
}),
|
|
2312
|
+
s(p, { label: "多文件" }, {
|
|
2313
|
+
default: S(() => [s(d, {
|
|
2314
|
+
"model-value": !!L("multiple", !0),
|
|
2315
|
+
"onUpdate:modelValue": c[23] ||= (e) => R("multiple", e)
|
|
2316
|
+
}, null, 8, ["model-value"])]),
|
|
2317
|
+
_: 1
|
|
2318
|
+
}),
|
|
2319
|
+
s(p, { label: "文件类型" }, {
|
|
2320
|
+
default: S(() => [s(x, {
|
|
2321
|
+
"model-value": String(L("accept", "image/*,.pdf,.txt")),
|
|
2322
|
+
"onUpdate:modelValue": c[24] ||= (e) => R("accept", e)
|
|
2323
|
+
}, null, 8, ["model-value"])]),
|
|
2324
|
+
_: 1
|
|
2325
|
+
})
|
|
2326
|
+
], 64)) : r("", !0),
|
|
2131
2327
|
s(p, { label: "必填" }, {
|
|
2132
2328
|
default: S(() => [s(d, {
|
|
2133
2329
|
modelValue: T.value.required,
|
|
2134
|
-
"onUpdate:modelValue": c[
|
|
2330
|
+
"onUpdate:modelValue": c[25] ||= (e) => T.value.required = e
|
|
2135
2331
|
}, null, 8, ["modelValue"])]),
|
|
2136
2332
|
_: 1
|
|
2137
2333
|
}),
|
|
2138
2334
|
s(p, { label: "禁用" }, {
|
|
2139
2335
|
default: S(() => [s(d, {
|
|
2140
2336
|
modelValue: T.value.disabled,
|
|
2141
|
-
"onUpdate:modelValue": c[
|
|
2337
|
+
"onUpdate:modelValue": c[26] ||= (e) => T.value.disabled = e
|
|
2142
2338
|
}, null, 8, ["modelValue"])]),
|
|
2143
2339
|
_: 1
|
|
2144
2340
|
}),
|
|
2145
2341
|
s(p, { label: "只读展示" }, {
|
|
2146
2342
|
default: S(() => [s(d, {
|
|
2147
2343
|
modelValue: T.value.isText,
|
|
2148
|
-
"onUpdate:modelValue": c[
|
|
2344
|
+
"onUpdate:modelValue": c[27] ||= (e) => T.value.isText = e
|
|
2149
2345
|
}, null, 8, ["modelValue"])]),
|
|
2150
2346
|
_: 1
|
|
2151
2347
|
}),
|
|
2152
2348
|
s(p, { label: "隐藏字段" }, {
|
|
2153
2349
|
default: S(() => [s(d, {
|
|
2154
2350
|
modelValue: T.value.visible,
|
|
2155
|
-
"onUpdate:modelValue": c[
|
|
2351
|
+
"onUpdate:modelValue": c[28] ||= (e) => T.value.visible = e
|
|
2156
2352
|
}, null, 8, ["modelValue"])]),
|
|
2157
2353
|
_: 1
|
|
2158
2354
|
}),
|
|
2159
2355
|
s(p, { label: "隐藏时清空" }, {
|
|
2160
2356
|
default: S(() => [s(d, {
|
|
2161
2357
|
modelValue: T.value.clearOnHide,
|
|
2162
|
-
"onUpdate:modelValue": c[
|
|
2358
|
+
"onUpdate:modelValue": c[29] ||= (e) => T.value.clearOnHide = e
|
|
2163
2359
|
}, null, 8, ["modelValue"])]),
|
|
2164
2360
|
_: 1
|
|
2165
2361
|
}),
|
|
@@ -2168,35 +2364,35 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
2168
2364
|
"datetimePicker",
|
|
2169
2365
|
"timePicker"
|
|
2170
2366
|
].includes(T.value.type) ? (m(), n(p, {
|
|
2171
|
-
key:
|
|
2367
|
+
key: 5,
|
|
2172
2368
|
label: "UTC时间"
|
|
2173
2369
|
}, {
|
|
2174
2370
|
default: S(() => [s(d, {
|
|
2175
2371
|
modelValue: T.value.utc,
|
|
2176
|
-
"onUpdate:modelValue": c[
|
|
2372
|
+
"onUpdate:modelValue": c[30] ||= (e) => T.value.utc = e
|
|
2177
2373
|
}, null, 8, ["modelValue"])]),
|
|
2178
2374
|
_: 1
|
|
2179
2375
|
})) : r("", !0),
|
|
2180
2376
|
s(p, { label: "联动配置" }, {
|
|
2181
|
-
default: S(() => [a("div",
|
|
2377
|
+
default: S(() => [a("div", aa, [(m(!0), i(e, null, _(te.value, (t, r) => (m(), i("div", {
|
|
2182
2378
|
key: r,
|
|
2183
2379
|
class: "linkage-rule"
|
|
2184
2380
|
}, [
|
|
2185
|
-
a("div",
|
|
2381
|
+
a("div", oa, [a("span", null, "规则 " + b(r + 1), 1), s(l, {
|
|
2186
2382
|
link: "",
|
|
2187
2383
|
type: "danger",
|
|
2188
|
-
onClick: (e) =>
|
|
2384
|
+
onClick: (e) => pe(r)
|
|
2189
2385
|
}, {
|
|
2190
|
-
default: S(() => [...c[
|
|
2386
|
+
default: S(() => [...c[45] ||= [o(" 删除 ", -1)]]),
|
|
2191
2387
|
_: 1
|
|
2192
2388
|
}, 8, ["onClick"])]),
|
|
2193
|
-
a("div",
|
|
2389
|
+
a("div", sa, [
|
|
2194
2390
|
s(g, {
|
|
2195
2391
|
modelValue: t.when.field,
|
|
2196
2392
|
"onUpdate:modelValue": (e) => t.when.field = e,
|
|
2197
2393
|
placeholder: "选择源字段"
|
|
2198
2394
|
}, {
|
|
2199
|
-
default: S(() => [(m(!0), i(e, null, _(
|
|
2395
|
+
default: S(() => [(m(!0), i(e, null, _(ne.value, (e) => (m(), n(h, {
|
|
2200
2396
|
key: e.value,
|
|
2201
2397
|
label: e.label,
|
|
2202
2398
|
value: e.value
|
|
@@ -2207,7 +2403,7 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
2207
2403
|
modelValue: t.when.operator,
|
|
2208
2404
|
"onUpdate:modelValue": (e) => t.when.operator = e
|
|
2209
2405
|
}, {
|
|
2210
|
-
default: S(() => [(m(), i(e, null, _(
|
|
2406
|
+
default: S(() => [(m(), i(e, null, _(z, (e) => s(h, {
|
|
2211
2407
|
key: e,
|
|
2212
2408
|
label: e,
|
|
2213
2409
|
value: e
|
|
@@ -2220,33 +2416,33 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
2220
2416
|
placeholder: "条件值"
|
|
2221
2417
|
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
2222
2418
|
]),
|
|
2223
|
-
a("div",
|
|
2224
|
-
s(
|
|
2419
|
+
a("div", ca, [
|
|
2420
|
+
s(O, {
|
|
2225
2421
|
modelValue: t.effects.visible,
|
|
2226
2422
|
"onUpdate:modelValue": (e) => t.effects.visible = e
|
|
2227
2423
|
}, {
|
|
2228
|
-
default: S(() => [...c[
|
|
2424
|
+
default: S(() => [...c[46] ||= [o("显示", -1)]]),
|
|
2229
2425
|
_: 1
|
|
2230
2426
|
}, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
2231
|
-
s(
|
|
2427
|
+
s(O, {
|
|
2232
2428
|
modelValue: t.effects.disabled,
|
|
2233
2429
|
"onUpdate:modelValue": (e) => t.effects.disabled = e
|
|
2234
2430
|
}, {
|
|
2235
|
-
default: S(() => [...c[
|
|
2431
|
+
default: S(() => [...c[47] ||= [o("禁用", -1)]]),
|
|
2236
2432
|
_: 1
|
|
2237
2433
|
}, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
2238
|
-
s(
|
|
2434
|
+
s(O, {
|
|
2239
2435
|
modelValue: t.effects.required,
|
|
2240
2436
|
"onUpdate:modelValue": (e) => t.effects.required = e
|
|
2241
2437
|
}, {
|
|
2242
|
-
default: S(() => [...c[
|
|
2438
|
+
default: S(() => [...c[48] ||= [o("必填", -1)]]),
|
|
2243
2439
|
_: 1
|
|
2244
2440
|
}, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
2245
|
-
s(
|
|
2441
|
+
s(O, {
|
|
2246
2442
|
modelValue: t.effects.clearOnHide,
|
|
2247
2443
|
"onUpdate:modelValue": (e) => t.effects.clearOnHide = e
|
|
2248
2444
|
}, {
|
|
2249
|
-
default: S(() => [...c[
|
|
2445
|
+
default: S(() => [...c[49] ||= [o("隐藏清空", -1)]]),
|
|
2250
2446
|
_: 1
|
|
2251
2447
|
}, 8, ["modelValue", "onUpdate:modelValue"])
|
|
2252
2448
|
]),
|
|
@@ -2258,24 +2454,24 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
2258
2454
|
s(x, {
|
|
2259
2455
|
type: "textarea",
|
|
2260
2456
|
rows: 2,
|
|
2261
|
-
"model-value":
|
|
2262
|
-
onChange: (e) =>
|
|
2457
|
+
"model-value": me(t.effects.options),
|
|
2458
|
+
onChange: (e) => he(t, e),
|
|
2263
2459
|
placeholder: "联动选项 JSON"
|
|
2264
2460
|
}, null, 8, ["model-value", "onChange"])
|
|
2265
2461
|
]))), 128)), s(l, {
|
|
2266
2462
|
size: "small",
|
|
2267
|
-
onClick:
|
|
2463
|
+
onClick: fe
|
|
2268
2464
|
}, {
|
|
2269
|
-
default: S(() => [...c[
|
|
2465
|
+
default: S(() => [...c[50] ||= [o("添加联动规则", -1)]]),
|
|
2270
2466
|
_: 1
|
|
2271
2467
|
})])]),
|
|
2272
2468
|
_: 1
|
|
2273
2469
|
}),
|
|
2274
|
-
|
|
2275
|
-
key:
|
|
2470
|
+
G.value ? (m(), n(p, {
|
|
2471
|
+
key: 6,
|
|
2276
2472
|
label: "选项"
|
|
2277
2473
|
}, {
|
|
2278
|
-
default: S(() => [a("div",
|
|
2474
|
+
default: S(() => [a("div", la, [(m(!0), i(e, null, _(T.value.options ?? [], (e, t) => (m(), i("div", {
|
|
2279
2475
|
key: t,
|
|
2280
2476
|
class: "option-row"
|
|
2281
2477
|
}, [
|
|
@@ -2294,17 +2490,17 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
2294
2490
|
type: "danger",
|
|
2295
2491
|
onClick: (e) => T.value.options?.splice(t, 1)
|
|
2296
2492
|
}, {
|
|
2297
|
-
default: S(() => [...c[
|
|
2493
|
+
default: S(() => [...c[51] ||= [o(" 删除 ", -1)]]),
|
|
2298
2494
|
_: 1
|
|
2299
2495
|
}, 8, ["onClick"])
|
|
2300
2496
|
]))), 128)), s(l, {
|
|
2301
2497
|
size: "small",
|
|
2302
|
-
onClick: c[
|
|
2498
|
+
onClick: c[31] ||= (e) => T.value.options?.push({
|
|
2303
2499
|
label: "",
|
|
2304
2500
|
value: ""
|
|
2305
2501
|
})
|
|
2306
2502
|
}, {
|
|
2307
|
-
default: S(() => [...c[
|
|
2503
|
+
default: S(() => [...c[52] ||= [o(" 添加选项 ", -1)]]),
|
|
2308
2504
|
_: 1
|
|
2309
2505
|
})])]),
|
|
2310
2506
|
_: 1
|
|
@@ -2314,43 +2510,43 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
2314
2510
|
type: "danger",
|
|
2315
2511
|
onClick: le
|
|
2316
2512
|
}, {
|
|
2317
|
-
default: S(() => [...c[
|
|
2513
|
+
default: S(() => [...c[53] ||= [o("删除字段", -1)]]),
|
|
2318
2514
|
_: 1
|
|
2319
2515
|
})]),
|
|
2320
2516
|
_: 1
|
|
2321
2517
|
})
|
|
2322
2518
|
]),
|
|
2323
2519
|
_: 1
|
|
2324
|
-
})) : (m(), i("div",
|
|
2520
|
+
})) : (m(), i("div", ua, "点击右侧表单中的字段进行配置"))]),
|
|
2325
2521
|
_: 1
|
|
2326
2522
|
})]),
|
|
2327
2523
|
_: 1
|
|
2328
2524
|
}, 8, ["modelValue"]),
|
|
2329
|
-
a("section",
|
|
2330
|
-
s(
|
|
2525
|
+
a("section", da, [a("div", fa, [c[54] ||= a("h3", null, "config", -1), a("pre", null, b(V.value), 1)]), a("div", pa, [c[55] ||= a("h3", null, "data", -1), a("pre", null, b(ae.value), 1)])]),
|
|
2526
|
+
s(Se, {
|
|
2331
2527
|
modelValue: M.value,
|
|
2332
|
-
"onUpdate:modelValue": c[
|
|
2528
|
+
"onUpdate:modelValue": c[35] ||= (e) => M.value = e,
|
|
2333
2529
|
title: j.value?.type === "block" ? "添加 block" : "添加字段",
|
|
2334
2530
|
width: "420px"
|
|
2335
2531
|
}, {
|
|
2336
2532
|
footer: S(() => [s(l, { onClick: ye }, {
|
|
2337
|
-
default: S(() => [...c[
|
|
2533
|
+
default: S(() => [...c[56] ||= [o("取消", -1)]]),
|
|
2338
2534
|
_: 1
|
|
2339
2535
|
}), s(l, {
|
|
2340
2536
|
type: "primary",
|
|
2341
2537
|
onClick: ve
|
|
2342
2538
|
}, {
|
|
2343
|
-
default: S(() => [...c[
|
|
2539
|
+
default: S(() => [...c[57] ||= [o("确定", -1)]]),
|
|
2344
2540
|
_: 1
|
|
2345
2541
|
})]),
|
|
2346
|
-
default: S(() => [s(
|
|
2542
|
+
default: S(() => [s(C, { "label-position": "top" }, {
|
|
2347
2543
|
default: S(() => [s(p, {
|
|
2348
2544
|
label: "key",
|
|
2349
2545
|
required: ""
|
|
2350
2546
|
}, {
|
|
2351
2547
|
default: S(() => [s(x, {
|
|
2352
2548
|
modelValue: F.value,
|
|
2353
|
-
"onUpdate:modelValue": c[
|
|
2549
|
+
"onUpdate:modelValue": c[33] ||= (e) => F.value = e,
|
|
2354
2550
|
placeholder: "请输入 key"
|
|
2355
2551
|
}, null, 8, ["modelValue"])]),
|
|
2356
2552
|
_: 1
|
|
@@ -2360,7 +2556,7 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
2360
2556
|
}, {
|
|
2361
2557
|
default: S(() => [s(x, {
|
|
2362
2558
|
modelValue: I.value,
|
|
2363
|
-
"onUpdate:modelValue": c[
|
|
2559
|
+
"onUpdate:modelValue": c[34] ||= (e) => I.value = e,
|
|
2364
2560
|
placeholder: "请输入 label"
|
|
2365
2561
|
}, null, 8, ["modelValue"])]),
|
|
2366
2562
|
_: 1
|
|
@@ -2372,8 +2568,8 @@ var zi = /*#__PURE__*/ xi(c({
|
|
|
2372
2568
|
]);
|
|
2373
2569
|
};
|
|
2374
2570
|
}
|
|
2375
|
-
}), [["__scopeId", "data-v-
|
|
2376
|
-
e.component("FitfulForm",
|
|
2571
|
+
}), [["__scopeId", "data-v-854c6855"]]), ha = { install(e) {
|
|
2572
|
+
e.component("FitfulForm", Wi), e.component("FitfulCreateForm", ma), e.component("FitfulDynamicField", Di);
|
|
2377
2573
|
} };
|
|
2378
2574
|
//#endregion
|
|
2379
|
-
export {
|
|
2575
|
+
export { ma as CreateForm, Di as DynamicField, ha as FitfulFormPlugin, ha as default, Wi as Form };
|