vue-2024-ui 0.0.51 → 0.0.53

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/index.es.js CHANGED
@@ -1,9 +1,9 @@
1
- import ht, { ElForm as Ie, ElButtonGroup as je, ElButton as $e, ElPopover as Ne, ElMessage as _e, ElMessageBox as st, ElDialog as yt, ElDrawer as gt } from "element-plus";
2
- import { mergeModels as Fe, useModel as Te, ref as ye, onMounted as Ae, resolveComponent as U, openBlock as s, createElementBlock as L, unref as o, createBlock as V, mergeProps as q, withCtx as p, renderSlot as v, Fragment as X, renderList as B, createTextVNode as be, toDisplayString as he, createSlots as se, normalizeProps as Se, createVNode as te, createElementVNode as z, useSlots as it, inject as Ke, useAttrs as Re, computed as Oe, normalizeStyle as Me, withModifiers as ut, createCommentVNode as ve, guardReactiveProps as ze, resolveDynamicComponent as De, Transition as bt, withDirectives as He, vShow as We, h as ke, onBeforeUnmount as $t, normalizeClass as dt, watchEffect as Et, watch as wt, createApp as _t } from "vue";
3
- import { FullScreen as kt, Remove as Ct } from "@element-plus/icons-vue";
1
+ import ht, { ElForm as Ne, ElButtonGroup as Le, ElButton as be, ElPopover as We, ElMessage as we, ElMessageBox as ut, ElDialog as yt, ElDrawer as gt } from "element-plus";
2
+ import { mergeModels as Te, useModel as qe, ref as ye, onMounted as Ie, resolveComponent as j, openBlock as i, createElementBlock as I, unref as o, createBlock as C, mergeProps as M, withCtx as v, renderSlot as f, Fragment as G, renderList as A, createTextVNode as Ee, toDisplayString as ve, createSlots as ae, normalizeProps as Be, createVNode as J, createElementVNode as Q, useSlots as nt, inject as Je, useAttrs as Pe, onUnmounted as bt, computed as Oe, normalizeStyle as Me, withModifiers as rt, createCommentVNode as pe, guardReactiveProps as Ge, resolveDynamicComponent as De, Transition as $t, withDirectives as st, vShow as it, h as ke, onBeforeUnmount as Et, normalizeClass as dt, watchEffect as wt, watch as _t, createApp as kt } from "vue";
3
+ import { FullScreen as Ct, Remove as Vt } from "@element-plus/icons-vue";
4
4
  import ct from "sortablejs";
