vue-2024-ui 0.1.20 → 0.1.22

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,5 +1,5 @@
1
1
  import It, { ElForm as ft, ElButtonGroup as ct, ElButton as De, ElPopover as ht, ElMessage as Fe, ElMessageBox as Vt, ElDialog as Bt, ElDrawer as Yt } from "element-plus";
2
- import { mergeModels as ze, useModel as Pe, ref as le, nextTick as et, onMounted as ot, computed as Je, resolveComponent as I, openBlock as n, createElementBlock as F, Fragment as G, createElementVNode as X, createBlock as M, createCommentVNode as pe, unref as U, mergeProps as S, withCtx as h, renderSlot as y, renderList as L, createTextVNode as Me, toDisplayString as ye, createSlots as me, createVNode as Q, normalizeProps as gt, useSlots as Tt, inject as _t, useAttrs as kt, onUnmounted as Ut, normalizeStyle as Ie, withModifiers as mt, resolveDynamicComponent as Ye, guardReactiveProps as Rt, Transition as Lt, withDirectives as jt, vShow as Ht, h as Ae, onBeforeUnmount as Nt, normalizeClass as St, watchEffect as zt, watch as Pt, createApp as Wt } from "vue";
2
+ import { mergeModels as Ne, useModel as Pe, ref as le, nextTick as et, onMounted as ot, computed as Je, resolveComponent as I, openBlock as n, createElementBlock as F, Fragment as G, createElementVNode as X, createBlock as M, createCommentVNode as pe, unref as U, mergeProps as S, withCtx as h, renderSlot as y, renderList as L, createTextVNode as Me, toDisplayString as ye, createSlots as me, createVNode as Q, normalizeProps as gt, useSlots as Tt, inject as _t, useAttrs as kt, onUnmounted as Ut, normalizeStyle as Ie, withModifiers as mt, resolveDynamicComponent as Ye, guardReactiveProps as Rt, Transition as Lt, withDirectives as jt, vShow as zt, h as Ae, onBeforeUnmount as Ht, normalizeClass as St, watchEffect as Nt, watch as Pt, createApp as Wt } from "vue";
3
3
  import { Plus as Xt, ZoomIn as Gt, Delete as Qt, DocumentCopy as Zt, FullScreen as Jt, CopyDocument as Kt } from "@element-plus/icons-vue";
4
4
  import xt from "sortablejs";
5
5
  import { Dexie as el } from "dexie";
@@ -189,7 +189,7 @@ var Ft = { exports: {} };
189
189
  (function(r, t) {
190
190
  i.exports = t();
191
191
  })(ll, function() {
192
- var r = 1e3, t = 6e4, e = 36e5, d = "millisecond", E = "second", x = "minute", T = "hour", _ = "day", w = "week", H = "month", ee = "quarter", q = "year", B = "date", se = "Invalid Date", re = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, J = /\[([^\]]+)]|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, ve = { 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(p) {
192
+ var r = 1e3, t = 6e4, e = 36e5, d = "millisecond", E = "second", x = "minute", T = "hour", _ = "day", w = "week", z = "month", ee = "quarter", q = "year", B = "date", se = "Invalid Date", re = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, J = /\[([^\]]+)]|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, ve = { 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(p) {
193
193
  var a = ["th", "st", "nd", "rd"], v = p % 100;
194
194
  return "[" + p + (a[(v - 20) % 10] || a[v] || a[0]) + "]";
195
195
  } }, ge = function(p, a, v) {
@@ -200,12 +200,12 @@ var Ft = { exports: {} };
200
200
  return (a <= 0 ? "+" : "-") + ge(g, 2, "0") + ":" + ge(s, 2, "0");
201
201
  }, m: function p(a, v) {
202
202
  if (a.date() < v.date()) return -p(v, a);
203
- var g = 12 * (v.year() - a.year()) + (v.month() - a.month()), s = a.clone().add(g, H), C = v - s < 0, V = a.clone().add(g + (C ? -1 : 1), H);
203
+ var g = 12 * (v.year() - a.year()) + (v.month() - a.month()), s = a.clone().add(g, z), C = v - s < 0, V = a.clone().add(g + (C ? -1 : 1), z);
204
204
  return +(-(g + (v - s) / (C ? s - V : V - s)) || 0);
205
205
  }, a: function(p) {
206
206
  return p < 0 ? Math.ceil(p) || 0 : Math.floor(p);
207
207
  }, p: function(p) {
208
- return { M: H, y: q, w, d: _, D: B, h: T, m: x, s: E, ms: d, Q: ee }[p] || String(p || "").toLowerCase().replace(/s$/, "");
208
+ return { M: z, y: q, w, d: _, D: B, h: T, m: x, s: E, ms: d, Q: ee }[p] || String(p || "").toLowerCase().replace(/s$/, "");
209
209
  }, u: function(p) {
210
210
  return p === void 0;
211
211
  } }, ie = "en", de = {};
@@ -283,7 +283,7 @@ var Ft = { exports: {} };
283
283
  switch (V) {
284
284
  case q:
285
285
  return C ? j(1, 0) : j(31, 11);
286
- case H:
286
+ case z:
287
287
  return C ? j(1, O) : j(0, O + 1);
288
288
  case w:
289
289
  var _e = this.$locale().weekStart || 0, Te = (Y < _e ? Y + 7 : Y) - _e;
@@ -303,8 +303,8 @@ var Ft = { exports: {} };
303
303
  }, a.endOf = function(v) {
304
304
  return this.startOf(v, !1);
305
305
  }, a.$set = function(v, g) {
306
- var s, C = b.p(v), V = "set" + (this.$u ? "UTC" : ""), j = (s = {}, s[_] = V + "Date", s[B] = V + "Date", s[H] = V + "Month", s[q] = V + "FullYear", s[T] = V + "Hours", s[x] = V + "Minutes", s[E] = V + "Seconds", s[d] = V + "Milliseconds", s)[C], Z = C === _ ? this.$D + (g - this.$W) : g;
307
- if (C === H || C === q) {
306
+ var s, C = b.p(v), V = "set" + (this.$u ? "UTC" : ""), j = (s = {}, s[_] = V + "Date", s[B] = V + "Date", s[z] = V + "Month", s[q] = V + "FullYear", s[T] = V + "Hours", s[x] = V + "Minutes", s[E] = V + "Seconds", s[d] = V + "Milliseconds", s)[C], Z = C === _ ? this.$D + (g - this.$W) : g;
307
+ if (C === z || C === q) {
308
308
  var Y = this.clone().set(B, 1);
309
309
  Y.$d[j](Z), Y.init(), this.$d = Y.set(B, Math.min(this.$D, Y.daysInMonth())).$d;
310
310
  } else j && this.$d[j](Z);
@@ -320,7 +320,7 @@ var Ft = { exports: {} };
320
320
  var ue = ne(C);
321
321
  return b.w(ue.date(ue.date() + Math.round(O * v)), C);
322
322
  };
323
- if (V === H) return this.set(H, this.$M + v);
323
+ if (V === z) return this.set(z, this.$M + v);
324
324
  if (V === q) return this.set(q, this.$y + v);
325
325
  if (V === _) return j(1);
326
326
  if (V === w) return j(7);
@@ -404,7 +404,7 @@ var Ft = { exports: {} };
404
404
  case q:
405
405
  C = ue() / 12;
406
406
  break;
407
- case H:
407
+ case z:
408
408
  C = ue();
409
409
  break;
410
410
  case ee:
@@ -430,7 +430,7 @@ var Ft = { exports: {} };
430
430
  }
431
431
  return s ? C : b.a(C);
432
432
  }, a.daysInMonth = function() {
433
- return this.endOf(H).$D;
433
+ return this.endOf(z).$D;
434
434
  }, a.$locale = function() {
435
435
  return de[this.$L];
436
436
  }, a.locale = function(v, g) {
@@ -449,7 +449,7 @@ var Ft = { exports: {} };
449
449
  return this.$d.toUTCString();
450
450
  }, p;
451
451
  }(), k = o.prototype;
452
- return ne.prototype = k, [["$ms", d], ["$s", E], ["$m", x], ["$H", T], ["$W", _], ["$M", H], ["$y", q], ["$D", B]].forEach(function(p) {
452
+ return ne.prototype = k, [["$ms", d], ["$s", E], ["$m", x], ["$H", T], ["$W", _], ["$M", z], ["$y", q], ["$D", B]].forEach(function(p) {
453
453
  k[p[1]] = function(a) {
454
454
  return this.$g(a, p[0], p[1]);
455
455
  };
@@ -461,7 +461,7 @@ var Ft = { exports: {} };
461
461
  });
462
462
  })(Ft);
463
463
  var rl = Ft.exports;
