vue-2024-ui 0.0.54 → 0.0.56

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