5
- import { Dexie as Vt } from "dexie";
6
- var Dt = {
5
+ import { Dexie as Dt } from "dexie";
6
+ var Ft = {
7
7
  name: "zh-cn",
8
8
  el: {
9
9
  breadcrumb: {
@@ -180,389 +180,393 @@ var Dt = {
180
180
  indicator: "幻灯片切换至索引 {index}"
181
181
  }
182
182
  }
183
- }, Ft = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
184
- function Tt(f) {
185
- return f && f.__esModule && Object.prototype.hasOwnProperty.call(f, "default") ? f.default : f;
183
+ }, Tt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
184
+ function qt(m) {
185
+ return m && m.__esModule && Object.prototype.hasOwnProperty.call(m, "default") ? m.default : m;
186
186
  }
187
187
  var ft = { exports: {} };
188
- (function(f, d) {
189
- (function(e, t) {
190
- f.exports = t();
191
- })(Ft, function() {
192
- var e = 1e3, t = 6e4, n = 36e5, m = "millisecond", w = "second", R = "minute", D = "hour", E = "day", M = "week", P = "month", ce = "quarter", F = "year", i = "date", x = "Invalid Date", le = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, ie = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, h = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(r) {
193
- var b = ["th", "st", "nd", "rd"], c = r % 100;
194
- return "[" + r + (b[(c - 20) % 10] || b[c] || b[0]) + "]";
195
- } }, S = function(r, b, c) {
196
- var _ = String(r);
197
- return !_ || _.length >= b ? r : "" + Array(b + 1 - _.length).join(c) + r;
198
- }, G = { s: S, z: function(r) {
199
- var b = -r.utcOffset(), c = Math.abs(b), _ = Math.floor(c / 60), $ = c % 60;
200
- return (b <= 0 ? "+" : "-") + S(_, 2, "0") + ":" + S($, 2, "0");
201
- }, m: function r(b, c) {
202
- if (b.date() < c.date()) return -r(c, b);
203
- var _ = 12 * (c.year() - b.year()) + (c.month() - b.month()), $ = b.clone().add(_, P), y = c - $ < 0, T = b.clone().add(_ + (y ? -1 : 1), P);
204
- return +(-(_ + (c - $) / (y ? $ - T : T - $)) || 0);
205
- }, a: function(r) {
206
- return r < 0 ? Math.ceil(r) || 0 : Math.floor(r);
207
- }, p: function(r) {
208
- return { M: P, y: F, w: M, d: E, D: i, h: D, m: R, s: w, ms: m, Q: ce }[r] || String(r || "").toLowerCase().replace(/s$/, "");
209
- }, u: function(r) {
210
- return r === void 0;
211
- } }, C = "en", re = {};
212
- re[C] = h;
213
- var K = "$isDayjsObject", oe = function(r) {
214
- return r instanceof N || !(!r || !r[K]);
215
- }, J = function r(b, c, _) {
216
- var $;
217
- if (!b) return C;
218
- if (typeof b == "string") {
219
- var y = b.toLowerCase();
220
- re[y] && ($ = y), c && (re[y] = c, $ = y);
221
- var T = b.split("-");
222
- if (!$ && T.length > 1) return r(T[0]);
188
+ (function(m, c) {
189
+ (function(t, e) {
190
+ m.exports = e();
191
+ })(Tt, function() {
192
+ var t = 1e3, e = 6e4, n = 36e5, p = "millisecond", $ = "second", N = "minute", w = "hour", g = "day", T = "week", Y = "month", q = "quarter", y = "year", _ = "date", F = "Invalid Date", re = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, ue = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, fe = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(O) {
193
+ var u = ["th", "st", "nd", "rd"], r = O % 100;
194
+ return "[" + O + (u[(r - 20) % 10] || u[r] || u[0]) + "]";
195
+ } }, me = function(O, u, r) {
196
+ var V = String(O);
197
+ return !V || V.length >= u ? O : "" + Array(u + 1 - V.length).join(r) + O;
198
+ }, d = { s: me, z: function(O) {
199
+ var u = -O.utcOffset(), r = Math.abs(u), V = Math.floor(r / 60), b = r % 60;
200
+ return (u <= 0 ? "+" : "-") + me(V, 2, "0") + ":" + me(b, 2, "0");
201
+ }, m: function O(u, r) {
202
+ if (u.date() < r.date()) return -O(r, u);
203
+ var V = 12 * (r.year() - u.year()) + (r.month() - u.month()), b = u.clone().add(V, Y), E = r - b < 0, k = u.clone().add(V + (E ? -1 : 1), Y);
204
+ return +(-(V + (r - b) / (E ? b - k : k - b)) || 0);
205
+ }, a: function(O) {
206
+ return O < 0 ? Math.ceil(O) || 0 : Math.floor(O);
207
+ }, p: function(O) {
208
+ return { M: Y, y, w: T, d: g, D: _, h: w, m: N, s: $, ms: p, Q: q }[O] || String(O || "").toLowerCase().replace(/s$/, "");
209
+ }, u: function(O) {
210
+ return O === void 0;
211
+ } }, x = "en", ee = {};
212
+ ee[x] = fe;
213
+ var D = "$isDayjsObject", ne = function(O) {
214
+ return O instanceof le || !(!O || !O[D]);
215
+ }, R = function O(u, r, V) {
216
+ var b;
217
+ if (!u) return x;
218
+ if (typeof u == "string") {
219
+ var E = u.toLowerCase();
220
+ ee[E] && (b = E), r && (ee[E] = r, b = E);
221
+ var k = u.split("-");
222
+ if (!b && k.length > 1) return O(k[0]);
223
223
  } else {
224
- var j = b.name;
225
- re[j] = b, $ = j;
224
+ var U = u.name;
225
+ ee[U] = u, b = U;
226
226
  }
227
- return !_ && $ && (C = $), $ || !_ && C;
228
- }, Q = function(r, b) {
229
- if (oe(r)) return r.clone();
230
- var c = typeof b == "object" ? b : {};
231
- return c.date = r, c.args = arguments, new N(c);
232
- }, k = G;
233
- k.l = J, k.i = oe, k.w = function(r, b) {
234
- return Q(r, { locale: b.$L, utc: b.$u, x: b.$x, $offset: b.$offset });
227
+ return !V && b && (x = b), b || !V && x;
228
+ }, P = function(O, u) {
229
+ if (ne(O)) return O.clone();
230
+ var r = typeof u == "object" ? u : {};
231
+ return r.date = O, r.args = arguments, new le(r);
232
+ }, K = d;
233
+ K.l = R, K.i = ne, K.w = function(O, u) {
234
+ return P(O, { locale: u.$L, utc: u.$u, x: u.$x, $offset: u.$offset });
235
235
  };
236
- var N = function() {
237
- function r(c) {
238
- this.$L = J(c.locale, null, !0), this.parse(c), this.$x = this.$x || c.x || {}, this[K] = !0;
236
+ var le = function() {
237
+ function O(r) {
238
+ this.$L = R(r.locale, null, !0), this.parse(r), this.$x = this.$x || r.x || {}, this[D] = !0;
239
239
  }
240
- var b = r.prototype;
241
- return b.parse = function(c) {
242
- this.$d = function(_) {
243
- var $ = _.date, y = _.utc;
244
- if ($ === null) return /* @__PURE__ */ new Date(NaN);
245
- if (k.u($)) return /* @__PURE__ */ new Date();
246
- if ($ instanceof Date) return new Date($);
247
- if (typeof $ == "string" && !/Z$/i.test($)) {
248
- var T = $.match(le);
249
- if (T) {
250
- var j = T[2] - 1 || 0, W = (T[7] || "0").substring(0, 3);
251
- return y ? new Date(Date.UTC(T[1], j, T[3] || 1, T[4] || 0, T[5] || 0, T[6] || 0, W)) : new Date(T[1], j, T[3] || 1, T[4] || 0, T[5] || 0, T[6] || 0, W);
240
+ var u = O.prototype;
241
+ return u.parse = function(r) {
242
+ this.$d = function(V) {
243
+ var b = V.date, E = V.utc;
244
+ if (b === null) return /* @__PURE__ */ new Date(NaN);
245
+ if (K.u(b)) return /* @__PURE__ */ new Date();
246
+ if (b instanceof Date) return new Date(b);
247
+ if (typeof b == "string" && !/Z$/i.test(b)) {
248
+ var k = b.match(re);
249
+ if (k) {
250
+ var U = k[2] - 1 || 0, H = (k[7] || "0").substring(0, 3);
251
+ return E ? new Date(Date.UTC(k[1], U, k[3] || 1, k[4] || 0, k[5] || 0, k[6] || 0, H)) : new Date(k[1], U, k[3] || 1, k[4] || 0, k[5] || 0, k[6] || 0, H);
252
252
  }
253
253
  }
254
- return new Date($);
255
- }(c), this.init();
256
- }, b.init = function() {
257
- var c = this.$d;
258
- this.$y = c.getFullYear(), this.$M = c.getMonth(), this.$D = c.getDate(), this.$W = c.getDay(), this.$H = c.getHours(), this.$m = c.getMinutes(), this.$s = c.getSeconds(), this.$ms = c.getMilliseconds();
259
- }, b.$utils = function() {
260
- return k;
261
- }, b.isValid = function() {
262
- return this.$d.toString() !== x;
263
- }, b.isSame = function(c, _) {
264
- var $ = Q(c);
265
- return this.startOf(_) <= $ && $ <= this.endOf(_);
266
- }, b.isAfter = function(c, _) {
267
- return Q(c) < this.startOf(_);
268
- }, b.isBefore = function(c, _) {
269
- return this.endOf(_) < Q(c);
270
- }, b.$g = function(c, _, $) {
271
- return k.u(c) ? this[_] : this.set($, c);
272
- }, b.unix = function() {
254
+ return new Date(b);
255
+ }(r), this.init();
256
+ }, u.init = function() {
257
+ var r = this.$d;
258
+ this.$y = r.getFullYear(), this.$M = r.getMonth(), this.$D = r.getDate(), this.$W = r.getDay(), this.$H = r.getHours(), this.$m = r.getMinutes(), this.$s = r.getSeconds(), this.$ms = r.getMilliseconds();
259
+ }, u.$utils = function() {
260
+ return K;
261
+ }, u.isValid = function() {
262
+ return this.$d.toString() !== F;
263
+ }, u.isSame = function(r, V) {
264
+ var b = P(r);
265
+ return this.startOf(V) <= b && b <= this.endOf(V);
266
+ }, u.isAfter = function(r, V) {
267
+ return P(r) < this.startOf(V);
268
+ }, u.isBefore = function(r, V) {
269
+ return this.endOf(V) < P(r);
270
+ }, u.$g = function(r, V, b) {
271
+ return K.u(r) ? this[V] : this.set(b, r);
272
+ }, u.unix = function() {
273
273
  return Math.floor(this.valueOf() / 1e3);
274
- }, b.valueOf = function() {
274
+ }, u.valueOf = function() {
275
275
  return this.$d.getTime();
276
- }, b.startOf = function(c, _) {
277
- var $ = this, y = !!k.u(_) || _, T = k.p(c), j = function(g, A) {
278
- var Y = k.w($.$u ? Date.UTC($.$y, A, g) : new Date($.$y, A, g), $);
279
- return y ? Y : Y.endOf(E);
280
- }, W = function(g, A) {
281
- return k.w($.toDate()[g].apply($.toDate("s"), (y ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(A)), $);
282
- }, ae = this.$W, ne = this.$M, u = this.$D, I = "set" + (this.$u ? "UTC" : "");
283
- switch (T) {
284
- case F:
285
- return y ? j(1, 0) : j(31, 11);
286
- case P:
287
- return y ? j(1, ne) : j(0, ne + 1);
288
- case M:
289
- var l = this.$locale().weekStart || 0, a = (ae < l ? ae + 7 : ae) - l;
290
- return j(y ? u - a : u + (6 - a), ne);
291
- case E:
292
- case i:
293
- return W(I + "Hours", 0);
294
- case D:
295
- return W(I + "Minutes", 1);
296
- case R:
297
- return W(I + "Seconds", 2);
276
+ }, u.startOf = function(r, V) {
277
+ var b = this, E = !!K.u(V) || V, k = K.p(r), U = function(h, B) {
278
+ var X = K.w(b.$u ? Date.UTC(b.$y, B, h) : new Date(b.$y, B, h), b);
279
+ return E ? X : X.endOf(g);
280
+ }, H = function(h, B) {
281
+ return K.w(b.toDate()[h].apply(b.toDate("s"), (E ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(B)), b);
282
+ }, oe = this.$W, s = this.$M, z = this.$D, W = "set" + (this.$u ? "UTC" : "");
283
+ switch (k) {
284
+ case y:
285
+ return E ? U(1, 0) : U(31, 11);
286
+ case Y:
287
+ return E ? U(1, s) : U(0, s + 1);
288
+ case T:
289
+ var l = this.$locale().weekStart || 0, a = (oe < l ? oe + 7 : oe) - l;
290
+ return U(E ? z - a : z + (6 - a), s);
291
+ case g:
292
+ case _:
293
+ return H(W + "Hours", 0);
298
294
  case w:
299
- return W(I + "Milliseconds", 3);
295
+ return H(W + "Minutes", 1);
296
+ case N:
297
+ return H(W + "Seconds", 2);
298
+ case $:
299
+ return H(W + "Milliseconds", 3);
300
300
  default:
301
301
  return this.clone();
302
302
  }
303
- }, b.endOf = function(c) {
304
- return this.startOf(c, !1);
305
- }, b.$set = function(c, _) {
306
- var $, y = k.p(c), T = "set" + (this.$u ? "UTC" : ""), j = ($ = {}, $[E] = T + "Date", $[i] = T + "Date", $[P] = T + "Month", $[F] = T + "FullYear", $[D] = T + "Hours", $[R] = T + "Minutes", $[w] = T + "Seconds", $[m] = T + "Milliseconds", $)[y], W = y === E ? this.$D + (_ - this.$W) : _;
307
- if (y === P || y === F) {
308
- var ae = this.clone().set(i, 1);
309
- ae.$d[j](W), ae.init(), this.$d = ae.set(i, Math.min(this.$D, ae.daysInMonth())).$d;
310
- } else j && this.$d[j](W);
303
+ }, u.endOf = function(r) {
304
+ return this.startOf(r, !1);
305
+ }, u.$set = function(r, V) {
306
+ var b, E = K.p(r), k = "set" + (this.$u ? "UTC" : ""), U = (b = {}, b[g] = k + "Date", b[_] = k + "Date", b[Y] = k + "Month", b[y] = k + "FullYear", b[w] = k + "Hours", b[N] = k + "Minutes", b[$] = k + "Seconds", b[p] = k + "Milliseconds", b)[E], H = E === g ? this.$D + (V - this.$W) : V;
307
+ if (E === Y || E === y) {
308
+ var oe = this.clone().set(_, 1);
309
+ oe.$d[U](H), oe.init(), this.$d = oe.set(_, Math.min(this.$D, oe.daysInMonth())).$d;
310
+ } else U && this.$d[U](H);
311
311
  return this.init(), this;
312
- }, b.set = function(c, _) {
313
- return this.clone().$set(c, _);
314
- }, b.get = function(c) {
315
- return this[k.p(c)]();
316
- }, b.add = function(c, _) {
317
- var $, y = this;
318
- c = Number(c);
319
- var T = k.p(_), j = function(ne) {
320
- var u = Q(y);
321
- return k.w(u.date(u.date() + Math.round(ne * c)), y);
312
+ }, u.set = function(r, V) {
313
+ return this.clone().$set(r, V);
314
+ }, u.get = function(r) {
315
+ return this[K.p(r)]();
316
+ }, u.add = function(r, V) {
317
+ var b, E = this;
318
+ r = Number(r);
319
+ var k = K.p(V), U = function(s) {
320
+ var z = P(E);
321
+ return K.w(z.date(z.date() + Math.round(s * r)), E);
322
322
  };
323
- if (T === P) return this.set(P, this.$M + c);
324
- if (T === F) return this.set(F, this.$y + c);
325
- if (T === E) return j(1);
326
- if (T === M) return j(7);
327
- var W = ($ = {}, $[R] = t, $[D] = n, $[w] = e, $)[T] || 1, ae = this.$d.getTime() + c * W;
328
- return k.w(ae, this);
329
- }, b.subtract = function(c, _) {
330
- return this.add(-1 * c, _);
331
- }, b.format = function(c) {
332
- var _ = this, $ = this.$locale();
333
- if (!this.isValid()) return $.invalidDate || x;
334
- var y = c || "YYYY-MM-DDTHH:mm:ssZ", T = k.z(this), j = this.$H, W = this.$m, ae = this.$M, ne = $.weekdays, u = $.months, I = $.meridiem, l = function(A, Y, Z, ge) {
335
- return A && (A[Y] || A(_, y)) || Z[Y].slice(0, ge);
336
- }, a = function(A) {
337
- return k.s(j % 12 || 12, A, "0");
338
- }, g = I || function(A, Y, Z) {
339
- var ge = A < 12 ? "AM" : "PM";
340
- return Z ? ge.toLowerCase() : ge;
323
+ if (k === Y) return this.set(Y, this.$M + r);
324
+ if (k === y) return this.set(y, this.$y + r);
325
+ if (k === g) return U(1);
326
+ if (k === T) return U(7);
327
+ var H = (b = {}, b[N] = e, b[w] = n, b[$] = t, b)[k] || 1, oe = this.$d.getTime() + r * H;
328
+ return K.w(oe, this);
329
+ }, u.subtract = function(r, V) {
330
+ return this.add(-1 * r, V);
331
+ }, u.format = function(r) {
332
+ var V = this, b = this.$locale();
333
+ if (!this.isValid()) return b.invalidDate || F;
334
+ var E = r || "YYYY-MM-DDTHH:mm:ssZ", k = K.z(this), U = this.$H, H = this.$m, oe = this.$M, s = b.weekdays, z = b.months, W = b.meridiem, l = function(B, X, te, he) {
335
+ return B && (B[X] || B(V, E)) || te[X].slice(0, he);
336
+ }, a = function(B) {
337
+ return K.s(U % 12 || 12, B, "0");
338
+ }, h = W || function(B, X, te) {
339
+ var he = B < 12 ? "AM" : "PM";
340
+ return te ? he.toLowerCase() : he;
341
341
  };
342
- return y.replace(ie, function(A, Y) {
343
- return Y || function(Z) {
344
- switch (Z) {
342
+ return E.replace(ue, function(B, X) {
343
+ return X || function(te) {
344
+ switch (te) {
345
345
  case "YY":
346
- return String(_.$y).slice(-2);
346
+ return String(V.$y).slice(-2);
347
347
  case "YYYY":
348
- return k.s(_.$y, 4, "0");
348
+ return K.s(V.$y, 4, "0");
349
349
  case "M":
350
- return ae + 1;
350
+ return oe + 1;
351
351
  case "MM":
352
- return k.s(ae + 1, 2, "0");
352
+ return K.s(oe + 1, 2, "0");
353
353
  case "MMM":
354
- return l($.monthsShort, ae, u, 3);
354
+ return l(b.monthsShort, oe, z, 3);
355
355
  case "MMMM":
356
- return l(u, ae);
356
+ return l(z, oe);
357
357
  case "D":
358
- return _.$D;
358
+ return V.$D;
359
359
  case "DD":
360
- return k.s(_.$D, 2, "0");
360
+ return K.s(V.$D, 2, "0");
361
361
  case "d":
362
- return String(_.$W);
362
+ return String(V.$W);
363
363
  case "dd":
364
- return l($.weekdaysMin, _.$W, ne, 2);
364
+ return l(b.weekdaysMin, V.$W, s, 2);
365
365
  case "ddd":
366
- return l($.weekdaysShort, _.$W, ne, 3);
366
+ return l(b.weekdaysShort, V.$W, s, 3);
367
367
  case "dddd":
368
- return ne[_.$W];
368
+ return s[V.$W];
369
369
  case "H":
370
- return String(j);
370
+ return String(U);
371
371
  case "HH":
372
- return k.s(j, 2, "0");
372
+ return K.s(U, 2, "0");
373
373
  case "h":
374
374
  return a(1);
375
375
  case "hh":
376
376
  return a(2);
377
377
  case "a":
378
- return g(j, W, !0);
378
+ return h(U, H, !0);
379
379
  case "A":
380
- return g(j, W, !1);
380
+ return h(U, H, !1);
381
381
  case "m":
382
- return String(W);
382
+ return String(H);
383
383
  case "mm":
384
- return k.s(W, 2, "0");
384
+ return K.s(H, 2, "0");
385
385
  case "s":
386
- return String(_.$s);
386
+ return String(V.$s);
387
387
  case "ss":
388
- return k.s(_.$s, 2, "0");
388
+ return K.s(V.$s, 2, "0");
389
389
  case "SSS":
390
- return k.s(_.$ms, 3, "0");
390
+ return K.s(V.$ms, 3, "0");
391
391
  case "Z":
392
- return T;
392
+ return k;
393
393
  }
394
394
  return null;
395
- }(A) || T.replace(":", "");
395
+ }(B) || k.replace(":", "");
396
396
  });
397
- }, b.utcOffset = function() {
397
+ }, u.utcOffset = function() {
398
398
  return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
399
- }, b.diff = function(c, _, $) {
400
- var y, T = this, j = k.p(_), W = Q(c), ae = (W.utcOffset() - this.utcOffset()) * t, ne = this - W, u = function() {
401
- return k.m(T, W);
399
+ }, u.diff = function(r, V, b) {
400
+ var E, k = this, U = K.p(V), H = P(r), oe = (H.utcOffset() - this.utcOffset()) * e, s = this - H, z = function() {
401
+ return K.m(k, H);
402
402
  };
403
- switch (j) {
404
- case F:
405
- y = u() / 12;
403
+ switch (U) {
404
+ case y:
405
+ E = z() / 12;
406
406
  break;
407
- case P:
408
- y = u();
407
+ case Y:
408
+ E = z();
409
409
  break;
410
- case ce:
411
- y = u() / 3;
410
+ case q:
411
+ E = z() / 3;
412
412
  break;
413
- case M:
414
- y = (ne - ae) / 6048e5;
413
+ case T:
414
+ E = (s - oe) / 6048e5;
415
415
  break;
416
- case E:
417
- y = (ne - ae) / 864e5;
416
+ case g:
417
+ E = (s - oe) / 864e5;
418
418
  break;
419
- case D:
420
- y = ne / n;
419
+ case w:
420
+ E = s / n;
421
421
  break;
422
- case R:
423
- y = ne / t;
422
+ case N:
423
+ E = s / e;
424
424
  break;
425
- case w:
426
- y = ne / e;
425
+ case $:
426
+ E = s / t;
427
427
  break;
428
428
  default:
429
- y = ne;
429
+ E = s;
430
430
  }
431
- return $ ? y : k.a(y);
432
- }, b.daysInMonth = function() {
433
- return this.endOf(P).$D;
434
- }, b.$locale = function() {
435
- return re[this.$L];
436
- }, b.locale = function(c, _) {
437
- if (!c) return this.$L;
438
- var $ = this.clone(), y = J(c, _, !0);
439
- return y && ($.$L = y), $;
440
- }, b.clone = function() {
441
- return k.w(this.$d, this);
442
- }, b.toDate = function() {
431
+ return b ? E : K.a(E);
432
+ }, u.daysInMonth = function() {
433
+ return this.endOf(Y).$D;
434
+ }, u.$locale = function() {
435
+ return ee[this.$L];
436
+ }, u.locale = function(r, V) {
437
+ if (!r) return this.$L;
438
+ var b = this.clone(), E = R(r, V, !0);
439
+ return E && (b.$L = E), b;
440
+ }, u.clone = function() {
441
+ return K.w(this.$d, this);
442
+ }, u.toDate = function() {
443
443
  return new Date(this.valueOf());
444
- }, b.toJSON = function() {
444
+ }, u.toJSON = function() {
445
445
  return this.isValid() ? this.toISOString() : null;
446
- }, b.toISOString = function() {
446
+ }, u.toISOString = function() {
447
447
  return this.$d.toISOString();
448
- }, b.toString = function() {
448
+ }, u.toString = function() {
449
449
  return this.$d.toUTCString();
450
- }, r;
451
- }(), ue = N.prototype;
452
- return Q.prototype = ue, [["$ms", m], ["$s", w], ["$m", R], ["$H", D], ["$W", E], ["$M", P], ["$y", F], ["$D", i]].forEach(function(r) {
453
- ue[r[1]] = function(b) {
454
- return this.$g(b, r[0], r[1]);
450
+ }, O;
451
+ }(), ge = le.prototype;
452
+ return P.prototype = ge, [["$ms", p], ["$s", $], ["$m", N], ["$H", w], ["$W", g], ["$M", Y], ["$y", y], ["$D", _]].forEach(function(O) {
453
+ ge[O[1]] = function(u) {
454
+ return this.$g(u, O[0], O[1]);
455
455
  };
456
- }), Q.extend = function(r, b) {
457
- return r.$i || (r(b, N, Q), r.$i = !0), Q;
458
- }, Q.locale = J, Q.isDayjs = oe, Q.unix = function(r) {
459
- return Q(1e3 * r);
460
- }, Q.en = re[C], Q.Ls = re, Q.p = {}, Q;
456
+ }), P.extend = function(O, u) {
457
+ return O.$i || (O(u, le, P), O.$i = !0), P;
458
+ }, P.locale = R, P.isDayjs = ne, P.unix = function(O) {
459
+ return P(1e3 * O);
460
+ }, P.en = ee[x], P.Ls = ee, P.p = {}, P;
461
461
  });
462
462
  })(ft);
463
- var qt = ft.exports;
464
- const Pe = /* @__PURE__ */ Tt(qt), Mt = {
463
+ var Mt = ft.exports;
464
+ const Ye = /* @__PURE__ */ qt(Mt), Ot = {
465
465
  style: { display: "flex", width: "100%" },
466
466
  class: "g-ctrl-container"
467
- }, xt = {
467
+ }, St = {
468
468
  key: 20,
469
469
  style: { position: "relative" }
470
- }, St = ["title"], qe = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
470
+ }, xt = ["title"], Fe = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
471
471
  __name: "g-ctrl",
472
- props: /* @__PURE__ */ Fe(["t", "ctrlKey", "item", "model", "ctrlType"], {
472
+ props: /* @__PURE__ */ Te(["t", "ctrlKey", "item", "model", "ctrlType", "formInfo"], {
473
473
  modelValue: { required: !0 },
474
474
  modelModifiers: {}
475
475
  }),
476
476
  emits: ["update:modelValue"],
477
- setup(f) {
478
- const d = Te(f, "modelValue"), e = f, t = e.item || {}, n = e.ctrlKey, m = e.ctrlType, w = e.model, R = ye([]), D = () => Object.keys(it()).filter((F) => F.startsWith(`${e.t}-${n}-`)).map((F) => F.replace(`${e.t}-${n}-`, "")), E = {
477
+ setup(m) {
478
+ const c = qe(m, "modelValue"), t = m, e = t.item || {}, n = t.ctrlKey, p = t.ctrlType, $ = t.model, N = ye([]), w = () => Object.keys(nt()).filter((q) => q.startsWith(`${t.t}-${n}-`)).map((q) => q.replace(`${t.t}-${n}-`, "")), g = {
479
479
  filterable: !0,
480
- remote: !!(t && t["remote-method"]),
481
- ...t
482
- }, M = (F) => {
483
- t["remote-method"](F, (i) => {
484
- w[n].options = i;
480
+ remote: !!(e && e["remote-method"]),
481
+ ...e
482
+ }, T = (q) => {
483
+ e["remote-method"](q, (y) => {
484
+ $[n].options = y;
485
485
  });
486
- }, P = ye(!1), ce = async (F = "options") => {
486
+ }, Y = async (q = "options") => {
487
487
  try {
488
- const i = await (t == null ? void 0 : t.getDicts(w));
489
- w[n][F] = i, P.value = !0;
490
- } catch (i) {
491
- console.error("Failed to fetch options:", i);
488
+ const y = await (e == null ? void 0 : e.getDicts(t.formInfo, c.value)), _ = y == null ? void 0 : y.map((F, re) => ({
489
+ ...F,
490
+ value: F.value ?? F.label ?? re,
491
+ label: F.label || "未知选项"
492
+ }));
493
+ Object.assign($[n], { [q]: _ });
494
+ } catch (y) {
495
+ throw console.error("获取选项失败:", y), y;
492
496
  }
493
497
  };
494
- return Ae(async () => {
495
- t && t["remote-method"] && (E["remote-method"] = M);
496
- const F = (x, le = "options", ie = w[n]) => {
497
- typeof t.getDicts == "function" && ce(le).catch((h) => {
498
- console.error(`Failed to load ${le} for ${x}:`, h);
498
+ return Ie(async () => {
499
+ e && e["remote-method"] && (g["remote-method"] = T);
500
+ const q = (_, F = "options", re = $[n]) => {
501
+ typeof e.getDicts == "function" && Y(F).catch((ue) => {
502
+ console.error(`Failed to load ${F} for ${_}:`, ue);
499
503
  });
500
504
  };
501
- ["radio", "radio-button", "checkbox-group", "checkbox-group-button", "select", "cascader"].includes(m) && F(m), m === "tree-select" && await (async () => {
505
+ ["radio", "radio-button", "checkbox-group", "checkbox-group-button", "select", "cascader"].includes(p) && q(p), p === "tree-select" && await (async () => {
502
506
  try {
503
- typeof t.getDicts == "function" ? R.value = await t.getDicts(w) : w[n].options && (R.value = w[n].options), P.value = !0;
504
- } catch (le) {
505
- console.error("Failed to load data for tree-select:", le);
507
+ typeof e.getDicts == "function" ? N.value = await e.getDicts(t.formInfo, c.value) : $[n].options && (N.value = $[n].options);
508
+ } catch (F) {
509
+ console.error("Failed to load data for tree-select:", F);
506
510
  }
507
511
  })();
508
- }), (F, i) => {
509
- var ae, ne;
510
- const x = U("el-radio"), le = U("el-radio-group"), ie = U("el-radio-button"), h = U("el-checkbox"), S = U("el-checkbox-group"), G = U("el-checkbox-button"), C = U("el-option"), re = U("el-option-group"), K = U("el-select"), oe = U("el-tree-select"), J = U("el-time-picker"), Q = U("el-time-select"), k = U("el-date-picker"), N = U("el-color-picker"), ue = U("el-rate"), r = U("el-slider"), b = U("el-switch"), c = U("el-transfer"), _ = U("el-cascader"), $ = U("el-button"), y = U("el-upload"), T = U("el-autocomplete"), j = U("el-input-number"), W = U("el-input");
511
- return s(), L("div", Mt, [
512
- o(m) == o(de).RADIO ? (s(), V(le, q({
512
+ }), (q, y) => {
513
+ var H, oe;
514
+ const _ = j("el-radio"), F = j("el-radio-group"), re = j("el-radio-button"), ue = j("el-checkbox"), fe = j("el-checkbox-group"), me = j("el-checkbox-button"), d = j("el-option"), x = j("el-option-group"), ee = j("el-select"), D = j("el-tree-select"), ne = j("el-time-picker"), R = j("el-time-select"), P = j("el-date-picker"), K = j("el-color-picker"), le = j("el-rate"), ge = j("el-slider"), O = j("el-switch"), u = j("el-transfer"), r = j("el-cascader"), V = j("el-button"), b = j("el-upload"), E = j("el-autocomplete"), k = j("el-input-number"), U = j("el-input");
515
+ return i(), I("div", Ot, [
516
+ o(p) == o(ie).RADIO ? (i(), C(F, M({
513
517
  key: 0,
514
- modelValue: d.value,
515
- "onUpdate:modelValue": i[0] || (i[0] = (u) => d.value = u)
516
- }, o(t)), {
517
- default: p(() => [
518
- v(F.$slots, `${e.t}-${o(n)}`, { data: o(t) }, () => [
519
- (s(!0), L(X, null, B(o(w)[o(n)].options, (u) => (s(), V(x, q({ ref_for: !0 }, u), {
520
- default: p(() => [
521
- v(F.$slots, `${e.t}-${o(n)}-options`, { option: u })
518
+ modelValue: c.value,
519
+ "onUpdate:modelValue": y[0] || (y[0] = (s) => c.value = s)
520
+ }, o(e)), {
521
+ default: v(() => [
522
+ f(q.$slots, `${t.t}-${o(n)}`, { data: o(e) }, () => [
523
+ (i(!0), I(G, null, A(o($)[o(n)].options, (s) => (i(), C(_, M({ ref_for: !0 }, s), {
524
+ default: v(() => [
525
+ f(q.$slots, `${t.t}-${o(n)}-options`, { option: s })
522
526
  ]),
523
527
  _: 2
524
528
  }, 1040))), 256))
525
529
  ])
526
530
  ]),
527
531
  _: 3
528
- }, 16, ["modelValue"])) : o(m) == o(de).RADIOBUTTON ? (s(), V(le, q({
532
+ }, 16, ["modelValue"])) : o(p) == o(ie).RADIOBUTTON ? (i(), C(F, M({
529
533
  key: 1,
530
- modelValue: d.value,
531
- "onUpdate:modelValue": i[1] || (i[1] = (u) => d.value = u)
532
- }, o(t)), {
533
- default: p(() => [
534
- v(F.$slots, `${e.t}-${o(n)}`, { data: o(t) }, () => [
535
- (s(!0), L(X, null, B(o(w)[o(n)].options, (u) => (s(), V(ie, q({ ref_for: !0 }, u), {
536
- default: p(() => [
537
- v(F.$slots, `${e.t}-${o(n)}-options`, { option: u })
534
+ modelValue: c.value,
535
+ "onUpdate:modelValue": y[1] || (y[1] = (s) => c.value = s)
536
+ }, o(e)), {
537
+ default: v(() => [
538
+ f(q.$slots, `${t.t}-${o(n)}`, { data: o(e) }, () => [
539
+ (i(!0), I(G, null, A(o($)[o(n)].options, (s) => (i(), C(re, M({ ref_for: !0 }, s), {
540
+ default: v(() => [
541
+ f(q.$slots, `${t.t}-${o(n)}-options`, { option: s })
538
542
  ]),
539
543
  _: 2
540
544
  }, 1040))), 256))
541
545
  ])
542
546
  ]),
543
547
  _: 3
544
- }, 16, ["modelValue"])) : o(m) == o(de).CHECKBOX ? (s(), V(h, q({
548
+ }, 16, ["modelValue"])) : o(p) == o(ie).CHECKBOX ? (i(), C(ue, M({
545
549
  key: 2,
546
- modelValue: d.value,
547
- "onUpdate:modelValue": i[2] || (i[2] = (u) => d.value = u)
548
- }, o(t)), {
549
- default: p(() => [
550
- v(F.$slots, `${e.t}-${o(n)}`, { data: o(t) }, () => [
551
- i[21] || (i[21] = be(he(" ")))
550
+ modelValue: c.value,
551
+ "onUpdate:modelValue": y[2] || (y[2] = (s) => c.value = s)
552
+ }, o(e)), {
553
+ default: v(() => [
554
+ f(q.$slots, `${t.t}-${o(n)}`, { data: o(e) }, () => [
555
+ y[21] || (y[21] = Ee(ve(" ")))
552
556
  ])
553
557
  ]),
554
558
  _: 3
555
- }, 16, ["modelValue"])) : o(m) == o(de).CHECKBOXGROUP ? (s(), V(S, q({
559
+ }, 16, ["modelValue"])) : o(p) == o(ie).CHECKBOXGROUP ? (i(), C(fe, M({
556
560
  key: 3,
557
- modelValue: d.value,
558
- "onUpdate:modelValue": i[3] || (i[3] = (u) => d.value = u)
559
- }, o(t)), {
560
- default: p(() => [
561
- v(F.$slots, `${e.t}-${o(n)}`, { data: o(t) }, () => [
562
- (s(!0), L(X, null, B(o(w)[o(n)].options, (u) => (s(), V(h, q({ ref_for: !0 }, u), {
563
- default: p(() => [
564
- v(F.$slots, `${e.t}-${o(n)}-options`, { option: u }, () => [
565
- be(he(u.label), 1)
561
+ modelValue: c.value,
562
+ "onUpdate:modelValue": y[3] || (y[3] = (s) => c.value = s)
563
+ }, o(e)), {
564
+ default: v(() => [
565
+ f(q.$slots, `${t.t}-${o(n)}`, { data: o(e) }, () => [
566
+ (i(!0), I(G, null, A(o($)[o(n)].options, (s) => (i(), C(ue, M({ ref_for: !0 }, s), {
567
+ default: v(() => [
568
+ f(q.$slots, `${t.t}-${o(n)}-options`, { option: s }, () => [
569
+ Ee(ve(s.label), 1)
566
570
  ])
567
571
  ]),
568
572
  _: 2
@@ -570,56 +574,56 @@ const Pe = /* @__PURE__ */ Tt(qt), Mt = {
570
574
  ])
571
575
  ]),
572
576
  _: 3
573
- }, 16, ["modelValue"])) : o(m) == o(de).CHECKBOXGROUPBUTTON ? (s(), V(S, q({
577
+ }, 16, ["modelValue"])) : o(p) == o(ie).CHECKBOXGROUPBUTTON ? (i(), C(fe, M({
574
578
  key: 4,
575
- modelValue: d.value,
576
- "onUpdate:modelValue": i[4] || (i[4] = (u) => d.value = u)
577
- }, o(t)), {
578
- default: p(() => [
579
- v(F.$slots, `${e.t}-${o(n)}`, { data: o(t) }, () => [
580
- (s(!0), L(X, null, B(o(w)[o(n)].options, (u) => (s(), V(G, q({ ref_for: !0 }, u), {
581
- default: p(() => [
582
- v(F.$slots, `${e.t}-${o(n)}-options`, { option: u })
579
+ modelValue: c.value,
580
+ "onUpdate:modelValue": y[4] || (y[4] = (s) => c.value = s)
581
+ }, o(e)), {
582
+ default: v(() => [
583
+ f(q.$slots, `${t.t}-${o(n)}`, { data: o(e) }, () => [
584
+ (i(!0), I(G, null, A(o($)[o(n)].options, (s) => (i(), C(me, M({ ref_for: !0 }, s), {
585
+ default: v(() => [
586
+ f(q.$slots, `${t.t}-${o(n)}-options`, { option: s })
583
587
  ]),
584
588
  _: 2
585
589
  }, 1040))), 256))
586
590
  ])
587
591
  ]),
588
592
  _: 3
589
- }, 16, ["modelValue"])) : o(m) === o(de).SELECT ? (s(), V(K, q({
593
+ }, 16, ["modelValue"])) : o(p) === o(ie).SELECT ? (i(), C(ee, M({
590
594
  key: 5,
591
- modelValue: d.value,
592
- "onUpdate:modelValue": i[5] || (i[5] = (u) => d.value = u),
593
- placeholder: o(w)[o(n)].label
594
- }, E), se({
595
- default: p(() => [
596
- v(F.$slots, `${e.t}-${o(n)}`, {
597
- options: o(w)[o(n)].options
595
+ modelValue: c.value,
596
+ "onUpdate:modelValue": y[5] || (y[5] = (s) => c.value = s),
597
+ placeholder: o($)[o(n)].label
598
+ }, g), ae({
599
+ default: v(() => [
600
+ f(q.$slots, `${t.t}-${o(n)}`, {
601
+ options: o($)[o(n)].options
598
602
  }, () => {
599
- var u, I;
603
+ var s, z;
600
604
  return [
601
- (I = (u = o(w)[o(n)]) == null ? void 0 : u.options) != null && I.some((l) => l.options) ? (s(!0), L(X, { key: 0 }, B(o(w)[o(n)].options, (l) => (s(), V(re, {
602
- key: l.label,
603
- label: l.label
605
+ (z = (s = o($)[o(n)]) == null ? void 0 : s.options) != null && z.some((W) => W.options) ? (i(!0), I(G, { key: 0 }, A(o($)[o(n)].options, (W) => (i(), C(x, {
606
+ key: W.label,
607
+ label: W.label
604
608
  }, {
605
- default: p(() => [
606
- (s(!0), L(X, null, B(l.options, (a) => (s(), V(C, q({ ref_for: !0 }, a, {
607
- key: a.value,
608
- onClick: (g) => E.change && E.change(a)
609
+ default: v(() => [
610
+ (i(!0), I(G, null, A(W.options, (l) => (i(), C(d, M({ ref_for: !0 }, l, {
611
+ key: l.value,
612
+ onClick: (a) => g.change && g.change(l)
609
613
  }), {
610
- default: p(() => [
611
- v(F.$slots, `${e.t}-${o(n)}-options`, { option: a })
614
+ default: v(() => [
615
+ f(q.$slots, `${t.t}-${o(n)}-options`, { option: l })
612
616
  ]),
613
617
  _: 2
614
618
  }, 1040, ["onClick"]))), 128))
615
619
  ]),
616
620
  _: 2
617
- }, 1032, ["label"]))), 128)) : (s(!0), L(X, { key: 1 }, B(o(w)[o(n)].options, (l) => (s(), V(C, q({ ref_for: !0 }, l, {
618
- key: l.value,
619
- onClick: (a) => E.change && E.change(l)
621
+ }, 1032, ["label"]))), 128)) : (i(!0), I(G, { key: 1 }, A(o($)[o(n)].options, (W) => (i(), C(d, M({ ref_for: !0 }, W, {
622
+ key: W.value,
623
+ onClick: (l) => g.change && g.change(W)
620
624
  }), {
621
- default: p(() => [
622
- v(F.$slots, `${e.t}-${o(n)}-options`, { option: l })
625
+ default: v(() => [
626
+ f(q.$slots, `${t.t}-${o(n)}-options`, { option: W })
623
627
  ]),
624
628
  _: 2
625
629
  }, 1040, ["onClick"]))), 128))
@@ -628,200 +632,200 @@ const Pe = /* @__PURE__ */ Tt(qt), Mt = {
628
632
  ]),
629
633
  _: 2
630
634
  }, [
631
- B(D(), (u) => ({
632
- name: u,
633
- fn: p((I) => [
634
- v(F.$slots, `${e.t}-${o(n)}-${u}`, { data: I })
635
+ A(w(), (s) => ({
636
+ name: s,
637
+ fn: v((z) => [
638
+ f(q.$slots, `${t.t}-${o(n)}-${s}`, { data: z })
635
639
  ])
636
640
  }))
637
- ]), 1040, ["modelValue", "placeholder"])) : o(m) == o(de).TREESELECT ? (s(), V(oe, q({
641
+ ]), 1040, ["modelValue", "placeholder"])) : o(p) == o(ie).TREESELECT ? (i(), C(D, M({
638
642
  key: 6,
639
- modelValue: d.value,
640
- "onUpdate:modelValue": i[6] || (i[6] = (u) => d.value = u),
641
- placeholder: o(w)[o(n)].label
642
- }, o(t), { data: R.value }), se({ _: 2 }, [
643
- B(D(), (u) => ({
644
- name: u,
645
- fn: p((I) => [
646
- v(F.$slots, `${e.t}-${o(n)}-${u}`, { data: I })
643
+ modelValue: c.value,
644
+ "onUpdate:modelValue": y[6] || (y[6] = (s) => c.value = s),
645
+ placeholder: o($)[o(n)].label
646
+ }, o(e), { data: N.value }), ae({ _: 2 }, [
647
+ A(w(), (s) => ({
648
+ name: s,
649
+ fn: v((z) => [
650
+ f(q.$slots, `${t.t}-${o(n)}-${s}`, { data: z })
647
651
  ])
648
652
  }))
649
- ]), 1040, ["modelValue", "placeholder", "data"])) : o(m) == o(de).TIME ? (s(), V(J, q({
653
+ ]), 1040, ["modelValue", "placeholder", "data"])) : o(p) == o(ie).TIME ? (i(), C(ne, M({
650
654
  key: 7,
651
- modelValue: d.value,
652
- "onUpdate:modelValue": i[7] || (i[7] = (u) => d.value = u),
655
+ modelValue: c.value,
656
+ "onUpdate:modelValue": y[7] || (y[7] = (s) => c.value = s),
653
657
  "arrow-control": ""
654
- }, o(t), {
655
- placeholder: o(w)[o(n)].label
656
- }), null, 16, ["modelValue", "placeholder"])) : o(m) == o(de).TIMESELECT ? (s(), V(Q, q({
658
+ }, o(e), {
659
+ placeholder: o($)[o(n)].label
660
+ }), null, 16, ["modelValue", "placeholder"])) : o(p) == o(ie).TIMESELECT ? (i(), C(R, M({
657
661
  key: 8,
658
- modelValue: d.value,
659
- "onUpdate:modelValue": i[8] || (i[8] = (u) => d.value = u),
662
+ modelValue: c.value,
663
+ "onUpdate:modelValue": y[8] || (y[8] = (s) => c.value = s),
660
664
  start: "06:30",
661
665
  step: "00:15",
662
666
  end: "23:30",
663
- placeholder: o(w)[o(n)].label
664
- }, o(t)), null, 16, ["modelValue", "placeholder"])) : o(m) == o(de).DATE ? (s(), V(k, q({
667
+ placeholder: o($)[o(n)].label
668
+ }, o(e)), null, 16, ["modelValue", "placeholder"])) : o(p) == o(ie).DATE ? (i(), C(P, M({
665
669
  key: 9,
666
- modelValue: d.value,
667
- "onUpdate:modelValue": i[9] || (i[9] = (u) => d.value = u),
670
+ modelValue: c.value,
671
+ "onUpdate:modelValue": y[9] || (y[9] = (s) => c.value = s),
668
672
  type: "date",
669
- placeholder: o(w)[o(n)].label
670
- }, o(t)), se({ _: 2 }, [
671
- B(D(), (u) => ({
672
- name: u,
673
- fn: p((I) => [
674
- v(F.$slots, `${e.t}-${o(n)}-${u}`, { data: I })
673
+ placeholder: o($)[o(n)].label
674
+ }, o(e)), ae({ _: 2 }, [
675
+ A(w(), (s) => ({
676
+ name: s,
677
+ fn: v((z) => [
678
+ f(q.$slots, `${t.t}-${o(n)}-${s}`, { data: z })
675
679
  ])
676
680
  }))
677
- ]), 1040, ["modelValue", "placeholder"])) : o(m) == o(de).DATETIME ? (s(), V(k, q({
681
+ ]), 1040, ["modelValue", "placeholder"])) : o(p) == o(ie).DATETIME ? (i(), C(P, M({
678
682
  key: 10,
679
- modelValue: d.value,
680
- "onUpdate:modelValue": i[10] || (i[10] = (u) => d.value = u),
681
- type: o(de).DATETIME,
682
- placeholder: o(w)[o(n)].label
683
- }, o(t)), se({ _: 2 }, [
684
- B(D(), (u) => ({
685
- name: u,
686
- fn: p((I) => [
687
- v(F.$slots, `${e.t}-${o(n)}-${u}`, { data: I })
683
+ modelValue: c.value,
684
+ "onUpdate:modelValue": y[10] || (y[10] = (s) => c.value = s),
685
+ type: o(ie).DATETIME,
686
+ placeholder: o($)[o(n)].label
687
+ }, o(e)), ae({ _: 2 }, [
688
+ A(w(), (s) => ({
689
+ name: s,
690
+ fn: v((z) => [
691
+ f(q.$slots, `${t.t}-${o(n)}-${s}`, { data: z })
688
692
  ])
689
693
  }))
690
- ]), 1040, ["modelValue", "type", "placeholder"])) : o(m) == o(de).COLOR ? (s(), V(N, q({
694
+ ]), 1040, ["modelValue", "type", "placeholder"])) : o(p) == o(ie).COLOR ? (i(), C(K, M({
691
695
  key: 11,
692
- modelValue: d.value,
693
- "onUpdate:modelValue": i[11] || (i[11] = (u) => d.value = u)
694
- }, o(t)), null, 16, ["modelValue"])) : o(m) == o(de).RATE ? (s(), V(ue, q({
696
+ modelValue: c.value,
697
+ "onUpdate:modelValue": y[11] || (y[11] = (s) => c.value = s)
698
+ }, o(e)), null, 16, ["modelValue"])) : o(p) == o(ie).RATE ? (i(), C(le, M({
695
699
  key: 12,
696
- modelValue: d.value,
697
- "onUpdate:modelValue": i[12] || (i[12] = (u) => d.value = u)
698
- }, o(t)), null, 16, ["modelValue"])) : o(m) == o(de).SLIDER ? (s(), V(r, q({
700
+ modelValue: c.value,
701
+ "onUpdate:modelValue": y[12] || (y[12] = (s) => c.value = s)
702
+ }, o(e)), null, 16, ["modelValue"])) : o(p) == o(ie).SLIDER ? (i(), C(ge, M({
699
703
  key: 13,
700
- modelValue: d.value,
701
- "onUpdate:modelValue": i[13] || (i[13] = (u) => d.value = u)
702
- }, o(t)), null, 16, ["modelValue"])) : o(m) == o(de).SWITCH ? (s(), V(b, q({
704
+ modelValue: c.value,
705
+ "onUpdate:modelValue": y[13] || (y[13] = (s) => c.value = s)
706
+ }, o(e)), null, 16, ["modelValue"])) : o(p) == o(ie).SWITCH ? (i(), C(O, M({
703
707
  key: 14,
704
- modelValue: d.value,
705
- "onUpdate:modelValue": i[14] || (i[14] = (u) => d.value = u)
706
- }, o(t)), se({ _: 2 }, [
707
- B(D(), (u) => ({
708
- name: u,
709
- fn: p((I) => [
710
- v(F.$slots, `${e.t}-${o(n)}-${u}`, { data: I })
708
+ modelValue: c.value,
709
+ "onUpdate:modelValue": y[14] || (y[14] = (s) => c.value = s)
710
+ }, o(e)), ae({ _: 2 }, [
711
+ A(w(), (s) => ({
712
+ name: s,
713
+ fn: v((z) => [
714
+ f(q.$slots, `${t.t}-${o(n)}-${s}`, { data: z })
711
715
  ])
712
716
  }))
713
- ]), 1040, ["modelValue"])) : o(m) == o(de).TRANSFER ? (s(), V(c, q({
717
+ ]), 1040, ["modelValue"])) : o(p) == o(ie).TRANSFER ? (i(), C(u, M({
714
718
  key: 15,
715
- modelValue: d.value,
716
- "onUpdate:modelValue": i[15] || (i[15] = (u) => d.value = u)
717
- }, o(t)), se({ _: 2 }, [
718
- B(D(), (u) => ({
719
- name: u,
720
- fn: p((I) => [
721
- v(F.$slots, `${e.t}-${o(n)}-${u}`, { data: I })
719
+ modelValue: c.value,
720
+ "onUpdate:modelValue": y[15] || (y[15] = (s) => c.value = s)
721
+ }, o(e)), ae({ _: 2 }, [
722
+ A(w(), (s) => ({
723
+ name: s,
724
+ fn: v((z) => [
725
+ f(q.$slots, `${t.t}-${o(n)}-${s}`, { data: z })
722
726
  ])
723
727
  }))
724
- ]), 1040, ["modelValue"])) : o(m) == o(de).CASCADER ? (s(), V(_, q({
728
+ ]), 1040, ["modelValue"])) : o(p) == o(ie).CASCADER ? (i(), C(r, M({
725
729
  key: 16,
726
- modelValue: d.value,
727
- "onUpdate:modelValue": i[16] || (i[16] = (u) => d.value = u)
728
- }, o(t), {
729
- options: o(w)[o(n)].options
730
- }), se({ _: 2 }, [
731
- B(D(), (u) => ({
732
- name: u,
733
- fn: p((I) => [
734
- v(F.$slots, `${e.t}-${o(n)}-${u}`, { data: I })
730
+ modelValue: c.value,
731
+ "onUpdate:modelValue": y[16] || (y[16] = (s) => c.value = s)
732
+ }, o(e), {
733
+ options: o($)[o(n)].options
734
+ }), ae({ _: 2 }, [
735
+ A(w(), (s) => ({
736
+ name: s,
737
+ fn: v((z) => [
738
+ f(q.$slots, `${t.t}-${o(n)}-${s}`, { data: z })
735
739
  ])
736
740
  }))
737
- ]), 1040, ["modelValue", "options"])) : o(m) == o(de).IMAGE ? (s(), V(y, Se(q({ key: 17 }, o(t))), se({
738
- default: p(() => [
739
- te($, { type: "primary" }, {
740
- default: p(() => i[22] || (i[22] = [
741
- be("点击上传")
741
+ ]), 1040, ["modelValue", "options"])) : o(p) == o(ie).IMAGE ? (i(), C(b, Be(M({ key: 17 }, o(e))), ae({
742
+ default: v(() => [
743
+ J(V, { type: "primary" }, {
744
+ default: v(() => y[22] || (y[22] = [
745
+ Ee("点击上传")
742
746
  ])),
743
747
  _: 1
744
748
  })
745
749
  ]),
746
750
  _: 2
747
751
  }, [
748
- B(D(), (u, I) => ({
749
- name: u,
750
- fn: p((l) => [
751
- v(F.$slots, `${e.t}-${o(n)}-${u}`, { data: l })
752
+ A(w(), (s, z) => ({
753
+ name: s,
754
+ fn: v((W) => [
755
+ f(q.$slots, `${t.t}-${o(n)}-${s}`, { data: W })
752
756
  ])
753
757
  }))
754
- ]), 1040)) : o(m) == o(de).AUTOCOMPLETE ? (s(), V(T, q({
758
+ ]), 1040)) : o(p) == o(ie).AUTOCOMPLETE ? (i(), C(E, M({
755
759
  key: 18,
756
- modelValue: d.value,
757
- "onUpdate:modelValue": i[17] || (i[17] = (u) => d.value = u)
758
- }, o(t), {
759
- placeholder: o(w)[o(n)].label
760
- }), se({ _: 2 }, [
761
- B(D(), (u, I) => ({
762
- name: u,
763
- fn: p((l) => [
764
- v(F.$slots, `${e.t}-${o(n)}-${u}`, { data: l })
760
+ modelValue: c.value,
761
+ "onUpdate:modelValue": y[17] || (y[17] = (s) => c.value = s)
762
+ }, o(e), {
763
+ placeholder: o($)[o(n)].label
764
+ }), ae({ _: 2 }, [
765
+ A(w(), (s, z) => ({
766
+ name: s,
767
+ fn: v((W) => [
768
+ f(q.$slots, `${t.t}-${o(n)}-${s}`, { data: W })
765
769
  ])
766
770
  }))
767
- ]), 1040, ["modelValue", "placeholder"])) : o(m) == o(de).INPUTNUMBER ? (s(), V(j, q({
771
+ ]), 1040, ["modelValue", "placeholder"])) : o(p) == o(ie).INPUTNUMBER ? (i(), C(k, M({
768
772
  key: 19,
769
- modelValue: d.value,
770
- "onUpdate:modelValue": i[18] || (i[18] = (u) => d.value = u),
773
+ modelValue: c.value,
774
+ "onUpdate:modelValue": y[18] || (y[18] = (s) => c.value = s),
771
775
  min: 0,
772
776
  max: 1e8,
773
- placeholder: o(w)[o(n)].label
774
- }, o(t)), se({ _: 2 }, [
775
- B(D(), (u, I) => ({
776
- name: u,
777
- fn: p((l) => [
778
- v(F.$slots, `${e.t}-${o(n)}-${u}`, { data: l })
777
+ placeholder: o($)[o(n)].label
778
+ }, o(e)), ae({ _: 2 }, [
779
+ A(w(), (s, z) => ({
780
+ name: s,
781
+ fn: v((W) => [
782
+ f(q.$slots, `${t.t}-${o(n)}-${s}`, { data: W })
779
783
  ])
780
784
  }))
781
- ]), 1040, ["modelValue", "placeholder"])) : o(m) == o(de).MONEY ? (s(), L("div", xt, [
782
- te(W, q({
783
- modelValue: d.value,
784
- "onUpdate:modelValue": i[19] || (i[19] = (u) => d.value = u),
785
- placeholder: o(w)[o(n)].label,
786
- type: o(de).NUMBER,
787
- maxlength: ((ae = o(t)) == null ? void 0 : ae.max) || 25
788
- }, { ...o(t), type: o(m) }), se({ _: 2 }, [
789
- d.value ? {
785
+ ]), 1040, ["modelValue", "placeholder"])) : o(p) == o(ie).MONEY ? (i(), I("div", St, [
786
+ J(U, M({
787
+ modelValue: c.value,
788
+ "onUpdate:modelValue": y[19] || (y[19] = (s) => c.value = s),
789
+ placeholder: o($)[o(n)].label,
790
+ type: o(ie).NUMBER,
791
+ maxlength: ((H = o(e)) == null ? void 0 : H.max) || 25
792
+ }, { ...o(e), type: o(p) }), ae({ _: 2 }, [
793
+ c.value ? {
790
794
  name: "suffix",
791
- fn: p(() => [
792
- z("div", {
793
- title: o(Xe)(d.value),
795
+ fn: v(() => [
796
+ Q("div", {
797
+ title: o(Xe)(c.value),
794
798
  style: { "font-size": "10px", display: "block", width: "120px", overflow: "hidden", "text-overflow": "ellipsis" }
795
- }, he(o(Xe)(d.value)), 9, St)
799
+ }, ve(o(Xe)(c.value)), 9, xt)
796
800
  ]),
797
801
  key: "0"
798
802
  } : void 0,
799
- B(D(), (u, I) => ({
800
- name: u,
801
- fn: p((l) => [
802
- v(F.$slots, `${e.t}-${o(n)}-${u}`, { data: l })
803
+ A(w(), (s, z) => ({
804
+ name: s,
805
+ fn: v((W) => [
806
+ f(q.$slots, `${t.t}-${o(n)}-${s}`, { data: W })
803
807
  ])
804
808
  }))
805
809
  ]), 1040, ["modelValue", "placeholder", "type", "maxlength"])
806
- ])) : (s(), V(W, q({
810
+ ])) : (i(), C(U, M({
807
811
  key: 21,
808
- modelValue: d.value,
809
- "onUpdate:modelValue": i[20] || (i[20] = (u) => d.value = u),
810
- placeholder: o(w)[o(n)].label,
811
- maxlength: ((ne = o(t)) == null ? void 0 : ne.max) || 25,
812
+ modelValue: c.value,
813
+ "onUpdate:modelValue": y[20] || (y[20] = (s) => c.value = s),
814
+ placeholder: o($)[o(n)].label,
815
+ maxlength: ((oe = o(e)) == null ? void 0 : oe.max) || 25,
812
816
  clearable: !0
813
- }, { ...o(t), type: o(m) }), se({ _: 2 }, [
814
- B(D(), (u, I) => ({
815
- name: u,
816
- fn: p((l) => [
817
- v(F.$slots, `${e.t}-${o(n)}-${u}`, { data: l })
817
+ }, { ...o(e), type: o(p) }), ae({ _: 2 }, [
818
+ A(w(), (s, z) => ({
819
+ name: s,
820
+ fn: v((W) => [
821
+ f(q.$slots, `${t.t}-${o(n)}-${s}`, { data: W })
818
822
  ])
819
823
  }))
820
824
  ]), 1040, ["modelValue", "placeholder", "maxlength"]))
821
825
  ]);
822
826
  };
823
827
  }
824
- }), Ye = /* @__PURE__ */ Object.assign({
828
+ }), ze = /* @__PURE__ */ Object.assign({
825
829
  name: "g-form",
826
830
  inheritAttrs: !1
827
831
  }, {
@@ -830,10 +834,10 @@ const Pe = /* @__PURE__ */ Tt(qt), Mt = {
830
834
  modelValue: { required: !0 },
831
835
  modelModifiers: {}
832
836
  },
833
- emits: /* @__PURE__ */ Fe(["submit", "reset"], ["update:modelValue"]),
834
- setup(f, { emit: d }) {
835
- var i, x, le, ie;
836
- const e = Te(f, "modelValue"), t = d, n = ye(null), m = Ke("options"), w = {
837
+ emits: /* @__PURE__ */ Te(["submit", "reset"], ["update:modelValue"]),
838
+ setup(m, { emit: c }) {
839
+ var re, ue, fe, me;
840
+ const t = qe(m, "modelValue"), e = c, n = ye(null), p = Je("options"), $ = {
837
841
  inline: !0,
838
842
  type: "hidden",
839
843
  "scroll-to-error": !0,
@@ -843,7 +847,7 @@ const Pe = /* @__PURE__ */ Tt(qt), Mt = {
843
847
  style: {
844
848
  display: "flex",
845
849
  flexWrap: "wrap",
846
- ...(i = Re()) == null ? void 0 : i.style
850
+ ...(re = Pe()) == null ? void 0 : re.style
847
851
  },
848
852
  // 表单底部属性
849
853
  footer: {
@@ -863,9 +867,9 @@ const Pe = /* @__PURE__ */ Tt(qt), Mt = {
863
867
  label: "提交",
864
868
  plain: !0,
865
869
  hidden: !1,
866
- click: async (h, S) => {
867
- n.value && await n.value.validate((G, C) => {
868
- G ? t("submit", h, S) : console.log("表单验证不通过!", C);
870
+ click: (d, x) => {
871
+ n.value && n.value.validate((ee, D) => {
872
+ ee ? e("submit", d, x) : console.log("表单验证不通过!", D);
869
873
  });
870
874
  }
871
875
  },
@@ -877,10 +881,10 @@ const Pe = /* @__PURE__ */ Tt(qt), Mt = {
877
881
  plain: !0,
878
882
  click: () => {
879
883
  if (!n.value) return;
880
- let h = !0;
881
- t("reset", (S) => {
882
- h = S;
883
- }), h && n.value.resetFields();
884
+ let d = !0;
885
+ e("reset", (x) => {
886
+ d = x;
887
+ }), d && n.value.resetFields();
884
888
  }
885
889
  },
886
890
  slots: {},
@@ -889,38 +893,38 @@ const Pe = /* @__PURE__ */ Tt(qt), Mt = {
889
893
  editable: !1
890
894
  }
891
895
  };
892
- e.value.form = we(
893
- w,
894
- m == null ? void 0 : m.form,
895
- (x = e.value) == null ? void 0 : x.form
896
+ t.value.form = $e(
897
+ $,
898
+ p == null ? void 0 : p.form,
899
+ (ue = t.value) == null ? void 0 : ue.form
896
900
  );
897
- const R = {
901
+ const N = {
898
902
  type: "hidden",
899
903
  labelPosition: "right",
900
904
  style: {
901
905
  width: "100%"
902
906
  }
903
907
  };
904
- e.value.formItems = we(
905
- R,
906
- m == null ? void 0 : m.formItems,
907
- (le = e == null ? void 0 : e.value) == null ? void 0 : le.formItems
908
+ t.value.formItems = $e(
909
+ N,
910
+ p == null ? void 0 : p.formItems,
911
+ (fe = t == null ? void 0 : t.value) == null ? void 0 : fe.formItems
908
912
  );
909
- const D = {
913
+ const w = {
910
914
  span: 12,
911
915
  offset: 0
912
916
  };
913
- e.value.form.cols = we(
914
- D,
915
- (ie = m == null ? void 0 : m.form) == null ? void 0 : ie.cols,
916
- e.value.form.cols
917
+ t.value.form.cols = $e(
918
+ w,
919
+ (me = p == null ? void 0 : p.form) == null ? void 0 : me.cols,
920
+ t.value.form.cols
917
921
  );
918
- const E = (h) => {
919
- let S = [];
920
- if (h.rules)
921
- S = h.rules;
922
+ const g = (d) => {
923
+ let x = [];
924
+ if (d.rules)
925
+ x = d.rules;
922
926
  else {
923
- const C = { ...{
927
+ const D = { ...{
924
928
  required: void 0,
925
929
  max: void 0,
926
930
  min: void 0,
@@ -928,157 +932,180 @@ const Pe = /* @__PURE__ */ Tt(qt), Mt = {
928
932
  url: void 0,
929
933
  pattern: void 0,
930
934
  validate: void 0
931
- }, ...h };
932
- C.required && S.push({ required: !0, message: `${C.label}不能为空!`, trigger: "blur" }), C.max && C.min && S.push({
933
- validator: (re, K, oe) => {
934
- K && h.type == "number" && (K < C.min || K > C.max) ? oe(new Error(`${C.label} 必须在 ${C.min} 和 ${C.max} 之间!`)) : K && h.type !== "number" && (K.toString().length < C.min || K.toString().length > C.max) ? oe(new Error(`字符长度必须在 ${C.min} 和 ${C.max} 之间!`)) : oe();
935
+ }, ...d };
936
+ D.required && x.push({ required: !0, message: `${D.label}不能为空!`, trigger: "blur" }), D.max && D.min && x.push({
937
+ validator: (ne, R, P) => {
938
+ R && d.type == "number" && (R < D.min || R > D.max) ? P(new Error(`${D.label} 必须在 ${D.min} 和 ${D.max} 之间!`)) : R && d.type !== "number" && (R.toString().length < D.min || R.toString().length > D.max) ? P(new Error(`字符长度必须在 ${D.min} 和 ${D.max} 之间!`)) : P();
935
939
  }
936
- }), C.max && !C.min && h.type == "number" && S.push({
937
- validator: (re, K, oe) => {
938
- K && K > C.max ? oe(new Error(`${C.label}不能大于${C.max}!`)) : oe();
940
+ }), D.max && !D.min && d.type == "number" && x.push({
941
+ validator: (ne, R, P) => {
942
+ R && R > D.max ? P(new Error(`${D.label}不能大于${D.max}!`)) : P();
939
943
  }
940
- }), C.min && !C.max && h.type == "number" && S.push({
941
- validator: (re, K, oe) => {
942
- K && K < C.min ? oe(new Error(`${C.label}不能小于${C.min}!`)) : oe();
944
+ }), D.min && !D.max && d.type == "number" && x.push({
945
+ validator: (ne, R, P) => {
946
+ R && R < D.min ? P(new Error(`${D.label}不能小于${D.min}!`)) : P();
943
947
  }
944
- }), C.type == "email" && S.push({ type: "email", message: "不是一个正确的邮箱地址!" }), C.type == "url" && S.push({ type: "url", message: "不是一个合正确的URL!" }), C.pattern && S.push({ pattern: C == null ? void 0 : C.pattern, message: (C == null ? void 0 : C.message) || "格式不正确!" }), C.validate && S.push({
945
- validator: (re, K, oe) => C.validate(re, K, oe)
948
+ }), D.type == "email" && x.push({ type: "email", message: "不是一个正确的邮箱地址!" }), D.type == "url" && x.push({ type: "url", message: "不是一个合正确的URL!" }), D.pattern && x.push({ pattern: D == null ? void 0 : D.pattern, message: (D == null ? void 0 : D.message) || "格式不正确!" }), D.validate && x.push({
949
+ validator: (ne, R, P) => D.validate(ne, R, P)
946
950
  });
947
951
  }
948
- return S;
952
+ return x;
949
953
  };
950
- Ae(() => {
951
- M();
954
+ Ie(() => {
955
+ T();
956
+ }), bt(() => {
957
+ n.value = null;
952
958
  });
953
- const M = () => {
954
- for (const [h, S] of Object.entries(P.value))
955
- e.value[h].formItem = { ...e.value[h].formItem, ...S.formItem }, e.value[h].formItem.style = { ...e.value[h].formItem.style, ...S.formItem.style };
956
- }, P = Oe(() => Object.fromEntries(Object.entries(e.value).filter((h) => h[1].type != "hidden").filter((h) => !["table", "tableColumns", "query", "queryItems"].includes(h[0])).filter((h) => h[1].editor !== !1).filter((h) => h[1].type !== "control").filter((h) => {
957
- var S, G, C, re;
958
- return e.value.form.modalState === "edit" ? ((G = (S = h[1].editor) == null ? void 0 : S.ep) == null ? void 0 : G.editor) !== !1 : e.value.form.modalState === "add" ? ((re = (C = h[1].editor) == null ? void 0 : C.ap) == null ? void 0 : re.editor) !== !1 : !0;
959
- }).map((h) => [h[0], h[1]])));
960
- console.log(P);
961
- const ce = Oe(() => Object.fromEntries(Object.entries(e.value).filter((h) => h[1].type != "hidden").filter((h) => h[1].type != "control").map((h) => [h[0], h[1].value]))), F = Oe(() => {
962
- const h = /* @__PURE__ */ new Map();
963
- return Object.entries(P.value).forEach(([S, G]) => {
964
- if (G.groupName) {
965
- const C = G.groupName;
966
- h.has(C) || h.set(C, {
967
- groupName: C,
959
+ const T = () => {
960
+ for (const [d, x] of Object.entries(Y.value))
961
+ t.value[d].formItem = { ...t.value[d].formItem, ...x.formItem }, t.value[d].formItem.style = { ...t.value[d].formItem.style, ...x.formItem.style };
962
+ }, Y = Oe(() => Object.fromEntries(Object.entries(t.value).filter((d) => d[1].type != "hidden").filter((d) => !["table", "tableColumns", "query", "queryItems"].includes(d[0])).filter((d) => d[1].editor !== !1).filter((d) => d[1].type !== "control").filter((d) => {
963
+ var x, ee, D, ne;
964
+ return t.value.form.modalState === "edit" ? ((ee = (x = d[1].editor) == null ? void 0 : x.ep) == null ? void 0 : ee.editor) !== !1 : t.value.form.modalState === "add" ? ((ne = (D = d[1].editor) == null ? void 0 : D.ap) == null ? void 0 : ne.editor) !== !1 : !0;
965
+ }).map((d) => [d[0], d[1]]))), q = Oe(() => Object.fromEntries(Object.entries(t.value).filter((d) => d[1].type != "hidden").filter((d) => d[1].type != "control").map((d) => [d[0], d[1].value]))), y = Oe(() => {
966
+ const d = /* @__PURE__ */ new Map();
967
+ return Object.entries(Y.value).forEach(([x, ee]) => {
968
+ if (ee.groupName) {
969
+ const D = ee.groupName;
970
+ d.has(D) || d.set(D, {
971
+ groupName: D,
968
972
  items: []
969
- }), h.get(C).items.push({ key: S, item: G });
973
+ }), d.get(D).items.push({ key: x, item: ee });
970
974
  }
971
- }), h.forEach((S) => {
972
- S.tabPane = we(...S.items.map(({ item: G }) => G.tabPane || {}));
973
- }), Array.from(h.values());
974
- });
975
- return (h, S) => {
976
- const G = U("el-form-item"), C = U("el-col"), re = U("el-tab-pane"), K = U("el-tabs"), oe = U("el-button"), J = U("el-form");
977
- return s(), V(J, q({
975
+ }), d.forEach((x) => {
976
+ x.tabPane = $e(...x.items.map(({ item: ee }) => ee.tabPane || {}));
977
+ }), Array.from(d.values());
978
+ }), _ = [
979
+ {
980
+ name: "f-submit",
981
+ label: t.value.form.submit.label,
982
+ click: t.value.form.submit.click,
983
+ hidden: t.value.form.submit.hidden,
984
+ info: _e(t.value.form.submit, (d) => !["click"].includes(d)),
985
+ sort: t.value.form.submit.sort ?? 1,
986
+ // 使用空值合并运算符
987
+ originalOrder: 0
988
+ // 添加原始顺序标识
989
+ },
990
+ {
991
+ name: "f-reset",
992
+ label: t.value.form.reset.label,
993
+ click: t.value.form.reset.click,
994
+ info: _e(t.value.form.reset, (d) => !["click"].includes(d)),
995
+ hidden: t.value.form.reset.hidden,
996
+ sort: t.value.form.reset.sort ?? 2,
997
+ // 使用空值合并运算符
998
+ originalOrder: 1
999
+ // 添加原始顺序标识
1000
+ }
1001
+ ], F = Oe(() => _.filter((d) => !d.hidden).sort((d, x) => d.sort - x.sort || d.originalOrder - x.originalOrder));
1002
+ return (d, x) => {
1003
+ const ee = j("el-form-item"), D = j("el-col"), ne = j("el-tab-pane"), R = j("el-tabs"), P = j("el-button"), K = j("el-form");
1004
+ return i(), C(K, M({
978
1005
  ref_key: "gform",
979
1006
  ref: n,
980
- model: e.value,
1007
+ model: t.value,
981
1008
  style: { width: "98%", padding: 0, margin: 0, "box-sizing": "border-box" }
982
- }, o(Ee)(e.value.form, (Q) => !["footer", "submit", "reset", "slots", "type", "sort"].includes(Q)), { class: "g-form-container" }), {
983
- default: p(() => [
984
- F.value.length > 0 ? v(h.$slots, "default", { key: 0 }, () => {
985
- var Q, k, N;
1009
+ }, o(_e)(t.value.form, (le) => !["footer", "submit", "reset", "slots", "type", "sort"].includes(le)), { class: "g-form-container" }), {
1010
+ default: v(() => [
1011
+ y.value.length > 0 ? f(d.$slots, "default", { key: 0 }, () => {
1012
+ var le, ge, O;
986
1013
  return [
987
- te(K, q({
1014
+ J(R, M({
988
1015
  class: "demo-tabs",
989
- modelValue: F.value[0].groupName,
990
- "onUpdate:modelValue": S[0] || (S[0] = (ue) => F.value[0].groupName = ue),
1016
+ modelValue: y.value[0].groupName,
1017
+ "onUpdate:modelValue": x[0] || (x[0] = (u) => y.value[0].groupName = u),
991
1018
  style: { width: "100%" }
992
- }, e.value.form.tabs), {
993
- default: p(() => [
994
- (s(!0), L(X, null, B(F.value, (ue) => (s(), V(re, q({
995
- key: ue.groupName,
996
- label: ue.groupName,
997
- name: ue.groupName,
1019
+ }, t.value.form.tabs), {
1020
+ default: v(() => [
1021
+ (i(!0), I(G, null, A(y.value, (u) => (i(), C(ne, M({
1022
+ key: u.groupName,
1023
+ label: u.groupName,
1024
+ name: u.groupName,
998
1025
  style: { width: "100%", display: "flex", "flex-wrap": "wrap" },
999
1026
  ref_for: !0
1000
- }, ue.tabPane), {
1001
- default: p(() => [
1002
- (s(!0), L(X, null, B(ue.items, (r, b) => (s(), V(C, q({ ref_for: !0 }, { ...e.value.form.cols, ...r == null ? void 0 : r.item.col }, {
1027
+ }, u.tabPane), {
1028
+ default: v(() => [
1029
+ (i(!0), I(G, null, A(u.items, (r, V) => (i(), C(D, M({ ref_for: !0 }, { ...t.value.form.cols, ...r == null ? void 0 : r.item.col }, {
1003
1030
  key: r.key,
1004
1031
  style: { width: "100%" }
1005
1032
  }), {
1006
- default: p(() => {
1007
- var c, _;
1033
+ default: v(() => {
1034
+ var b, E;
1008
1035
  return [
1009
- te(G, q({
1036
+ J(ee, M({
1010
1037
  label: r == null ? void 0 : r.item.label,
1011
1038
  prop: `${r.key}.value`,
1012
- rules: E(r == null ? void 0 : r.item),
1039
+ rules: g(r == null ? void 0 : r.item),
1013
1040
  ref_for: !0
1014
- }, { ...(c = e.value) == null ? void 0 : c.formItems, ...(_ = r == null ? void 0 : r.item) == null ? void 0 : _.formItem }, { style: { width: "100%" } }), {
1015
- default: p(() => [
1016
- v(h.$slots, "f-" + r.key, {
1041
+ }, { ...(b = t.value) == null ? void 0 : b.formItems, ...(E = r == null ? void 0 : r.item) == null ? void 0 : E.formItem }, { style: { width: "100%" } }), {
1042
+ default: v(() => [
1043
+ f(d.$slots, "f-" + r.key, {
1017
1044
  item: r == null ? void 0 : r.item,
1018
- model: e.value
1045
+ model: t.value
1019
1046
  }, () => {
1020
- var $, y, T, j, W, ae, ne;
1047
+ var k, U, H, oe, s, z, W;
1021
1048
  return [
1022
- e.value.form.modalState === "edit" ? (s(), V(qe, {
1049
+ t.value.form.modalState === "edit" ? (i(), C(Fe, {
1023
1050
  key: 0,
1024
- modelValue: e.value[r.key].value,
1025
- "onUpdate:modelValue": (u) => e.value[r.key].value = u,
1026
- item: { ...(($ = r == null ? void 0 : r.item) == null ? void 0 : $.editor) || {}, ...((T = (y = r == null ? void 0 : r.item) == null ? void 0 : y.editor) == null ? void 0 : T.ep) || {} },
1051
+ modelValue: t.value[r.key].value,
1052
+ "onUpdate:modelValue": (l) => t.value[r.key].value = l,
1053
+ item: { ...((k = r == null ? void 0 : r.item) == null ? void 0 : k.editor) || {}, ...((H = (U = r == null ? void 0 : r.item) == null ? void 0 : U.editor) == null ? void 0 : H.ep) || {} },
1027
1054
  ctrlKey: r.key,
1028
1055
  ctrlType: r == null ? void 0 : r.item.type,
1029
- model: e.value,
1056
+ model: t.value,
1030
1057
  class: "g-ctrl-container",
1031
1058
  t: "f"
1032
- }, se({ _: 2 }, [
1033
- B(h.$slots, (u, I) => ({
1034
- name: I,
1035
- fn: p((l) => [
1036
- v(h.$slots, I, {
1037
- data: l,
1059
+ }, ae({ _: 2 }, [
1060
+ A(d.$slots, (l, a) => ({
1061
+ name: a,
1062
+ fn: v((h) => [
1063
+ f(d.$slots, a, {
1064
+ data: h,
1038
1065
  item: r.item,
1039
- model: e.value
1066
+ model: t.value
1040
1067
  })
1041
1068
  ])
1042
1069
  }))
1043
- ]), 1032, ["modelValue", "onUpdate:modelValue", "item", "ctrlKey", "ctrlType", "model"])) : e.value.form.modalState === "add" ? (s(), V(qe, {
1070
+ ]), 1032, ["modelValue", "onUpdate:modelValue", "item", "ctrlKey", "ctrlType", "model"])) : t.value.form.modalState === "add" ? (i(), C(Fe, {
1044
1071
  key: 1,
1045
- modelValue: e.value[r.key].value,
1046
- "onUpdate:modelValue": (u) => e.value[r.key].value = u,
1047
- item: { ...((j = r == null ? void 0 : r.item) == null ? void 0 : j.editor) || {}, ...((ae = (W = r == null ? void 0 : r.item) == null ? void 0 : W.editor) == null ? void 0 : ae.ap) || {} },
1072
+ modelValue: t.value[r.key].value,
1073
+ "onUpdate:modelValue": (l) => t.value[r.key].value = l,
1074
+ item: { ...((oe = r == null ? void 0 : r.item) == null ? void 0 : oe.editor) || {}, ...((z = (s = r == null ? void 0 : r.item) == null ? void 0 : s.editor) == null ? void 0 : z.ap) || {} },
1048
1075
  ctrlKey: r.key,
1049
1076
  ctrlType: r == null ? void 0 : r.item.type,
1050
- model: e.value,
1077
+ model: t.value,
1051
1078
  class: "g-ctrl-container",
1052
1079
  t: "f"
1053
- }, se({ _: 2 }, [
1054
- B(h.$slots, (u, I) => ({
1055
- name: I,
1056
- fn: p((l) => [
1057
- v(h.$slots, I, {
1058
- data: l,
1080
+ }, ae({ _: 2 }, [
1081
+ A(d.$slots, (l, a) => ({
1082
+ name: a,
1083
+ fn: v((h) => [
1084
+ f(d.$slots, a, {
1085
+ data: h,
1059
1086
  item: r.item,
1060
- model: e.value
1087
+ model: t.value
1061
1088
  })
1062
1089
  ])
1063
1090
  }))
1064
- ]), 1032, ["modelValue", "onUpdate:modelValue", "item", "ctrlKey", "ctrlType", "model"])) : (s(), V(qe, {
1091
+ ]), 1032, ["modelValue", "onUpdate:modelValue", "item", "ctrlKey", "ctrlType", "model"])) : (i(), C(Fe, {
1065
1092
  key: 2,
1066
- modelValue: e.value[r.key].value,
1067
- "onUpdate:modelValue": (u) => e.value[r.key].value = u,
1068
- item: ((ne = r == null ? void 0 : r.item) == null ? void 0 : ne.editor) || {},
1093
+ modelValue: t.value[r.key].value,
1094
+ "onUpdate:modelValue": (l) => t.value[r.key].value = l,
1095
+ item: ((W = r == null ? void 0 : r.item) == null ? void 0 : W.editor) || {},
1069
1096
  ctrlKey: r.key,
1070
1097
  ctrlType: r == null ? void 0 : r.item.type,
1071
- model: e.value,
1098
+ model: t.value,
1072
1099
  class: "g-ctrl-container",
1073
1100
  t: "f"
1074
- }, se({ _: 2 }, [
1075
- B(h.$slots, (u, I) => ({
1076
- name: I,
1077
- fn: p((l) => [
1078
- v(h.$slots, I, {
1079
- data: l,
1101
+ }, ae({ _: 2 }, [
1102
+ A(d.$slots, (l, a) => ({
1103
+ name: a,
1104
+ fn: v((h) => [
1105
+ f(d.$slots, a, {
1106
+ data: h,
1080
1107
  item: r.item,
1081
- model: e.value
1108
+ model: t.value
1082
1109
  })
1083
1110
  ])
1084
1111
  }))
@@ -1098,138 +1125,128 @@ const Pe = /* @__PURE__ */ Tt(qt), Mt = {
1098
1125
  ]),
1099
1126
  _: 3
1100
1127
  }, 16, ["modelValue"]),
1101
- (N = (k = (Q = e.value) == null ? void 0 : Q.form) == null ? void 0 : k.footer) != null && N.hidden ? ve("", !0) : v(h.$slots, "f-footer", { key: 0 }, () => {
1102
- var ue, r, b, c, _, $;
1103
- return [
1104
- z("div", {
1105
- style: Me(e.value.form.footer.style)
1106
- }, [
1107
- v(h.$slots, "f-footer-left"),
1108
- (b = (r = (ue = e.value) == null ? void 0 : ue.form) == null ? void 0 : r.submit) != null && b.hidden ? ve("", !0) : (s(), V(oe, q({
1109
- key: 0,
1110
- onClick: S[1] || (S[1] = ut((y) => e.value.form.submit.click(ce.value, e.value), ["stop"]))
1111
- }, o(Ee)(e.value.form.submit, (y) => !["click"].includes(y))), {
1112
- default: p(() => {
1113
- var y, T, j;
1114
- return [
1115
- be(he((j = (T = (y = e.value) == null ? void 0 : y.form) == null ? void 0 : T.submit) == null ? void 0 : j.label), 1)
1116
- ];
1117
- }),
1118
- _: 1
1119
- }, 16)),
1120
- ($ = (_ = (c = e.value) == null ? void 0 : c.form) == null ? void 0 : _.reset) != null && $.hidden ? ve("", !0) : (s(), V(oe, q({
1121
- key: 1,
1122
- onClick: S[2] || (S[2] = (y) => e.value.form.reset.click(e.value))
1123
- }, o(Ee)(e.value.form.reset, (y) => !["click"].includes(y))), {
1124
- default: p(() => {
1125
- var y, T, j;
1126
- return [
1127
- be(he((j = (T = (y = e.value) == null ? void 0 : y.form) == null ? void 0 : T.reset) == null ? void 0 : j.label), 1)
1128
- ];
1129
- }),
1130
- _: 1
1131
- }, 16)),
1132
- v(h.$slots, "f-footer-right")
1133
- ], 4)
1134
- ];
1135
- })
1128
+ (O = (ge = (le = t.value) == null ? void 0 : le.form) == null ? void 0 : ge.footer) != null && O.hidden ? pe("", !0) : f(d.$slots, "f-footer", { key: 0 }, () => [
1129
+ Q("div", {
1130
+ style: Me(t.value.form.footer.style)
1131
+ }, [
1132
+ f(d.$slots, "f-footer-left"),
1133
+ (i(!0), I(G, null, A(F.value, (u) => (i(), I(G, null, [
1134
+ f(d.$slots, u.name + "-left"),
1135
+ f(d.$slots, u.name, {}, () => [
1136
+ J(P, M({ ref_for: !0 }, u.info, {
1137
+ onClick: rt((r) => u.click(q.value, t.value), ["stop"])
1138
+ }), {
1139
+ default: v(() => [
1140
+ Ee(ve(u == null ? void 0 : u.label), 1)
1141
+ ]),
1142
+ _: 2
1143
+ }, 1040, ["onClick"])
1144
+ ]),
1145
+ f(d.$slots, u.name + "-right")
1146
+ ], 64))), 256)),
1147
+ f(d.$slots, "f-footer-right")
1148
+ ], 4)
1149
+ ])
1136
1150
  ];
1137
- }) : v(h.$slots, "default", { key: 1 }, () => {
1138
- var Q;
1151
+ }) : f(d.$slots, "default", { key: 1 }, () => {
1152
+ var le, ge, O;
1139
1153
  return [
1140
- (s(!0), L(X, null, B(P.value, (k, N) => (s(), V(C, q({ ref_for: !0 }, { ...e.value.form.cols, ...k.col }, {
1141
- key: N,
1154
+ (i(!0), I(G, null, A(Y.value, (u, r) => (i(), C(D, M({ ref_for: !0 }, { ...t.value.form.cols, ...u.col }, {
1155
+ key: r,
1142
1156
  style: { width: "100%" }
1143
1157
  }), {
1144
- default: p(() => {
1145
- var ue;
1158
+ default: v(() => {
1159
+ var V;
1146
1160
  return [
1147
- te(G, q({
1148
- label: k.label,
1149
- prop: `${N}.value`,
1150
- rules: E(k),
1161
+ J(ee, M({
1162
+ label: u.label,
1163
+ prop: `${r}.value`,
1164
+ rules: g(u),
1151
1165
  ref_for: !0
1152
- }, { ...(ue = e.value) == null ? void 0 : ue.formItems, ...k == null ? void 0 : k.formItem }, { style: { width: "100%" } }), {
1153
- label: p((r) => [
1154
- v(h.$slots, `f-${N}-label`, {
1155
- data: r,
1156
- item: k,
1157
- model: e.value
1166
+ }, { ...(V = t.value) == null ? void 0 : V.formItems, ...u == null ? void 0 : u.formItem }, { style: { width: "100%" } }), {
1167
+ label: v((b) => [
1168
+ f(d.$slots, `f-${r}-label`, {
1169
+ data: b,
1170
+ item: u,
1171
+ model: t.value
1158
1172
  }, () => [
1159
- be(he(k.label), 1)
1173
+ Ee(ve(u.label), 1)
1160
1174
  ])
1161
1175
  ]),
1162
- default: p(() => [
1163
- v(h.$slots, "f-" + N, {
1164
- item: k,
1165
- model: e.value
1176
+ default: v(() => [
1177
+ f(d.$slots, "f-" + r, {
1178
+ item: u,
1179
+ model: t.value
1166
1180
  }, () => {
1167
- var r, b;
1181
+ var b, E;
1168
1182
  return [
1169
- e.value.form.modalState === "edit" ? (s(), V(qe, {
1183
+ t.value.form.modalState === "edit" ? (i(), C(Fe, {
1170
1184
  key: 0,
1171
- modelValue: e.value[N].value,
1172
- "onUpdate:modelValue": (c) => e.value[N].value = c,
1173
- item: { ...(k == null ? void 0 : k.editor) || {}, ...((r = k == null ? void 0 : k.editor) == null ? void 0 : r.ep) || {} },
1174
- ctrlKey: N,
1175
- ctrlType: k.type,
1176
- model: e.value,
1185
+ modelValue: t.value[r].value,
1186
+ "onUpdate:modelValue": (k) => t.value[r].value = k,
1187
+ item: { ...(u == null ? void 0 : u.editor) || {}, ...((b = u == null ? void 0 : u.editor) == null ? void 0 : b.ep) || {} },
1188
+ ctrlKey: r,
1189
+ ctrlType: u.type,
1190
+ model: t.value,
1177
1191
  class: "g-ctrl-container",
1178
- t: "f"
1179
- }, se({ _: 2 }, [
1180
- B(h.$slots, (c, _) => ({
1181
- name: _,
1182
- fn: p(($) => [
1183
- v(h.$slots, _, {
1184
- data: $,
1185
- item: k,
1186
- model: e.value
1192
+ t: "f",
1193
+ formInfo: q.value
1194
+ }, ae({ _: 2 }, [
1195
+ A(d.$slots, (k, U) => ({
1196
+ name: U,
1197
+ fn: v((H) => [
1198
+ f(d.$slots, U, {
1199
+ data: H,
1200
+ item: u,
1201
+ model: t.value
1187
1202
  })
1188
1203
  ])
1189
1204
  }))
1190
- ]), 1032, ["modelValue", "onUpdate:modelValue", "item", "ctrlKey", "ctrlType", "model"])) : e.value.form.modalState === "add" ? (s(), V(qe, {
1205
+ ]), 1032, ["modelValue", "onUpdate:modelValue", "item", "ctrlKey", "ctrlType", "model", "formInfo"])) : t.value.form.modalState === "add" ? (i(), C(Fe, {
1191
1206
  key: 1,
1192
- modelValue: e.value[N].value,
1193
- "onUpdate:modelValue": (c) => e.value[N].value = c,
1194
- item: { ...(k == null ? void 0 : k.editor) || {}, ...((b = k == null ? void 0 : k.editor) == null ? void 0 : b.ap) || {} },
1195
- ctrlKey: N,
1196
- ctrlType: k.type,
1197
- model: e.value,
1207
+ modelValue: t.value[r].value,
1208
+ "onUpdate:modelValue": (k) => t.value[r].value = k,
1209
+ item: { ...(u == null ? void 0 : u.editor) || {}, ...((E = u == null ? void 0 : u.editor) == null ? void 0 : E.ap) || {} },
1210
+ ctrlKey: r,
1211
+ ctrlType: u.type,
1212
+ model: t.value,
1198
1213
  class: "g-ctrl-container",
1199
- t: "f"
1200
- }, se({ _: 2 }, [
1201
- B(h.$slots, (c, _) => ({
1202
- name: _,
1203
- fn: p(($) => [
1204
- v(h.$slots, _, {
1205
- data: $,
1206
- item: k,
1207
- model: e.value
1214
+ t: "f",
1215
+ formInfo: q.value
1216
+ }, ae({ _: 2 }, [
1217
+ A(d.$slots, (k, U) => ({
1218
+ name: U,
1219
+ fn: v((H) => [
1220
+ f(d.$slots, U, {
1221
+ data: H,
1222
+ item: u,
1223
+ model: t.value
1208
1224
  })
1209
1225
  ])
1210
1226
  }))
1211
- ]), 1032, ["modelValue", "onUpdate:modelValue", "item", "ctrlKey", "ctrlType", "model"])) : (s(), V(qe, {
1227
+ ]), 1032, ["modelValue", "onUpdate:modelValue", "item", "ctrlKey", "ctrlType", "model", "formInfo"])) : (i(), C(Fe, {
1212
1228
  key: 2,
1213
- modelValue: e.value[N].value,
1214
- "onUpdate:modelValue": (c) => e.value[N].value = c,
1215
- item: k == null ? void 0 : k.editor,
1216
- ctrlKey: N,
1217
- ctrlType: k.type,
1218
- model: e.value,
1229
+ modelValue: t.value[r].value,
1230
+ "onUpdate:modelValue": (k) => t.value[r].value = k,
1231
+ item: u == null ? void 0 : u.editor,
1232
+ ctrlKey: r,
1233
+ ctrlType: u.type,
1234
+ model: t.value,
1219
1235
  class: "g-ctrl-container",
1220
- t: "f"
1221
- }, se({ _: 2 }, [
1222
- B(h.$slots, (c, _) => ({
1223
- name: _,
1224
- fn: p(($) => [
1225
- v(h.$slots, _, {
1226
- data: $,
1227
- item: k,
1228
- model: e.value
1236
+ t: "f",
1237
+ formInfo: q.value
1238
+ }, ae({ _: 2 }, [
1239
+ A(d.$slots, (k, U) => ({
1240
+ name: U,
1241
+ fn: v((H) => [
1242
+ f(d.$slots, U, {
1243
+ data: H,
1244
+ item: u,
1245
+ model: t.value
1229
1246
  })
1230
1247
  ])
1231
1248
  }))
1232
- ]), 1032, ["modelValue", "onUpdate:modelValue", "item", "ctrlKey", "ctrlType", "model"]))
1249
+ ]), 1032, ["modelValue", "onUpdate:modelValue", "item", "ctrlKey", "ctrlType", "model", "formInfo"]))
1233
1250
  ];
1234
1251
  })
1235
1252
  ]),
@@ -1239,46 +1256,26 @@ const Pe = /* @__PURE__ */ Tt(qt), Mt = {
1239
1256
  }),
1240
1257
  _: 2
1241
1258
  }, 1040))), 128)),
1242
- (Q = e.value.form.footer) != null && Q.hidden ? ve("", !0) : v(h.$slots, "f-footer", { key: 0 }, () => [
1243
- z("div", {
1244
- style: Me(e.value.form.footer.style)
1259
+ (O = (ge = (le = t.value) == null ? void 0 : le.form) == null ? void 0 : ge.footer) != null && O.hidden ? pe("", !0) : f(d.$slots, "f-footer", { key: 0 }, () => [
1260
+ Q("div", {
1261
+ style: Me(t.value.form.footer.style)
1245
1262
  }, [
1246
- v(h.$slots, "f-footer-left"),
1247
- v(h.$slots, "f-submit", {}, () => {
1248
- var k, N, ue;
1249
- return [
1250
- (ue = (N = (k = e.value) == null ? void 0 : k.form) == null ? void 0 : N.submit) != null && ue.hidden ? ve("", !0) : (s(), V(oe, q({
1251
- key: 0,
1252
- onClick: S[3] || (S[3] = ut((r) => e.value.form.submit.click(ce.value, e.value), ["stop"]))
1253
- }, o(Ee)(e.value.form.submit, (r) => !["click"].includes(r))), {
1254
- default: p(() => {
1255
- var r, b, c;
1256
- return [
1257
- be(he((c = (b = (r = e.value) == null ? void 0 : r.form) == null ? void 0 : b.submit) == null ? void 0 : c.label), 1)
1258
- ];
1259
- }),
1260
- _: 1
1261
- }, 16))
1262
- ];
1263
- }),
1264
- v(h.$slots, "f-reset", {}, () => {
1265
- var k, N, ue;
1266
- return [
1267
- (ue = (N = (k = e.value) == null ? void 0 : k.form) == null ? void 0 : N.reset) != null && ue.hidden ? ve("", !0) : (s(), V(oe, q({
1268
- key: 0,
1269
- onClick: S[4] || (S[4] = (r) => e.value.form.reset.click(e.value))
1270
- }, o(Ee)(e.value.form.reset, (r) => !["click"].includes(r))), {
1271
- default: p(() => {
1272
- var r, b, c;
1273
- return [
1274
- be(he((c = (b = (r = e.value) == null ? void 0 : r.form) == null ? void 0 : b.reset) == null ? void 0 : c.label), 1)
1275
- ];
1276
- }),
1277
- _: 1
1278
- }, 16))
1279
- ];
1280
- }),
1281
- v(h.$slots, "f-footer-right")
1263
+ f(d.$slots, "f-footer-left"),
1264
+ (i(!0), I(G, null, A(F.value, (u) => (i(), I(G, null, [
1265
+ f(d.$slots, u.name + "-left"),
1266
+ f(d.$slots, u.name, {}, () => [
1267
+ J(P, M({ ref_for: !0 }, u.info, {
1268
+ onClick: rt((r) => u.click(q.value, t.value), ["stop"])
1269
+ }), {
1270
+ default: v(() => [
1271
+ Ee(ve(u == null ? void 0 : u.label), 1)
1272
+ ]),
1273
+ _: 2
1274
+ }, 1040, ["onClick"])
1275
+ ]),
1276
+ f(d.$slots, u.name + "-right")
1277
+ ], 64))), 256)),
1278
+ f(d.$slots, "f-footer-right")
1282
1279
  ], 4)
1283
1280
  ])
1284
1281
  ];
@@ -1288,51 +1285,51 @@ const Pe = /* @__PURE__ */ Tt(qt), Mt = {
1288
1285
  }, 16, ["model"]);
1289
1286
  };
1290
1287
  }
1291
- }), nt = {
1288
+ }), at = {
1292
1289
  __name: "g-query-item",
1293
- props: /* @__PURE__ */ Fe(["more"], {
1290
+ props: /* @__PURE__ */ Te(["more"], {
1294
1291
  modelValue: { required: !0 },
1295
1292
  modelModifiers: {},
1296
1293
  info: { required: !0 },
1297
1294
  infoModifiers: {}
1298
1295
  }),
1299
1296
  emits: ["update:modelValue", "update:info"],
1300
- setup(f) {
1301
- const d = Te(f, "modelValue"), e = f, t = Te(f, "info"), n = (m) => Oe(() => Object.fromEntries(Object.entries(d.value).filter((w) => w[1].search && w[1].search.more === m).map((w) => [w[0], w[1]]))).value;
1302
- return (m, w) => {
1303
- const R = U("el-form-item");
1304
- return s(!0), L(X, null, B(n(e.more), (D, E) => v(m.$slots, `q-${E}`, {
1305
- key: E,
1306
- item: D,
1307
- model: d.value
1297
+ setup(m) {
1298
+ const c = qe(m, "modelValue"), t = m, e = qe(m, "info"), n = (p) => Oe(() => Object.fromEntries(Object.entries(c.value).filter(($) => $[1].search && $[1].search.more === p).map(($) => [$[0], $[1]]))).value;
1299
+ return (p, $) => {
1300
+ const N = j("el-form-item");
1301
+ return i(!0), I(G, null, A(n(t.more), (w, g) => f(p.$slots, `q-${g}`, {
1302
+ key: g,
1303
+ item: w,
1304
+ model: c.value
1308
1305
  }, () => [
1309
- te(R, q({
1310
- label: D.label,
1306
+ J(N, M({
1307
+ label: w.label,
1311
1308
  ref_for: !0
1312
- }, { ...d.value.queryItems, ...D == null ? void 0 : D.search }), {
1313
- label: p(() => [
1314
- v(m.$slots, `q-${E}-label`, {
1315
- item: D,
1316
- model: d.value
1309
+ }, { ...c.value.queryItems, ...w == null ? void 0 : w.search }), {
1310
+ label: v(() => [
1311
+ f(p.$slots, `q-${g}-label`, {
1312
+ item: w,
1313
+ model: c.value
1317
1314
  })
1318
1315
  ]),
1319
- default: p(() => [
1320
- te(qe, {
1321
- modelValue: t.value[E],
1322
- "onUpdate:modelValue": (M) => t.value[E] = M,
1323
- item: { ...D == null ? void 0 : D.editor, ...D.search },
1324
- ctrlKey: E,
1325
- ctrlType: D.type,
1326
- model: d.value,
1316
+ default: v(() => [
1317
+ J(Fe, {
1318
+ modelValue: e.value[g],
1319
+ "onUpdate:modelValue": (T) => e.value[g] = T,
1320
+ item: { ...w == null ? void 0 : w.editor, ...w.search },
1321
+ ctrlKey: g,
1322
+ ctrlType: w.type,
1323
+ model: c.value,
1327
1324
  t: "q"
1328
- }, se({ _: 2 }, [
1329
- B(Object.keys(m.$slots), (M) => ({
1330
- name: M,
1331
- fn: p((P) => [
1332
- v(m.$slots, M, {
1333
- data: P,
1334
- item: D,
1335
- model: d.value
1325
+ }, ae({ _: 2 }, [
1326
+ A(Object.keys(p.$slots), (T) => ({
1327
+ name: T,
1328
+ fn: v((Y) => [
1329
+ f(p.$slots, T, {
1330
+ data: Y,
1331
+ item: w,
1332
+ model: c.value
1336
1333
  })
1337
1334
  ])
1338
1335
  }))
@@ -1343,25 +1340,25 @@ const Pe = /* @__PURE__ */ Tt(qt), Mt = {
1343
1340
  ])), 128);
1344
1341
  };
1345
1342
  }
1346
- }, Be = (f, d) => {
1347
- const e = f.__vccOpts || f;
1348
- for (const [t, n] of d)
1349
- e[t] = n;
1350
- return e;
1351
- }, Ot = {
1343
+ }, Ue = (m, c) => {
1344
+ const t = m.__vccOpts || m;
1345
+ for (const [e, n] of c)
1346
+ t[e] = n;
1347
+ return t;
1348
+ }, At = {
1352
1349
  key: 0,
1353
1350
  class: "outer"
1354
- }, At = { class: "inner" }, Bt = {
1351
+ }, Bt = { class: "inner" }, It = {
1355
1352
  __name: "g-query",
1356
1353
  props: {
1357
1354
  modelValue: { required: !0 },
1358
1355
  modelModifiers: {}
1359
1356
  },
1360
- emits: /* @__PURE__ */ Fe(["query", "reset"], ["update:modelValue"]),
1361
- setup(f, { emit: d }) {
1362
- const e = Te(f, "modelValue"), t = d, n = Ke("options"), m = ye(!1);
1363
- let w = Object.fromEntries(Object.entries(e.value).filter((i) => i[1].search).map(([i, x]) => [i, x.value]));
1364
- const R = ye(w), D = {
1357
+ emits: /* @__PURE__ */ Te(["query", "reset"], ["update:modelValue"]),
1358
+ setup(m, { emit: c }) {
1359
+ const t = qe(m, "modelValue"), e = c, n = Je("options"), p = ye(!1);
1360
+ let $ = Object.fromEntries(Object.entries(t.value).filter((_) => _[1].search).map(([_, F]) => [_, F.value]));
1361
+ const N = ye($), w = {
1365
1362
  hidden: !1,
1366
1363
  type: "hidden",
1367
1364
  labelWidth: 100,
@@ -1378,7 +1375,7 @@ const Pe = /* @__PURE__ */ Tt(qt), Mt = {
1378
1375
  type: "primary",
1379
1376
  label: "更多",
1380
1377
  click: () => {
1381
- m.value = !m.value;
1378
+ p.value = !p.value;
1382
1379
  }
1383
1380
  },
1384
1381
  reset: {
@@ -1387,7 +1384,7 @@ const Pe = /* @__PURE__ */ Tt(qt), Mt = {
1387
1384
  hidden: !1,
1388
1385
  plain: !1,
1389
1386
  click: () => {
1390
- R.value = ye(w), t("reset", R.value);
1387
+ N.value = ye($), e("reset", N.value);
1391
1388
  }
1392
1389
  },
1393
1390
  query: {
@@ -1395,7 +1392,7 @@ const Pe = /* @__PURE__ */ Tt(qt), Mt = {
1395
1392
  type: "primary",
1396
1393
  label: "查询",
1397
1394
  click: () => {
1398
- t("query", R.value), m.value = !1;
1395
+ e("query", N.value), p.value = !1;
1399
1396
  }
1400
1397
  },
1401
1398
  btns: {
@@ -1407,8 +1404,8 @@ const Pe = /* @__PURE__ */ Tt(qt), Mt = {
1407
1404
  }
1408
1405
  }
1409
1406
  };
1410
- e.value.query = we(D, n == null ? void 0 : n.query, e.value.query);
1411
- const E = {
1407
+ t.value.query = $e(w, n == null ? void 0 : n.query, t.value.query);
1408
+ const g = {
1412
1409
  2: {
1413
1410
  title: "更多查询",
1414
1411
  showClose: !1,
@@ -1425,195 +1422,195 @@ const Pe = /* @__PURE__ */ Tt(qt), Mt = {
1425
1422
  trigger: "click"
1426
1423
  }
1427
1424
  };
1428
- e.value.query.more.dialog = we(
1429
- E[e.value.query.more.mode] || {},
1430
- e.value.query.more.dialog
1425
+ t.value.query.more.dialog = $e(
1426
+ g[t.value.query.more.mode] || {},
1427
+ t.value.query.more.dialog
1431
1428
  );
1432
- const M = {
1429
+ const T = {
1433
1430
  type: "hidden",
1434
1431
  labelPosition: "right",
1435
1432
  style: {
1436
1433
  width: "280px"
1437
1434
  }
1438
1435
  };
1439
- e.value.queryItems = we(M, n == null ? void 0 : n.queryItems, e.value.queryItems);
1440
- const P = (i, x) => {
1441
- const le = Object.keys(i.slots).filter((ie) => ie !== "default").reduce((ie, h) => (ie[h] = (S) => i.slots[h]({
1442
- model: e.value
1436
+ t.value.queryItems = $e(T, n == null ? void 0 : n.queryItems, t.value.queryItems);
1437
+ const Y = (_, F) => {
1438
+ const re = Object.keys(_.slots).filter((ue) => ue !== "default").reduce((ue, fe) => (ue[fe] = (me) => _.slots[fe]({
1439
+ model: t.value
1443
1440
  // 传递当前模型数据
1444
- }), ie), {});
1445
- return ke(nt, {
1446
- modelValue: e.value,
1447
- "onUpdate:modelValue": (ie) => e.value = ie,
1448
- info: R.value,
1449
- "onUpdate:info": (ie) => R.value = ie,
1450
- more: x
1451
- }, le);
1452
- }, ce = it(), F = () => {
1453
- var le, ie, h, S, G, C, re, K, oe;
1454
- const i = [
1441
+ }), ue), {});
1442
+ return ke(at, {
1443
+ modelValue: t.value,
1444
+ "onUpdate:modelValue": (ue) => t.value = ue,
1445
+ info: N.value,
1446
+ "onUpdate:info": (ue) => N.value = ue,
1447
+ more: F
1448
+ }, re);
1449
+ }, q = nt(), y = () => {
1450
+ var re, ue, fe, me, d, x, ee, D, ne;
1451
+ const _ = [
1455
1452
  {
1456
1453
  key: "query",
1457
- hidden: (h = (ie = (le = e.value) == null ? void 0 : le.query) == null ? void 0 : ie.query) == null ? void 0 : h.hidden,
1458
- component: $e,
1454
+ hidden: (fe = (ue = (re = t.value) == null ? void 0 : re.query) == null ? void 0 : ue.query) == null ? void 0 : fe.hidden,
1455
+ component: be,
1459
1456
  props: {
1460
- ...e.value.query.query,
1461
- onClick: e.value.query.query.click
1457
+ ...t.value.query.query,
1458
+ onClick: t.value.query.query.click
1462
1459
  },
1463
- label: e.value.query.query.label,
1464
- sort: e.value.query.query.sort || 0
1460
+ label: t.value.query.query.label,
1461
+ sort: t.value.query.query.sort || 0
1465
1462
  },
1466
1463
  {
1467
1464
  key: "reset",
1468
- hidden: (C = (G = (S = e.value) == null ? void 0 : S.query) == null ? void 0 : G.reset) == null ? void 0 : C.hidden,
1469
- component: $e,
1465
+ hidden: (x = (d = (me = t.value) == null ? void 0 : me.query) == null ? void 0 : d.reset) == null ? void 0 : x.hidden,
1466
+ component: be,
1470
1467
  props: {
1471
- ...e.value.query.reset,
1472
- onClick: e.value.query.reset.click
1468
+ ...t.value.query.reset,
1469
+ onClick: t.value.query.reset.click
1473
1470
  },
1474
- label: e.value.query.reset.label,
1475
- sort: e.value.query.reset.sort || 0
1471
+ label: t.value.query.reset.label,
1472
+ sort: t.value.query.reset.sort || 0
1476
1473
  },
1477
1474
  {
1478
1475
  key: "more",
1479
- hidden: (oe = (K = (re = e.value) == null ? void 0 : re.query) == null ? void 0 : K.more) == null ? void 0 : oe.hidden,
1480
- component: e.value.query.more.mode === 3 ? Ne : $e,
1481
- props: e.value.query.more.mode === 3 ? { ...e.value.query.more.dialog } : {
1482
- ...e.value.query.more,
1483
- onClick: e.value.query.more.click
1476
+ hidden: (ne = (D = (ee = t.value) == null ? void 0 : ee.query) == null ? void 0 : D.more) == null ? void 0 : ne.hidden,
1477
+ component: t.value.query.more.mode === 3 ? We : be,
1478
+ props: t.value.query.more.mode === 3 ? { ...t.value.query.more.dialog } : {
1479
+ ...t.value.query.more,
1480
+ onClick: t.value.query.more.click
1484
1481
  },
1485
- label: e.value.query.more.label,
1486
- sort: e.value.query.more.sort || 0,
1487
- content: e.value.query.more.mode === 3 ? () => ke(Ie, {
1482
+ label: t.value.query.more.label,
1483
+ sort: t.value.query.more.sort || 0,
1484
+ content: t.value.query.more.mode === 3 ? () => ke(Ne, {
1488
1485
  class: "query-form",
1489
- ...Ee(e.value.query, (J) => !["query", "more", "reset"].includes(J))
1490
- }, () => P({ slots: ce }, !0)) : null
1486
+ ..._e(t.value.query, (R) => !["query", "more", "reset"].includes(R))
1487
+ }, () => Y({ slots: q }, !0)) : null
1491
1488
  }
1492
1489
  ];
1493
- return i.sort((J, Q) => J.sort - Q.sort), i.filter((J) => !J.hidden).map((J) => J.key === "more" && J.component === Ne ? ke(Ne, J.props, {
1494
- reference: () => ke($e, e.value.query.more, () => J.label),
1495
- default: J.content
1496
- }) : (J.props.slot = "query-" + J.key, J.label ? ke(J.component, J.props, () => J.label) : ke(J.component, J.props)));
1490
+ return _.sort((R, P) => R.sort - P.sort), _.filter((R) => !R.hidden).map((R) => R.key === "more" && R.component === We ? ke(We, R.props, {
1491
+ reference: () => ke(be, t.value.query.more, () => R.label),
1492
+ default: R.content
1493
+ }) : (R.props.slot = "query-" + R.key, R.label ? ke(R.component, R.props, () => R.label) : ke(R.component, R.props)));
1497
1494
  };
1498
- return (i, x) => {
1499
- var h, S, G, C, re, K, oe, J, Q, k, N, ue, r, b, c, _, $;
1500
- const le = U("el-form-item"), ie = U("el-drawer");
1501
- return s(), L("div", {
1495
+ return (_, F) => {
1496
+ var fe, me, d, x, ee, D, ne, R, P, K, le, ge, O, u, r, V, b;
1497
+ const re = j("el-form-item"), ue = j("el-drawer");
1498
+ return i(), I("div", {
1502
1499
  class: "g-query-container",
1503
- style: Me((S = (h = e.value.query) == null ? void 0 : h.container) == null ? void 0 : S.style)
1500
+ style: Me((me = (fe = t.value.query) == null ? void 0 : fe.container) == null ? void 0 : me.style)
1504
1501
  }, [
1505
- te(o(Ie), Se(ze(o(Ee)(e.value.query, (y) => !["query", "more", "reset", "btns"].includes(y)))), {
1506
- default: p(() => {
1507
- var y, T;
1502
+ J(o(Ne), Be(Ge(o(_e)(t.value.query, (E) => !["query", "more", "reset", "btns"].includes(E)))), {
1503
+ default: v(() => {
1504
+ var E, k;
1508
1505
  return [
1509
- (s(), V(De(P({ slots: i.$slots }, void 0)))),
1510
- ((T = (y = e.value.query) == null ? void 0 : y.container) == null ? void 0 : T.inline) === !0 ? (s(), V(le, { key: 0 }, {
1511
- default: p(() => {
1512
- var j, W, ae, ne, u;
1506
+ (i(), C(De(Y({ slots: _.$slots }, void 0)))),
1507
+ ((k = (E = t.value.query) == null ? void 0 : E.container) == null ? void 0 : k.inline) === !0 ? (i(), C(re, { key: 0 }, {
1508
+ default: v(() => {
1509
+ var U, H, oe, s, z;
1513
1510
  return [
1514
- z("div", {
1515
- style: Me((W = (j = e.value.query) == null ? void 0 : j.btns) == null ? void 0 : W.style)
1511
+ Q("div", {
1512
+ style: Me((H = (U = t.value.query) == null ? void 0 : U.btns) == null ? void 0 : H.style)
1516
1513
  }, [
1517
- e.value.query.group ? (s(), V(o(je), { key: 0 }, {
1518
- default: p(() => [
1519
- (s(!0), L(X, null, B(F(), (I) => v(i.$slots, I.props.slot, {}, () => [
1520
- (s(), V(De(I)))
1514
+ t.value.query.group ? (i(), C(o(Le), { key: 0 }, {
1515
+ default: v(() => [
1516
+ (i(!0), I(G, null, A(y(), (W) => f(_.$slots, W.props.slot, {}, () => [
1517
+ (i(), C(De(W)))
1521
1518
  ], !0)), 256)),
1522
- v(i.$slots, "q-btns", {}, void 0, !0)
1519
+ f(_.$slots, "q-btns", {}, void 0, !0)
1523
1520
  ]),
1524
1521
  _: 3
1525
- })) : (s(), L(X, { key: 1 }, [
1526
- (u = (ne = (ae = e.value) == null ? void 0 : ae.query) == null ? void 0 : ne.btns) != null && u.group ? (s(), V(o(je), { key: 0 }, {
1527
- default: p(() => [
1528
- (s(!0), L(X, null, B(F(), (I) => v(i.$slots, I.props.slot, {}, () => [
1529
- (s(), V(De(I)))
1522
+ })) : (i(), I(G, { key: 1 }, [
1523
+ (z = (s = (oe = t.value) == null ? void 0 : oe.query) == null ? void 0 : s.btns) != null && z.group ? (i(), C(o(Le), { key: 0 }, {
1524
+ default: v(() => [
1525
+ (i(!0), I(G, null, A(y(), (W) => f(_.$slots, W.props.slot, {}, () => [
1526
+ (i(), C(De(W)))
1530
1527
  ], !0)), 256))
1531
1528
  ]),
1532
1529
  _: 3
1533
- })) : (s(!0), L(X, { key: 1 }, B(F(), (I) => v(i.$slots, I.props.slot, {}, () => [
1534
- (s(), V(De(I)))
1530
+ })) : (i(!0), I(G, { key: 1 }, A(y(), (W) => f(_.$slots, W.props.slot, {}, () => [
1531
+ (i(), C(De(W)))
1535
1532
  ], !0)), 256)),
1536
- v(i.$slots, "q-btns", {}, void 0, !0)
1533
+ f(_.$slots, "q-btns", {}, void 0, !0)
1537
1534
  ], 64))
1538
1535
  ], 4)
1539
1536
  ];
1540
1537
  }),
1541
1538
  _: 3
1542
- })) : ve("", !0)
1539
+ })) : pe("", !0)
1543
1540
  ];
1544
1541
  }),
1545
1542
  _: 3
1546
1543
  }, 16),
1547
- ((re = (C = (G = e.value) == null ? void 0 : G.query) == null ? void 0 : C.container) == null ? void 0 : re.inline) === !1 ? (s(), L("div", {
1544
+ ((ee = (x = (d = t.value) == null ? void 0 : d.query) == null ? void 0 : x.container) == null ? void 0 : ee.inline) === !1 ? (i(), I("div", {
1548
1545
  key: 0,
1549
- style: Me((oe = (K = e.value.query) == null ? void 0 : K.btns) == null ? void 0 : oe.style)
1546
+ style: Me((ne = (D = t.value.query) == null ? void 0 : D.btns) == null ? void 0 : ne.style)
1550
1547
  }, [
1551
- e.value.query.group ? (s(), V(o(je), { key: 0 }, {
1552
- default: p(() => [
1553
- (s(!0), L(X, null, B(F(), (y) => v(i.$slots, y.props.slot, {}, () => [
1554
- (s(), V(De(y)))
1548
+ t.value.query.group ? (i(), C(o(Le), { key: 0 }, {
1549
+ default: v(() => [
1550
+ (i(!0), I(G, null, A(y(), (E) => f(_.$slots, E.props.slot, {}, () => [
1551
+ (i(), C(De(E)))
1555
1552
  ], !0)), 256)),
1556
- v(i.$slots, "q-btns", {}, void 0, !0)
1553
+ f(_.$slots, "q-btns", {}, void 0, !0)
1557
1554
  ]),
1558
1555
  _: 3
1559
- })) : (s(), L(X, { key: 1 }, [
1560
- (Q = (J = e.value.query) == null ? void 0 : J.btns) != null && Q.group ? (s(), V(o(je), { key: 0 }, {
1561
- default: p(() => [
1562
- (s(!0), L(X, null, B(F(), (y) => v(i.$slots, y.props.slot, {}, () => [
1563
- (s(), V(De(y)))
1556
+ })) : (i(), I(G, { key: 1 }, [
1557
+ (P = (R = t.value.query) == null ? void 0 : R.btns) != null && P.group ? (i(), C(o(Le), { key: 0 }, {
1558
+ default: v(() => [
1559
+ (i(!0), I(G, null, A(y(), (E) => f(_.$slots, E.props.slot, {}, () => [
1560
+ (i(), C(De(E)))
1564
1561
  ], !0)), 256))
1565
1562
  ]),
1566
1563
  _: 3
1567
- })) : (s(!0), L(X, { key: 1 }, B(F(), (y) => v(i.$slots, y.props.slot, {}, () => [
1568
- (s(), V(De(y)))
1564
+ })) : (i(!0), I(G, { key: 1 }, A(y(), (E) => f(_.$slots, E.props.slot, {}, () => [
1565
+ (i(), C(De(E)))
1569
1566
  ], !0)), 256)),
1570
- v(i.$slots, "q-btns", {}, void 0, !0)
1567
+ f(_.$slots, "q-btns", {}, void 0, !0)
1571
1568
  ], 64))
1572
- ], 4)) : ve("", !0),
1573
- te(bt, {
1569
+ ], 4)) : pe("", !0),
1570
+ J($t, {
1574
1571
  duration: 300,
1575
1572
  name: "nested"
1576
1573
  }, {
1577
- default: p(() => {
1578
- var y, T, j;
1574
+ default: v(() => {
1575
+ var E, k, U;
1579
1576
  return [
1580
- m.value && !((j = (T = (y = e.value) == null ? void 0 : y.query) == null ? void 0 : T.more) != null && j.hidden) && e.value.query.more.mode == 1 ? (s(), L("div", Ot, [
1581
- z("div", At, [
1582
- e.value.query.more.mode == 1 ? He((s(), V(o(Ie), Se(q({ key: 0 }, o(Ee)(e.value.query, (W) => !["query", "more", "reset"].includes(W)))), {
1583
- default: p(() => [
1584
- (s(), V(De(P({ slots: i.$slots }, !0))))
1577
+ p.value && !((U = (k = (E = t.value) == null ? void 0 : E.query) == null ? void 0 : k.more) != null && U.hidden) && t.value.query.more.mode == 1 ? (i(), I("div", At, [
1578
+ Q("div", Bt, [
1579
+ t.value.query.more.mode == 1 ? st((i(), C(o(Ne), Be(M({ key: 0 }, o(_e)(t.value.query, (H) => !["query", "more", "reset"].includes(H)))), {
1580
+ default: v(() => [
1581
+ (i(), C(De(Y({ slots: _.$slots }, !0))))
1585
1582
  ]),
1586
1583
  _: 1
1587
1584
  }, 16)), [
1588
- [We, m.value]
1589
- ]) : ve("", !0)
1585
+ [it, p.value]
1586
+ ]) : pe("", !0)
1590
1587
  ])
1591
- ])) : ve("", !0)
1588
+ ])) : pe("", !0)
1592
1589
  ];
1593
1590
  }),
1594
1591
  _: 1
1595
1592
  }),
1596
- m.value && !((ue = (N = (k = e.value) == null ? void 0 : k.query) == null ? void 0 : N.more) != null && ue.hidden) && e.value.query.more.mode == 2 ? (s(), V(ie, q({
1593
+ p.value && !((ge = (le = (K = t.value) == null ? void 0 : K.query) == null ? void 0 : le.more) != null && ge.hidden) && t.value.query.more.mode == 2 ? (i(), C(ue, M({
1597
1594
  key: 1,
1598
- modelValue: m.value,
1599
- "onUpdate:modelValue": x[4] || (x[4] = (y) => m.value = y),
1595
+ modelValue: p.value,
1596
+ "onUpdate:modelValue": F[4] || (F[4] = (E) => p.value = E),
1600
1597
  title: "更多查询",
1601
1598
  "show-close": !1
1602
- }, e.value.query.more.dialog), se({
1603
- default: p(() => [
1604
- te(o(Ie), q(o(Ee)(e.value.query, (y) => !["query", "more", "reset"].includes(y)), { style: { width: "98%" } }), {
1605
- default: p(() => [
1606
- te(nt, {
1607
- modelValue: e.value,
1608
- "onUpdate:modelValue": x[0] || (x[0] = (y) => e.value = y),
1609
- info: R.value,
1610
- "onUpdate:info": x[1] || (x[1] = (y) => R.value = y),
1599
+ }, t.value.query.more.dialog), ae({
1600
+ default: v(() => [
1601
+ J(o(Ne), M(o(_e)(t.value.query, (E) => !["query", "more", "reset"].includes(E)), { style: { width: "98%" } }), {
1602
+ default: v(() => [
1603
+ J(at, {
1604
+ modelValue: t.value,
1605
+ "onUpdate:modelValue": F[0] || (F[0] = (E) => t.value = E),
1606
+ info: N.value,
1607
+ "onUpdate:info": F[1] || (F[1] = (E) => N.value = E),
1611
1608
  more: !0
1612
- }, se({ _: 2 }, [
1613
- B(i.$slots, (y, T, j) => ({
1614
- name: T,
1615
- fn: p((W) => [
1616
- v(i.$slots, T, { model: e.value }, void 0, !0)
1609
+ }, ae({ _: 2 }, [
1610
+ A(_.$slots, (E, k, U) => ({
1611
+ name: k,
1612
+ fn: v((H) => [
1613
+ f(_.$slots, k, { model: t.value }, void 0, !0)
1617
1614
  ])
1618
1615
  }))
1619
1616
  ]), 1032, ["modelValue", "info"])
@@ -1623,23 +1620,23 @@ const Pe = /* @__PURE__ */ Tt(qt), Mt = {
1623
1620
  ]),
1624
1621
  _: 2
1625
1622
  }, [
1626
- ($ = (_ = (c = (b = (r = e.value) == null ? void 0 : r.query) == null ? void 0 : b.more) == null ? void 0 : c.dialog) == null ? void 0 : _.footer) != null && $.hidden ? void 0 : {
1623
+ (b = (V = (r = (u = (O = t.value) == null ? void 0 : O.query) == null ? void 0 : u.more) == null ? void 0 : r.dialog) == null ? void 0 : V.footer) != null && b.hidden ? void 0 : {
1627
1624
  name: "footer",
1628
- fn: p(() => [
1629
- z("div", Se(ze(e.value.query.more.dialog.footer)), [
1630
- te(o($e), q(e.value.query.query, {
1631
- onClick: x[2] || (x[2] = (y) => e.value.query.query.click())
1625
+ fn: v(() => [
1626
+ Q("div", Be(Ge(t.value.query.more.dialog.footer)), [
1627
+ J(o(be), M(t.value.query.query, {
1628
+ onClick: F[2] || (F[2] = (E) => t.value.query.query.click())
1632
1629
  }), {
1633
- default: p(() => [
1634
- be(he(e.value.query.query.label), 1)
1630
+ default: v(() => [
1631
+ Ee(ve(t.value.query.query.label), 1)
1635
1632
  ]),
1636
1633
  _: 1
1637
1634
  }, 16),
1638
- te(o($e), q(e.value.query.reset, {
1639
- onClick: x[3] || (x[3] = (y) => e.value.query.reset.click())
1635
+ J(o(be), M(t.value.query.reset, {
1636
+ onClick: F[3] || (F[3] = (E) => t.value.query.reset.click())
1640
1637
  }), {
1641
- default: p(() => [
1642
- be(he(e.value.query.reset.label), 1)
1638
+ default: v(() => [
1639
+ Ee(ve(t.value.query.reset.label), 1)
1643
1640
  ]),
1644
1641
  _: 1
1645
1642
  }, 16)
@@ -1647,105 +1644,105 @@ const Pe = /* @__PURE__ */ Tt(qt), Mt = {
1647
1644
  ]),
1648
1645
  key: "0"
1649
1646
  }
1650
- ]), 1040, ["modelValue"])) : ve("", !0)
1647
+ ]), 1040, ["modelValue"])) : pe("", !0)
1651
1648
  ], 4);
1652
1649
  };
1653
1650
  }
1654
- }, Ut = /* @__PURE__ */ Be(Bt, [["__scopeId", "data-v-561bb961"]]), It = { style: { padding: "0", margin: "0", "box-sizing": "border-box" } }, jt = { style: { padding: "10px", "box-sizing": "border-box" } }, Rt = { style: { margin: "10px" } }, Lt = {
1651
+ }, Ut = /* @__PURE__ */ Ue(It, [["__scopeId", "data-v-561bb961"]]), Rt = { style: { padding: "0", margin: "0", "box-sizing": "border-box" } }, jt = { style: { padding: "10px", "box-sizing": "border-box" } }, Nt = { style: { margin: "10px" } }, Lt = {
1655
1652
  style: { display: "flex", "flex-wrap": "wrap" },
1656
1653
  id: "excelSortEl"
1657
- }, Nt = ["textContent"], Pt = { style: { width: "100%", display: "flex", padding: "10px", "box-sizing": "border-box", "justify-content": "center", "border-top": "1px solid #dcdfe6" } }, zt = {
1654
+ }, Pt = ["textContent"], zt = { style: { width: "100%", display: "flex", padding: "10px", "box-sizing": "border-box", "justify-content": "center", "border-top": "1px solid #dcdfe6" } }, Ht = {
1658
1655
  __name: "check-excel-item",
1659
1656
  props: {
1660
1657
  items: Array,
1661
1658
  commitText: String
1662
1659
  },
1663
1660
  emits: ["excel"],
1664
- setup(f, { emit: d }) {
1665
- const e = f, t = d, n = ye(e.items), m = () => {
1666
- n.value.forEach((D) => {
1667
- D.value = !0;
1661
+ setup(m, { emit: c }) {
1662
+ const t = m, e = c, n = ye(t.items), p = () => {
1663
+ n.value.forEach((w) => {
1664
+ w.value = !0;
1668
1665
  });
1669
- }, w = () => {
1670
- n.value.forEach((D) => {
1671
- D.value = !1;
1666
+ }, $ = () => {
1667
+ n.value.forEach((w) => {
1668
+ w.value = !1;
1672
1669
  });
1673
- }, R = () => {
1674
- t("excel", n.value, (D, E = "excel.xls") => {
1675
- if (!D) {
1670
+ }, N = () => {
1671
+ e("excel", n.value, (w, g = "excel.xls") => {
1672
+ if (!w) {
1676
1673
  console.error("下载链接无效");
1677
1674
  return;
1678
1675
  }
1679
1676
  try {
1680
- const M = document.createElement("a");
1681
- M.href = D, M.download = E, M.style.display = "none", document.body.appendChild(M), M.click(), document.body.removeChild(M);
1682
- } catch (M) {
1683
- console.error("下载文件时出现错误:", M);
1677
+ const T = document.createElement("a");
1678
+ T.href = w, T.download = g, T.style.display = "none", document.body.appendChild(T), T.click(), document.body.removeChild(T);
1679
+ } catch (T) {
1680
+ console.error("下载文件时出现错误:", T);
1684
1681
  }
1685
1682
  });
1686
1683
  };
1687
- return Ae(() => {
1688
- const D = new ct(document.getElementById("excelSortEl"), {
1684
+ return Ie(() => {
1685
+ const w = new ct(document.getElementById("excelSortEl"), {
1689
1686
  animation: 150,
1690
1687
  onEnd: () => {
1691
- let M = D.toArray();
1692
- console.log(M);
1688
+ let T = w.toArray();
1689
+ console.log(T);
1693
1690
  }
1694
- }), E = D;
1695
- $t(() => {
1696
- E && E.destroy();
1691
+ }), g = w;
1692
+ Et(() => {
1693
+ g && g.destroy();
1697
1694
  });
1698
- }), (D, E) => {
1699
- const M = U("el-divider"), P = U("el-alert"), ce = U("el-checkbox"), F = U("el-button");
1700
- return s(), L("div", It, [
1701
- z("div", jt, [
1702
- z("div", Rt, [
1703
- z("a", {
1704
- onClick: m,
1695
+ }), (w, g) => {
1696
+ const T = j("el-divider"), Y = j("el-alert"), q = j("el-checkbox"), y = j("el-button");
1697
+ return i(), I("div", Rt, [
1698
+ Q("div", jt, [
1699
+ Q("div", Nt, [
1700
+ Q("a", {
1701
+ onClick: p,
1705
1702
  style: { cursor: "pointer" }
1706
1703
  }, "全选"),
1707
- te(M, { direction: "vertical" }),
1708
- z("a", {
1709
- onClick: w,
1704
+ J(T, { direction: "vertical" }),
1705
+ Q("a", {
1706
+ onClick: $,
1710
1707
  style: { cursor: "pointer" }
1711
1708
  }, "全不选")
1712
1709
  ]),
1713
- te(P, {
1710
+ J(Y, {
1714
1711
  title: "拖动列标题可以改变表格列的生成顺序 !",
1715
1712
  type: "warning",
1716
1713
  "show-icon": "",
1717
1714
  closable: !1,
1718
1715
  style: { "margin-bottom": "10px" }
1719
1716
  }),
1720
- E[0] || (E[0] = z("div", { style: { margin: "1px 0" } }, null, -1)),
1721
- z("div", Lt, [
1722
- (s(!0), L(X, null, B(n.value, (i) => (s(), V(ce, {
1717
+ g[0] || (g[0] = Q("div", { style: { margin: "1px 0" } }, null, -1)),
1718
+ Q("div", Lt, [
1719
+ (i(!0), I(G, null, A(n.value, (_) => (i(), C(q, {
1723
1720
  class: "check-box-hover",
1724
1721
  style: { width: "120px !important", height: "30px !important", border: "1px solid #dfe6ec", margin: "5px !important", "border-radius": "3px !important", "padding-left": "5px !important", display: "flex !important", "align-items": "center !important" },
1725
- "data-id": i.key,
1726
- modelValue: i.value,
1727
- "onUpdate:modelValue": (x) => i.value = x,
1728
- key: i.key,
1729
- title: i.label
1722
+ "data-id": _.key,
1723
+ modelValue: _.value,
1724
+ "onUpdate:modelValue": (F) => _.value = F,
1725
+ key: _.key,
1726
+ title: _.label
1730
1727
  }, {
1731
- default: p(() => [
1732
- z("span", {
1733
- textContent: he(i.label),
1728
+ default: v(() => [
1729
+ Q("span", {
1730
+ textContent: ve(_.label),
1734
1731
  style: { display: "block", "text-overflow": "ellipsis", width: "95px", overflow: "hidden" }
1735
- }, null, 8, Nt)
1732
+ }, null, 8, Pt)
1736
1733
  ]),
1737
1734
  _: 2
1738
1735
  }, 1032, ["data-id", "modelValue", "onUpdate:modelValue", "title"]))), 128))
1739
1736
  ])
1740
1737
  ]),
1741
- z("div", Pt, [
1742
- te(F, {
1738
+ Q("div", zt, [
1739
+ J(y, {
1743
1740
  type: "primary",
1744
- onClick: R,
1745
- disabled: n.value.filter((i) => i.value).length < 1
1741
+ onClick: N,
1742
+ disabled: n.value.filter((_) => _.value).length < 1
1746
1743
  }, {
1747
- default: p(() => [
1748
- be(he(e.commitText), 1)
1744
+ default: v(() => [
1745
+ Ee(ve(t.commitText), 1)
1749
1746
  ]),
1750
1747
  _: 1
1751
1748
  }, 8, ["disabled"])
@@ -1753,46 +1750,46 @@ const Pe = /* @__PURE__ */ Tt(qt), Mt = {
1753
1750
  ]);
1754
1751
  };
1755
1752
  }
1756
- }, Ht = /* @__PURE__ */ Be(zt, [["__scopeId", "data-v-51dfb7ef"]]), Ce = new Vt("gyc");
1753
+ }, Wt = /* @__PURE__ */ Ue(Ht, [["__scopeId", "data-v-51dfb7ef"]]), Ce = new Dt("gyc");
1757
1754
  Ce.version(1).stores({
1758
1755
  tableInfo: "++id,[user+page+key],user,page,key,showCol,width,sort",
1759
1756
  tableList: "++id,name"
1760
1757
  });
1761
- async function xe(f, d, e, t = {}) {
1762
- if (await Ce.tableInfo.where({ user: f, page: d, key: e }).count() > 0) {
1763
- let m = await Ce.tableInfo.where({ user: f, page: d, key: e }).first();
1764
- return await Ce.tableInfo.put({ ...m, ...t }), "update success";
1758
+ async function Ae(m, c, t, e = {}) {
1759
+ if (await Ce.tableInfo.where({ user: m, page: c, key: t }).count() > 0) {
1760
+ let p = await Ce.tableInfo.where({ user: m, page: c, key: t }).first();
1761
+ return await Ce.tableInfo.put({ ...p, ...e }), "update success";
1765
1762
  } else {
1766
- let m = { showCol: !0, width: "auto", sort: 0, ...t };
1767
- return await Ce.tableInfo.add({ user: f, page: d, key: e, ...m }), "add success";
1763
+ let p = { showCol: !0, width: "auto", sort: 0, ...e };
1764
+ return await Ce.tableInfo.add({ user: m, page: c, key: t, ...p }), "add success";
1768
1765
  }
1769
1766
  }
1770
- async function Wt(f, d) {
1771
- return await Ce.tableInfo.where({ user: f, page: d }).toArray();
1767
+ async function Yt(m, c) {
1768
+ return await Ce.tableInfo.where({ user: m, page: c }).toArray();
1772
1769
  }
1773
- async function Yt(f, d) {
1770
+ async function Gt(m, c) {
1774
1771
  try {
1775
- const e = await Ce.tableInfo.where({ user: f, page: d }).delete();
1776
- return console.log("删除了" + e + "条数据"), e;
1777
- } catch (e) {
1778
- throw console.error("删除表格项设置信息时出错:", e), e;
1772
+ const t = await Ce.tableInfo.where({ user: m, page: c }).delete();
1773
+ return console.log("删除了" + t + "条数据"), t;
1774
+ } catch (t) {
1775
+ throw console.error("删除表格项设置信息时出错:", t), t;
1779
1776
  }
1780
1777
  }
1781
- async function Gt(f) {
1782
- return await Ce.tableList.where({ name: f }).first();
1778
+ async function Kt(m) {
1779
+ return await Ce.tableList.where({ name: m }).first();
1783
1780
  }
1784
- async function Qt(f) {
1785
- return typeof f == "string" && (f = { name: f }), await Ce.tableList.add(f), "add success";
1781
+ async function Qt(m) {
1782
+ return typeof m == "string" && (m = { name: m }), await Ce.tableList.add(m), "add success";
1786
1783
  }
1787
1784
  const Xt = {
1788
1785
  style: { margin: "10px" },
1789
1786
  class: "allcheck"
1790
- }, Kt = {
1787
+ }, Jt = {
1791
1788
  id: "cols",
1792
1789
  style: { display: "flex", "flex-wrap": "wrap", margin: "0 !important", padding: "0 !important" }
1793
- }, Jt = ["textContent"], Zt = {
1790
+ }, Zt = ["textContent"], el = {
1794
1791
  __name: "columns-setting",
1795
- props: /* @__PURE__ */ Fe({
1792
+ props: /* @__PURE__ */ Te({
1796
1793
  name: {
1797
1794
  type: String,
1798
1795
  required: !0
@@ -1802,35 +1799,35 @@ const Xt = {
1802
1799
  modelModifiers: {}
1803
1800
  }),
1804
1801
  emits: ["update:modelValue"],
1805
- setup(f) {
1806
- const d = f, e = ye([]), t = Te(f, "modelValue"), n = async (E, M) => {
1807
- E ? t.value[M].showCol = !0 : t.value[M].showCol = !1;
1802
+ setup(m) {
1803
+ const c = m, t = ye([]), e = qe(m, "modelValue"), n = async (g, T) => {
1804
+ g ? e.value[T].showCol = !0 : e.value[T].showCol = !1;
1808
1805
  try {
1809
- const P = await xe(t.value.table.user, d.name, M, { showCol: E });
1810
- console.log(P);
1811
- } catch (P) {
1812
- console.error("列显示状态保存信息时出错:", P), _e({
1806
+ const Y = await Ae(e.value.table.user, c.name, T, { showCol: g });
1807
+ console.log(Y);
1808
+ } catch (Y) {
1809
+ console.error("列显示状态保存信息时出错:", Y), we({
1813
1810
  type: "error",
1814
1811
  message: "列显示状态保存信息失败!"
1815
1812
  });
1816
1813
  }
1817
- }, m = () => {
1818
- const E = document.getElementById("cols");
1819
- if (E) {
1820
- let M = ct.create(E, {
1814
+ }, p = () => {
1815
+ const g = document.getElementById("cols");
1816
+ if (g) {
1817
+ let T = ct.create(g, {
1821
1818
  animation: 150,
1822
1819
  filter: ".filtered",
1823
1820
  //
1824
1821
  sort: !0,
1825
1822
  onEnd: () => {
1826
- M.toArray().forEach(async (ce, F) => {
1827
- t.value[ce].sort = F;
1828
- let i = t.value[ce].width || "auto";
1823
+ T.toArray().forEach(async (q, y) => {
1824
+ e.value[q].sort = y;
1825
+ let _ = e.value[q].width || "auto";
1829
1826
  try {
1830
- const x = await xe(t.value.table.user, d.name, ce, { sort: F, width: i });
1831
- console.log(x);
1832
- } catch (x) {
1833
- console.error("列排序和宽度保存信息时出错:", x), _e({
1827
+ const F = await Ae(e.value.table.user, c.name, q, { sort: y, width: _ });
1828
+ console.log(F);
1829
+ } catch (F) {
1830
+ console.error("列排序和宽度保存信息时出错:", F), we({
1834
1831
  type: "error",
1835
1832
  message: "列排序和宽度保存信息失败!"
1836
1833
  });
@@ -1839,102 +1836,102 @@ const Xt = {
1839
1836
  }
1840
1837
  });
1841
1838
  }
1842
- }, w = async () => {
1839
+ }, $ = async () => {
1843
1840
  try {
1844
- for (const E of e.value) {
1845
- E.showCol = !0, t.value[E.value].showCol = !0;
1846
- const M = await xe(t.value.table.user, d.name, E.value, {
1841
+ for (const g of t.value) {
1842
+ g.showCol = !0, e.value[g.value].showCol = !0;
1843
+ const T = await Ae(e.value.table.user, c.name, g.value, {
1847
1844
  showCol: !0,
1848
- width: E.width,
1849
- sort: E.sort
1845
+ width: g.width,
1846
+ sort: g.sort
1850
1847
  });
1851
- console.log(M);
1848
+ console.log(T);
1852
1849
  }
1853
- } catch (E) {
1854
- console.error("全选列保存信息时出错:", E), _e({
1850
+ } catch (g) {
1851
+ console.error("全选列保存信息时出错:", g), we({
1855
1852
  type: "error",
1856
1853
  message: "全选列保存信息失败!"
1857
1854
  });
1858
1855
  }
1859
- }, R = async () => {
1856
+ }, N = async () => {
1860
1857
  try {
1861
- const E = e.value.filter((M) => !M.alwaysShow);
1862
- for (const M of E) {
1863
- M.showCol = !1, t.value[M.value].showCol = !1;
1864
- const P = await xe(t.value.table.user, d.name, M.value, {
1858
+ const g = t.value.filter((T) => !T.alwaysShow);
1859
+ for (const T of g) {
1860
+ T.showCol = !1, e.value[T.value].showCol = !1;
1861
+ const Y = await Ae(e.value.table.user, c.name, T.value, {
1865
1862
  showCol: !1,
1866
- width: M.width,
1867
- sort: M.sort
1863
+ width: T.width,
1864
+ sort: T.sort
1868
1865
  });
1869
- console.log(P);
1866
+ console.log(Y);
1870
1867
  }
1871
- } catch (E) {
1872
- console.error("清除列保存信息时出错:", E), _e({
1868
+ } catch (g) {
1869
+ console.error("清除列保存信息时出错:", g), we({
1873
1870
  type: "error",
1874
1871
  message: "清除列保存信息失败!"
1875
1872
  });
1876
1873
  }
1877
- }, D = () => {
1878
- st.confirm("确定要复位吗?", "提示", {
1874
+ }, w = () => {
1875
+ ut.confirm("确定要复位吗?", "提示", {
1879
1876
  confirmButtonText: "确定",
1880
1877
  cancelButtonText: "取消",
1881
1878
  type: "warning"
1882
1879
  }).then(() => {
1883
- Yt(t.value.table.user, d.name).then((E) => {
1884
- console.log(E), window.location.reload();
1885
- }).catch((E) => {
1886
- console.error("复位操作出错:", E), _e({
1880
+ Gt(e.value.table.user, c.name).then((g) => {
1881
+ console.log(g), window.location.reload();
1882
+ }).catch((g) => {
1883
+ console.error("复位操作出错:", g), we({
1887
1884
  type: "info",
1888
1885
  message: "复位失败!"
1889
1886
  });
1890
1887
  });
1891
1888
  });
1892
1889
  };
1893
- return Ae(async () => {
1894
- e.value = Object.entries(t.value).filter(([, E]) => E.visible !== !1).filter(([, E]) => E.type != "hidden").map(([E, M]) => ({
1895
- label: M.label,
1896
- value: E,
1897
- alwaysShow: M.alwaysShow,
1898
- showCol: M.showCol !== !1,
1899
- sort: M.sort || 0,
1900
- width: M.width || "auto"
1901
- })).sort((E, M) => E.sort - M.sort), m();
1902
- }), (E, M) => {
1903
- const P = U("el-divider"), ce = U("el-alert"), F = U("el-checkbox");
1904
- return s(), L("div", null, [
1905
- z("div", Xt, [
1906
- z("a", { onClick: w }, "全选"),
1907
- te(P, { direction: "vertical" }),
1908
- z("a", { onClick: R }, "全不选"),
1909
- te(P, { direction: "vertical" }),
1910
- z("a", { onClick: D }, "复位")
1890
+ return Ie(async () => {
1891
+ t.value = Object.entries(e.value).filter(([, g]) => g.visible !== !1).filter(([, g]) => g.type != "hidden").map(([g, T]) => ({
1892
+ label: T.label,
1893
+ value: g,
1894
+ alwaysShow: T.alwaysShow,
1895
+ showCol: T.showCol !== !1,
1896
+ sort: T.sort || 0,
1897
+ width: T.width || "auto"
1898
+ })).sort((g, T) => g.sort - T.sort), p();
1899
+ }), (g, T) => {
1900
+ const Y = j("el-divider"), q = j("el-alert"), y = j("el-checkbox");
1901
+ return i(), I("div", null, [
1902
+ Q("div", Xt, [
1903
+ Q("a", { onClick: $ }, "全选"),
1904
+ J(Y, { direction: "vertical" }),
1905
+ Q("a", { onClick: N }, "全不选"),
1906
+ J(Y, { direction: "vertical" }),
1907
+ Q("a", { onClick: w }, "复位")
1911
1908
  ]),
1912
- te(ce, {
1909
+ J(q, {
1913
1910
  title: "拖动表格列标题可以改变表格列显示顺序 !",
1914
1911
  type: "warning",
1915
1912
  "show-icon": "",
1916
1913
  closable: !1,
1917
1914
  style: { "margin-bottom": "10px" }
1918
1915
  }),
1919
- z("div", null, [
1920
- z("div", Kt, [
1921
- (s(!0), L(X, null, B(e.value, (i) => (s(), V(F, {
1922
- modelValue: i.showCol,
1923
- "onUpdate:modelValue": (x) => i.showCol = x,
1924
- "data-id": i.value,
1925
- class: dt(["check-box-hover", i.value == "control" ? "filtered" : ""]),
1926
- onChange: (x) => n(x, i.value),
1916
+ Q("div", null, [
1917
+ Q("div", Jt, [
1918
+ (i(!0), I(G, null, A(t.value, (_) => (i(), C(y, {
1919
+ modelValue: _.showCol,
1920
+ "onUpdate:modelValue": (F) => _.showCol = F,
1921
+ "data-id": _.value,
1922
+ class: dt(["check-box-hover", _.value == "control" ? "filtered" : ""]),
1923
+ onChange: (F) => n(F, _.value),
1927
1924
  style: { width: "125px !important", height: "30px !important", border: "1px solid #dfe6ec", margin: "5px !important", "border-radius": "2px !important", "padding-left": "5px !important", display: "flex !important", "align-items": "center !important" },
1928
- value: i.value,
1929
- title: i.label,
1930
- disabled: i.alwaysShow,
1931
- key: i.value
1925
+ value: _.value,
1926
+ title: _.label,
1927
+ disabled: _.alwaysShow,
1928
+ key: _.value
1932
1929
  }, {
1933
- default: p(() => [
1934
- z("span", {
1935
- textContent: he(i.label),
1930
+ default: v(() => [
1931
+ Q("span", {
1932
+ textContent: ve(_.label),
1936
1933
  style: { display: "block", "text-overflow": "ellipsis", width: "95px", overflow: "hidden" }
1937
- }, null, 8, Jt)
1934
+ }, null, 8, Zt)
1938
1935
  ]),
1939
1936
  _: 2
1940
1937
  }, 1032, ["modelValue", "onUpdate:modelValue", "data-id", "class", "onChange", "value", "title", "disabled"]))), 128))
@@ -1943,28 +1940,28 @@ const Xt = {
1943
1940
  ]);
1944
1941
  };
1945
1942
  }
1946
- }, el = /* @__PURE__ */ Be(Zt, [["__scopeId", "data-v-c423ede0"]]), tl = { class: "g-table-container" }, ll = {
1943
+ }, tl = /* @__PURE__ */ Ue(el, [["__scopeId", "data-v-c423ede0"]]), ll = { class: "g-table-container" }, ol = {
1947
1944
  key: 0,
1948
1945
  class: "table-query-container"
1949
- }, ol = { class: "table-container" }, al = ["innerHTML"], rl = ["src"], ul = { style: { display: "flex", "margin-top": "-2px" } }, nl = { style: { display: "flex", flex: "1" } }, sl = {
1946
+ }, rl = { class: "table-container" }, al = ["innerHTML"], ul = ["src"], nl = { key: 0 }, sl = { style: { display: "flex", "margin-top": "-2px" } }, il = { style: { display: "flex", flex: "1" } }, dl = {
1950
1947
  style: { display: "flex", "justify-content": "center", width: "100%", height: "100%" },
1951
1948
  id: "table-form"
1952
- }, il = { style: { display: "flex" } }, dl = { style: { display: "flex", flex: "1" } }, cl = /* @__PURE__ */ Object.assign({
1949
+ }, cl = { key: 1 }, fl = { style: { display: "flex" } }, ml = { style: { display: "flex", flex: "1" } }, pl = /* @__PURE__ */ Object.assign({
1953
1950
  name: "g-table",
1954
1951
  inheritAttrs: !1
1955
1952
  }, {
1956
1953
  __name: "g-table",
1957
- props: /* @__PURE__ */ Fe({
1954
+ props: /* @__PURE__ */ Te({
1958
1955
  name: String,
1959
1956
  require: !0
1960
1957
  }, {
1961
1958
  modelValue: { required: !0 },
1962
1959
  modelModifiers: {}
1963
1960
  }),
1964
- emits: /* @__PURE__ */ Fe(["load", "open", "delete", "submit", "reset", "download"], ["update:modelValue"]),
1965
- setup(f, { emit: d }) {
1966
- var T, j, W, ae, ne, u, I;
1967
- const e = d, t = Te(f, "modelValue"), n = Ke("options"), m = ye({}), w = ye(!1), R = ["type", "index", "label", "column-key", "prop", "width", "min-width", "fixed", "render-header", "sortable", "sort-method", "sort-by", "sort-orders", "resizable", "formatter", "show-overflow-tooltip", "align", "header-align", "class-name", "label-class-name", "selectable", "reserve-selection", "filters", "filter-placement", "filter-class-name", "filter-multiple", "filter-method", "filtered-value"], D = ye([]), E = f, M = {
1961
+ emits: /* @__PURE__ */ Te(["load", "open", "delete", "submit", "reset", "download"], ["update:modelValue"]),
1962
+ setup(m, { emit: c }) {
1963
+ var k, U, H, oe, s, z, W;
1964
+ const t = c, e = qe(m, "modelValue"), n = Je("options"), p = ye({}), $ = ye(!1), N = ["type", "index", "label", "column-key", "prop", "width", "min-width", "fixed", "render-header", "sortable", "sort-method", "sort-by", "sort-orders", "resizable", "formatter", "show-overflow-tooltip", "align", "header-align", "class-name", "label-class-name", "selectable", "reserve-selection", "filters", "filter-placement", "filter-class-name", "filter-multiple", "filter-method", "filtered-value"], w = ye([]), g = m, T = {
1968
1965
  data: [],
1969
1966
  border: !0,
1970
1967
  stripe: !0,
@@ -1972,29 +1969,29 @@ const Xt = {
1972
1969
  fit: !1,
1973
1970
  type: "hidden",
1974
1971
  load: () => {
1975
- let { currentPage: l, pageSize: a } = t.value.table.page;
1972
+ let { currentPage: l, pageSize: a } = e.value.table.page;
1976
1973
  try {
1977
- e("load", { currentPage: l, pageSize: a, ...m.value }, (g, A) => {
1978
- if (!Array.isArray(g)) {
1979
- console.error("从 load 事件回调中接收到的数据不是数组格式。"), _e.error("数据加载失败,请检查数据格式。");
1974
+ t("load", { currentPage: l, pageSize: a, ...p.value }, (h, B) => {
1975
+ if (!Array.isArray(h)) {
1976
+ console.error("从 load 事件回调中接收到的数据不是数组格式。"), we.error("数据加载失败,请检查数据格式。");
1980
1977
  return;
1981
1978
  }
1982
- if (typeof A != "number") {
1983
- console.error("从 load 事件回调中接收到的 total 不是数字格式。"), _e.error("数据加载失败,请检查数据格式。");
1979
+ if (typeof B != "number") {
1980
+ console.error("从 load 事件回调中接收到的 total 不是数字格式。"), we.error("数据加载失败,请检查数据格式。");
1984
1981
  return;
1985
1982
  }
1986
- t.value.table.data = g, t.value.table.page.total = A, y();
1983
+ e.value.table.data = h, e.value.table.page.total = B, E();
1987
1984
  });
1988
- } catch (g) {
1989
- console.error("触发 load 事件时出现错误:", g), _e.error("数据加载时出现错误,请稍后重试。");
1985
+ } catch (h) {
1986
+ console.error("触发 load 事件时出现错误:", h), we.error("数据加载时出现错误,请稍后重试。");
1990
1987
  }
1991
1988
  },
1992
- onHeaderDragend: (l, a, g) => {
1993
- var A;
1994
- xe((A = t.value.table) == null ? void 0 : A.user, E.name, g.property, { width: l });
1989
+ onHeaderDragend: (l, a, h) => {
1990
+ var B;
1991
+ Ae((B = e.value.table) == null ? void 0 : B.user, g.name, h.property, { width: l });
1995
1992
  },
1996
- onRowDblclick: (l, a, g) => {
1997
- t.value.table.dblclickType == "edit" ? C(l, a, g, t) : t.value.table.dblclickType == "view" && K(l, a, g, t);
1993
+ onRowDblclick: (l, a, h) => {
1994
+ e.value.table.dblclickType == "edit" ? x(l, a, h, e) : e.value.table.dblclickType == "view" && D(l, a, h, e);
1998
1995
  },
1999
1996
  style: { "min-height": "100px", backgroundColor: "var(--el-bg-color)" },
2000
1997
  page: {
@@ -2013,17 +2010,17 @@ const Xt = {
2013
2010
  },
2014
2011
  dblclickType: "edit"
2015
2012
  };
2016
- t.value.table = we(
2017
- M,
2013
+ e.value.table = $e(
2014
+ T,
2018
2015
  n == null ? void 0 : n.table,
2019
- t.value.table
2016
+ e.value.table
2020
2017
  );
2021
- const P = {
2018
+ const Y = {
2022
2019
  type: "control",
2023
2020
  label: "操作",
2024
2021
  width: 250,
2025
2022
  fixed: "right",
2026
- style: { ...(j = (T = t.value) == null ? void 0 : T.control) == null ? void 0 : j.style },
2023
+ style: { ...(U = (k = e.value) == null ? void 0 : k.control) == null ? void 0 : U.style },
2027
2024
  add: {
2028
2025
  label: "新增",
2029
2026
  text: !1,
@@ -2036,20 +2033,20 @@ const Xt = {
2036
2033
  text: !0,
2037
2034
  type: "success",
2038
2035
  mode: "dialog",
2039
- auth: (l, a, g) => !1
2036
+ auth: (l, a, h) => !1
2040
2037
  },
2041
2038
  edit: {
2042
2039
  label: "编辑",
2043
2040
  text: !0,
2044
2041
  type: "primary",
2045
2042
  mode: "dialog",
2046
- auth: (l, a, g) => !0
2043
+ auth: (l, a, h) => !0
2047
2044
  },
2048
2045
  delete: {
2049
2046
  text: !0,
2050
2047
  label: "删除",
2051
2048
  type: "danger",
2052
- auth: (l, a, g) => !0,
2049
+ auth: (l, a, h) => !0,
2053
2050
  dialog: {
2054
2051
  message: "此操作将永久删除该文件, 是否继续?",
2055
2052
  title: "提示",
@@ -2072,46 +2069,46 @@ const Xt = {
2072
2069
  auth: () => !0
2073
2070
  }
2074
2071
  };
2075
- t.value.control = we(
2076
- P,
2072
+ e.value.control = $e(
2073
+ Y,
2077
2074
  n == null ? void 0 : n.control,
2078
- (W = t.value) == null ? void 0 : W.control
2075
+ (H = e.value) == null ? void 0 : H.control
2079
2076
  );
2080
- const ce = {
2077
+ const q = {
2081
2078
  type: "hidden",
2082
2079
  minWidth: 120,
2083
2080
  align: "center",
2084
- formatter: (l, a, g, A) => g
2081
+ formatter: (l, a, h, B) => h
2085
2082
  };
2086
- t.value.tableColumns = we(
2087
- ce,
2083
+ e.value.tableColumns = $e(
2084
+ q,
2088
2085
  n == null ? void 0 : n.tableColumns,
2089
- (ae = t.value) == null ? void 0 : ae.tableColumns
2086
+ (oe = e.value) == null ? void 0 : oe.tableColumns
2090
2087
  );
2091
- const F = {
2088
+ const y = {
2092
2089
  type: "hidden",
2093
2090
  disabled: void 0,
2094
2091
  footer: { hidden: !1 },
2095
2092
  modalState: void 0
2096
2093
  };
2097
- t.value.form = we(
2098
- F,
2094
+ e.value.form = $e(
2095
+ y,
2099
2096
  n == null ? void 0 : n.form,
2100
- (ne = t.value) == null ? void 0 : ne.form
2097
+ (s = e.value) == null ? void 0 : s.form
2101
2098
  );
2102
- const i = {
2099
+ const _ = {
2103
2100
  type: "hidden",
2104
2101
  labelPosition: "right",
2105
2102
  style: {
2106
2103
  width: "100%"
2107
2104
  }
2108
2105
  };
2109
- t.value.formItems = we(
2110
- i,
2106
+ e.value.formItems = $e(
2107
+ _,
2111
2108
  n == null ? void 0 : n.formItems,
2112
- (u = t == null ? void 0 : t.value) == null ? void 0 : u.formItems
2109
+ (z = e == null ? void 0 : e.value) == null ? void 0 : z.formItems
2113
2110
  );
2114
- const x = {
2111
+ const F = {
2115
2112
  title: "编辑",
2116
2113
  mode: "drawer",
2117
2114
  type: "hidden",
@@ -2119,246 +2116,246 @@ const Xt = {
2119
2116
  size: 700,
2120
2117
  fullScreen: !1
2121
2118
  };
2122
- t.value.dialog = we(
2123
- x,
2119
+ e.value.dialog = $e(
2120
+ F,
2124
2121
  n == null ? void 0 : n.dialog,
2125
- (I = t.value) == null ? void 0 : I.dialog
2122
+ (W = e.value) == null ? void 0 : W.dialog
2126
2123
  );
2127
- const le = Object.fromEntries(Object.entries(Ee(t.value, (l, a) => a.type != "control" && a.editor !== !1 && a.type != "hidden")).map(([l, a]) => [l, a.value])), ie = (l, a) => {
2128
- let g = a;
2129
- if (l.decimals && !isNaN(a) && (typeof l.decimals == "number" ? g = parseFloat(g).toFixed(l.decimals) : typeof l.decimals == "object" && l.decimals.num && (l.decimals.pad ? g = parseFloat(g).toFixed(l.decimals.num) : g = parseFloat(parseFloat(g).toFixed(l.decimals.num)).toString())), ["date", "datetime", "time", "time-select"].includes(l.type) && Pe(a).isValid()) {
2130
- const Y = {
2124
+ const re = Object.fromEntries(Object.entries(_e(e.value, (l, a) => a.type != "control" && a.editor !== !1 && a.type != "hidden")).map(([l, a]) => [l, a.value])), ue = (l, a) => {
2125
+ let h = a;
2126
+ if (l.decimals && !isNaN(a) && (typeof l.decimals == "number" ? h = parseFloat(h).toFixed(l.decimals) : typeof l.decimals == "object" && l.decimals.num && (l.decimals.pad ? h = parseFloat(h).toFixed(l.decimals.num) : h = parseFloat(parseFloat(h).toFixed(l.decimals.num)).toString())), ["date", "datetime", "time", "time-select"].includes(l.type) && Ye(a).isValid()) {
2127
+ const X = {
2131
2128
  date: "YYYY-MM-DD",
2132
2129
  datetime: "YYYY-MM-DD HH:mm:ss",
2133
2130
  time: "HH:mm:ss"
2134
2131
  };
2135
- g = l.format ? Pe(g).format(l.format) : Pe(g).format(Y[l.type]);
2132
+ h = l.format ? Ye(h).format(l.format) : Ye(h).format(X[l.type]);
2136
2133
  }
2137
- return l.type === "money" && (l.align = l.align || "right", l.width = l.width || 130, g = `<span title="${Xe(parseFloat(g))}">${El(parseFloat(g))}</span>`), l.prefix && g && (g = `<span>${l.prefix}${g}</span>`), l.suffix && g && (g = `${g}<span>${l.suffix}</span>`), g;
2138
- }, h = (l) => {
2139
- m.value = l.value;
2140
- }, S = (l) => {
2141
- console.log(l), m.value = l, t.value.table.load();
2142
- }, G = (l) => {
2134
+ return l.type === "money" && (l.align = l.align || "right", l.width = l.width || 130, h = `<span title="${Xe(parseFloat(h))}">${kl(parseFloat(h))}</span>`), l.prefix && h && (h = `<span>${l.prefix}${h}</span>`), l.suffix && h && (h = `${h}<span>${l.suffix}</span>`), h;
2135
+ }, fe = (l) => {
2136
+ p.value = l.value;
2137
+ }, me = (l) => {
2138
+ console.log(l), p.value = l, e.value.table.load();
2139
+ }, d = (l) => {
2143
2140
  var a;
2144
- t.value.form.modalState = "add", (a = t.value.control.add) != null && a.click ? t.value.control.add.click(l) : (t.value.form.disabled = !1, t.value.dialog.mode = t.value.control.add.mode, t.value.dialog.title = t.value.control.add.label, Object.keys(le).forEach((g) => {
2145
- t.value[g] && (t.value[g].value = le[g]);
2146
- }), w.value = !0, e("open", l, "add"));
2147
- }, C = (l, a, g, A) => {
2148
- var Y;
2149
- t.value.form.modalState = "edit", (Y = t.value.control.edit) != null && Y.click ? t.value.control.edit.click(l, a, g, A) : (t.value.form.disabled = !1, t.value.dialog.mode = t.value.control.edit.mode, t.value.dialog.title = t.value.control.edit.label, Object.keys(l).forEach((Z) => {
2150
- t.value[Z] && (t.value[Z].value = l[Z]);
2151
- }), w.value = !0, e("open", A, "edit", l, a, g));
2152
- }, re = (l, a, g, A) => {
2153
- var Y;
2154
- if ((Y = t.value.control.delete) != null && Y.click)
2155
- t.value.control.delete.click(l, a, g, A);
2141
+ e.value.form.modalState = "add", (a = e.value.control.add) != null && a.click ? e.value.control.add.click(l) : (e.value.form.disabled = !1, e.value.dialog.mode = e.value.control.add.mode, e.value.dialog.title = e.value.control.add.label, Object.keys(re).forEach((h) => {
2142
+ e.value[h] && (e.value[h].value = re[h]);
2143
+ }), $.value = !0, t("open", l, "add"));
2144
+ }, x = (l, a, h, B) => {
2145
+ var X;
2146
+ e.value.form.modalState = "edit", (X = e.value.control.edit) != null && X.click ? e.value.control.edit.click(l, a, h, B) : (e.value.form.disabled = !1, e.value.dialog.mode = e.value.control.edit.mode, e.value.dialog.title = e.value.control.edit.label, Object.keys(l).forEach((te) => {
2147
+ e.value[te] && (e.value[te].value = l[te]);
2148
+ }), $.value = !0, t("open", B, "edit", l, a, h));
2149
+ }, ee = (l, a, h, B) => {
2150
+ var X;
2151
+ if ((X = e.value.control.delete) != null && X.click)
2152
+ e.value.control.delete.click(l, a, h, B);
2156
2153
  else {
2157
- let { message: Z, title: ge, options: Ve } = t.value.control.delete.dialog;
2158
- st.confirm(Z, ge, Ve).then(() => {
2159
- e("delete", { row: l, column: a, $index: g }, (Ue) => {
2160
- Ue && (t.value.table.data.splice(g, 1), t.value.table.page.total--);
2154
+ let { message: te, title: he, options: Ve } = e.value.control.delete.dialog;
2155
+ ut.confirm(te, he, Ve).then(() => {
2156
+ t("delete", { row: l, column: a, $index: h }, (Re) => {
2157
+ Re && (e.value.table.data.splice(h, 1), e.value.table.page.total--);
2161
2158
  });
2162
2159
  }).catch(() => {
2163
2160
  });
2164
2161
  }
2165
- }, K = (l, a, g, A) => {
2166
- var Y;
2167
- t.value.form.modalState = void 0, (Y = t.value.control.view) != null && Y.click ? t.value.control.view.click(l, a, g, A) : (t.value.form.disabled = !0, t.value.dialog.mode = t.value.control.view.mode, t.value.dialog.title = t.value.control.view.label, Object.keys(l).forEach((Z) => {
2168
- t.value[Z] && (t.value[Z].value = l[Z]);
2169
- }), w.value = !0, e("open", A, "view", l, a, g));
2170
- }, oe = (l, a) => {
2171
- e("submit", t.value.form.modalState, l, a, (g) => {
2172
- g && (w.value = !1, a.table.load());
2162
+ }, D = (l, a, h, B) => {
2163
+ var X;
2164
+ e.value.form.modalState = void 0, (X = e.value.control.view) != null && X.click ? e.value.control.view.click(l, a, h, B) : (e.value.form.disabled = !0, e.value.dialog.mode = e.value.control.view.mode, e.value.dialog.title = e.value.control.view.label, Object.keys(l).forEach((te) => {
2165
+ e.value[te] && (e.value[te].value = l[te]);
2166
+ }), $.value = !0, t("open", B, "view", l, a, h));
2167
+ }, ne = (l, a) => {
2168
+ t("submit", e.value.form.modalState, l, a, (h) => {
2169
+ h && ($.value = !1, a.table.load());
2173
2170
  });
2174
- }, J = (l) => {
2175
- e("reset", l);
2176
- }, Q = (l, a) => {
2177
- var g;
2178
- if ((g = l.control.download) != null && g.click)
2171
+ }, R = (l) => {
2172
+ t("reset", l);
2173
+ }, P = (l, a) => {
2174
+ var h;
2175
+ if ((h = l.control.download) != null && h.click)
2179
2176
  l.control.download.click(l, a);
2180
2177
  else {
2181
- let A = Qe({
2178
+ let B = Qe({
2182
2179
  title: l.control.download.label,
2183
2180
  size: 480,
2184
2181
  width: 600,
2185
2182
  slots: {
2186
- default: () => ke(Ht, {
2183
+ default: () => ke(Wt, {
2187
2184
  items: a,
2188
2185
  commitText: l.control.download.excelLabel,
2189
- onExcel: (Y, Z) => {
2190
- e("download", Y, Z), A();
2186
+ onExcel: (X, te) => {
2187
+ t("download", X, te), B();
2191
2188
  }
2192
2189
  })
2193
2190
  }
2194
2191
  }, l.control.download.mode);
2195
2192
  }
2196
- }, k = (l) => {
2193
+ }, K = (l) => {
2197
2194
  var a;
2198
2195
  (a = l.control.setting) != null && a.click ? l.control.setting.click(l) : Qe({
2199
2196
  title: l.control.setting.label,
2200
2197
  size: 470,
2201
2198
  width: 600,
2202
2199
  slots: {
2203
- default: () => ke(el, {
2200
+ default: () => ke(tl, {
2204
2201
  modelValue: l,
2205
- name: E.name
2202
+ name: g.name
2206
2203
  })
2207
2204
  }
2208
2205
  }, l.control.setting.mode);
2209
- }, N = t.value.control, ue = [
2210
- { type: "add", func: G },
2211
- { type: "download", func: Q },
2212
- { type: "setting", func: k },
2213
- { type: "view", func: K },
2214
- { type: "edit", func: C },
2215
- { type: "delete", func: re }
2216
- ], r = (l) => ue.filter((a) => l.includes(a.type)).map(({ type: a, func: g }) => {
2217
- var A, Y, Z;
2206
+ }, le = e.value.control, ge = [
2207
+ { type: "add", func: d },
2208
+ { type: "download", func: P },
2209
+ { type: "setting", func: K },
2210
+ { type: "view", func: D },
2211
+ { type: "edit", func: x },
2212
+ { type: "delete", func: ee }
2213
+ ], O = (l) => ge.filter((a) => l.includes(a.type)).map(({ type: a, func: h }) => {
2214
+ var B, X, te;
2218
2215
  return {
2219
2216
  name: `control-${a}`,
2220
- attr: N == null ? void 0 : N[a],
2221
- func: g,
2222
- label: (A = N == null ? void 0 : N[a]) == null ? void 0 : A.label,
2223
- sort: ((Y = N == null ? void 0 : N[a]) == null ? void 0 : Y.sort) || 0,
2224
- groupName: ((Z = N == null ? void 0 : N[a]) == null ? void 0 : Z.groupName) || "default"
2217
+ attr: le == null ? void 0 : le[a],
2218
+ func: h,
2219
+ label: (B = le == null ? void 0 : le[a]) == null ? void 0 : B.label,
2220
+ sort: ((X = le == null ? void 0 : le[a]) == null ? void 0 : X.sort) || 0,
2221
+ groupName: ((te = le == null ? void 0 : le[a]) == null ? void 0 : te.groupName) || "default"
2225
2222
  };
2226
- }).sort((a, g) => a.sort - g.sort), b = (l) => r(l).reduce((a, g) => {
2227
- const A = g.groupName || "default";
2228
- return a[A] || (a[A] = []), a[A].push(g), a;
2229
- }, {}), c = Oe(() => Object.fromEntries(
2230
- Object.entries(t.value).filter(([l, a]) => a.type !== "hidden").filter(([l, a]) => a.visible !== !1).filter(([l, a]) => a.showCol !== !1).map(([l, a]) => (a.sort = typeof a.sort == "number" ? a.sort : 0, [l, a])).sort((l, a) => l[1].sort - a[1].sort)
2231
- )), _ = ye({}), $ = (l, a) => {
2232
- const g = (A, Y) => {
2233
- for (const Z of A) {
2234
- if (Z.value == Y) return Z.label;
2235
- if (Z.children) {
2236
- const ge = g(Z.children, Y);
2237
- if (ge) return ge;
2223
+ }).sort((a, h) => a.sort - h.sort), u = (l) => O(l).reduce((a, h) => {
2224
+ const B = h.groupName || "default";
2225
+ return a[B] || (a[B] = []), a[B].push(h), a;
2226
+ }, {}), r = Oe(() => Object.fromEntries(
2227
+ Object.entries(e.value).filter(([l, a]) => a.type !== "hidden").filter(([l, a]) => a.visible !== !1).filter(([l, a]) => a.showCol !== !1).map(([l, a]) => (a.sort = typeof a.sort == "number" ? a.sort : 0, [l, a])).sort((l, a) => l[1].sort - a[1].sort)
2228
+ )), V = ye({}), b = (l, a) => {
2229
+ const h = (B, X) => {
2230
+ for (const te of B) {
2231
+ if (te.value == X) return te.label;
2232
+ if (te.children) {
2233
+ const he = h(te.children, X);
2234
+ if (he) return he;
2238
2235
  }
2239
2236
  }
2240
2237
  return null;
2241
2238
  };
2242
2239
  if (l.getDicts) {
2243
- const A = a.toString();
2244
- return _.value[A] ? (l.options = _.value[A], l.formatter || (l.formatter = (Y, Z, ge, Ve) => l.options && g(l.options, ge) || ge), Promise.resolve()) : l.getDicts(l, t.value).then((Y) => {
2245
- _.value[A] = Y, l.options = Y, l.formatter || (l.formatter = (Z, ge, Ve, Ue) => l.options && g(l.options, Ve) || Ve);
2240
+ const B = a.toString();
2241
+ return V.value[B] ? (l.options = V.value[B], l.formatter || (l.formatter = (X, te, he, Ve) => l.options && h(l.options, he) || he), Promise.resolve()) : l.getDicts(e.value.table.data, e.value).then((X) => {
2242
+ V.value[B] = X, l.options = X, l.formatter || (l.formatter = (te, he, Ve, Re) => l.options && h(l.options, Ve) || Ve);
2246
2243
  });
2247
2244
  }
2248
2245
  return Promise.resolve();
2249
- }, y = () => {
2246
+ }, E = () => {
2250
2247
  const l = [];
2251
- Object.keys(t.value).forEach((a) => {
2252
- if (t.value[a].getDicts) {
2253
- const g = $(t.value[a], a).then(() => {
2254
- t.value.table.data.forEach((A) => {
2255
- var Y;
2256
- if (t.value[a].getDicts && ((Y = t.value[a]) == null ? void 0 : Y.forceString) !== !1) {
2257
- const Z = A[a];
2258
- A[a] = Z != null ? Z.toString() : Z;
2248
+ Object.keys(e.value).forEach((a) => {
2249
+ if (e.value[a].getDicts) {
2250
+ const h = b(e.value[a], a).then(() => {
2251
+ e.value.table.data.forEach((B) => {
2252
+ var X;
2253
+ if (e.value[a].getDicts && ((X = e.value[a]) == null ? void 0 : X.forceString) !== !1) {
2254
+ const te = B[a];
2255
+ B[a] = te != null ? te.toString() : te;
2259
2256
  }
2260
2257
  });
2261
- }).catch((A) => {
2262
- console.error(`加载字典${a}出错:`, A);
2258
+ }).catch((B) => {
2259
+ console.error(`加载字典${a}出错:`, B);
2263
2260
  });
2264
- l.push(g);
2261
+ l.push(h);
2265
2262
  }
2266
2263
  }), Promise.all(l).catch((a) => {
2267
2264
  console.error("字典加载过程中发生错误:", a);
2268
2265
  });
2269
2266
  };
2270
- return Et(() => {
2271
- t.value.table.load();
2272
- }), Ae(async () => {
2267
+ return wt(() => {
2268
+ e.value.table.load();
2269
+ }), Ie(async () => {
2273
2270
  var l;
2274
- if (D.value = Object.values(t.value).filter((a) => a.type !== "hidden").filter((a) => a.type !== "control").filter((a) => a.visible !== !1).map((a) => ({ key: a.key || "", label: a.label, value: !0 })), !((l = t.value.table) != null && l.user)) {
2275
- _e.error("必须给使用此表格的用户一个名字!");
2271
+ if (w.value = Object.values(e.value).filter((a) => a.type !== "hidden").filter((a) => a.type !== "control").filter((a) => a.visible !== !1).map((a) => ({ key: a.key || "", label: a.label, value: !0 })), !((l = e.value.table) != null && l.user)) {
2272
+ we.error("必须给使用此表格的用户一个名字!");
2276
2273
  return;
2277
2274
  }
2278
- if (!E.name) {
2279
- _e.error("必须给表格一个唯一的name属性");
2275
+ if (!g.name) {
2276
+ we.error("必须给表格一个唯一的name属性");
2280
2277
  return;
2281
2278
  }
2282
2279
  try {
2283
- let a = await Gt(E.name);
2280
+ let a = await Kt(g.name);
2284
2281
  if (a) {
2285
- if (E.name !== a.name) {
2286
- _e.error("此表格已经存在,请换一个名字!");
2282
+ if (g.name !== a.name) {
2283
+ we.error("此表格已经存在,请换一个名字!");
2287
2284
  return;
2288
2285
  }
2289
2286
  } else
2290
- await Qt({ name: E.name });
2287
+ await Qt({ name: g.name });
2291
2288
  } catch (a) {
2292
- console.error("检查表格名称时出现错误:", a), _e.error("检查表格名称时出现错误,请稍后重试。");
2289
+ console.error("检查表格名称时出现错误:", a), we.error("检查表格名称时出现错误,请稍后重试。");
2293
2290
  }
2294
2291
  try {
2295
- const a = await Wt(t.value.table.user, E.name);
2296
- a && a.forEach((g) => {
2297
- t.value[g.key] && (t.value[g.key].width = g.width, t.value[g.key].showCol = g.showCol, t.value[g.key].sort = g.sort);
2292
+ const a = await Yt(e.value.table.user, g.name);
2293
+ a && a.forEach((h) => {
2294
+ e.value[h.key] && (e.value[h.key].width = h.width, e.value[h.key].showCol = h.showCol, e.value[h.key].sort = h.sort);
2298
2295
  });
2299
2296
  } catch (a) {
2300
2297
  console.error("Error fetching table column settings:", a);
2301
2298
  }
2302
2299
  }), (l, a) => {
2303
- var Je, Ze, et, tt, lt;
2304
- const g = U("el-button-group"), A = U("el-table-column"), Y = U("el-table"), Z = U("el-pagination"), ge = U("el-icon"), Ve = U("el-dialog"), Ue = U("el-drawer");
2305
- return s(), L(X, null, [
2306
- z("div", tl, [
2307
- ((Ze = (Je = t.value) == null ? void 0 : Je.query) == null ? void 0 : Ze.hidden) != !0 ? (s(), L("div", ll, [
2308
- v(l.$slots, "query", {}, () => [
2309
- te(Ut, {
2310
- modelValue: t.value,
2311
- "onUpdate:modelValue": a[0] || (a[0] = (H) => t.value = H),
2312
- onQuery: S,
2313
- onReset: h
2314
- }, se({
2315
- "q-btns": p(() => [
2316
- v(l.$slots, "q-btns", {}, () => [
2317
- (s(!0), L(X, null, B(b(["add", "download", "setting"]), (H, fe) => (s(), L(X, null, [
2318
- fe == "default" ? (s(!0), L(X, { key: 0 }, B(H, (O) => (s(), L(X, null, [
2319
- v(l.$slots, O.name + "-left", {}, void 0, !0),
2320
- O.attr.auth() ? v(l.$slots, O.name, { key: 0 }, () => [
2321
- O.label ? (s(), V(o($e), q({
2300
+ var Ze, et, tt, lt, ot;
2301
+ const h = j("el-button-group"), B = j("el-table-column"), X = j("el-table"), te = j("el-pagination"), he = j("el-icon"), Ve = j("el-dialog"), Re = j("el-drawer");
2302
+ return i(), I(G, null, [
2303
+ Q("div", ll, [
2304
+ ((et = (Ze = e.value) == null ? void 0 : Ze.query) == null ? void 0 : et.hidden) != !0 ? (i(), I("div", ol, [
2305
+ f(l.$slots, "query", {}, () => [
2306
+ J(Ut, {
2307
+ modelValue: e.value,
2308
+ "onUpdate:modelValue": a[0] || (a[0] = (L) => e.value = L),
2309
+ onQuery: me,
2310
+ onReset: fe
2311
+ }, ae({
2312
+ "q-btns": v(() => [
2313
+ f(l.$slots, "q-btns", {}, () => [
2314
+ (i(!0), I(G, null, A(u(["add", "download", "setting"]), (L, se) => (i(), I(G, null, [
2315
+ se == "default" ? (i(!0), I(G, { key: 0 }, A(L, (S) => (i(), I(G, null, [
2316
+ f(l.$slots, S.name + "-left", {}, void 0, !0),
2317
+ S.attr.auth() ? f(l.$slots, S.name, { key: 0 }, () => [
2318
+ S.label ? (i(), C(o(be), M({
2322
2319
  key: 0,
2323
2320
  ref_for: !0
2324
- }, O.attr, {
2325
- onClick: (ee) => O.func(t.value, D.value)
2321
+ }, S.attr, {
2322
+ onClick: (Z) => S.func(e.value, w.value)
2326
2323
  }), {
2327
- default: p(() => [
2328
- be(he(O.label), 1)
2324
+ default: v(() => [
2325
+ Ee(ve(S.label), 1)
2329
2326
  ]),
2330
2327
  _: 2
2331
- }, 1040, ["onClick"])) : (s(), V(o($e), q({
2328
+ }, 1040, ["onClick"])) : (i(), C(o(be), M({
2332
2329
  key: 1,
2333
2330
  ref_for: !0
2334
- }, O.attr, {
2335
- onClick: (ee) => O.func(t.value, D.value)
2331
+ }, S.attr, {
2332
+ onClick: (Z) => S.func(e.value, w.value)
2336
2333
  }), null, 16, ["onClick"]))
2337
- ], !0) : ve("", !0),
2338
- v(l.$slots, O.name + "-right", {}, void 0, !0)
2339
- ], 64))), 256)) : (s(), V(g, { key: 1 }, {
2340
- default: p(() => [
2341
- (s(!0), L(X, null, B(H, (O) => (s(), L(X, null, [
2342
- v(l.$slots, O.name + "-left", {}, void 0, !0),
2343
- O.attr.auth() ? v(l.$slots, O.name, { key: 0 }, () => [
2344
- O.label ? (s(), V(o($e), q({
2334
+ ], !0) : pe("", !0),
2335
+ f(l.$slots, S.name + "-right", {}, void 0, !0)
2336
+ ], 64))), 256)) : (i(), C(h, { key: 1 }, {
2337
+ default: v(() => [
2338
+ (i(!0), I(G, null, A(L, (S) => (i(), I(G, null, [
2339
+ f(l.$slots, S.name + "-left", {}, void 0, !0),
2340
+ S.attr.auth() ? f(l.$slots, S.name, { key: 0 }, () => [
2341
+ S.label ? (i(), C(o(be), M({
2345
2342
  key: 0,
2346
2343
  ref_for: !0
2347
- }, O.attr, {
2348
- onClick: (ee) => O.func(t.value, D.value)
2344
+ }, S.attr, {
2345
+ onClick: (Z) => S.func(e.value, w.value)
2349
2346
  }), {
2350
- default: p(() => [
2351
- be(he(O.label), 1)
2347
+ default: v(() => [
2348
+ Ee(ve(S.label), 1)
2352
2349
  ]),
2353
2350
  _: 2
2354
- }, 1040, ["onClick"])) : (s(), V(o($e), q({
2351
+ }, 1040, ["onClick"])) : (i(), C(o(be), M({
2355
2352
  key: 1,
2356
2353
  ref_for: !0
2357
- }, O.attr, {
2358
- onClick: (ee) => O.func(t.value, D.value)
2354
+ }, S.attr, {
2355
+ onClick: (Z) => S.func(e.value, w.value)
2359
2356
  }), null, 16, ["onClick"]))
2360
- ], !0) : ve("", !0),
2361
- v(l.$slots, O.name + "-right", {}, void 0, !0)
2357
+ ], !0) : pe("", !0),
2358
+ f(l.$slots, S.name + "-right", {}, void 0, !0)
2362
2359
  ], 64))), 256))
2363
2360
  ]),
2364
2361
  _: 2
@@ -2368,168 +2365,197 @@ const Xt = {
2368
2365
  ]),
2369
2366
  _: 2
2370
2367
  }, [
2371
- B(l.$slots, (H, fe, O) => ({
2372
- name: fe,
2373
- fn: p((ee) => [
2374
- v(l.$slots, fe, { model: t.value }, void 0, !0)
2368
+ A(l.$slots, (L, se, S) => ({
2369
+ name: se,
2370
+ fn: v((Z) => [
2371
+ f(l.$slots, se, { model: e.value }, void 0, !0)
2375
2372
  ])
2376
2373
  }))
2377
2374
  ]), 1032, ["modelValue"])
2378
2375
  ], !0)
2379
- ])) : ve("", !0),
2380
- z("div", ol, [
2381
- te(Y, Se(ze({ ...l.$attrs, ...o(Ee)(t.value.table, (H) => !["dblclickType", "page"].includes(H)) })), {
2382
- append: p(() => [
2383
- v(l.$slots, "append", {}, void 0, !0)
2376
+ ])) : pe("", !0),
2377
+ Q("div", rl, [
2378
+ J(X, Be(Ge({ ...l.$attrs, ...o(_e)(e.value.table, (L) => !["dblclickType", "page"].includes(L)) })), {
2379
+ append: v(() => [
2380
+ f(l.$slots, "append", {}, void 0, !0)
2384
2381
  ]),
2385
- empty: p(() => [
2386
- v(l.$slots, "empty", {}, void 0, !0)
2382
+ empty: v(() => [
2383
+ f(l.$slots, "empty", {}, void 0, !0)
2387
2384
  ]),
2388
- default: p(() => [
2389
- v(l.$slots, "default", {}, () => [
2390
- (s(!0), L(X, null, B(c.value, (H, fe) => (s(), V(A, q({
2391
- prop: fe,
2392
- key: fe,
2385
+ default: v(() => [
2386
+ f(l.$slots, "default", {}, () => [
2387
+ (i(!0), I(G, null, A(r.value, (L, se) => (i(), C(B, M({
2388
+ prop: se,
2389
+ key: se,
2393
2390
  ref_for: !0
2394
- }, { ...t.value.tableColumns, ...o(Ee)(H, (O) => R.includes(O)) }, { "header-align": "center" }), se({
2395
- header: p(({ column: O, $index: ee }) => [
2396
- v(l.$slots, `${fe}-header`, {
2397
- column: O,
2398
- $index: ee
2391
+ }, { ...e.value.tableColumns, ...o(_e)(L, (S) => N.includes(S)) }, { "header-align": "center" }), ae({
2392
+ header: v(({ column: S, $index: Z }) => [
2393
+ f(l.$slots, `${se}-header`, {
2394
+ column: S,
2395
+ $index: Z
2399
2396
  }, void 0, !0)
2400
2397
  ]),
2401
- "filter-icon": p((O) => [
2402
- v(l.$slots, `${fe}-filter-icon`, { data: O }, void 0, !0)
2398
+ "filter-icon": v((S) => [
2399
+ f(l.$slots, `${se}-filter-icon`, { data: S }, void 0, !0)
2403
2400
  ]),
2404
2401
  _: 2
2405
2402
  }, [
2406
- H.type != "selection" && H.type != "index" && H.type != "expand" ? {
2403
+ L.type != "selection" && L.type != "index" && L.type != "expand" ? {
2407
2404
  name: "default",
2408
- fn: p(({ row: O, column: ee, $index: me }) => [
2409
- v(l.$slots, `${fe}`, {
2410
- row: O,
2411
- column: ee,
2412
- $index: me
2405
+ fn: v(({ row: S, column: Z, $index: de }) => [
2406
+ L.table ? f(l.$slots, `${se}`, {
2407
+ key: 0,
2408
+ row: S,
2409
+ column: Z,
2410
+ $index: de
2413
2411
  }, () => [
2414
- z("div", {
2415
- innerHTML: ie(H, ee.formatter(O, ee, O[fe], me))
2412
+ J(Fe, {
2413
+ modelValue: S[se],
2414
+ "onUpdate:modelValue": (Se) => S[se] = Se,
2415
+ item: L == null ? void 0 : L.table,
2416
+ ctrlKey: se,
2417
+ ctrlType: L.type,
2418
+ model: e.value,
2419
+ class: "g-ctrl-container",
2420
+ t: "t",
2421
+ formInfo: e.value.table.data
2422
+ }, ae({ _: 2 }, [
2423
+ A(l.$slots, (Se, xe) => ({
2424
+ name: xe,
2425
+ fn: v((je) => [
2426
+ f(l.$slots, xe, {
2427
+ data: je,
2428
+ item: L,
2429
+ model: e.value
2430
+ }, void 0, !0)
2431
+ ])
2432
+ }))
2433
+ ]), 1032, ["modelValue", "onUpdate:modelValue", "item", "ctrlKey", "ctrlType", "model", "formInfo"])
2434
+ ], !0) : f(l.$slots, `${se}`, {
2435
+ key: 1,
2436
+ row: S,
2437
+ column: Z,
2438
+ $index: de
2439
+ }, () => [
2440
+ Q("div", {
2441
+ innerHTML: ue(L, Z.formatter(S, Z, S[se], de))
2416
2442
  }, null, 8, al)
2417
2443
  ], !0)
2418
2444
  ]),
2419
2445
  key: "0"
2420
2446
  } : void 0,
2421
- H.type === "image" ? {
2447
+ L.type === "image" ? {
2422
2448
  name: "default",
2423
- fn: p(({ row: O, column: ee, $index: me }) => [
2424
- v(l.$slots, `${fe}`, {
2425
- row: O,
2426
- column: ee,
2427
- $index: me
2449
+ fn: v(({ row: S, column: Z, $index: de }) => [
2450
+ f(l.$slots, `${se}`, {
2451
+ row: S,
2452
+ column: Z,
2453
+ $index: de
2428
2454
  }, () => [
2429
- z("img", q({
2455
+ Q("img", M({
2430
2456
  style: { width: "80px", height: "80px", "object-fit": "cover", "border-radius": "3px" },
2431
- src: H.value,
2457
+ src: L.value,
2432
2458
  ref_for: !0
2433
- }, H), null, 16, rl)
2459
+ }, L), null, 16, ul)
2434
2460
  ], !0)
2435
2461
  ]),
2436
2462
  key: "1"
2437
2463
  } : void 0,
2438
- H.type == "control" ? {
2464
+ L.type == "control" ? {
2439
2465
  name: "default",
2440
- fn: p(({ row: O, column: ee, $index: me }) => {
2441
- var ot, at;
2466
+ fn: v(({ row: S, column: Z, $index: de }) => {
2467
+ var Se, xe;
2442
2468
  return [
2443
- z("div", {
2444
- class: dt(["control", (ot = t.value.control) == null ? void 0 : ot.class]),
2445
- style: Me((at = t.value.control) == null ? void 0 : at.style)
2469
+ Q("div", {
2470
+ class: dt(["control", (Se = e.value.control) == null ? void 0 : Se.class]),
2471
+ style: Me((xe = e.value.control) == null ? void 0 : xe.style)
2446
2472
  }, [
2447
- v(l.$slots, "control", {}, () => [
2448
- v(l.$slots, "control-left", {
2449
- row: O,
2450
- column: ee,
2451
- $index: me
2473
+ f(l.$slots, "control", {}, () => [
2474
+ f(l.$slots, "control-left", {
2475
+ row: S,
2476
+ column: Z,
2477
+ $index: de
2452
2478
  }, void 0, !0),
2453
- (s(!0), L(X, null, B(b(["view", "edit", "delete"]), (rt, vt) => (s(), L(X, null, [
2454
- vt == "default" ? (s(!0), L(X, { key: 0 }, B(rt, (pe) => (s(), L(X, null, [
2455
- v(l.$slots, pe.name + "-left", {
2456
- row: O,
2457
- column: ee,
2458
- $index: me
2479
+ (i(!0), I(G, null, A(u(["view", "edit", "delete"]), (je, vt) => (i(), I(G, null, [
2480
+ vt == "default" ? (i(!0), I(G, { key: 0 }, A(je, (ce) => (i(), I(G, null, [
2481
+ f(l.$slots, ce.name + "-left", {
2482
+ row: S,
2483
+ column: Z,
2484
+ $index: de
2459
2485
  }, void 0, !0),
2460
- pe.attr.auth(O, ee, me) ? v(l.$slots, pe.name, {
2486
+ ce.attr.auth(S, Z, de) ? f(l.$slots, ce.name, {
2461
2487
  key: 0,
2462
- row: O,
2463
- column: ee,
2464
- $index: me
2488
+ row: S,
2489
+ column: Z,
2490
+ $index: de
2465
2491
  }, () => [
2466
- pe.label ? (s(), V(o($e), q({
2492
+ ce.label ? (i(), C(o(be), M({
2467
2493
  key: 0,
2468
2494
  ref_for: !0
2469
- }, pe.attr, {
2470
- onClick: (Le) => pe.func(O, ee, me, t.value)
2495
+ }, ce.attr, {
2496
+ onClick: (He) => ce.func(S, Z, de, e.value)
2471
2497
  }), {
2472
- default: p(() => [
2473
- be(he(pe.label), 1)
2498
+ default: v(() => [
2499
+ Ee(ve(ce.label), 1)
2474
2500
  ]),
2475
2501
  _: 2
2476
- }, 1040, ["onClick"])) : (s(), V(o($e), q({
2502
+ }, 1040, ["onClick"])) : (i(), C(o(be), M({
2477
2503
  key: 1,
2478
2504
  ref_for: !0
2479
- }, pe.attr, {
2480
- onClick: (Le) => pe.func(O, ee, me, t.value)
2505
+ }, ce.attr, {
2506
+ onClick: (He) => ce.func(S, Z, de, e.value)
2481
2507
  }), null, 16, ["onClick"]))
2482
- ], !0) : ve("", !0),
2483
- v(l.$slots, pe.name + "-right", {
2484
- row: O,
2485
- column: ee,
2486
- $index: me
2508
+ ], !0) : pe("", !0),
2509
+ f(l.$slots, ce.name + "-right", {
2510
+ row: S,
2511
+ column: Z,
2512
+ $index: de
2487
2513
  }, void 0, !0)
2488
- ], 64))), 256)) : (s(), V(g, { key: 1 }, {
2489
- default: p(() => [
2490
- (s(!0), L(X, null, B(rt, (pe) => (s(), L(X, null, [
2491
- v(l.$slots, pe.name + "-left", {
2492
- row: O,
2493
- column: ee,
2494
- $index: me
2514
+ ], 64))), 256)) : (i(), C(h, { key: 1 }, {
2515
+ default: v(() => [
2516
+ (i(!0), I(G, null, A(je, (ce) => (i(), I(G, null, [
2517
+ f(l.$slots, ce.name + "-left", {
2518
+ row: S,
2519
+ column: Z,
2520
+ $index: de
2495
2521
  }, void 0, !0),
2496
- pe.attr.auth(O, ee, me) ? v(l.$slots, pe.name, {
2522
+ ce.attr.auth(S, Z, de) ? f(l.$slots, ce.name, {
2497
2523
  key: 0,
2498
- row: O,
2499
- column: ee,
2500
- $index: me
2524
+ row: S,
2525
+ column: Z,
2526
+ $index: de
2501
2527
  }, () => [
2502
- pe.label ? (s(), V(o($e), q({
2528
+ ce.label ? (i(), C(o(be), M({
2503
2529
  key: 0,
2504
2530
  ref_for: !0
2505
- }, pe.attr, {
2506
- onClick: (Le) => pe.func(O, ee, me, t.value)
2531
+ }, ce.attr, {
2532
+ onClick: (He) => ce.func(S, Z, de, e.value)
2507
2533
  }), {
2508
- default: p(() => [
2509
- be(he(pe.label), 1)
2534
+ default: v(() => [
2535
+ Ee(ve(ce.label), 1)
2510
2536
  ]),
2511
2537
  _: 2
2512
- }, 1040, ["onClick"])) : (s(), V(o($e), q({
2538
+ }, 1040, ["onClick"])) : (i(), C(o(be), M({
2513
2539
  key: 1,
2514
2540
  ref_for: !0
2515
- }, pe.attr, {
2516
- onClick: (Le) => pe.func(O, ee, me, t.value)
2541
+ }, ce.attr, {
2542
+ onClick: (He) => ce.func(S, Z, de, e.value)
2517
2543
  }), null, 16, ["onClick"]))
2518
- ], !0) : ve("", !0),
2519
- v(l.$slots, pe.name + "-right", {
2520
- row: O,
2521
- column: ee,
2522
- $index: me
2544
+ ], !0) : pe("", !0),
2545
+ f(l.$slots, ce.name + "-right", {
2546
+ row: S,
2547
+ column: Z,
2548
+ $index: de
2523
2549
  }, void 0, !0)
2524
2550
  ], 64))), 256))
2525
2551
  ]),
2526
2552
  _: 2
2527
2553
  }, 1024))
2528
2554
  ], 64))), 256)),
2529
- v(l.$slots, "control-right", {
2530
- row: O,
2531
- column: ee,
2532
- $index: me
2555
+ f(l.$slots, "control-right", {
2556
+ row: S,
2557
+ column: Z,
2558
+ $index: de
2533
2559
  }, void 0, !0)
2534
2560
  ], !0)
2535
2561
  ], 6)
@@ -2542,82 +2568,82 @@ const Xt = {
2542
2568
  ]),
2543
2569
  _: 3
2544
2570
  }, 16),
2545
- (lt = (tt = (et = t.value) == null ? void 0 : et.table) == null ? void 0 : tt.page) != null && lt.hidden ? ve("", !0) : v(l.$slots, "page", { key: 0 }, () => [
2546
- te(Z, q({
2547
- "page-size": t.value.table.page.pageSize,
2548
- "onUpdate:pageSize": a[1] || (a[1] = (H) => t.value.table.page.pageSize = H),
2549
- "current-page": t.value.table.page.currentPage,
2550
- "onUpdate:currentPage": a[2] || (a[2] = (H) => t.value.table.page.currentPage = H)
2551
- }, t.value.table.page), {
2552
- default: p(() => [
2553
- v(l.$slots, "table-page", {}, void 0, !0)
2571
+ (ot = (lt = (tt = e.value) == null ? void 0 : tt.table) == null ? void 0 : lt.page) != null && ot.hidden ? pe("", !0) : f(l.$slots, "page", { key: 0 }, () => [
2572
+ J(te, M({
2573
+ "page-size": e.value.table.page.pageSize,
2574
+ "onUpdate:pageSize": a[1] || (a[1] = (L) => e.value.table.page.pageSize = L),
2575
+ "current-page": e.value.table.page.currentPage,
2576
+ "onUpdate:currentPage": a[2] || (a[2] = (L) => e.value.table.page.currentPage = L)
2577
+ }, e.value.table.page), {
2578
+ default: v(() => [
2579
+ f(l.$slots, "table-page", {}, void 0, !0)
2554
2580
  ]),
2555
2581
  _: 3
2556
2582
  }, 16, ["page-size", "current-page"])
2557
2583
  ], !0)
2558
2584
  ])
2559
2585
  ]),
2560
- He(z("div", null, [
2561
- te(Ve, q({
2562
- modelValue: w.value,
2563
- "onUpdate:modelValue": a[6] || (a[6] = (H) => w.value = H),
2564
- fullscreen: t.value.dialog.fullScreen
2565
- }, o(Ee)(t.value.dialog, (H) => !["size"].includes(H)), {
2566
- width: o(pt)(t.value.dialog.width) + 35
2586
+ e.value.dialog.mode == "dialog" && $.value ? (i(), I("div", nl, [
2587
+ J(Ve, M({
2588
+ modelValue: $.value,
2589
+ "onUpdate:modelValue": a[6] || (a[6] = (L) => $.value = L),
2590
+ fullscreen: e.value.dialog.fullScreen
2591
+ }, o(_e)(e.value.dialog, (L) => !["size"].includes(L)), {
2592
+ width: o(pt)(e.value.dialog.width) + 35
2567
2593
  }), {
2568
- header: p(() => {
2569
- var H, fe, O, ee;
2594
+ header: v(() => {
2595
+ var L, se, S, Z;
2570
2596
  return [
2571
- z("div", ul, [
2572
- z("div", nl, [
2573
- v(l.$slots, "f-header", {}, () => [
2574
- z("div", null, he(t.value.dialog.title), 1)
2597
+ Q("div", sl, [
2598
+ Q("div", il, [
2599
+ f(l.$slots, "f-header", {}, () => [
2600
+ Q("div", null, ve(e.value.dialog.title), 1)
2575
2601
  ], !0)
2576
2602
  ]),
2577
- ((fe = (H = t.value) == null ? void 0 : H.dialog) == null ? void 0 : fe.fullScreen) === !1 ? (s(), L("div", {
2603
+ ((se = (L = e.value) == null ? void 0 : L.dialog) == null ? void 0 : se.fullScreen) === !1 ? (i(), I("div", {
2578
2604
  key: 0,
2579
- onClick: a[3] || (a[3] = (me) => {
2580
- t.value.dialog.fullScreen = !0;
2605
+ onClick: a[3] || (a[3] = (de) => {
2606
+ e.value.dialog.fullScreen = !0;
2581
2607
  }),
2582
2608
  class: "max"
2583
2609
  }, [
2584
- te(ge, null, {
2585
- default: p(() => [
2586
- te(o(kt))
2610
+ J(he, null, {
2611
+ default: v(() => [
2612
+ J(o(Ct))
2587
2613
  ]),
2588
2614
  _: 1
2589
2615
  })
2590
- ])) : ve("", !0),
2591
- ((ee = (O = t.value) == null ? void 0 : O.dialog) == null ? void 0 : ee.fullScreen) === !0 ? (s(), L("div", {
2616
+ ])) : pe("", !0),
2617
+ ((Z = (S = e.value) == null ? void 0 : S.dialog) == null ? void 0 : Z.fullScreen) === !0 ? (i(), I("div", {
2592
2618
  key: 1,
2593
- onClick: a[4] || (a[4] = (me) => {
2594
- t.value.dialog.fullScreen = !1;
2619
+ onClick: a[4] || (a[4] = (de) => {
2620
+ e.value.dialog.fullScreen = !1;
2595
2621
  }),
2596
2622
  class: "max"
2597
2623
  }, [
2598
- te(ge, null, {
2599
- default: p(() => [
2600
- te(o(Ct))
2624
+ J(he, null, {
2625
+ default: v(() => [
2626
+ J(o(Vt))
2601
2627
  ]),
2602
2628
  _: 1
2603
2629
  })
2604
- ])) : ve("", !0)
2630
+ ])) : pe("", !0)
2605
2631
  ])
2606
2632
  ];
2607
2633
  }),
2608
- default: p(() => [
2609
- z("div", sl, [
2610
- v(l.$slots, "table-dialog-form", { model: t.value }, () => [
2611
- te(Ye, {
2612
- modelValue: t.value,
2613
- "onUpdate:modelValue": a[5] || (a[5] = (H) => t.value = H),
2614
- onSubmit: oe,
2615
- onReset: J
2616
- }, se({ _: 2 }, [
2617
- B(l.$slots, (H, fe, O) => ({
2618
- name: fe,
2619
- fn: p((ee) => [
2620
- v(l.$slots, fe, { model: ee }, void 0, !0)
2634
+ default: v(() => [
2635
+ Q("div", dl, [
2636
+ f(l.$slots, "table-dialog-form", { model: e.value }, () => [
2637
+ J(ze, {
2638
+ modelValue: e.value,
2639
+ "onUpdate:modelValue": a[5] || (a[5] = (L) => e.value = L),
2640
+ onSubmit: ne,
2641
+ onReset: R
2642
+ }, ae({ _: 2 }, [
2643
+ A(l.$slots, (L, se, S) => ({
2644
+ name: se,
2645
+ fn: v((Z) => [
2646
+ f(l.$slots, se, { model: Z }, void 0, !0)
2621
2647
  ])
2622
2648
  }))
2623
2649
  ]), 1032, ["modelValue"])
@@ -2626,35 +2652,33 @@ const Xt = {
2626
2652
  ]),
2627
2653
  _: 3
2628
2654
  }, 16, ["modelValue", "fullscreen", "width"])
2629
- ], 512), [
2630
- [We, t.value.dialog.mode == "dialog"]
2631
- ]),
2632
- He(z("div", null, [
2633
- te(Ue, q({
2634
- modelValue: w.value,
2635
- "onUpdate:modelValue": a[8] || (a[8] = (H) => w.value = H)
2636
- }, o(Ee)(t.value.dialog, (H) => !["width"].includes(H))), {
2637
- header: p(() => [
2638
- z("div", il, [
2639
- z("div", dl, [
2640
- v(l.$slots, "f-header", {}, () => [
2641
- z("div", null, he(t.value.dialog.title), 1)
2655
+ ])) : pe("", !0),
2656
+ e.value.dialog.mode == "drawer" && $.value ? (i(), I("div", cl, [
2657
+ J(Re, M({
2658
+ modelValue: $.value,
2659
+ "onUpdate:modelValue": a[8] || (a[8] = (L) => $.value = L)
2660
+ }, o(_e)(e.value.dialog, (L) => !["width"].includes(L))), {
2661
+ header: v(() => [
2662
+ Q("div", fl, [
2663
+ Q("div", ml, [
2664
+ f(l.$slots, "f-header", {}, () => [
2665
+ Q("div", null, ve(e.value.dialog.title), 1)
2642
2666
  ], !0)
2643
2667
  ])
2644
2668
  ])
2645
2669
  ]),
2646
- default: p(() => [
2647
- v(l.$slots, "table-drawer-form", { model: t.value }, () => [
2648
- te(Ye, {
2649
- modelValue: t.value,
2650
- "onUpdate:modelValue": a[7] || (a[7] = (H) => t.value = H),
2651
- onSubmit: oe,
2652
- onReset: J
2653
- }, se({ _: 2 }, [
2654
- B(l.$slots, (H, fe, O) => ({
2655
- name: fe,
2656
- fn: p((ee) => [
2657
- v(l.$slots, fe, { model: ee }, void 0, !0)
2670
+ default: v(() => [
2671
+ f(l.$slots, "table-drawer-form", { model: e.value }, () => [
2672
+ J(ze, {
2673
+ modelValue: e.value,
2674
+ "onUpdate:modelValue": a[7] || (a[7] = (L) => e.value = L),
2675
+ onSubmit: ne,
2676
+ onReset: R
2677
+ }, ae({ _: 2 }, [
2678
+ A(l.$slots, (L, se, S) => ({
2679
+ name: se,
2680
+ fn: v((Z) => [
2681
+ f(l.$slots, se, { model: Z }, void 0, !0)
2658
2682
  ])
2659
2683
  }))
2660
2684
  ]), 1032, ["modelValue"])
@@ -2662,13 +2686,19 @@ const Xt = {
2662
2686
  ]),
2663
2687
  _: 3
2664
2688
  }, 16, ["modelValue"])
2665
- ], 512), [
2666
- [We, t.value.dialog.mode == "drawer"]
2689
+ ])) : pe("", !0),
2690
+ st(J(ze, {
2691
+ modelValue: e.value,
2692
+ "onUpdate:modelValue": a[9] || (a[9] = (L) => e.value = L),
2693
+ onSubmit: ne,
2694
+ onReset: R
2695
+ }, null, 8, ["modelValue"]), [
2696
+ [it, !1]
2667
2697
  ])
2668
2698
  ], 64);
2669
2699
  };
2670
2700
  }
2671
- }), fl = /* @__PURE__ */ Be(cl, [["__scopeId", "data-v-7692cf44"]]), ml = { class: "g-tree-table" }, pl = { class: "g-tree-container" }, vl = { class: "g-tree-table-container" }, hl = /* @__PURE__ */ Object.assign({
2701
+ }), vl = /* @__PURE__ */ Ue(pl, [["__scopeId", "data-v-e0cf669f"]]), hl = { class: "g-tree-table" }, yl = { class: "g-tree-container" }, gl = { class: "g-tree-table-container" }, bl = /* @__PURE__ */ Object.assign({
2672
2702
  name: "g-tree-table",
2673
2703
  inheritAttrs: !1
2674
2704
  }, {
@@ -2677,68 +2707,68 @@ const Xt = {
2677
2707
  modelValue: { required: !0 },
2678
2708
  modelModifiers: {}
2679
2709
  },
2680
- emits: /* @__PURE__ */ Fe(["load"], ["update:modelValue"]),
2681
- setup(f, { emit: d }) {
2682
- var ce, F, i;
2683
- const e = d, t = Te(f, "modelValue"), n = ye(((ce = Re()) == null ? void 0 : ce.width) || "180px"), m = ye(((F = Re()) == null ? void 0 : F.search) === void 0 ? !0 : (i = Re()) == null ? void 0 : i.search), w = ye({}), R = ye(""), D = ye(null), E = (x, le) => x ? le.label.includes(x) : !0, M = (x, le) => {
2684
- e("load", w.value, x, le);
2685
- }, P = (x) => {
2686
- w.value = x, t.value.table.load();
2710
+ emits: /* @__PURE__ */ Te(["load"], ["update:modelValue"]),
2711
+ setup(m, { emit: c }) {
2712
+ var q, y, _;
2713
+ const t = c, e = qe(m, "modelValue"), n = ye(((q = Pe()) == null ? void 0 : q.width) || "180px"), p = ye(((y = Pe()) == null ? void 0 : y.search) === void 0 ? !0 : (_ = Pe()) == null ? void 0 : _.search), $ = ye({}), N = ye(""), w = ye(null), g = (F, re) => F ? re.label.includes(F) : !0, T = (F, re) => {
2714
+ t("load", $.value, F, re);
2715
+ }, Y = (F) => {
2716
+ $.value = F, e.value.table.load();
2687
2717
  };
2688
- return wt(R, (x) => {
2689
- D.value.filter(x);
2690
- }), (x, le) => {
2691
- const ie = U("el-input"), h = U("el-tree"), S = U("g-table");
2692
- return s(), L("div", ml, [
2693
- z("div", {
2718
+ return _t(N, (F) => {
2719
+ w.value.filter(F);
2720
+ }), (F, re) => {
2721
+ const ue = j("el-input"), fe = j("el-tree"), me = j("g-table");
2722
+ return i(), I("div", hl, [
2723
+ Q("div", {
2694
2724
  class: "g-tree-left",
2695
2725
  style: Me({ width: n.value })
2696
2726
  }, [
2697
- m.value ? (s(), V(ie, {
2727
+ p.value ? (i(), C(ue, {
2698
2728
  key: 0,
2699
- modelValue: R.value,
2700
- "onUpdate:modelValue": le[0] || (le[0] = (G) => R.value = G),
2729
+ modelValue: N.value,
2730
+ "onUpdate:modelValue": re[0] || (re[0] = (d) => N.value = d),
2701
2731
  style: { width: "100%" },
2702
2732
  placeholder: "输入节点查询",
2703
2733
  clearable: ""
2704
- }, null, 8, ["modelValue"])) : ve("", !0),
2705
- z("div", pl, [
2706
- te(h, q({
2734
+ }, null, 8, ["modelValue"])) : pe("", !0),
2735
+ Q("div", yl, [
2736
+ J(fe, M({
2707
2737
  style: { width: n.value },
2708
- "filter-node-method": E,
2738
+ "filter-node-method": g,
2709
2739
  "expand-on-click-node": !1,
2710
2740
  ref_key: "treeRef",
2711
- ref: D,
2712
- onNodeClick: P
2713
- }, x.$attrs), se({
2714
- default: p(({ node: G, data: C }) => [
2715
- v(x.$slots, "tree", {
2716
- node: G,
2717
- data: C
2741
+ ref: w,
2742
+ onNodeClick: Y
2743
+ }, F.$attrs), ae({
2744
+ default: v(({ node: d, data: x }) => [
2745
+ f(F.$slots, "tree", {
2746
+ node: d,
2747
+ data: x
2718
2748
  }, () => [
2719
- z("span", null, he(G.label), 1)
2749
+ Q("span", null, ve(d.label), 1)
2720
2750
  ], !0)
2721
2751
  ]),
2722
2752
  _: 2
2723
2753
  }, [
2724
- B(x.$slots, (G, C, re) => ({
2725
- name: C,
2726
- fn: p((K) => [
2727
- v(x.$slots, C, { data: K }, void 0, !0)
2754
+ A(F.$slots, (d, x, ee) => ({
2755
+ name: x,
2756
+ fn: v((D) => [
2757
+ f(F.$slots, x, { data: D }, void 0, !0)
2728
2758
  ])
2729
2759
  }))
2730
2760
  ]), 1040, ["style"])
2731
2761
  ])
2732
2762
  ], 4),
2733
- z("div", vl, [
2734
- te(S, q({
2735
- modelValue: t.value,
2736
- "onUpdate:modelValue": le[1] || (le[1] = (G) => t.value = G)
2737
- }, x.$attrs, { onLoad: M }), se({ _: 2 }, [
2738
- B(x.$slots, (G, C, re) => ({
2739
- name: C,
2740
- fn: p((K) => [
2741
- v(x.$slots, C, { data: K }, void 0, !0)
2763
+ Q("div", gl, [
2764
+ J(me, M({
2765
+ modelValue: e.value,
2766
+ "onUpdate:modelValue": re[1] || (re[1] = (d) => e.value = d)
2767
+ }, F.$attrs, { onLoad: T }), ae({ _: 2 }, [
2768
+ A(F.$slots, (d, x, ee) => ({
2769
+ name: x,
2770
+ fn: v((D) => [
2771
+ f(F.$slots, x, { data: D }, void 0, !0)
2742
2772
  ])
2743
2773
  }))
2744
2774
  ]), 1040, ["modelValue"])
@@ -2746,124 +2776,124 @@ const Xt = {
2746
2776
  ]);
2747
2777
  };
2748
2778
  }
2749
- }), yl = /* @__PURE__ */ Be(hl, [["__scopeId", "data-v-c07fe107"]]), gl = Object.freeze({}), mt = [fl, Ye, yl];
2750
- let Ge = {};
2751
- const Dl = {
2752
- install: (f, d = {}) => {
2753
- Ge = Object.freeze({ ...gl, ...d }), mt.forEach((e) => {
2754
- f.component(e.name, e);
2755
- }), f.provide("options", Ge), f.config.globalProperties.$openModal = Qe;
2779
+ }), $l = /* @__PURE__ */ Ue(bl, [["__scopeId", "data-v-c07fe107"]]), El = Object.freeze({}), mt = [vl, ze, $l];
2780
+ let Ke = {};
2781
+ const ql = {
2782
+ install: (m, c = {}) => {
2783
+ Ke = Object.freeze({ ...El, ...c }), mt.forEach((t) => {
2784
+ m.component(t.name, t);
2785
+ }), m.provide("options", Ke), m.config.globalProperties.$openModal = Qe;
2756
2786
  }
2757
- }, bl = (f) => ({ dialog: yt, drawer: gt })[f] || null, Qe = (f = {}, d = "dialog") => {
2787
+ }, wl = (m) => ({ dialog: yt, drawer: gt })[m] || null, Qe = (m = {}, c = "dialog") => {
2758
2788
  if (typeof document > "u") return () => {
2759
2789
  };
2760
- const e = document.createElement("div");
2761
- let t = () => {
2790
+ const t = document.createElement("div");
2791
+ let e = () => {
2762
2792
  };
2763
- const n = bl(d);
2793
+ const n = wl(c);
2764
2794
  if (!n) return () => {
2765
2795
  };
2766
- const m = ye(!0), w = _t({
2796
+ const p = ye(!0), $ = kt({
2767
2797
  setup() {
2768
- return t = () => {
2769
- m.value = !1, setTimeout(() => {
2770
- w.unmount(), e.remove();
2798
+ return e = () => {
2799
+ p.value = !1, setTimeout(() => {
2800
+ $.unmount(), t.remove();
2771
2801
  }, 300);
2772
2802
  }, () => {
2773
- var R, D, E;
2803
+ var N, w, g;
2774
2804
  return ke(n, {
2775
- modelValue: m.value,
2776
- "onUpdate:modelValue": (M) => m.value = M,
2777
- ...f,
2805
+ modelValue: p.value,
2806
+ "onUpdate:modelValue": (T) => p.value = T,
2807
+ ...m,
2778
2808
  appendToBody: !0,
2779
2809
  destroyOnClose: !0
2780
2810
  }, {
2781
- default: (R = f.slots) == null ? void 0 : R.default,
2782
- header: (D = f.slots) == null ? void 0 : D.header,
2783
- footer: (E = f.slots) == null ? void 0 : E.footer
2811
+ default: (N = m.slots) == null ? void 0 : N.default,
2812
+ header: (w = m.slots) == null ? void 0 : w.header,
2813
+ footer: (g = m.slots) == null ? void 0 : g.footer
2784
2814
  });
2785
2815
  };
2786
2816
  }
2787
2817
  });
2788
- return mt.forEach((R) => {
2789
- w.component(R.name, R);
2790
- }), w.provide("options", Ge), w.use(ht, { locale: Dt }), document.body.appendChild(e), w.mount(e), t;
2818
+ return mt.forEach((N) => {
2819
+ $.component(N.name, N);
2820
+ }), $.provide("options", Ke), $.use(ht, { locale: Ft }), document.body.appendChild(t), $.mount(t), e;
2791
2821
  };
2792
- function pt(f, d = window.innerWidth) {
2793
- if (typeof f == "number")
2794
- return f;
2795
- if (f.endsWith("px"))
2796
- return parseFloat(f);
2797
- const e = window.innerHeight, t = window.innerWidth;
2798
- if (f.endsWith("vh"))
2799
- return e * parseFloat(f) / 100;
2800
- if (f.endsWith("vw"))
2801
- return t * parseFloat(f) / 100;
2802
- if (f.endsWith("%")) {
2803
- if (typeof d != "number")
2822
+ function pt(m, c = window.innerWidth) {
2823
+ if (typeof m == "number")
2824
+ return m;
2825
+ if (m.endsWith("px"))
2826
+ return parseFloat(m);
2827
+ const t = window.innerHeight, e = window.innerWidth;
2828
+ if (m.endsWith("vh"))
2829
+ return t * parseFloat(m) / 100;
2830
+ if (m.endsWith("vw"))
2831
+ return e * parseFloat(m) / 100;
2832
+ if (m.endsWith("%")) {
2833
+ if (typeof c != "number")
2804
2834
  throw new Error("Reference size is required to convert % to px");
2805
- return d * parseFloat(f) / 100;
2835
+ return c * parseFloat(m) / 100;
2806
2836
  }
2807
- if (f.startsWith("calc(") && f.endsWith(")")) {
2808
- let m = function(R) {
2809
- if (/[0-9+\-*/().\s]+$/.test(R))
2810
- return new Function("return " + R)();
2837
+ if (m.startsWith("calc(") && m.endsWith(")")) {
2838
+ let p = function(N) {
2839
+ if (/[0-9+\-*/().\s]+$/.test(N))
2840
+ return new Function("return " + N)();
2811
2841
  throw new Error("Invalid calc expression");
2812
2842
  };
2813
- const n = f.slice(5, -1).trim();
2814
- return m(n.replace(/([0-9.]+)([a-z%]+)/g, (R, D, E) => pt(D + E, d)));
2843
+ const n = m.slice(5, -1).trim();
2844
+ return p(n.replace(/([0-9.]+)([a-z%]+)/g, (N, w, g) => pt(w + g, c)));
2815
2845
  }
2816
- throw new Error("Unsupported unit in value: " + f);
2846
+ throw new Error("Unsupported unit in value: " + m);
2817
2847
  }
2818
- const we = (...f) => {
2819
- const d = {}, e = (t, n) => (Object.keys(n).forEach((m) => {
2820
- t[m] = typeof n[m] == "object" && !Array.isArray(n[m]) ? e(t[m] || {}, n[m]) : n[m];
2821
- }), t);
2822
- return f.forEach((t = {}) => e(d, t)), d;
2848
+ const $e = (...m) => {
2849
+ const c = {}, t = (e, n) => (Object.keys(n).forEach((p) => {
2850
+ e[p] = typeof n[p] == "object" && !Array.isArray(n[p]) ? t(e[p] || {}, n[p]) : n[p];
2851
+ }), e);
2852
+ return m.forEach((e = {}) => t(c, e)), c;
2823
2853
  };
2824
- function Ee(f, d = (e, t) => d(e, t)) {
2825
- const e = {};
2826
- for (const t in f)
2827
- f.hasOwnProperty(t) && d(t, f[t]) && (e[t] = f[t]);
2828
- return e;
2854
+ function _e(m, c = (t, e) => c(t, e)) {
2855
+ const t = {};
2856
+ for (const e in m)
2857
+ m.hasOwnProperty(e) && c(e, m[e]) && (t[e] = m[e]);
2858
+ return t;
2829
2859
  }
2830
- function $l(f, d, e = "value", t = "label", n = "children") {
2831
- for (const m of f) {
2832
- if (m[e] === d)
2833
- return m[t];
2834
- if (m[n] && m[n].length > 0) {
2835
- const w = $l(m[n], d, e, t, n);
2836
- if (w)
2837
- return w;
2860
+ function _l(m, c, t = "value", e = "label", n = "children") {
2861
+ for (const p of m) {
2862
+ if (p[t] === c)
2863
+ return p[e];
2864
+ if (p[n] && p[n].length > 0) {
2865
+ const $ = _l(p[n], c, t, e, n);
2866
+ if ($)
2867
+ return $;
2838
2868
  }
2839
2869
  }
2840
2870
  return null;
2841
2871
  }
2842
- function Xe(f) {
2843
- const d = ["角", "分"], e = ["零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖"], t = [
2872
+ function Xe(m) {
2873
+ const c = ["角", "分"], t = ["零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖"], e = [
2844
2874
  ["元", "万", "亿"],
2845
2875
  ["", "拾", "佰", "仟"]
2846
- ], n = f < 0 ? "欠" : "";
2847
- f = Math.abs(f);
2848
- let m = "";
2849
- for (let w = 0; w < d.length; w++)
2850
- m += (e[Math.floor(f * 10 * Math.pow(10, w)) % 10] + d[w]).replace(/零./, "");
2851
- m = m || "整", f = Math.floor(f);
2852
- for (let w = 0; w < t[0].length && f > 0; w++) {
2853
- let R = "";
2854
- for (let D = 0; D < t[1].length && f > 0; D++)
2855
- R = e[f % 10] + t[1][D] + R, f = Math.floor(f / 10);
2856
- m = R.replace(/(零.)*零$/, "").replace(/^$/, "零") + t[0][w] + m;
2876
+ ], n = m < 0 ? "欠" : "";
2877
+ m = Math.abs(m);
2878
+ let p = "";
2879
+ for (let $ = 0; $ < c.length; $++)
2880
+ p += (t[Math.floor(m * 10 * Math.pow(10, $)) % 10] + c[$]).replace(/零./, "");
2881
+ p = p || "整", m = Math.floor(m);
2882
+ for (let $ = 0; $ < e[0].length && m > 0; $++) {
2883
+ let N = "";
2884
+ for (let w = 0; w < e[1].length && m > 0; w++)
2885
+ N = t[m % 10] + e[1][w] + N, m = Math.floor(m / 10);
2886
+ p = N.replace(/(零.)*零$/, "").replace(/^$/, "零") + e[0][$] + p;
2857
2887
  }
2858
- return n + m.replace(/(零.)*零元/, "元").replace(/(零.)+/g, "零").replace(/^整$/, "零元整");
2888
+ return n + p.replace(/(零.)*零元/, "元").replace(/(零.)+/g, "零").replace(/^整$/, "零元整");
2859
2889
  }
2860
- function El(f) {
2861
- if (typeof f != "number")
2890
+ function kl(m) {
2891
+ if (typeof m != "number")
2862
2892
  return "0.00";
2863
- const d = f.toFixed(2), [e, t] = d.split(".");
2864
- return `${e.replace(/\B(?=(\d{3})+(?!\d))/g, ",")}.${t}`;
2893
+ const c = m.toFixed(2), [t, e] = c.split(".");
2894
+ return `${t.replace(/\B(?=(\d{3})+(?!\d))/g, ",")}.${e}`;
2865
2895
  }
2866
- const de = {
2896
+ const ie = {
2867
2897
  RADIO: "radio",
2868
2898
  RADIOBUTTON: "radio-button",
2869
2899
  CHECKBOX: "checkbox",
@@ -2893,13 +2923,13 @@ const de = {
2893
2923
  TEL: "tel"
2894
2924
  };
2895
2925
  export {
2896
- de as CT,
2926
+ ie as CT,
2897
2927
  pt as convertToPx,
2898
- Dl as default,
2899
- Ee as filterObject,
2900
- $l as findTreeLabelByValue,
2901
- El as formatAmount,
2902
- we as mergeObjects,
2928
+ ql as default,
2929
+ _e as filterObject,
2930
+ _l as findTreeLabelByValue,
2931
+ kl as formatAmount,
2932
+ $e as mergeObjects,
2903
2933
  Xe as moneyToChinese,
2904
2934
  Qe as openModal
2905
2935
  };