464
- const yt = /* @__PURE__ */ al(rl), Qe = (i, f) => {
464
+ const yt = /* @__PURE__ */ al(rl), We = (i, f) => {
465
465
  const r = i.__vccOpts || i;
466
466
  for (const [t, e] of f)
467
467
  r[t] = e;
@@ -474,14 +474,14 @@ const yt = /* @__PURE__ */ al(rl), Qe = (i, f) => {
474
474
  style: { position: "relative" }
475
475
  }, sl = ["title"], il = { key: 20 }, dl = { key: 21 }, fl = { key: 22 }, cl = ["innerHTML"], ml = { key: 23 }, pl = ["innerHTML"], vl = ["innerHTML"], hl = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
476
476
  __name: "g-ctrl",
477
- props: /* @__PURE__ */ ze(["t", "ctrlKey", "item", "model", "ctrlType", "formInfo"], {
477
+ props: /* @__PURE__ */ Ne(["t", "ctrlKey", "item", "model", "ctrlType", "formInfo"], {
478
478
  modelValue: { required: !0 },
479
479
  modelModifiers: {}
480
480
  }),
481
481
  emits: ["update:modelValue"],
482
482
  setup(i) {
483
483
  var $e, ne;
484
- const f = Pe(i, "modelValue"), r = i, t = le(r.item || {}), e = le(r.ctrlKey), d = le(r.ctrlType), E = le(r.model), x = le([]), T = le([]), _ = le(!1), w = le(!1), H = () => Object.keys(Tt()).filter((b) => b.startsWith(`${r.t}-${e}-`)).map((b) => b.replace(`${r.t}-${e}-`, "")), ee = le({
484
+ const f = Pe(i, "modelValue"), r = i, t = le(r.item || {}), e = le(r.ctrlKey), d = le(r.ctrlType), E = le(r.model), x = le([]), T = le([]), _ = le(!1), w = le(!1), z = () => Object.keys(Tt()).filter((b) => b.startsWith(`${r.t}-${e}-`)).map((b) => b.replace(`${r.t}-${e}-`, "")), ee = le({
485
485
  multiple: !1,
486
486
  "show-file-list": !1,
487
487
  "file-list": [],
@@ -597,7 +597,7 @@ const yt = /* @__PURE__ */ al(rl), Qe = (i, f) => {
597
597
  return t.value["file-list"] && t.value["file-list"].length ? (b = t.value["file-list"]) == null ? void 0 : b.map((o) => o == null ? void 0 : o.url) : [f.value];
598
598
  });
599
599
  return (b, o) => {
600
- var N, z, te, Ee, Ce, Le;
600
+ var H, N, te, Ee, Ce, Le;
601
601
  const k = I("el-image-viewer"), p = I("el-radio"), a = I("el-radio-group"), v = I("el-radio-button"), g = I("el-checkbox"), s = I("el-checkbox-group"), C = I("el-checkbox-button"), V = I("g-select-option"), j = I("el-option"), Z = I("el-select"), Y = I("el-tree-select"), O = I("el-time-picker"), ue = I("el-time-select"), ke = I("el-date-picker"), _e = I("el-color-picker"), Te = I("el-rate"), Se = I("el-slider"), we = I("el-switch"), xe = I("el-transfer"), Ue = I("el-cascader"), Re = I("el-icon"), ut = I("el-image"), tt = I("el-tooltip"), nt = I("el-upload"), st = I("el-autocomplete"), it = I("el-input-number"), lt = I("el-input"), l = I("el-link"), u = I("el-text"), m = I("el-avatar"), D = I("el-tag");
602
602
  return n(), F(G, null, [
603
603
  X("div", null, [
@@ -780,7 +780,7 @@ const yt = /* @__PURE__ */ al(rl), Qe = (i, f) => {
780
780
  ]),
781
781
  _: 2
782
782
  }, [
783
- (N = t.value) != null && N.columns ? {
783
+ (H = t.value) != null && H.columns ? {
784
784
  name: "header",
785
785
  fn: h(() => {
786
786
  var c;
@@ -801,7 +801,7 @@ const yt = /* @__PURE__ */ al(rl), Qe = (i, f) => {
801
801
  }),
802
802
  key: "0"
803
803
  } : void 0,
804
- L(H(), (c) => ({
804
+ L(z(), (c) => ({
805
805
  name: c,
806
806
  fn: h((W) => [
807
807
  y(b.$slots, `${r.t}-${e.value}-${c}`, { data: W }, void 0, !0)
@@ -813,7 +813,7 @@ const yt = /* @__PURE__ */ al(rl), Qe = (i, f) => {
813
813
  "onUpdate:modelValue": o[8] || (o[8] = (c) => f.value = c),
814
814
  placeholder: E.value[e.value].label
815
815
  }, t.value, { data: x.value }), me({ _: 2 }, [
816
- L(H(), (c) => ({
816
+ L(z(), (c) => ({
817
817
  name: c,
818
818
  fn: h((W) => [
819
819
  y(b.$slots, `${r.t}-${e.value}-${c}`, { data: W }, void 0, !0)
@@ -842,7 +842,7 @@ const yt = /* @__PURE__ */ al(rl), Qe = (i, f) => {
842
842
  placeholder: E.value[e.value].label,
843
843
  "value-format": se(d.value)
844
844
  }, t.value), me({ _: 2 }, [
845
- L(H(), (c) => ({
845
+ L(z(), (c) => ({
846
846
  name: c,
847
847
  fn: h((W) => [
848
848
  y(b.$slots, `${r.t}-${e.value}-${c}`, { data: W }, void 0, !0)
@@ -866,7 +866,7 @@ const yt = /* @__PURE__ */ al(rl), Qe = (i, f) => {
866
866
  "onUpdate:modelValue": o[15] || (o[15] = (c) => f.value = c),
867
867
  inlinePrompt: !0
868
868
  }, t.value), me({ _: 2 }, [
869
- L(H(), (c) => ({
869
+ L(z(), (c) => ({
870
870
  name: c,
871
871
  fn: h((W) => [
872
872
  y(b.$slots, `${r.t}-${e.value}-${c}`, { data: W }, void 0, !0)
@@ -877,7 +877,7 @@ const yt = /* @__PURE__ */ al(rl), Qe = (i, f) => {
877
877
  modelValue: f.value,
878
878
  "onUpdate:modelValue": o[16] || (o[16] = (c) => f.value = c)
879
879
  }, t.value), me({ _: 2 }, [
880
- L(H(), (c) => ({
880
+ L(z(), (c) => ({
881
881
  name: c,
882
882
  fn: h((W) => [
883
883
  y(b.$slots, `${r.t}-${e.value}-${c}`, { data: W }, void 0, !0)
@@ -888,7 +888,7 @@ const yt = /* @__PURE__ */ al(rl), Qe = (i, f) => {
888
888
  modelValue: f.value,
889
889
  "onUpdate:modelValue": o[17] || (o[17] = (c) => f.value = c)
890
890
  }, t.value, { options: T.value }), me({ _: 2 }, [
891
- L(H(), (c) => ({
891
+ L(z(), (c) => ({
892
892
  name: c,
893
893
  fn: h((W) => [
894
894
  y(b.$slots, `${r.t}-${e.value}-${c}`, { data: W }, void 0, !0)
@@ -918,7 +918,7 @@ const yt = /* @__PURE__ */ al(rl), Qe = (i, f) => {
918
918
  style: { width: "var(--up-width)", height: "var(--up-height)" },
919
919
  src: f.value
920
920
  }, { fit: "cover", lazy: !0, ...(c = t.value) == null ? void 0 : c.img }), me({ _: 2 }, [
921
- L(H(), (W, ce) => ({
921
+ L(z(), (W, ce) => ({
922
922
  name: W,
923
923
  fn: h((Be) => [
924
924
  y(b.$slots, `${r.t}-${e.value}-${W}`, { data: Be }, void 0, !0)
@@ -971,7 +971,7 @@ const yt = /* @__PURE__ */ al(rl), Qe = (i, f) => {
971
971
  }),
972
972
  _: 2
973
973
  }, [
974
- L(H(), (c, W) => ({
974
+ L(z(), (c, W) => ({
975
975
  name: c,
976
976
  fn: h((ce) => [
977
977
  y(b.$slots, `${r.t}-${e.value}-${c}`, { data: ce }, void 0, !0)
@@ -984,7 +984,7 @@ const yt = /* @__PURE__ */ al(rl), Qe = (i, f) => {
984
984
  }, t.value, {
985
985
  placeholder: E.value[e.value].label
986
986
  }), me({ _: 2 }, [
987
- L(H(), (c, W) => ({
987
+ L(z(), (c, W) => ({
988
988
  name: c,
989
989
  fn: h((ce) => [
990
990
  y(b.$slots, `${r.t}-${e.value}-${c}`, { data: ce }, void 0, !0)
@@ -998,7 +998,7 @@ const yt = /* @__PURE__ */ al(rl), Qe = (i, f) => {
998
998
  max: 1e8,
999
999
  placeholder: E.value[e.value].label
1000
1000
  }, t.value), me({ _: 2 }, [
1001
- L(H(), (c, W) => ({
1001
+ L(z(), (c, W) => ({
1002
1002
  name: c,
1003
1003
  fn: h((ce) => [
1004
1004
  y(b.$slots, `${r.t}-${e.value}-${c}`, { data: ce }, void 0, !0)
@@ -1010,7 +1010,7 @@ const yt = /* @__PURE__ */ al(rl), Qe = (i, f) => {
1010
1010
  "onUpdate:modelValue": o[24] || (o[24] = (c) => f.value = c),
1011
1011
  placeholder: E.value[e.value].label,
1012
1012
  type: U(he).NUMBER,
1013
- maxlength: ((z = t.value) == null ? void 0 : z.max) || 25
1013
+ maxlength: ((N = t.value) == null ? void 0 : N.max) || 25
1014
1014
  }, { ...t.value, type: d.value }), me({
1015
1015
  suffix: h(() => [
1016
1016
  X("div", {
@@ -1020,7 +1020,7 @@ const yt = /* @__PURE__ */ al(rl), Qe = (i, f) => {
1020
1020
  ]),
1021
1021
  _: 2
1022
1022
  }, [
1023
- L(H(), (c, W) => ({
1023
+ L(z(), (c, W) => ({
1024
1024
  name: c,
1025
1025
  fn: h((ce) => [
1026
1026
  y(b.$slots, `${r.t}-${e.value}-${c}`, { data: ce }, void 0, !0)
@@ -1079,7 +1079,7 @@ const yt = /* @__PURE__ */ al(rl), Qe = (i, f) => {
1079
1079
  r.t == "q" && E.value.table.load();
1080
1080
  })
1081
1081
  }, { ...t.value, type: d.value }), me({ _: 2 }, [
1082
- L(H(), (c, W) => ({
1082
+ L(z(), (c, W) => ({
1083
1083
  name: c,
1084
1084
  fn: h((ce) => [
1085
1085
  y(b.$slots, `${r.t}-${e.value}-${c}`, { data: ce }, void 0, !0)
@@ -1090,16 +1090,16 @@ const yt = /* @__PURE__ */ al(rl), Qe = (i, f) => {
1090
1090
  ], 64);
1091
1091
  };
1092
1092
  }
1093
- }), vt = /* @__PURE__ */ Qe(hl, [["__scopeId", "data-v-30ecdb1c"]]), bt = /* @__PURE__ */ Object.assign({
1093
+ }), vt = /* @__PURE__ */ We(hl, [["__scopeId", "data-v-30ecdb1c"]]), yl = { class: "g-form-container" }, gl = /* @__PURE__ */ Object.assign({
1094
1094
  name: "g-form",
1095
1095
  inheritAttrs: !1
1096
1096
  }, {
1097
1097
  __name: "g-form",
1098
- props: /* @__PURE__ */ ze(["editForm"], {
1098
+ props: /* @__PURE__ */ Ne(["editForm"], {
1099
1099
  modelValue: { required: !0 },
1100
1100
  modelModifiers: {}
1101
1101
  }),
1102
- emits: /* @__PURE__ */ ze(["submit", "reset"], ["update:modelValue"]),
1102
+ emits: /* @__PURE__ */ Ne(["submit", "reset"], ["update:modelValue"]),
1103
1103
  setup(i, { expose: f, emit: r }) {
1104
1104
  var ae, $e, ne, b;
1105
1105
  const t = Pe(i, "modelValue"), e = r, d = le(null), E = _t("options"), x = le({}), T = le(""), _ = i, w = {
@@ -1122,7 +1122,7 @@ const yt = /* @__PURE__ */ al(rl), Qe = (i, f) => {
1122
1122
  width: "100%",
1123
1123
  "align-items": "center",
1124
1124
  justifyContent: "center",
1125
- margin: "5px"
1125
+ boxSizing: "border-box"
1126
1126
  }
1127
1127
  },
1128
1128
  //表单提交按钮属性
@@ -1151,7 +1151,7 @@ const yt = /* @__PURE__ */ al(rl), Qe = (i, f) => {
1151
1151
  E == null ? void 0 : E.form,
1152
1152
  ($e = t.value) == null ? void 0 : $e.form
1153
1153
  );
1154
- const H = async (o, k) => {
1154
+ const z = async (o, k) => {
1155
1155
  let p = 5;
1156
1156
  for (; p > 0; ) {
1157
1157
  if (await et(), d.value) {
@@ -1181,7 +1181,7 @@ const yt = /* @__PURE__ */ al(rl), Qe = (i, f) => {
1181
1181
  }
1182
1182
  console.error("表单实例获取失败,请检查组件状态");
1183
1183
  };
1184
- t.value.form.submit.click = H, t.value.form.reset.click = ee;
1184
+ t.value.form.submit.click = z, t.value.form.reset.click = ee;
1185
1185
  const q = {
1186
1186
  type: "hidden",
1187
1187
  labelPosition: "right",
@@ -1217,23 +1217,48 @@ const yt = /* @__PURE__ */ al(rl), Qe = (i, f) => {
1217
1217
  pattern: void 0,
1218
1218
  validate: void 0
1219
1219
  }, ...o };
1220
- a.required && k.push({ required: !0, message: `${a.label}不能为空!`, trigger: "blur" }), a.max !== void 0 && a.max !== null && a.max !== "" && (a.min === void 0 || a.min === null || a.min === "") && k.push({
1220
+ a.required && k.push({
1221
+ required: !0,
1222
+ message: `${a.label}不能为空!`,
1223
+ trigger: "blur"
1224
+ }), a.max !== void 0 && a.max !== null && a.max !== "" && (a.min === void 0 || a.min === null || a.min === "") && k.push({
1221
1225
  validator: (v, g, s) => {
1222
1226
  if (g == null || g === "") return s();
1223
- a.type !== "number" && a.type !== "input-number" ? ((g == null ? void 0 : g.toString()) || "").length > Number(a.max) ? s(new Error(`${a.label}长度不能超过${a.max}个字符!`)) : s() : Number(g) > Number(a.max) ? s(new Error(`${a.label}不能大于${a.max}!`)) : s();
1227
+ a.type !== "number" && a.type !== "input-number" ? ((g == null ? void 0 : g.toString()) || "").length > Number(a.max) ? s(
1228
+ new Error(`${a.label}长度不能超过${a.max}个字符!`)
1229
+ ) : s() : Number(g) > Number(a.max) ? s(new Error(`${a.label}不能大于${a.max}!`)) : s();
1224
1230
  }
1225
1231
  }), a.min !== void 0 && a.min !== null && a.min !== "" && (a.max === void 0 || a.max === null || a.max === "") && k.push({
1226
1232
  validator: (v, g, s) => {
1227
1233
  if (g == null || g === "") return s();
1228
- a.type !== "number" && a.type !== "input-number" ? Number(a.min) < 1 ? s(new Error(`${a.label}长度最小值${a.min}设置错误!`)) : g.toString().length < Number(a.min) ? s(new Error(`${a.label}长度不能少于${a.min}个字符!`)) : s() : Number(g) < Number(a.min) ? s(new Error(`${a.label}不能小于${a.min}!`)) : s();
1234
+ a.type !== "number" && a.type !== "input-number" ? Number(a.min) < 1 ? s(
1235
+ new Error(
1236
+ `${a.label}长度最小值${a.min}设置错误!`
1237
+ )
1238
+ ) : g.toString().length < Number(a.min) ? s(
1239
+ new Error(
1240
+ `${a.label}长度不能少于${a.min}个字符!`
1241
+ )
1242
+ ) : s() : Number(g) < Number(a.min) ? s(new Error(`${a.label}不能小于${a.min}!`)) : s();
1229
1243
  }
1230
1244
  }), a.min !== void 0 && a.min !== null && a.min !== "" && a.max !== void 0 && a.max !== null && a.max !== "" && k.push({
1231
1245
  validator: (v, g, s) => {
1232
1246
  if (g == null || g === "") return s();
1233
1247
  const C = Number(a.min), V = Number(a.max);
1234
- a.type !== "number" && a.type !== "input-number" ? Number(a.min) < 1 ? s(new Error(`${a.label}长度最小值${a.min}设置错误!`)) : g.toString().length < C || g.toString().length > V ? s(new Error(`${a.label}长度必须在${C}-${V}个字符之间!`)) : s() : Number(g) < C || g > V ? s(new Error(`${a.label}必须在${C}-${V}之间!`)) : s();
1248
+ a.type !== "number" && a.type !== "input-number" ? Number(a.min) < 1 ? s(
1249
+ new Error(
1250
+ `${a.label}长度最小值${a.min}设置错误!`
1251
+ )
1252
+ ) : g.toString().length < C || g.toString().length > V ? s(
1253
+ new Error(
1254
+ `${a.label}长度必须在${C}-${V}个字符之间!`
1255
+ )
1256
+ ) : s() : Number(g) < C || g > V ? s(new Error(`${a.label}必须在${C}-${V}之间!`)) : s();
1235
1257
  }
1236
- }), a.type == "email" && k.push({ type: "email", message: "不是一个正确的邮箱地址!" }), a.type == "url" && k.push({ type: "url", message: "不是一个合正确的URL!" }), a.pattern && k.push({ pattern: a == null ? void 0 : a.pattern, message: (a == null ? void 0 : a.message) || "格式不正确!" }), a.validate && k.push({
1258
+ }), a.type == "email" && k.push({ type: "email", message: "不是一个正确的邮箱地址!" }), a.type == "url" && k.push({ type: "url", message: "不是一个合正确的URL!" }), a.pattern && k.push({
1259
+ pattern: a == null ? void 0 : a.pattern,
1260
+ message: (a == null ? void 0 : a.message) || "格式不正确!"
1261
+ }), a.validate && k.push({
1237
1262
  validator: (v, g, s) => a.validate(v, g, s)
1238
1263
  });
1239
1264
  }
@@ -1263,12 +1288,28 @@ const yt = /* @__PURE__ */ al(rl), Qe = (i, f) => {
1263
1288
  const ve = () => {
1264
1289
  T.value = Math.random().toString(36).substring(2);
1265
1290
  for (const [o, k] of Object.entries(ge.value))
1266
- t.value[o].formItem = { ...t.value[o].formItem, ...k.formItem }, t.value[o].formItem.style = { ...t.value[o].formItem.style, ...k.formItem.style };
1267
- }, ge = Je(() => Object.fromEntries(Object.entries(t.value).filter((o) => o[1].type != "hidden").filter((o) => o[1].edit !== !1).filter((o) => !["table", "tableColumns", "query", "queryItems"].includes(o[0])).filter((o) => o[1].editor !== !1).filter((o) => o[1].type !== "control").filter((o) => {
1268
- var p, a, v;
1269
- const k = typeof o[1].editor == "function" ? o[1].editor(x.value, (p = t.value.form) == null ? void 0 : p.modalState) : o[1].editor;
1270
- return t.value.form.modalState === "edit" ? ((a = k == null ? void 0 : k.ep) == null ? void 0 : a.editor) !== !1 : t.value.form.modalState === "add" ? ((v = k == null ? void 0 : k.ap) == null ? void 0 : v.editor) !== !1 : !0;
1271
- }).map((o) => [o[0], o[1]]))), be = Je(() => Object.fromEntries(Object.entries(t.value).filter((o) => o[1].type != "hidden").filter((o) => o[1].type != "control").map((o) => [o[0], o[1].value]))), ie = Je(() => {
1291
+ t.value[o].formItem = {
1292
+ ...t.value[o].formItem,
1293
+ ...k.formItem
1294
+ }, t.value[o].formItem.style = {
1295
+ ...t.value[o].formItem.style,
1296
+ ...k.formItem.style
1297
+ };
1298
+ }, ge = Je(
1299
+ () => Object.fromEntries(
1300
+ Object.entries(t.value).filter((o) => o[1].type != "hidden").filter((o) => o[1].edit !== !1).filter(
1301
+ (o) => !["table", "tableColumns", "query", "queryItems"].includes(o[0])
1302
+ ).filter((o) => o[1].editor !== !1).filter((o) => o[1].type !== "control").filter((o) => {
1303
+ var p, a, v;
1304
+ const k = typeof o[1].editor == "function" ? o[1].editor(x.value, (p = t.value.form) == null ? void 0 : p.modalState) : o[1].editor;
1305
+ return t.value.form.modalState === "edit" ? ((a = k == null ? void 0 : k.ep) == null ? void 0 : a.editor) !== !1 : t.value.form.modalState === "add" ? ((v = k == null ? void 0 : k.ap) == null ? void 0 : v.editor) !== !1 : !0;
1306
+ }).map((o) => [o[0], o[1]])
1307
+ )
1308
+ ), be = Je(
1309
+ () => Object.fromEntries(
1310
+ Object.entries(t.value).filter((o) => o[1].type != "hidden").filter((o) => o[1].type != "control").map((o) => [o[0], o[1].value])
1311
+ )
1312
+ ), ie = Je(() => {
1272
1313
  const o = /* @__PURE__ */ new Map();
1273
1314
  return Object.entries(ge.value).forEach(([k, p]) => {
1274
1315
  if (p.groupName) {
@@ -1279,7 +1320,9 @@ const yt = /* @__PURE__ */ al(rl), Qe = (i, f) => {
1279
1320
  }), o.get(a).items.push({ key: k, item: p });
1280
1321
  }
1281
1322
  }), o.forEach((k) => {
1282
- k.tabPane = qe(...k.items.map(({ item: p }) => p.tabPane || {}));
1323
+ k.tabPane = qe(
1324
+ ...k.items.map(({ item: p }) => p.tabPane || {})
1325
+ );
1283
1326
  }), Array.from(o.values());
1284
1327
  }), de = [
1285
1328
  {
@@ -1306,19 +1349,30 @@ const yt = /* @__PURE__ */ al(rl), Qe = (i, f) => {
1306
1349
  }
1307
1350
  ], fe = Je(() => de.filter((o) => !o.hidden).sort((o, k) => o.sort - k.sort || o.originalOrder - k.originalOrder));
1308
1351
  return f({
1309
- submit: H,
1352
+ submit: z,
1310
1353
  reset: ee,
1311
1354
  formData: x
1312
1355
  }), (o, k) => {
1313
1356
  var V, j, Z;
1314
1357
  const p = I("el-form-item"), a = I("el-col"), v = I("el-tab-pane"), g = I("el-tabs"), s = I("el-form"), C = I("el-button");
1315
- return n(), F("div", null, [
1316
- Q(s, S({
1317
- ref_key: "gform",
1318
- ref: d,
1319
- model: x.value,
1320
- style: { width: "98%", padding: 0, margin: 0, "box-sizing": "border-box" }
1321
- }, U(Ve)(t.value.form, (Y) => !["footer", "submit", "reset", "slots", "type", "sort"].includes(Y)), { class: "g-form-container" }), {
1358
+ return n(), F("div", yl, [
1359
+ Q(s, S(
1360
+ {
1361
+ ref_key: "gform",
1362
+ ref: d,
1363
+ model: x.value,
1364
+ style: {
1365
+ width: "98%",
1366
+ padding: 0,
1367
+ margin: 0,
1368
+ "box-sizing": "border-box"
1369
+ }
1370
+ },
1371
+ U(Ve)(
1372
+ t.value.form,
1373
+ (Y) => !["footer", "submit", "reset", "slots", "type", "sort"].includes(Y)
1374
+ )
1375
+ ), {
1322
1376
  default: h(() => [
1323
1377
  ie.value.length > 0 ? y(o.$slots, "default", { key: 0 }, () => [
1324
1378
  Q(g, S({
@@ -1374,11 +1428,11 @@ const yt = /* @__PURE__ */ al(rl), Qe = (i, f) => {
1374
1428
  data: we,
1375
1429
  item: O.item,
1376
1430
  model: t.value
1377
- })
1431
+ }, void 0, !0)
1378
1432
  ])
1379
1433
  }))
1380
1434
  ]), 1032, ["modelValue", "onUpdate:modelValue", "item", "ctrlKey", "ctrlType", "model", "formInfo"]))
1381
- ])
1435
+ ], !0)
1382
1436
  ]),
1383
1437
  _: 2
1384
1438
  }, 1040, ["label", "prop", "rules"])
@@ -1392,7 +1446,7 @@ const yt = /* @__PURE__ */ al(rl), Qe = (i, f) => {
1392
1446
  ]),
1393
1447
  _: 3
1394
1448
  }, 16, ["modelValue"])
1395
- ]) : y(o.$slots, "default", { key: 1 }, () => [
1449
+ ], !0) : y(o.$slots, "default", { key: 1 }, () => [
1396
1450
  (n(!0), F(G, null, L(ge.value, (Y, O) => (n(), M(a, S({ ref_for: !0 }, { ...t.value.form.cols, ...Y.col }, {
1397
1451
  key: O,
1398
1452
  style: { width: "100%" }
@@ -1413,7 +1467,7 @@ const yt = /* @__PURE__ */ al(rl), Qe = (i, f) => {
1413
1467
  model: t.value
1414
1468
  }, () => [
1415
1469
  Me(ye(Y.label), 1)
1416
- ])
1470
+ ], !0)
1417
1471
  ]),
1418
1472
  default: h(() => [
1419
1473
  y(o.$slots, "f-" + O, {
@@ -1440,11 +1494,11 @@ const yt = /* @__PURE__ */ al(rl), Qe = (i, f) => {
1440
1494
  data: Te,
1441
1495
  item: Y,
1442
1496
  model: t.value
1443
- })
1497
+ }, void 0, !0)
1444
1498
  ])
1445
1499
  }))
1446
1500
  ]), 1032, ["modelValue", "onUpdate:modelValue", "item", "ctrlKey", "ctrlType", "model", "formInfo"]))
1447
- ])
1501
+ ], !0)
1448
1502
  ]),
1449
1503
  _: 2
1450
1504
  }, 1040, ["label", "prop", "rules"])
@@ -1452,7 +1506,7 @@ const yt = /* @__PURE__ */ al(rl), Qe = (i, f) => {
1452
1506
  }),
1453
1507
  _: 2
1454
1508
  }, 1040))), 128))
1455
- ])
1509
+ ], !0)
1456
1510
  ]),
1457
1511
  _: 3
1458
1512
  }, 16, ["model"]),
@@ -1460,9 +1514,9 @@ const yt = /* @__PURE__ */ al(rl), Qe = (i, f) => {
1460
1514
  X("div", {
1461
1515
  style: Ie(t.value.form.footer.style)
1462
1516
  }, [
1463
- y(o.$slots, "f-footer-left"),
1517
+ y(o.$slots, "f-footer-left", {}, void 0, !0),
1464
1518
  (n(!0), F(G, null, L(fe.value, (Y) => (n(), F(G, null, [
1465
- y(o.$slots, Y.name + "-left"),
1519
+ y(o.$slots, Y.name + "-left", {}, void 0, !0),
1466
1520
  y(o.$slots, Y.name, {}, () => [
1467
1521
  Q(C, S({ ref_for: !0 }, Y.info, {
1468
1522
  onClick: mt((O) => Y.click(x.value, t.value), ["stop"])
@@ -1472,18 +1526,18 @@ const yt = /* @__PURE__ */ al(rl), Qe = (i, f) => {
1472
1526
  ]),
1473
1527
  _: 2
1474
1528
  }, 1040, ["onClick"])
1475
- ]),
1476
- y(o.$slots, Y.name + "-right")
1529
+ ], !0),
1530
+ y(o.$slots, Y.name + "-right", {}, void 0, !0)
1477
1531
  ], 64))), 256)),
1478
- y(o.$slots, "f-footer-right")
1532
+ y(o.$slots, "f-footer-right", {}, void 0, !0)
1479
1533
  ], 4)
1480
- ])
1534
+ ], !0)
1481
1535
  ]);
1482
1536
  };
1483
1537
  }
1484
- }), Dt = {
1538
+ }), bt = /* @__PURE__ */ We(gl, [["__scopeId", "data-v-a6be53f9"]]), Dt = {
1485
1539
  __name: "g-query-item",
1486
- props: /* @__PURE__ */ ze(["more"], {
1540
+ props: /* @__PURE__ */ Ne(["more"], {
1487
1541
  modelValue: { required: !0 },
1488
1542
  modelModifiers: {},
1489
1543
  info: { required: !0 },
@@ -1500,8 +1554,8 @@ const yt = /* @__PURE__ */ al(rl), Qe = (i, f) => {
1500
1554
  };
1501
1555
  return (x, T) => {
1502
1556
  const _ = I("el-form-item");
1503
- return n(!0), F(G, null, L(e(r.more), (w, H) => y(x.$slots, `q-${H}`, {
1504
- key: H,
1557
+ return n(!0), F(G, null, L(e(r.more), (w, z) => y(x.$slots, `q-${z}`, {
1558
+ key: z,
1505
1559
  item: w,
1506
1560
  queryModel: t.value,
1507
1561
  model: f.value
@@ -1511,17 +1565,17 @@ const yt = /* @__PURE__ */ al(rl), Qe = (i, f) => {
1511
1565
  ref_for: !0
1512
1566
  }, { ...f.value.queryItems, ...d(w) }), {
1513
1567
  label: h(() => [
1514
- y(x.$slots, `q-${H}-label`, {
1568
+ y(x.$slots, `q-${z}-label`, {
1515
1569
  item: w,
1516
1570
  model: f.value
1517
1571
  })
1518
1572
  ]),
1519
1573
  default: h(() => [
1520
1574
  Q(vt, {
1521
- modelValue: t.value[H],
1522
- "onUpdate:modelValue": (ee) => t.value[H] = ee,
1575
+ modelValue: t.value[z],
1576
+ "onUpdate:modelValue": (ee) => t.value[z] = ee,
1523
1577
  item: { ...w == null ? void 0 : w.editor, ...d(w) },
1524
- ctrlKey: H,
1578
+ ctrlKey: z,
1525
1579
  ctrlType: E(w),
1526
1580
  model: f.value,
1527
1581
  t: "q",
@@ -1544,10 +1598,10 @@ const yt = /* @__PURE__ */ al(rl), Qe = (i, f) => {
1544
1598
  ])), 128);
1545
1599
  };
1546
1600
  }
1547
- }, yl = {
1601
+ }, bl = {
1548
1602
  key: 0,
1549
1603
  class: "outer"
1550
- }, gl = { class: "inner" }, bl = {
1604
+ }, $l = { class: "inner" }, wl = {
1551
1605
  __name: "g-query",
1552
1606
  props: {
1553
1607
  modelValue: { required: !0 },
@@ -1555,7 +1609,7 @@ const yt = /* @__PURE__ */ al(rl), Qe = (i, f) => {
1555
1609
  info: { required: !0 },
1556
1610
  infoModifiers: {}
1557
1611
  },
1558
- emits: /* @__PURE__ */ ze(["query", "reset"], ["update:modelValue", "update:info"]),
1612
+ emits: /* @__PURE__ */ Ne(["query", "reset"], ["update:modelValue", "update:info"]),
1559
1613
  setup(i, { emit: f }) {
1560
1614
  const r = Pe(i, "modelValue"), t = f, e = _t("options"), d = le(!1), E = Pe(i, "info"), x = {
1561
1615
  hidden: !1,
@@ -1647,7 +1701,7 @@ const yt = /* @__PURE__ */ al(rl), Qe = (i, f) => {
1647
1701
  "onUpdate:info": (re) => E.value = re,
1648
1702
  more: B
1649
1703
  }, se);
1650
- }, H = Tt(), ee = () => {
1704
+ }, z = Tt(), ee = () => {
1651
1705
  var se, re, J, ve, ge, be, ie, de, fe;
1652
1706
  const q = [
1653
1707
  {
@@ -1685,7 +1739,7 @@ const yt = /* @__PURE__ */ al(rl), Qe = (i, f) => {
1685
1739
  content: r.value.query.more.mode === 3 ? () => Ae(ft, {
1686
1740
  class: "query-form",
1687
1741
  ...Ve(r.value.query, (ae) => !["query", "more", "reset"].includes(ae))
1688
- }, () => w({ slots: H }, !0)) : null
1742
+ }, () => w({ slots: z }, !0)) : null
1689
1743
  }
1690
1744
  ];
1691
1745
  return q.sort((ae, $e) => ae.sort - $e.sort), q.filter((ae) => !ae.hidden).map((ae) => ae.key === "more" && ae.component === ht ? Ae(ht, ae.props, {
@@ -1839,8 +1893,8 @@ const yt = /* @__PURE__ */ al(rl), Qe = (i, f) => {
1839
1893
  default: h(() => {
1840
1894
  var s, C, V;
1841
1895
  return [
1842
- d.value && !((V = (C = (s = r.value) == null ? void 0 : s.query) == null ? void 0 : C.more) != null && V.hidden) && r.value.query.more.mode == 1 ? (n(), F("div", yl, [
1843
- X("div", gl, [
1896
+ d.value && !((V = (C = (s = r.value) == null ? void 0 : s.query) == null ? void 0 : C.more) != null && V.hidden) && r.value.query.more.mode == 1 ? (n(), F("div", bl, [
1897
+ X("div", $l, [
1844
1898
  r.value.query.more.mode == 1 ? jt((n(), M(U(ft), S({
1845
1899
  key: 0,
1846
1900
  onSubmit: B[7] || (B[7] = mt(() => {
@@ -1851,7 +1905,7 @@ const yt = /* @__PURE__ */ al(rl), Qe = (i, f) => {
1851
1905
  ]),
1852
1906
  _: 1
1853
1907
  }, 16)), [
1854
- [Ht, d.value]
1908
+ [zt, d.value]
1855
1909
  ]) : pe("", !0)
1856
1910
  ])
1857
1911
  ])) : pe("", !0)
@@ -1862,10 +1916,10 @@ const yt = /* @__PURE__ */ al(rl), Qe = (i, f) => {
1862
1916
  ], 64);
1863
1917
  };
1864
1918
  }
1865
- }, $l = /* @__PURE__ */ Qe(bl, [["__scopeId", "data-v-46ed95d5"]]), wl = { style: { padding: "0", margin: "0", "box-sizing": "border-box" } }, El = { style: { padding: "10px", "box-sizing": "border-box" } }, _l = { style: { margin: "10px" } }, kl = {
1919
+ }, El = /* @__PURE__ */ We(wl, [["__scopeId", "data-v-46ed95d5"]]), _l = { style: { padding: "0", margin: "0", "box-sizing": "border-box" } }, kl = { style: { padding: "10px", "box-sizing": "border-box" } }, Cl = { style: { margin: "10px" } }, Dl = {
1866
1920
  style: { display: "flex", "flex-wrap": "wrap" },
1867
1921
  id: "excelSortEl"
1868
- }, Cl = ["textContent"], Dl = { style: { width: "100%", display: "flex", padding: "10px", "box-sizing": "border-box", "justify-content": "center", "border-top": "1px solid #dcdfe6" } }, Ml = {
1922
+ }, Ml = ["textContent"], Vl = { style: { width: "100%", display: "flex", padding: "10px", "box-sizing": "border-box", "justify-content": "center", "border-top": "1px solid #dcdfe6" } }, Tl = {
1869
1923
  __name: "check-excel-item",
1870
1924
  props: {
1871
1925
  items: Array,
@@ -1902,14 +1956,14 @@ const yt = /* @__PURE__ */ al(rl), Qe = (i, f) => {
1902
1956
  T.toArray();
1903
1957
  }
1904
1958
  }), _ = T;
1905
- Nt(() => {
1959
+ Ht(() => {
1906
1960
  _ && _.destroy();
1907
1961
  });
1908
1962
  }), (T, _) => {
1909
- const w = I("el-divider"), H = I("el-alert"), ee = I("el-checkbox"), q = I("el-button");
1910
- return n(), F("div", wl, [
1911
- X("div", El, [
1912
- X("div", _l, [
1963
+ const w = I("el-divider"), z = I("el-alert"), ee = I("el-checkbox"), q = I("el-button");
1964
+ return n(), F("div", _l, [
1965
+ X("div", kl, [
1966
+ X("div", Cl, [
1913
1967
  X("a", {
1914
1968
  onClick: d,
1915
1969
  style: { cursor: "pointer" }
@@ -1920,7 +1974,7 @@ const yt = /* @__PURE__ */ al(rl), Qe = (i, f) => {
1920
1974
  style: { cursor: "pointer" }
1921
1975
  }, "全不选")
1922
1976
  ]),
1923
- Q(H, {
1977
+ Q(z, {
1924
1978
  title: "拖动列标题可以改变表格列的生成顺序 !",
1925
1979
  type: "warning",
1926
1980
  "show-icon": "",
@@ -1928,7 +1982,7 @@ const yt = /* @__PURE__ */ al(rl), Qe = (i, f) => {
1928
1982
  style: { "margin-bottom": "10px" }
1929
1983
  }),
1930
1984
  _[0] || (_[0] = X("div", { style: { margin: "1px 0" } }, null, -1)),
1931
- X("div", kl, [
1985
+ X("div", Dl, [
1932
1986
  (n(!0), F(G, null, L(e.value, (B) => (n(), M(ee, {
1933
1987
  class: "check-box-hover",
1934
1988
  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" },
@@ -1942,13 +1996,13 @@ const yt = /* @__PURE__ */ al(rl), Qe = (i, f) => {
1942
1996
  X("span", {
1943
1997
  textContent: ye(B.label),
1944
1998
  style: { display: "block", "text-overflow": "ellipsis", width: "95px", overflow: "hidden" }
1945
- }, null, 8, Cl)
1999
+ }, null, 8, Ml)
1946
2000
  ]),
1947
2001
  _: 2
1948
2002
  }, 1032, ["data-id", "modelValue", "onUpdate:modelValue", "title"]))), 128))
1949
2003
  ])
1950
2004
  ]),
1951
- X("div", Dl, [
2005
+ X("div", Vl, [
1952
2006
  Q(q, {
1953
2007
  type: "primary",
1954
2008
  onClick: x,
@@ -1963,46 +2017,46 @@ const yt = /* @__PURE__ */ al(rl), Qe = (i, f) => {
1963
2017
  ]);
1964
2018
  };
1965
2019
  }
1966
- }, Vl = /* @__PURE__ */ Qe(Ml, [["__scopeId", "data-v-04791df1"]]), Ne = new el("gyc");
1967
- Ne.version(1).stores({
2020
+ }, Sl = /* @__PURE__ */ We(Tl, [["__scopeId", "data-v-04791df1"]]), He = new el("gyc");
2021
+ He.version(1).stores({
1968
2022
  tableInfo: "++id,[user+page+key],user,page,key,showCol,width,sort",
1969
2023
  tableList: "++id,name"
1970
2024
  });
1971
2025
  async function rt(i, f, r, t = {}) {
1972
- if (await Ne.tableInfo.where({ user: i, page: f, key: r }).count() > 0) {
1973
- let d = await Ne.tableInfo.where({ user: i, page: f, key: r }).first();
1974
- return await Ne.tableInfo.put({ ...d, ...t }), "update success";
2026
+ if (await He.tableInfo.where({ user: i, page: f, key: r }).count() > 0) {
2027
+ let d = await He.tableInfo.where({ user: i, page: f, key: r }).first();
2028
+ return await He.tableInfo.put({ ...d, ...t }), "update success";
1975
2029
  } else {
1976
2030
  let d = { showCol: !0, width: "auto", sort: 0, ...t };
1977
- return await Ne.tableInfo.add({ user: i, page: f, key: r, ...d }), "add success";
2031
+ return await He.tableInfo.add({ user: i, page: f, key: r, ...d }), "add success";
1978
2032
  }
1979
2033
  }
1980
- async function Tl(i, f) {
1981
- return await Ne.tableInfo.where({ user: i, page: f }).toArray();
2034
+ async function xl(i, f) {
2035
+ return await He.tableInfo.where({ user: i, page: f }).toArray();
1982
2036
  }
1983
- async function Sl(i, f) {
2037
+ async function Fl(i, f) {
1984
2038
  try {
1985
- const r = await Ne.tableInfo.where({ user: i, page: f }).delete();
2039
+ const r = await He.tableInfo.where({ user: i, page: f }).delete();
1986
2040
  return console.log("删除了" + r + "条数据"), r;
1987
2041
  } catch (r) {
1988
2042
  throw console.error("删除表格项设置信息时出错:", r), r;
1989
2043
  }
1990
2044
  }
1991
- async function xl(i) {
1992
- return await Ne.tableList.where({ name: i }).first();
2045
+ async function ql(i) {
2046
+ return await He.tableList.where({ name: i }).first();
1993
2047
  }
1994
- async function Fl(i) {
1995
- return typeof i == "string" && (i = { name: i }), await Ne.tableList.add(i), "add success";
2048
+ async function Ol(i) {
2049
+ return typeof i == "string" && (i = { name: i }), await He.tableList.add(i), "add success";
1996
2050
  }
1997
- const ql = {
2051
+ const Al = {
1998
2052
  style: { margin: "10px" },
1999
2053
  class: "allcheck"
2000
- }, Ol = {
2054
+ }, Il = {
2001
2055
  id: "cols",
2002
2056
  style: { display: "flex", "flex-wrap": "wrap", margin: "0 !important", padding: "0 !important" }
2003
- }, Al = ["textContent"], Il = {
2057
+ }, Bl = ["textContent"], Yl = {
2004
2058
  __name: "columns-setting",
2005
- props: /* @__PURE__ */ ze({
2059
+ props: /* @__PURE__ */ Ne({
2006
2060
  name: {
2007
2061
  type: String,
2008
2062
  required: !0
@@ -2017,8 +2071,8 @@ const ql = {
2017
2071
  _ ? t.value[w].showCol = !0 : t.value[w].showCol = !1;
2018
2072
  try {
2019
2073
  await rt(t.value.table.user, f.name, w, { showCol: _ });
2020
- } catch (H) {
2021
- console.error("列显示状态保存信息时出错:", H), Fe({
2074
+ } catch (z) {
2075
+ console.error("列显示状态保存信息时出错:", z), Fe({
2022
2076
  type: "error",
2023
2077
  message: "列显示状态保存信息失败!"
2024
2078
  });
@@ -2082,7 +2136,7 @@ const ql = {
2082
2136
  cancelButtonText: "取消",
2083
2137
  type: "warning"
2084
2138
  }).then(() => {
2085
- Sl(t.value.table.user, f.name).then((_) => {
2139
+ Fl(t.value.table.user, f.name).then((_) => {
2086
2140
  window.location.reload();
2087
2141
  }).catch((_) => {
2088
2142
  console.error("复位操作出错:", _), Fe({
@@ -2102,13 +2156,13 @@ const ql = {
2102
2156
  width: w.width || "auto"
2103
2157
  })).sort((_, w) => _.sort - w.sort), d();
2104
2158
  }), (_, w) => {
2105
- const H = I("el-divider"), ee = I("el-alert"), q = I("el-checkbox");
2159
+ const z = I("el-divider"), ee = I("el-alert"), q = I("el-checkbox");
2106
2160
  return n(), F("div", null, [
2107
- X("div", ql, [
2161
+ X("div", Al, [
2108
2162
  X("a", { onClick: E }, "全选"),
2109
- Q(H, { direction: "vertical" }),
2163
+ Q(z, { direction: "vertical" }),
2110
2164
  X("a", { onClick: x }, "全不选"),
2111
- Q(H, { direction: "vertical" }),
2165
+ Q(z, { direction: "vertical" }),
2112
2166
  X("a", { onClick: T }, "复位")
2113
2167
  ]),
2114
2168
  Q(ee, {
@@ -2119,7 +2173,7 @@ const ql = {
2119
2173
  style: { "margin-bottom": "10px" }
2120
2174
  }),
2121
2175
  X("div", null, [
2122
- X("div", Ol, [
2176
+ X("div", Il, [
2123
2177
  (n(!0), F(G, null, L(r.value, (B) => (n(), M(q, {
2124
2178
  modelValue: B.showCol,
2125
2179
  "onUpdate:modelValue": (se) => B.showCol = se,
@@ -2136,7 +2190,7 @@ const ql = {
2136
2190
  X("span", {
2137
2191
  textContent: ye(B.label),
2138
2192
  style: { display: "block", "text-overflow": "ellipsis", width: "95px", overflow: "hidden" }
2139
- }, null, 8, Al)
2193
+ }, null, 8, Bl)
2140
2194
  ]),
2141
2195
  _: 2
2142
2196
  }, 1032, ["modelValue", "onUpdate:modelValue", "data-id", "class", "onChange", "value", "title", "disabled"]))), 128))
@@ -2145,7 +2199,7 @@ const ql = {
2145
2199
  ]);
2146
2200
  };
2147
2201
  }
2148
- }, Bl = /* @__PURE__ */ Qe(Il, [["__scopeId", "data-v-51f730d2"]]), Yl = { class: "title" }, Ul = { class: "content" }, Rl = {
2202
+ }, Ul = /* @__PURE__ */ We(Yl, [["__scopeId", "data-v-51f730d2"]]), Rl = { class: "title" }, Ll = { class: "content" }, jl = {
2149
2203
  __name: "g-cell-toopTip",
2150
2204
  props: {
2151
2205
  content: {
@@ -2165,7 +2219,7 @@ const ql = {
2165
2219
  class: "g-cell-toopTip",
2166
2220
  style: Ie({ width: f.column.width + "px" })
2167
2221
  }, [
2168
- X("div", Yl, [
2222
+ X("div", Rl, [
2169
2223
  e[0] || (e[0] = X("span", { class: "title-text" }, "内容", -1)),
2170
2224
  X("span", {
2171
2225
  class: "copy-btn",
@@ -2175,33 +2229,70 @@ const ql = {
2175
2229
  Q(U(Zt))
2176
2230
  ])
2177
2231
  ]),
2178
- X("div", Ul, ye(f.content), 1)
2232
+ X("div", Ll, ye(f.content), 1)
2179
2233
  ], 4));
2180
2234
  }
2181
- }, Ll = /* @__PURE__ */ Qe(Rl, [["__scopeId", "data-v-f28912da"]]), jl = { key: 0 }, Hl = { style: { display: "flex", "margin-top": "-2px" } }, Nl = { style: { display: "flex", flex: "1" } }, zl = {
2235
+ }, zl = /* @__PURE__ */ We(jl, [["__scopeId", "data-v-f28912da"]]), Hl = { key: 0 }, Nl = { style: { display: "flex", "margin-top": "-2px" } }, Pl = { style: { display: "flex", flex: "1" } }, Wl = {
2182
2236
  style: { display: "flex", "justify-content": "center", width: "100%", height: "100%" },
2183
2237
  id: "table-form"
2184
- }, Pl = { key: 1 }, Wl = { style: { display: "flex" } }, Xl = { style: { display: "flex", flex: "1" } }, Gl = { class: "g-table-container" }, Ql = {
2238
+ }, Xl = { key: 1 }, Gl = { style: { display: "flex" } }, Ql = { style: { display: "flex", flex: "1" } }, Zl = { class: "g-table-container" }, Jl = {
2185
2239
  key: 0,
2186
2240
  class: "table-query-container"
2187
- }, Zl = { class: "table-container" }, Jl = ["innerHTML"], Kl = /* @__PURE__ */ Object.assign({
2241
+ }, Kl = { class: "table-container" }, ea = ["innerHTML"], ta = /* @__PURE__ */ Object.assign({
2188
2242
  name: "g-table",
2189
2243
  inheritAttrs: !1
2190
2244
  }, {
2191
2245
  __name: "g-table",
2192
- props: /* @__PURE__ */ ze({
2246
+ props: /* @__PURE__ */ Ne({
2193
2247
  name: String,
2194
2248
  require: !0
2195
2249
  }, {
2196
2250
  modelValue: { required: !0 },
2197
2251
  modelModifiers: {}
2198
2252
  }),
2199
- emits: /* @__PURE__ */ ze(["load", "open", "delete", "submit", "reset", "download", "row-save"], ["update:modelValue"]),
2253
+ emits: /* @__PURE__ */ Ne([
2254
+ "load",
2255
+ "open",
2256
+ "delete",
2257
+ "submit",
2258
+ "reset",
2259
+ "download",
2260
+ "row-save"
2261
+ ], ["update:modelValue"]),
2200
2262
  setup(i, { expose: f, emit: r }) {
2201
2263
  var Re, ut, tt, nt, st, it, lt;
2202
2264
  const t = r, e = Pe(i, "modelValue"), d = _t("options"), E = le({}), x = le(null), T = le(null), _ = Object.entries(e.value).filter(([l, u]) => (u == null ? void 0 : u.search) !== void 0).map(([l, u]) => [l, u.value]);
2203
2265
  E.value = Object.fromEntries(_);
2204
- const w = le(!1), H = ["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"], ee = le([]), q = i, B = kt(), se = le({}), re = le([]), J = le(null), ve = le(""), ge = le({
2266
+ const w = le(!1), z = [
2267
+ "type",
2268
+ "index",
2269
+ "label",
2270
+ "column-key",
2271
+ "prop",
2272
+ "width",
2273
+ "min-width",
2274
+ "fixed",
2275
+ "render-header",
2276
+ "sortable",
2277
+ "sort-method",
2278
+ "sort-by",
2279
+ "sort-orders",
2280
+ "resizable",
2281
+ "formatter",
2282
+ "show-overflow-tooltip",
2283
+ "align",
2284
+ "header-align",
2285
+ "class-name",
2286
+ "label-class-name",
2287
+ "selectable",
2288
+ "reserve-selection",
2289
+ "filters",
2290
+ "filter-placement",
2291
+ "filter-class-name",
2292
+ "filter-multiple",
2293
+ "filter-method",
2294
+ "filtered-value"
2295
+ ], ee = le([]), q = i, B = kt(), se = le({}), re = le([]), J = le(null), ve = le(""), ge = le({
2205
2296
  autoWatch: !1,
2206
2297
  data: [],
2207
2298
  border: !0,
@@ -2212,25 +2303,32 @@ const ql = {
2212
2303
  load: () => {
2213
2304
  let { currentPage: l, pageSize: u } = e.value.table.page;
2214
2305
  try {
2215
- t("load", { currentPage: l, pageSize: u, ...E.value }, (m = [], D = 0, { fields: N = [], sums: z = {} } = {}) => {
2216
- var te, Ee;
2217
- if (!Array.isArray(m)) {
2218
- console.error("从 load 事件回调中接收到的数据不是数组格式。"), Fe.error("数据加载失败,请检查数据格式。");
2219
- return;
2220
- }
2221
- if (typeof D != "number") {
2222
- console.error("从 load 事件回调中接收到的 total 不是数字格式。"), Fe.error("数据加载失败,请检查数据格式。");
2223
- return;
2224
- }
2225
- e.value.table.data = m, ((Ee = (te = e.value.control) == null ? void 0 : te.add) == null ? void 0 : Ee.inline) === !0 && e.value.table.data.unshift(J.value), e.value.table.page.total = D, re.value = N, se.value = z, Se(), ve.value = Math.random().toString(36).substring(2);
2226
- }, J.value);
2306
+ t(
2307
+ "load",
2308
+ { currentPage: l, pageSize: u, ...E.value },
2309
+ (m = [], D = 0, { fields: H = [], sums: N = {} } = {}) => {
2310
+ var te, Ee;
2311
+ if (!Array.isArray(m)) {
2312
+ console.error("从 load 事件回调中接收到的数据不是数组格式。"), Fe.error("数据加载失败,请检查数据格式。");
2313
+ return;
2314
+ }
2315
+ if (typeof D != "number") {
2316
+ console.error("从 load 事件回调中接收到的 total 不是数字格式。"), Fe.error("数据加载失败,请检查数据格式。");
2317
+ return;
2318
+ }
2319
+ e.value.table.data = m, ((Ee = (te = e.value.control) == null ? void 0 : te.add) == null ? void 0 : Ee.inline) === !0 && e.value.table.data.unshift(J.value), e.value.table.page.total = D, re.value = H, se.value = N, Se(), ve.value = Math.random().toString(36).substring(2);
2320
+ },
2321
+ J.value
2322
+ );
2227
2323
  } catch (m) {
2228
2324
  console.error("触发 load 事件时出现错误:", m), Fe.error("数据加载时出现错误,请稍后重试。");
2229
2325
  }
2230
2326
  },
2231
2327
  onHeaderDragend: (l, u, m) => {
2232
2328
  var D;
2233
- rt((D = e.value.table) == null ? void 0 : D.user, q.name, m.property, { width: l });
2329
+ rt((D = e.value.table) == null ? void 0 : D.user, q.name, m.property, {
2330
+ width: l
2331
+ });
2234
2332
  },
2235
2333
  onRowDblclick: (l, u, m) => {
2236
2334
  e.value.table.dblclickType == "edit" ? p(l, u, m, e) : e.value.table.dblclickType == "view" && v(l, u, m, e);
@@ -2297,8 +2395,8 @@ const ql = {
2297
2395
  type: "primary",
2298
2396
  mode: "dialog",
2299
2397
  auth: (l, u, m) => {
2300
- var D, N, z;
2301
- return ((z = (N = (D = e.value) == null ? void 0 : D.control) == null ? void 0 : N.add) == null ? void 0 : z.inline) === !1;
2398
+ var D, H, N;
2399
+ return ((N = (H = (D = e.value) == null ? void 0 : D.control) == null ? void 0 : H.add) == null ? void 0 : N.inline) === !1;
2302
2400
  }
2303
2401
  },
2304
2402
  delete: {
@@ -2306,13 +2404,17 @@ const ql = {
2306
2404
  label: "删除",
2307
2405
  type: "danger",
2308
2406
  auth: (l, u, m) => {
2309
- var D, N, z;
2310
- return !(((z = (N = (D = e.value) == null ? void 0 : D.control) == null ? void 0 : N.add) == null ? void 0 : z.inline) === !0 && m === 0);
2407
+ var D, H, N;
2408
+ return !(((N = (H = (D = e.value) == null ? void 0 : D.control) == null ? void 0 : H.add) == null ? void 0 : N.inline) === !0 && m === 0);
2311
2409
  },
2312
2410
  dialog: {
2313
2411
  message: "此操作将永久删除该文件, 是否继续?",
2314
2412
  title: "提示",
2315
- options: { confirmButtonText: "确定", cancelButtonText: "取消", type: "warning" }
2413
+ options: {
2414
+ confirmButtonText: "确定",
2415
+ cancelButtonText: "取消",
2416
+ type: "warning"
2417
+ }
2316
2418
  }
2317
2419
  },
2318
2420
  download: {
@@ -2349,9 +2451,9 @@ const ql = {
2349
2451
  size: "small",
2350
2452
  auth: () => !(D.control.add.inline === !0 && m == 0),
2351
2453
  onClick: () => {
2352
- var z;
2353
- let N = (z = ie(l, u, m, D)) == null ? void 0 : z.operate;
2354
- N === "edit" ? p(l, u, m, D) : N === "delete" ? a(l, u, m, D) : N === "view" && v(l, u, m, D);
2454
+ var N;
2455
+ let H = (N = ie(l, u, m, D)) == null ? void 0 : N.operate;
2456
+ H === "edit" ? p(l, u, m, D) : H === "delete" ? a(l, u, m, D) : H === "view" && v(l, u, m, D);
2355
2457
  },
2356
2458
  "button-props": { round: !0, plain: !0 }
2357
2459
  })
@@ -2365,14 +2467,14 @@ const ql = {
2365
2467
  var Ee, Ce, Le, c, W, ce;
2366
2468
  if (!l || !u || m == null)
2367
2469
  return console.warn("mergeDropdown: 缺少必要的参数(row, column或index)"), {};
2368
- const N = ((Ee = be.dropdown) == null ? void 0 : Ee.call(be, l, u, m, D)) || {}, z = ((Le = (Ce = d == null ? void 0 : d.control) == null ? void 0 : Ce.dropdown) == null ? void 0 : Le.call(Ce, l, u, m, D)) || {}, te = ((ce = (W = (c = e.value) == null ? void 0 : c.control) == null ? void 0 : W.dropdown) == null ? void 0 : ce.call(W, l, u, m, D)) || {};
2369
- return qe(N, z, te) || {};
2470
+ const H = ((Ee = be.dropdown) == null ? void 0 : Ee.call(be, l, u, m, D)) || {}, N = ((Le = (Ce = d == null ? void 0 : d.control) == null ? void 0 : Ce.dropdown) == null ? void 0 : Le.call(Ce, l, u, m, D)) || {}, te = ((ce = (W = (c = e.value) == null ? void 0 : c.control) == null ? void 0 : W.dropdown) == null ? void 0 : ce.call(W, l, u, m, D)) || {};
2471
+ return qe(H, N, te) || {};
2370
2472
  }, de = {
2371
2473
  type: "hidden",
2372
2474
  "min-width": 100,
2373
2475
  align: "center",
2374
2476
  formatter: (l, u, m, D) => m,
2375
- "tooltip-formatter": ({ row: l, column: u, cellValue: m }) => Ae(Ll, { content: m, column: u })
2477
+ "tooltip-formatter": ({ row: l, column: u, cellValue: m }) => Ae(zl, { content: m, column: u })
2376
2478
  };
2377
2479
  e.value.tableColumns = qe(
2378
2480
  de,
@@ -2430,15 +2532,19 @@ const ql = {
2430
2532
  );
2431
2533
  const ne = (l, u) => {
2432
2534
  let m = u;
2433
- if (l.decimals && !isNaN(parseFloat(u)) && (typeof l.decimals == "number" ? m = parseFloat(m).toFixed(l.decimals) : typeof l.decimals == "object" && l.decimals.num && (l.decimals.pad ? m = parseFloat(m).toFixed(l.decimals.num) : m = parseFloat(parseFloat(m).toFixed(l.decimals.num)).toString())), ["date", "datetime", "time", "time-select"].includes(l.type) && yt(u).isValid()) {
2434
- const N = {
2535
+ if (l.decimals && !isNaN(parseFloat(u)) && (typeof l.decimals == "number" ? m = parseFloat(m).toFixed(l.decimals) : typeof l.decimals == "object" && l.decimals.num && (l.decimals.pad ? m = parseFloat(m).toFixed(l.decimals.num) : m = parseFloat(
2536
+ parseFloat(m).toFixed(l.decimals.num)
2537
+ ).toString())), ["date", "datetime", "time", "time-select"].includes(l.type) && yt(u).isValid()) {
2538
+ const H = {
2435
2539
  date: "YYYY-MM-DD",
2436
2540
  datetime: "YYYY-MM-DD HH:mm:ss",
2437
2541
  time: "HH:mm:ss"
2438
2542
  };
2439
- m = l.format ? yt(m).format(l.format) : yt(m).format(N[l.type]);
2543
+ m = l.format ? yt(m).format(l.format) : yt(m).format(H[l.type]);
2440
2544
  }
2441
- return l.type === "money" && (l.align = l.align || "right", l.width = l.width || 130, m = `<span title="${Et(parseFloat(m))}">${pa(parseFloat(m))}</span>`), l.prefix && m && (m = `<span>${l.prefix}${m}</span>`), l.suffix && m && (m = `${m}<span>${l.suffix}</span>`), m;
2545
+ return l.type === "money" && (l.align = l.align || "right", l.width = l.width || 130, m = `<span title="${Et(
2546
+ parseFloat(m)
2547
+ )}">${ha(parseFloat(m))}</span>`), l.prefix && m && (m = `<span>${l.prefix}${m}</span>`), l.suffix && m && (m = `${m}<span>${l.suffix}</span>`), m;
2442
2548
  }, b = (l) => {
2443
2549
  E.value = Object.fromEntries(_), e.value.table.load();
2444
2550
  }, o = (l) => {
@@ -2456,55 +2562,85 @@ const ql = {
2456
2562
  e.value[D] && (e.value[D].value = J.value[D]);
2457
2563
  }), w.value = !0, t("open", "add", { m: l }), pt());
2458
2564
  }, p = async (l, u, m, D) => {
2459
- var N, z;
2565
+ var H, N;
2460
2566
  e.value.form.modalState = "edit";
2461
2567
  try {
2462
- if (!await ((N = e.value.control) == null ? void 0 : N.validate("edit", { row: l, column: u, $index: m, m: D }))) return;
2568
+ if (!await ((H = e.value.control) == null ? void 0 : H.validate("edit", {
2569
+ row: l,
2570
+ column: u,
2571
+ $index: m,
2572
+ m: D
2573
+ }))) return;
2463
2574
  } catch (te) {
2464
2575
  console.error("验证失败:", te);
2465
2576
  return;
2466
2577
  }
2467
- (z = e.value.control.edit) != null && z.click ? e.value.control.edit.click(l, u, m, D) : (e.value.form.disabled = !1, e.value.form.submit.hidden = !1, e.value.form.reset.hidden = !1, e.value.dialog.mode = e.value.control.edit.mode, e.value.dialog.title = e.value.control.edit.label, Object.keys(l).forEach((te) => {
2578
+ (N = e.value.control.edit) != null && N.click ? e.value.control.edit.click(l, u, m, D) : (e.value.form.disabled = !1, e.value.form.submit.hidden = !1, e.value.form.reset.hidden = !1, e.value.dialog.mode = e.value.control.edit.mode, e.value.dialog.title = e.value.control.edit.label, Object.keys(l).forEach((te) => {
2468
2579
  e.value[te] && (e.value[te].value = l[te]);
2469
2580
  }), w.value = !0, t("open", "edit", { m: D, row: l, column: u, $index: m }), pt());
2470
2581
  }, a = async (l, u, m, D) => {
2471
- var N, z;
2582
+ var H, N;
2472
2583
  try {
2473
- if (!await ((N = e.value.control) == null ? void 0 : N.validate("delete", { row: l, column: u, $index: m, m: D }))) return;
2584
+ if (!await ((H = e.value.control) == null ? void 0 : H.validate("delete", {
2585
+ row: l,
2586
+ column: u,
2587
+ $index: m,
2588
+ m: D
2589
+ }))) return;
2474
2590
  } catch (te) {
2475
2591
  console.error("验证失败:", te);
2476
2592
  return;
2477
2593
  }
2478
- if ((z = e.value.control.delete) != null && z.click)
2594
+ if ((N = e.value.control.delete) != null && N.click)
2479
2595
  e.value.control.delete.click(l, u, m, D);
2480
2596
  else {
2481
2597
  let { message: te, title: Ee, options: Ce } = e.value.control.delete.dialog;
2482
2598
  Vt.confirm(te, Ee, Ce).then(() => {
2483
- t("delete", { row: l, column: u, $index: m, m: D }, (Le = !0, c = !1) => {
2484
- Le && (e.value.table.data.splice(m, 1), e.value.table.page.total--), c && e.value.table.load();
2485
- });
2599
+ t(
2600
+ "delete",
2601
+ { row: l, column: u, $index: m, m: D },
2602
+ (Le = !0, c = !1) => {
2603
+ Le && (e.value.table.data.splice(m, 1), e.value.table.page.total--), c && e.value.table.load();
2604
+ }
2605
+ );
2486
2606
  }).catch(() => {
2487
2607
  });
2488
2608
  }
2489
2609
  }, v = async (l, u, m, D) => {
2490
- var N, z;
2610
+ var H, N;
2491
2611
  e.value.form.modalState = void 0;
2492
2612
  try {
2493
- if (!await ((N = e.value.control) == null ? void 0 : N.validate("view", { row: l, column: u, $index: m, m: D }))) return;
2613
+ if (!await ((H = e.value.control) == null ? void 0 : H.validate("view", {
2614
+ row: l,
2615
+ column: u,
2616
+ $index: m,
2617
+ m: D
2618
+ }))) return;
2494
2619
  } catch (te) {
2495
2620
  console.error("验证失败:", te);
2496
2621
  return;
2497
2622
  }
2498
- (z = e.value.control.view) != null && z.click ? e.value.control.view.click(l, u, m, D) : (e.value.form.disabled = !0, e.value.form.submit.hidden = !0, e.value.form.reset.hidden = !0, e.value.dialog.mode = e.value.control.view.mode, e.value.dialog.title = e.value.control.view.label, Object.keys(l).forEach((te) => {
2623
+ (N = e.value.control.view) != null && N.click ? e.value.control.view.click(l, u, m, D) : (e.value.form.disabled = !0, e.value.form.submit.hidden = !0, e.value.form.reset.hidden = !0, e.value.dialog.mode = e.value.control.view.mode, e.value.dialog.title = e.value.control.view.label, Object.keys(l).forEach((te) => {
2499
2624
  e.value[te] && (e.value[te].value = l[te]);
2500
2625
  }), w.value = !0, t("open", "view", { m: D, row: l, column: u, $index: m }), pt());
2501
2626
  }, g = (l, u, m, D) => {
2502
- var N;
2503
- (N = e.value.control.save) != null && N.click ? e.value.control.save.click(l, u, m, D) : t("row-save", { row: l, column: u, $index: m, data: e.value.table.data }, (z = !0, te = !0) => {
2504
- z && e.value.table.load(), te && et(() => {
2505
- J.value = Object.assign({}, Object.fromEntries(Object.entries(Ve(e.value, (Ee, Ce) => Ce.type != "control" && Ce.editor !== !1 && Ce.type != "hidden")).map(([Ee, Ce]) => [Ee, Ce.value])));
2506
- });
2507
- });
2627
+ var H;
2628
+ (H = e.value.control.save) != null && H.click ? e.value.control.save.click(l, u, m, D) : t(
2629
+ "row-save",
2630
+ { row: l, column: u, $index: m, data: e.value.table.data },
2631
+ (N = !0, te = !0) => {
2632
+ N && e.value.table.load(), te && et(() => {
2633
+ J.value = Object.assign(
2634
+ {},
2635
+ Object.fromEntries(
2636
+ Object.entries(
2637
+ Ve(e.value, (Ee, Ce) => Ce.type != "control" && Ce.editor !== !1 && Ce.type != "hidden")
2638
+ ).map(([Ee, Ce]) => [Ee, Ce.value])
2639
+ )
2640
+ );
2641
+ });
2642
+ }
2643
+ );
2508
2644
  }, s = (l, u) => {
2509
2645
  t("submit", e.value.form.modalState, l, u, (m) => {
2510
2646
  m && (w.value = !1, u.table.load());
@@ -2516,34 +2652,40 @@ const ql = {
2516
2652
  if ((m = l.control.download) != null && m.click)
2517
2653
  l.control.download.click(l, u);
2518
2654
  else {
2519
- let D = wt({
2520
- title: l.control.download.label,
2521
- size: 480,
2655
+ let D = wt(
2656
+ {
2657
+ title: l.control.download.label || l.control.download.title,
2658
+ size: 480,
2659
+ width: 600,
2660
+ slots: {
2661
+ default: () => Ae(Sl, {
2662
+ items: u,
2663
+ commitText: l.control.download.excelLabel,
2664
+ onExcel: (H, N) => {
2665
+ t("download", H, E.value, N), D();
2666
+ }
2667
+ })
2668
+ }
2669
+ },
2670
+ l.control.download.mode
2671
+ );
2672
+ }
2673
+ }, j = (l) => {
2674
+ var u;
2675
+ (u = l.control.setting) != null && u.click ? l.control.setting.click(l) : wt(
2676
+ {
2677
+ title: l.control.setting.label || l.control.setting.title,
2678
+ size: 470,
2522
2679
  width: 600,
2523
2680
  slots: {
2524
- default: () => Ae(Vl, {
2525
- items: u,
2526
- commitText: l.control.download.excelLabel,
2527
- onExcel: (N, z) => {
2528
- t("download", N, z), D();
2529
- }
2681
+ default: () => Ae(Ul, {
2682
+ modelValue: l,
2683
+ name: q.name
2530
2684
  })
2531
2685
  }
2532
- }, l.control.download.mode);
2533
- }
2534
- }, j = (l) => {
2535
- var u;
2536
- (u = l.control.setting) != null && u.click ? l.control.setting.click(l) : wt({
2537
- title: l.control.setting.label,
2538
- size: 470,
2539
- width: 600,
2540
- slots: {
2541
- default: () => Ae(Bl, {
2542
- modelValue: l,
2543
- name: q.name
2544
- })
2545
- }
2546
- }, l.control.setting.mode);
2686
+ },
2687
+ l.control.setting.mode
2688
+ );
2547
2689
  }, Z = e.value.control, Y = [
2548
2690
  { type: "add", func: k },
2549
2691
  { type: "download", func: V },
@@ -2553,26 +2695,28 @@ const ql = {
2553
2695
  { type: "delete", func: a },
2554
2696
  { type: "save", func: g }
2555
2697
  ], O = (l) => Y.filter((u) => l.includes(u.type)).map(({ type: u, func: m }) => {
2556
- var D, N, z;
2698
+ var D, H, N;
2557
2699
  return {
2558
2700
  name: `control-${u}`,
2559
2701
  attr: Z == null ? void 0 : Z[u],
2560
2702
  func: m,
2561
2703
  label: (D = Z == null ? void 0 : Z[u]) == null ? void 0 : D.label,
2562
- sort: ((N = Z == null ? void 0 : Z[u]) == null ? void 0 : N.sort) || 0,
2563
- groupName: ((z = Z == null ? void 0 : Z[u]) == null ? void 0 : z.groupName) || "default"
2704
+ sort: ((H = Z == null ? void 0 : Z[u]) == null ? void 0 : H.sort) || 0,
2705
+ groupName: ((N = Z == null ? void 0 : Z[u]) == null ? void 0 : N.groupName) || "default"
2564
2706
  };
2565
2707
  }).sort((u, m) => u.sort - m.sort), ue = (l) => O(l).reduce((u, m) => {
2566
2708
  const D = m.groupName || "default";
2567
2709
  return u[D] || (u[D] = []), u[D].push(m), u;
2568
- }, {}), ke = Je(() => Object.fromEntries(
2569
- Object.entries(e.value).filter(([l, u]) => u.type !== "hidden").filter(([l, u]) => u.visible !== !1).filter(([l, u]) => u.showCol !== !1).map(([l, u]) => (u.sort = typeof u.sort == "number" ? u.sort : 0, [l, u])).sort((l, u) => l[1].sort - u[1].sort)
2570
- )), _e = le({}), Te = (l, u) => {
2571
- const m = (D, N) => {
2572
- for (const z of D) {
2573
- if (z.value == N) return z.label;
2574
- if (z.children) {
2575
- const te = m(z.children, N);
2710
+ }, {}), ke = Je(
2711
+ () => Object.fromEntries(
2712
+ Object.entries(e.value).filter(([l, u]) => u.type !== "hidden").filter(([l, u]) => u.visible !== !1).filter(([l, u]) => u.showCol !== !1).map(([l, u]) => (u.sort = typeof u.sort == "number" ? u.sort : 0, [l, u])).sort((l, u) => l[1].sort - u[1].sort)
2713
+ )
2714
+ ), _e = le({}), Te = (l, u) => {
2715
+ const m = (D, H) => {
2716
+ for (const N of D) {
2717
+ if (N.value == H) return N.label;
2718
+ if (N.children) {
2719
+ const te = m(N.children, H);
2576
2720
  if (te) return te;
2577
2721
  }
2578
2722
  }
@@ -2580,8 +2724,8 @@ const ql = {
2580
2724
  };
2581
2725
  if (l.getDicts) {
2582
2726
  const D = u.toString();
2583
- return _e.value[D] ? (l.options = _e.value[D], l.formatter || (l.formatter = (N, z, te, Ee) => l.options && m(l.options, te) || te), Promise.resolve()) : l.getDicts(e.value.table.data).then((N) => {
2584
- _e.value[D] = N, l.options = N, l.formatter || (l.formatter = (z, te, Ee, Ce) => l.options && m(l.options, Ee) || Ee);
2727
+ return _e.value[D] ? (l.options = _e.value[D], l.formatter || (l.formatter = (H, N, te, Ee) => l.options && m(l.options, te) || te), Promise.resolve()) : l.getDicts(e.value.table.data).then((H) => {
2728
+ _e.value[D] = H, l.options = H, l.formatter || (l.formatter = (N, te, Ee, Ce) => l.options && m(l.options, Ee) || Ee);
2585
2729
  });
2586
2730
  }
2587
2731
  return Promise.resolve();
@@ -2591,10 +2735,10 @@ const ql = {
2591
2735
  if (e.value[u].getDicts) {
2592
2736
  const m = Te(e.value[u], u).then(() => {
2593
2737
  e.value.table.data.forEach((D) => {
2594
- var N;
2595
- if (e.value[u].getDicts && ((N = e.value[u]) == null ? void 0 : N.forceString) !== !1) {
2596
- const z = D[u];
2597
- D[u] = z != null ? z.toString() : z;
2738
+ var H;
2739
+ if (e.value[u].getDicts && ((H = e.value[u]) == null ? void 0 : H.forceString) !== !1) {
2740
+ const N = D[u];
2741
+ D[u] = N != null ? N.toString() : N;
2598
2742
  }
2599
2743
  });
2600
2744
  }).catch((D) => {
@@ -2606,8 +2750,8 @@ const ql = {
2606
2750
  console.error("字典加载过程中发生错误:", u);
2607
2751
  });
2608
2752
  }, we = (l, u, m, D) => {
2609
- var N, z;
2610
- return l.table ? (N = l.table(u, m, D)) != null && N.auth ? (z = l.table(u, m, D)) == null ? void 0 : z.auth(u, m, D) : !0 : !1;
2753
+ var H, N;
2754
+ return l.table ? (H = l.table(u, m, D)) != null && H.auth ? (N = l.table(u, m, D)) == null ? void 0 : N.auth(u, m, D) : !0 : !1;
2611
2755
  }, xe = (l, u) => l.name === "control-save" && u === 0 && e.value.control.add.inline === !0 ? l.attr.addLabel : l.label, Ue = () => {
2612
2756
  if (e.value.dialog.mode == "drawer")
2613
2757
  T.value.handleClose();
@@ -2620,14 +2764,23 @@ const ql = {
2620
2764
  else
2621
2765
  w.value = !1;
2622
2766
  };
2623
- return zt(() => {
2767
+ return Nt(() => {
2624
2768
  e.value.table.autoWatch && e.value.table.load();
2625
2769
  }), ot(async () => {
2626
2770
  var l;
2627
- if (ee.value = Object.values(e.value).filter((u) => u.type !== "hidden").filter((u) => u.type !== "control").filter((u) => u.visible !== !1).map((u) => ({ key: u.key || "", label: u.label, value: !0 })), et(() => {
2628
- J.value = Object.assign({}, Object.fromEntries(
2629
- Object.entries(Ve(e.value, (u, m) => m.type != "control" && m.editor !== !1 && m.type != "hidden")).map(([u, m]) => [u, m.value])
2630
- ));
2771
+ if (ee.value = Object.values(e.value).filter((u) => u.type !== "hidden").filter((u) => u.type !== "control").filter((u) => u.visible !== !1).map((u) => ({
2772
+ key: u.key || "",
2773
+ label: u.label,
2774
+ value: !0
2775
+ })), et(() => {
2776
+ J.value = Object.assign(
2777
+ {},
2778
+ Object.fromEntries(
2779
+ Object.entries(
2780
+ Ve(e.value, (u, m) => m.type != "control" && m.editor !== !1 && m.type != "hidden")
2781
+ ).map(([u, m]) => [u, m.value])
2782
+ )
2783
+ );
2631
2784
  }), !((l = e.value.table) != null && l.user)) {
2632
2785
  Fe.error("必须给使用此表格的用户一个名字!");
2633
2786
  return;
@@ -2637,19 +2790,19 @@ const ql = {
2637
2790
  return;
2638
2791
  }
2639
2792
  try {
2640
- let u = await xl(q.name);
2793
+ let u = await ql(q.name);
2641
2794
  if (u) {
2642
2795
  if (q.name !== u.name) {
2643
2796
  Fe.error("此表格已经存在,请换一个名字!");
2644
2797
  return;
2645
2798
  }
2646
2799
  } else
2647
- await Fl({ name: q.name });
2800
+ await Ol({ name: q.name });
2648
2801
  } catch (u) {
2649
2802
  console.error("检查表格名称时出现错误:", u), Fe.error("检查表格名称时出现错误,请稍后重试。");
2650
2803
  }
2651
2804
  try {
2652
- const u = await Tl(e.value.table.user, q.name);
2805
+ const u = await xl(e.value.table.user, q.name);
2653
2806
  u && u.forEach((m) => {
2654
2807
  e.value[m.key] && (e.value[m.key].width = m.width, e.value[m.key].showCol = m.showCol, e.value[m.key].sort = m.sort);
2655
2808
  });
@@ -2666,24 +2819,28 @@ const ql = {
2666
2819
  closeDialog: Ue
2667
2820
  }), (l, u) => {
2668
2821
  var ce, Be, Ke, Ze, dt;
2669
- const m = I("el-icon"), D = I("el-dialog"), N = I("el-drawer"), z = I("el-button-group"), te = I("el-dropdown-item"), Ee = I("el-dropdown-menu"), Ce = I("el-dropdown"), Le = I("el-table-column"), c = I("el-table"), W = I("el-pagination");
2822
+ const m = I("el-icon"), D = I("el-dialog"), H = I("el-drawer"), N = I("el-button-group"), te = I("el-dropdown-item"), Ee = I("el-dropdown-menu"), Ce = I("el-dropdown"), Le = I("el-table-column"), c = I("el-table"), W = I("el-pagination");
2670
2823
  return n(), F(G, null, [
2671
- e.value.dialog.mode == "dialog" && w.value ? (n(), F("div", jl, [
2672
- Q(D, S({
2673
- ref_key: "dialogRef",
2674
- ref: x,
2675
- id: "dialogRef",
2676
- modelValue: w.value,
2677
- "onUpdate:modelValue": u[3] || (u[3] = (R) => w.value = R),
2678
- fullscreen: e.value.dialog.fullScreen
2679
- }, U(Ve)(e.value.dialog, (R) => !["size", "max", "min"].includes(R)), {
2680
- width: U(Ot)(e.value.dialog.width) + 35
2681
- }), {
2824
+ e.value.dialog.mode == "dialog" && w.value ? (n(), F("div", Hl, [
2825
+ Q(D, S(
2826
+ {
2827
+ ref_key: "dialogRef",
2828
+ ref: x,
2829
+ id: "dialogRef",
2830
+ modelValue: w.value,
2831
+ "onUpdate:modelValue": u[3] || (u[3] = (R) => w.value = R),
2832
+ fullscreen: e.value.dialog.fullScreen
2833
+ },
2834
+ U(Ve)(e.value.dialog, (R) => !["size", "max", "min"].includes(R)),
2835
+ {
2836
+ width: U(Ot)(e.value.dialog.width) + 35
2837
+ }
2838
+ ), {
2682
2839
  header: h(() => {
2683
- var R, oe, $, P, K, We, Xe, je, He, at;
2840
+ var R, oe, $, P, K, Xe, Ge, je, ze, at;
2684
2841
  return [
2685
- X("div", Hl, [
2686
- X("div", Nl, [
2842
+ X("div", Nl, [
2843
+ X("div", Pl, [
2687
2844
  y(l.$slots, "f-header", {}, () => [
2688
2845
  X("div", null, ye(e.value.dialog.title), 1)
2689
2846
  ], !0)
@@ -2691,34 +2848,30 @@ const ql = {
2691
2848
  ((oe = (R = e.value) == null ? void 0 : R.dialog) == null ? void 0 : oe.fullScreen) === !1 ? (n(), F("div", {
2692
2849
  key: 0,
2693
2850
  style: Ie((K = (P = ($ = e.value) == null ? void 0 : $.dialog) == null ? void 0 : P.max) == null ? void 0 : K.style),
2694
- onClick: u[0] || (u[0] = (A) => {
2695
- e.value.dialog.fullScreen = !0;
2696
- }),
2851
+ onClick: u[0] || (u[0] = (A) => e.value.dialog.fullScreen = !0),
2697
2852
  class: "max"
2698
2853
  }, [
2699
2854
  Q(m, null, {
2700
2855
  default: h(() => {
2701
- var A, Oe, Ge;
2856
+ var A, Oe, Qe;
2702
2857
  return [
2703
- (n(), M(Ye((Ge = (Oe = (A = e.value) == null ? void 0 : A.dialog) == null ? void 0 : Oe.max) == null ? void 0 : Ge.icon)))
2858
+ (n(), M(Ye((Qe = (Oe = (A = e.value) == null ? void 0 : A.dialog) == null ? void 0 : Oe.max) == null ? void 0 : Qe.icon)))
2704
2859
  ];
2705
2860
  }),
2706
2861
  _: 1
2707
2862
  })
2708
2863
  ], 4)) : pe("", !0),
2709
- ((Xe = (We = e.value) == null ? void 0 : We.dialog) == null ? void 0 : Xe.fullScreen) === !0 ? (n(), F("div", {
2864
+ ((Ge = (Xe = e.value) == null ? void 0 : Xe.dialog) == null ? void 0 : Ge.fullScreen) === !0 ? (n(), F("div", {
2710
2865
  key: 1,
2711
- style: Ie((at = (He = (je = e.value) == null ? void 0 : je.dialog) == null ? void 0 : He.min) == null ? void 0 : at.style),
2712
- onClick: u[1] || (u[1] = (A) => {
2713
- e.value.dialog.fullScreen = !1;
2714
- }),
2866
+ style: Ie((at = (ze = (je = e.value) == null ? void 0 : je.dialog) == null ? void 0 : ze.min) == null ? void 0 : at.style),
2867
+ onClick: u[1] || (u[1] = (A) => e.value.dialog.fullScreen = !1),
2715
2868
  class: "max"
2716
2869
  }, [
2717
2870
  Q(m, null, {
2718
2871
  default: h(() => {
2719
- var A, Oe, Ge;
2872
+ var A, Oe, Qe;
2720
2873
  return [
2721
- (n(), M(Ye((Ge = (Oe = (A = e.value) == null ? void 0 : A.dialog) == null ? void 0 : Oe.min) == null ? void 0 : Ge.icon)))
2874
+ (n(), M(Ye((Qe = (Oe = (A = e.value) == null ? void 0 : A.dialog) == null ? void 0 : Oe.min) == null ? void 0 : Qe.icon)))
2722
2875
  ];
2723
2876
  }),
2724
2877
  _: 1
@@ -2728,7 +2881,7 @@ const ql = {
2728
2881
  ];
2729
2882
  }),
2730
2883
  default: h(() => [
2731
- X("div", zl, [
2884
+ X("div", Wl, [
2732
2885
  y(l.$slots, "table-dialog-form", { model: e.value }, () => [
2733
2886
  Q(bt, {
2734
2887
  modelValue: e.value,
@@ -2749,16 +2902,16 @@ const ql = {
2749
2902
  _: 3
2750
2903
  }, 16, ["modelValue", "fullscreen", "width"])
2751
2904
  ])) : pe("", !0),
2752
- e.value.dialog.mode == "drawer" && w.value ? (n(), F("div", Pl, [
2753
- Q(N, S({
2905
+ e.value.dialog.mode == "drawer" && w.value ? (n(), F("div", Xl, [
2906
+ Q(H, S({
2754
2907
  ref_key: "drawerRef",
2755
2908
  ref: T,
2756
2909
  modelValue: w.value,
2757
2910
  "onUpdate:modelValue": u[5] || (u[5] = (R) => w.value = R)
2758
2911
  }, U(Ve)(e.value.dialog, (R) => !["width"].includes(R))), {
2759
2912
  header: h(() => [
2760
- X("div", Wl, [
2761
- X("div", Xl, [
2913
+ X("div", Gl, [
2914
+ X("div", Ql, [
2762
2915
  y(l.$slots, "f-header", {}, () => [
2763
2916
  X("div", null, ye(e.value.dialog.title), 1)
2764
2917
  ], !0)
@@ -2785,10 +2938,10 @@ const ql = {
2785
2938
  _: 3
2786
2939
  }, 16, ["modelValue"])
2787
2940
  ])) : pe("", !0),
2788
- X("div", Gl, [
2789
- ((Be = (ce = e.value) == null ? void 0 : ce.query) == null ? void 0 : Be.hidden) != !0 ? (n(), F("div", Ql, [
2941
+ X("div", Zl, [
2942
+ ((Be = (ce = e.value) == null ? void 0 : ce.query) == null ? void 0 : Be.hidden) != !0 ? (n(), F("div", Jl, [
2790
2943
  y(l.$slots, "query", {}, () => [
2791
- Q($l, {
2944
+ Q(El, {
2792
2945
  modelValue: e.value,
2793
2946
  "onUpdate:modelValue": u[6] || (u[6] = (R) => e.value = R),
2794
2947
  info: E.value,
@@ -2798,7 +2951,11 @@ const ql = {
2798
2951
  }, me({
2799
2952
  "q-btns": h(() => [
2800
2953
  y(l.$slots, "q-btns", {}, () => [
2801
- (n(!0), F(G, null, L(ue(["add", "download", "setting"]), (R, oe) => (n(), F(G, null, [
2954
+ (n(!0), F(G, null, L(ue([
2955
+ "add",
2956
+ "download",
2957
+ "setting"
2958
+ ]), (R, oe) => (n(), F(G, null, [
2802
2959
  oe == "default" ? (n(!0), F(G, { key: 0 }, L(R, ($) => (n(), F(G, null, [
2803
2960
  y(l.$slots, $.name + "-left", {}, void 0, !0),
2804
2961
  ($.name === "control-add" ? $.attr.auth() && $.attr.inline === !1 : $.attr.auth()) ? y(l.$slots, $.name, { key: 0 }, () => [
@@ -2822,7 +2979,7 @@ const ql = {
2822
2979
  }), null, 16, ["title", "onClick"]))
2823
2980
  ], !0) : pe("", !0),
2824
2981
  y(l.$slots, $.name + "-right", {}, void 0, !0)
2825
- ], 64))), 256)) : (n(), M(z, { key: 1 }, {
2982
+ ], 64))), 256)) : (n(), M(N, { key: 1 }, {
2826
2983
  default: h(() => [
2827
2984
  (n(!0), F(G, null, L(R, ($) => (n(), F(G, null, [
2828
2985
  y(l.$slots, $.name + "-left", {}, void 0, !0),
@@ -2865,8 +3022,14 @@ const ql = {
2865
3022
  ]), 1032, ["modelValue", "info"])
2866
3023
  ], !0)
2867
3024
  ])) : pe("", !0),
2868
- X("div", Zl, [
2869
- Q(c, S({ ...l.$attrs, ...U(Ve)(e.value.table, (R) => !["dblclickType", "page"].includes(R)) }, {
3025
+ X("div", Kl, [
3026
+ Q(c, S({
3027
+ ...l.$attrs,
3028
+ ...U(Ve)(
3029
+ e.value.table,
3030
+ (R) => !["dblclickType", "page"].includes(R)
3031
+ )
3032
+ }, {
2870
3033
  "summary-method": (R) => e.value.table["summary-method"](R, { fields: re.value, sums: se.value }),
2871
3034
  onSortChange: u[8] || (u[8] = (R) => {
2872
3035
  var oe, $;
@@ -2885,7 +3048,10 @@ const ql = {
2885
3048
  prop: oe,
2886
3049
  key: oe,
2887
3050
  ref_for: !0
2888
- }, { ...e.value.tableColumns, ...U(Ve)(R, ($) => H.includes($)) }), me({
3051
+ }, {
3052
+ ...e.value.tableColumns,
3053
+ ...U(Ve)(R, ($) => z.includes($))
3054
+ }), me({
2889
3055
  header: h(({ column: $, $index: P }) => [
2890
3056
  oe == "control" ? y(l.$slots, `${oe}-header`, {
2891
3057
  key: 0,
@@ -2917,11 +3083,11 @@ const ql = {
2917
3083
  } : R.type == "control" ? {
2918
3084
  name: "default",
2919
3085
  fn: h(({ row: $, column: P, $index: K }) => {
2920
- var We, Xe;
3086
+ var Xe, Ge;
2921
3087
  return [
2922
3088
  X("div", {
2923
- class: St(["control", (We = e.value.control) == null ? void 0 : We.class]),
2924
- style: Ie((Xe = e.value.control) == null ? void 0 : Xe.style)
3089
+ class: St(["control", (Xe = e.value.control) == null ? void 0 : Xe.class]),
3090
+ style: Ie((Ge = e.value.control) == null ? void 0 : Ge.style)
2925
3091
  }, [
2926
3092
  y(l.$slots, "control", {}, () => [
2927
3093
  y(l.$slots, "control-left", {
@@ -2929,10 +3095,15 @@ const ql = {
2929
3095
  column: P,
2930
3096
  $index: K
2931
3097
  }, void 0, !0),
2932
- (n(!0), F(G, null, L(ue(["view", "edit", "delete", "save"]), (je, He) => {
3098
+ (n(!0), F(G, null, L(ue([
3099
+ "view",
3100
+ "edit",
3101
+ "delete",
3102
+ "save"
3103
+ ]), (je, ze) => {
2933
3104
  var at;
2934
3105
  return n(), F(G, null, [
2935
- He == "default" ? (n(!0), F(G, { key: 0 }, L(je, (A) => (n(), F(G, null, [
3106
+ ze == "default" ? (n(!0), F(G, { key: 0 }, L(je, (A) => (n(), F(G, null, [
2936
3107
  y(l.$slots, A.name + "-left", {
2937
3108
  row: $,
2938
3109
  column: P,
@@ -2968,7 +3139,7 @@ const ql = {
2968
3139
  column: P,
2969
3140
  $index: K
2970
3141
  }, void 0, !0)
2971
- ], 64))), 256)) : He != null && He.startsWith("dropdown") && ((at = ie($, P, K, e.value)) != null && at.auth()) ? (n(), M(Ce, S({
3142
+ ], 64))), 256)) : ze != null && ze.startsWith("dropdown") && ((at = ie($, P, K, e.value)) != null && at.auth()) ? (n(), M(Ce, S({
2972
3143
  key: 1,
2973
3144
  ref_for: !0
2974
3145
  }, ie($, P, K, e.value)), {
@@ -2976,7 +3147,7 @@ const ql = {
2976
3147
  Q(Ee, null, {
2977
3148
  default: h(() => [
2978
3149
  (n(!0), F(G, null, L(je, (A) => {
2979
- var Oe, Ge, Ct;
3150
+ var Oe, Qe, Ct;
2980
3151
  return n(), F(G, null, [
2981
3152
  l.$slots[A.name + "-left"] ? y(l.$slots, A.name + "-left", {
2982
3153
  key: 0,
@@ -2987,7 +3158,11 @@ const ql = {
2987
3158
  A.attr.auth($, P, K) ? (n(), M(te, S({
2988
3159
  key: 1,
2989
3160
  ref_for: !0
2990
- }, { command: (Oe = A == null ? void 0 : A.attr) == null ? void 0 : Oe.command, divided: (Ge = A == null ? void 0 : A.attr) == null ? void 0 : Ge.divided, disabled: (Ct = A == null ? void 0 : A.attr) == null ? void 0 : Ct.disabled }), {
3161
+ }, {
3162
+ command: (Oe = A == null ? void 0 : A.attr) == null ? void 0 : Oe.command,
3163
+ divided: (Qe = A == null ? void 0 : A.attr) == null ? void 0 : Qe.divided,
3164
+ disabled: (Ct = A == null ? void 0 : A.attr) == null ? void 0 : Ct.disabled
3165
+ }), {
2991
3166
  default: h(() => [
2992
3167
  y(l.$slots, A.name, {
2993
3168
  row: $,
@@ -3035,7 +3210,7 @@ const ql = {
3035
3210
  ];
3036
3211
  }),
3037
3212
  _: 2
3038
- }, 1040)) : (n(), M(z, { key: 2 }, {
3213
+ }, 1040)) : (n(), M(N, { key: 2 }, {
3039
3214
  default: h(() => [
3040
3215
  (n(!0), F(G, null, L(je, (A) => (n(), F(G, null, [
3041
3216
  y(l.$slots, A.name + "-left", {
@@ -3098,25 +3273,25 @@ const ql = {
3098
3273
  column: P,
3099
3274
  $index: K
3100
3275
  }, () => {
3101
- var We;
3276
+ var Xe;
3102
3277
  return [
3103
3278
  (n(), M(vt, {
3104
3279
  modelValue: $[oe],
3105
- "onUpdate:modelValue": (Xe) => $[oe] = Xe,
3280
+ "onUpdate:modelValue": (Ge) => $[oe] = Ge,
3106
3281
  item: R == null ? void 0 : R.table($, P, K),
3107
3282
  ctrlKey: oe,
3108
3283
  key: `${oe}-${K} -${ve.value}`,
3109
- ctrlType: (We = R.table($, P, K)) != null && We.type ? R.table($, P, K).type : R.type,
3284
+ ctrlType: (Xe = R.table($, P, K)) != null && Xe.type ? R.table($, P, K).type : R.type,
3110
3285
  model: e.value,
3111
3286
  class: "g-ctrl-container",
3112
3287
  t: "t",
3113
3288
  formInfo: $
3114
3289
  }, me({ _: 2 }, [
3115
- L(l.$slots, (Xe, je) => ({
3290
+ L(l.$slots, (Ge, je) => ({
3116
3291
  name: je,
3117
- fn: h((He) => [
3292
+ fn: h((ze) => [
3118
3293
  y(l.$slots, je, {
3119
- data: He,
3294
+ data: ze,
3120
3295
  item: R,
3121
3296
  model: e.value
3122
3297
  }, void 0, !0)
@@ -3132,8 +3307,11 @@ const ql = {
3132
3307
  }, () => [
3133
3308
  X("div", {
3134
3309
  style: Ie([{ width: "100%", "text-overflow": "ellipsis", overflow: "hidden" }, R == null ? void 0 : R.style]),
3135
- innerHTML: ne(R, P.formatter($, P, $[oe], K))
3136
- }, null, 12, Jl)
3310
+ innerHTML: ne(
3311
+ R,
3312
+ P.formatter($, P, $[oe], K)
3313
+ )
3314
+ }, null, 12, ea)
3137
3315
  ], !0)
3138
3316
  ]),
3139
3317
  key: "2"
@@ -3161,7 +3339,7 @@ const ql = {
3161
3339
  ], 64);
3162
3340
  };
3163
3341
  }
3164
- }), ea = /* @__PURE__ */ Qe(Kl, [["__scopeId", "data-v-93337e0b"]]), ta = { class: "g-tree-table" }, la = { class: "g-tree-container" }, aa = { class: "g-tree-table-container" }, ra = /* @__PURE__ */ Object.assign({
3342
+ }), la = /* @__PURE__ */ We(ta, [["__scopeId", "data-v-b4e063df"]]), aa = { class: "g-tree-table" }, ra = { class: "g-tree-container" }, oa = { class: "g-tree-table-container" }, ua = /* @__PURE__ */ Object.assign({
3165
3343
  name: "g-tree-table",
3166
3344
  inheritAttrs: !1
3167
3345
  }, {
@@ -3170,7 +3348,7 @@ const ql = {
3170
3348
  modelValue: { required: !0 },
3171
3349
  modelModifiers: {}
3172
3350
  },
3173
- emits: /* @__PURE__ */ ze(["load"], ["update:modelValue"]),
3351
+ emits: /* @__PURE__ */ Ne(["load"], ["update:modelValue"]),
3174
3352
  setup(i, { emit: f }) {
3175
3353
  var q, B, se, re;
3176
3354
  const r = f, t = Pe(i, "modelValue"), e = kt(), d = le(
@@ -3180,7 +3358,7 @@ const ql = {
3180
3358
  if (!J) return !0;
3181
3359
  const ge = ((ie = (be = e.tree) == null ? void 0 : be.props) == null ? void 0 : ie.label) || "label";
3182
3360
  return ve[ge].includes(J);
3183
- }, H = (J, ve) => {
3361
+ }, z = (J, ve) => {
3184
3362
  r("load", x.value, J, ve);
3185
3363
  }, ee = (J) => {
3186
3364
  x.value = J, t.value.table.load();
@@ -3189,7 +3367,7 @@ const ql = {
3189
3367
  _.value.filter(J);
3190
3368
  }), (J, ve) => {
3191
3369
  const ge = I("el-input"), be = I("el-tree"), ie = I("g-table");
3192
- return n(), F("div", ta, [
3370
+ return n(), F("div", aa, [
3193
3371
  X("div", {
3194
3372
  class: "g-tree-left",
3195
3373
  style: Ie({ width: d.value })
@@ -3202,7 +3380,7 @@ const ql = {
3202
3380
  placeholder: "输入节点查询",
3203
3381
  clearable: ""
3204
3382
  }, null, 8, ["modelValue"])) : pe("", !0),
3205
- X("div", la, [
3383
+ X("div", ra, [
3206
3384
  Q(be, S({
3207
3385
  style: { width: d.value },
3208
3386
  "filter-node-method": w,
@@ -3230,11 +3408,11 @@ const ql = {
3230
3408
  ]), 1040, ["style"])
3231
3409
  ])
3232
3410
  ], 4),
3233
- X("div", aa, [
3411
+ X("div", oa, [
3234
3412
  Q(ie, S({
3235
3413
  modelValue: t.value,
3236
3414
  "onUpdate:modelValue": ve[1] || (ve[1] = (de) => t.value = de)
3237
- }, J.$attrs, { onLoad: H }), me({ _: 2 }, [
3415
+ }, J.$attrs, { onLoad: z }), me({ _: 2 }, [
3238
3416
  L(J.$slots, (de, fe, ae) => ({
3239
3417
  name: fe,
3240
3418
  fn: h(($e) => [
@@ -3246,14 +3424,14 @@ const ql = {
3246
3424
  ]);
3247
3425
  };
3248
3426
  }
3249
- }), oa = /* @__PURE__ */ Qe(ra, [["__scopeId", "data-v-2d8b16ed"]]), ua = {
3427
+ }), na = /* @__PURE__ */ We(ua, [["__scopeId", "data-v-2d8b16ed"]]), sa = {
3250
3428
  key: 0,
3251
3429
  class: "op-group"
3252
- }, na = {
3430
+ }, ia = {
3253
3431
  key: 1,
3254
3432
  class: "op-items",
3255
3433
  style: { width: "100%", height: "100%" }
3256
- }, sa = ["title"], Mt = "100px", ia = /* @__PURE__ */ Object.assign({ name: "g-select-option" }, {
3434
+ }, da = ["title"], Mt = "100px", fa = /* @__PURE__ */ Object.assign({ name: "g-select-option" }, {
3257
3435
  __name: "g-select-option",
3258
3436
  props: {
3259
3437
  columns: {
@@ -3275,7 +3453,7 @@ const ql = {
3275
3453
  },
3276
3454
  setup(i) {
3277
3455
  const f = i;
3278
- return (r, t) => f.title ? (n(), F("div", ua, [
3456
+ return (r, t) => f.title ? (n(), F("div", sa, [
3279
3457
  (n(!0), F(G, null, L(f.columns, (e) => (n(), F("span", {
3280
3458
  style: Ie({ width: (e == null ? void 0 : e.width) || Mt, ...e == null ? void 0 : e.titleStyle, textAlign: (e == null ? void 0 : e.align) || "center" }),
3281
3459
  key: e.key
@@ -3284,7 +3462,7 @@ const ql = {
3284
3462
  Me(ye(e.label), 1)
3285
3463
  ], !0)
3286
3464
  ], 4))), 128))
3287
- ])) : (n(), F("div", na, [
3465
+ ])) : (n(), F("div", ia, [
3288
3466
  (n(!0), F(G, null, L(f.columns, (e) => (n(), F("span", {
3289
3467
  style: Ie({ width: (e == null ? void 0 : e.width) || Mt, textAlign: (e == null ? void 0 : e.align) || "center", ...e == null ? void 0 : e.style }),
3290
3468
  key: e.key,
@@ -3293,24 +3471,24 @@ const ql = {
3293
3471
  y(r.$slots, `${i.t}-option-${e.key}`, { col: e }, () => [
3294
3472
  Me(ye(i.data[e.key] ?? "-"), 1)
3295
3473
  ], !0)
3296
- ], 12, sa))), 128))
3474
+ ], 12, da))), 128))
3297
3475
  ]));
3298
3476
  }
3299
- }), da = /* @__PURE__ */ Qe(ia, [["__scopeId", "data-v-c0ac6b77"]]), fa = Object.freeze({}), qt = [ea, bt, oa, da];
3477
+ }), ca = /* @__PURE__ */ We(fa, [["__scopeId", "data-v-c0ac6b77"]]), ma = Object.freeze({}), qt = [la, bt, na, ca];
3300
3478
  let $t = {};
3301
- const _a = {
3479
+ const Ca = {
3302
3480
  install: (i, f = {}) => {
3303
- $t = Object.freeze({ ...fa, ...f }), qt.forEach((r) => {
3481
+ $t = Object.freeze({ ...ma, ...f }), qt.forEach((r) => {
3304
3482
  i.component(r.name, r);
3305
3483
  }), i.provide("options", $t), i.config.globalProperties.$openModal = wt;
3306
3484
  }
3307
- }, ca = (i) => ({ dialog: Bt, drawer: Yt })[i] || null, wt = (i = {}, f = "dialog") => {
3485
+ }, pa = (i) => ({ dialog: Bt, drawer: Yt })[i] || null, wt = (i = {}, f = "dialog") => {
3308
3486
  if (typeof document > "u") return () => {
3309
3487
  };
3310
3488
  const r = document.createElement("div");
3311
3489
  let t = () => {
3312
3490
  };
3313
- const e = ca(f);
3491
+ const e = pa(f);
3314
3492
  if (!e) return () => {
3315
3493
  };
3316
3494
  const d = le(!0), E = Wt({
@@ -3384,12 +3562,12 @@ function Ve(i, f = (r, t) => f(r, t)) {
3384
3562
  i.hasOwnProperty(t) && f(t, i[t]) && (r[t] = i[t]);
3385
3563
  return r;
3386
3564
  }
3387
- function ma(i, f, r = "value", t = "label", e = "children") {
3565
+ function va(i, f, r = "value", t = "label", e = "children") {
3388
3566
  for (const d of i) {
3389
3567
  if (d[r] === f)
3390
3568
  return d[t];
3391
3569
  if (d[e] && d[e].length > 0) {
3392
- const E = ma(d[e], f, r, t, e);
3570
+ const E = va(d[e], f, r, t, e);
3393
3571
  if (E)
3394
3572
  return E;
3395
3573
  }
@@ -3415,7 +3593,7 @@ function Et(i) {
3415
3593
  }
3416
3594
  return e + d.replace(/(零.)*零元/, "元").replace(/(零.)+/g, "零").replace(/^整$/, "零元整");
3417
3595
  }
3418
- function pa(i) {
3596
+ function ha(i) {
3419
3597
  if (typeof i != "number" || isNaN(i) || !isFinite(i))
3420
3598
  return "0.00";
3421
3599
  const f = i.toFixed(2), [r, t] = f.split(".");
@@ -3458,10 +3636,10 @@ const he = {
3458
3636
  }
3459
3637
  if (i.querySelector(".dialog-resize-handle"))
3460
3638
  return;
3461
- const f = va();
3462
- i.appendChild(f), ha(i), ya(i, f);
3639
+ const f = ya();
3640
+ i.appendChild(f), ga(i), ba(i, f);
3463
3641
  });
3464
- }, va = () => {
3642
+ }, ya = () => {
3465
3643
  const i = document.createElement("div");
3466
3644
  return Object.assign(i.style, {
3467
3645
  position: "absolute",
@@ -3473,7 +3651,7 @@ const he = {
3473
3651
  cursor: "nwse-resize",
3474
3652
  zIndex: "999999999999"
3475
3653
  }), i.className = "dialog-resize-handle", i;
3476
- }, ha = (i) => {
3654
+ }, ga = (i) => {
3477
3655
  Object.assign(i.style, {
3478
3656
  transition: "none",
3479
3657
  minWidth: "300px",
@@ -3481,14 +3659,14 @@ const he = {
3481
3659
  resize: "none"
3482
3660
  // 防止与原生resize冲突
3483
3661
  });
3484
- }, ya = (i, f) => {
3662
+ }, ba = (i, f) => {
3485
3663
  let r = !1, t, e, d, E;
3486
3664
  const x = (w) => {
3487
3665
  w.preventDefault(), r = !0, t = w.clientX, e = w.clientY, d = parseInt(document.defaultView.getComputedStyle(i).width), E = parseInt(document.defaultView.getComputedStyle(i).height), document.addEventListener("mousemove", T), document.addEventListener("mouseup", _);
3488
3666
  }, T = (w) => {
3489
3667
  if (!r) return;
3490
- const H = Math.max(300, d + w.clientX - t), ee = Math.max(200, E + w.clientY - e);
3491
- i.style.width = `${H}px`, i.style.height = `${ee}px`;
3668
+ const z = Math.max(300, d + w.clientX - t), ee = Math.max(200, E + w.clientY - e);
3669
+ i.style.width = `${z}px`, i.style.height = `${ee}px`;
3492
3670
  }, _ = () => {
3493
3671
  r = !1, document.removeEventListener("mousemove", T), document.removeEventListener("mouseup", _);
3494
3672
  };
@@ -3498,10 +3676,10 @@ export {
3498
3676
  he as CT,
3499
3677
  pt as bindResize,
3500
3678
  Ot as convertToPx,
3501
- _a as default,
3679
+ Ca as default,
3502
3680
  Ve as filterObject,
3503
- ma as findTreeLabelByValue,
3504
- pa as formatAmount,
3681
+ va as findTreeLabelByValue,
3682
+ ha as formatAmount,
3505
3683
  qe as mergeObjects,
3506
3684
  Et as moneyToChinese,
3507
3685
  wt as openModal