vue-2024-ui 0.1.10 → 0.1.12

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.
Files changed (2) hide show
  1. package/dist/index.es.js +105 -104
  2. package/package.json +1 -1
package/dist/index.es.js CHANGED
@@ -189,7 +189,7 @@ var Tt = { exports: {} };
189
189
  (function(r, t) {
190
190
  f.exports = t();
191
191
  })(tl, function() {
192
- var r = 1e3, t = 6e4, e = 36e5, d = "millisecond", E = "second", T = "minute", F = "hour", k = "day", $ = "week", N = "month", ee = "quarter", I = "year", U = "date", re = "Invalid Date", ae = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, Q = /\[([^\]]+)]|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, me = { 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(v) {
192
+ var r = 1e3, t = 6e4, e = 36e5, d = "millisecond", E = "second", F = "minute", T = "hour", k = "day", $ = "week", N = "month", ee = "quarter", I = "year", U = "date", re = "Invalid Date", ae = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, Q = /\[([^\]]+)]|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, me = { 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(v) {
193
193
  var a = ["th", "st", "nd", "rd"], p = v % 100;
194
194
  return "[" + v + (a[(p - 20) % 10] || a[p] || a[0]) + "]";
195
195
  } }, ye = function(v, a, p) {
@@ -205,7 +205,7 @@ var Tt = { exports: {} };
205
205
  }, a: function(v) {
206
206
  return v < 0 ? Math.ceil(v) || 0 : Math.floor(v);
207
207
  }, p: function(v) {
208
- return { M: N, y: I, w: $, d: k, D: U, h: F, m: T, s: E, ms: d, Q: ee }[v] || String(v || "").toLowerCase().replace(/s$/, "");
208
+ return { M: N, y: I, w: $, d: k, D: U, h: T, m: F, s: E, ms: d, Q: ee }[v] || String(v || "").toLowerCase().replace(/s$/, "");
209
209
  }, u: function(v) {
210
210
  return v === void 0;
211
211
  } }, ie = "en", de = {};
@@ -291,9 +291,9 @@ var Tt = { exports: {} };
291
291
  case k:
292
292
  case U:
293
293
  return X(Ee + "Hours", 0);
294
- case F:
295
- return X(Ee + "Minutes", 1);
296
294
  case T:
295
+ return X(Ee + "Minutes", 1);
296
+ case F:
297
297
  return X(Ee + "Seconds", 2);
298
298
  case E:
299
299
  return X(Ee + "Milliseconds", 3);
@@ -303,7 +303,7 @@ var Tt = { exports: {} };
303
303
  }, a.endOf = function(p) {
304
304
  return this.startOf(p, !1);
305
305
  }, a.$set = function(p, g) {
306
- var s, D = b.p(p), C = "set" + (this.$u ? "UTC" : ""), j = (s = {}, s[k] = C + "Date", s[U] = C + "Date", s[N] = C + "Month", s[I] = C + "FullYear", s[F] = C + "Hours", s[T] = C + "Minutes", s[E] = C + "Seconds", s[d] = C + "Milliseconds", s)[D], X = D === k ? this.$D + (g - this.$W) : g;
306
+ var s, D = b.p(p), C = "set" + (this.$u ? "UTC" : ""), j = (s = {}, s[k] = C + "Date", s[U] = C + "Date", s[N] = C + "Month", s[I] = C + "FullYear", s[T] = C + "Hours", s[F] = C + "Minutes", s[E] = C + "Seconds", s[d] = C + "Milliseconds", s)[D], X = D === k ? this.$D + (g - this.$W) : g;
307
307
  if (D === N || D === I) {
308
308
  var O = this.clone().set(U, 1);
309
309
  O.$d[j](X), O.init(), this.$d = O.set(U, Math.min(this.$D, O.daysInMonth())).$d;
@@ -324,7 +324,7 @@ var Tt = { exports: {} };
324
324
  if (C === I) return this.set(I, this.$y + p);
325
325
  if (C === k) return j(1);
326
326
  if (C === $) return j(7);
327
- var X = (s = {}, s[T] = t, s[F] = e, s[E] = r, s)[C] || 1, O = this.$d.getTime() + p * X;
327
+ var X = (s = {}, s[F] = t, s[T] = e, s[E] = r, s)[C] || 1, O = this.$d.getTime() + p * X;
328
328
  return b.w(O, this);
329
329
  }, a.subtract = function(p, g) {
330
330
  return this.add(-1 * p, g);
@@ -416,10 +416,10 @@ var Tt = { exports: {} };
416
416
  case k:
417
417
  D = (A - O) / 864e5;
418
418
  break;
419
- case F:
419
+ case T:
420
420
  D = A / e;
421
421
  break;
422
- case T:
422
+ case F:
423
423
  D = A / t;
424
424
  break;
425
425
  case E:
@@ -449,7 +449,7 @@ var Tt = { exports: {} };
449
449
  return this.$d.toUTCString();
450
450
  }, v;
451
451
  }(), _ = o.prototype;
452
- return se.prototype = _, [["$ms", d], ["$s", E], ["$m", T], ["$H", F], ["$W", k], ["$M", N], ["$y", I], ["$D", U]].forEach(function(v) {
452
+ return se.prototype = _, [["$ms", d], ["$s", E], ["$m", F], ["$H", T], ["$W", k], ["$M", N], ["$y", I], ["$D", U]].forEach(function(v) {
453
453
  _[v[1]] = function(a) {
454
454
  return this.$g(a, v[0], v[1]);
455
455
  };
@@ -481,7 +481,7 @@ const mt = /* @__PURE__ */ ll(al), Ge = (f, c) => {
481
481
  emits: ["update:modelValue"],
482
482
  setup(f) {
483
483
  var be, se;
484
- const c = Ne(f, "modelValue"), r = f, t = te(r.item || {}), e = te(r.ctrlKey), d = te(r.ctrlType), E = te(r.model), T = te([]), F = te([]), k = te(!1), $ = te(!1), N = () => Object.keys(Mt()).filter((b) => b.startsWith(`${r.t}-${e}-`)).map((b) => b.replace(`${r.t}-${e}-`, "")), ee = te({
484
+ const c = Ne(f, "modelValue"), r = f, t = te(r.item || {}), e = te(r.ctrlKey), d = te(r.ctrlType), E = te(r.model), F = te([]), T = te([]), k = te(!1), $ = te(!1), N = () => Object.keys(Mt()).filter((b) => b.startsWith(`${r.t}-${e}-`)).map((b) => b.replace(`${r.t}-${e}-`, "")), ee = te({
485
485
  multiple: !1,
486
486
  "show-file-list": !1,
487
487
  "file-list": [],
@@ -520,7 +520,7 @@ const mt = /* @__PURE__ */ ll(al), Ge = (f, c) => {
520
520
  }), Q = te((b) => {
521
521
  t.value["remote-method"](b, (o) => {
522
522
  Qe(() => {
523
- F.value = o;
523
+ T.value = o;
524
524
  });
525
525
  });
526
526
  }), me = async (b = "options") => {
@@ -528,14 +528,14 @@ const mt = /* @__PURE__ */ ll(al), Ge = (f, c) => {
528
528
  try {
529
529
  const _ = await ((o = t.value) == null ? void 0 : o.getDicts(r.formInfo));
530
530
  if (typeof _ == "string")
531
- F.value = [{ label: _, value: c.value }];
531
+ T.value = [{ label: _, value: c.value }];
532
532
  else {
533
533
  const v = _ == null ? void 0 : _.map((a, p) => ({
534
534
  ...a,
535
535
  value: a.value ?? a.label ?? p,
536
536
  label: a.label || "未知选项"
537
537
  }));
538
- F.value = v || [];
538
+ T.value = v || [];
539
539
  }
540
540
  } catch (_) {
541
541
  throw console.error("获取选项失败:", _), _;
@@ -552,7 +552,7 @@ const mt = /* @__PURE__ */ ll(al), Ge = (f, c) => {
552
552
  }, ne = te(null);
553
553
  at(async () => {
554
554
  var _, v, a, p, g;
555
- t.value && t.value["remote-method"] && (ae.value["remote-method"] = Q), (v = (_ = E.value[e.value]) == null ? void 0 : _.options) != null && v.length && (F.value = E.value[e.value].options);
555
+ t.value && t.value["remote-method"] && (ae.value["remote-method"] = Q), (v = (_ = E.value[e.value]) == null ? void 0 : _.options) != null && v.length && (T.value = E.value[e.value].options);
556
556
  const b = (s, D = "options", C = E.value[e.value]) => {
557
557
  typeof t.value.getDicts == "function" && me(D).catch((j) => {
558
558
  console.error(`Failed to load ${D} for ${s}:`, j);
@@ -560,7 +560,7 @@ const mt = /* @__PURE__ */ ll(al), Ge = (f, c) => {
560
560
  };
561
561
  if (["radio", "radio-button", "checkbox-group", "checkbox-group-button", "select", "cascader"].includes(d.value) && b(d.value), d.value === pe.TREESELECT && await (async () => {
562
562
  try {
563
- typeof t.value.getDicts == "function" ? T.value = await t.value.getDicts(r.formInfo) : T.value = F.value;
563
+ typeof t.value.getDicts == "function" ? F.value = await t.value.getDicts(r.formInfo) : F.value = T.value;
564
564
  } catch (D) {
565
565
  console.error("Failed to load data for tree-select:", D);
566
566
  }
@@ -616,7 +616,7 @@ const mt = /* @__PURE__ */ ll(al), Ge = (f, c) => {
616
616
  }, t.value), {
617
617
  default: y(() => [
618
618
  h(b.$slots, `${r.t}-${e.value}`, { data: t.value }, () => [
619
- (i(!0), x(W, null, R(F.value, (n) => (i(), M(v, q({ ref_for: !0 }, n), {
619
+ (i(!0), x(W, null, R(T.value, (n) => (i(), M(v, q({ ref_for: !0 }, n), {
620
620
  default: y(() => [
621
621
  h(b.$slots, `${r.t}-${e.value}-options`, { option: n }, void 0, !0)
622
622
  ]),
@@ -632,7 +632,7 @@ const mt = /* @__PURE__ */ ll(al), Ge = (f, c) => {
632
632
  }, t.value), {
633
633
  default: y(() => [
634
634
  h(b.$slots, `${r.t}-${e.value}`, { data: t.value }, () => [
635
- (i(!0), x(W, null, R(F.value, (n) => (i(), M(p, q({ ref_for: !0 }, n), {
635
+ (i(!0), x(W, null, R(T.value, (n) => (i(), M(p, q({ ref_for: !0 }, n), {
636
636
  default: y(() => [
637
637
  h(b.$slots, `${r.t}-${e.value}-options`, { option: n }, void 0, !0)
638
638
  ]),
@@ -659,7 +659,7 @@ const mt = /* @__PURE__ */ ll(al), Ge = (f, c) => {
659
659
  }, t.value), {
660
660
  default: y(() => [
661
661
  h(b.$slots, `${r.t}-${e.value}`, { data: t.value }, () => [
662
- (i(!0), x(W, null, R(F.value, (n) => (i(), M(g, q({ ref_for: !0 }, n), {
662
+ (i(!0), x(W, null, R(T.value, (n) => (i(), M(g, q({ ref_for: !0 }, n), {
663
663
  default: y(() => [
664
664
  h(b.$slots, `${r.t}-${e.value}-options`, { option: n }, () => [
665
665
  _e(he(n.label), 1)
@@ -677,7 +677,7 @@ const mt = /* @__PURE__ */ ll(al), Ge = (f, c) => {
677
677
  }, t.value), {
678
678
  default: y(() => [
679
679
  h(b.$slots, `${r.t}-${e.value}`, { data: t.value }, () => [
680
- (i(!0), x(W, null, R(F.value, (n) => (i(), M(D, q({ ref_for: !0 }, n), {
680
+ (i(!0), x(W, null, R(T.value, (n) => (i(), M(D, q({ ref_for: !0 }, n), {
681
681
  default: y(() => [
682
682
  h(b.$slots, `${r.t}-${e.value}-options`, { option: n }, void 0, !0)
683
683
  ]),
@@ -697,8 +697,8 @@ const mt = /* @__PURE__ */ ll(al), Ge = (f, c) => {
697
697
  })
698
698
  }, ae.value), fe({
699
699
  default: y(() => [
700
- h(b.$slots, `${r.t}-${e.value}`, { options: F.value }, () => [
701
- (i(!0), x(W, null, R(F.value, (n) => (i(), x(W, {
700
+ h(b.$slots, `${r.t}-${e.value}`, { options: T.value }, () => [
701
+ (i(!0), x(W, null, R(T.value, (n) => (i(), x(W, {
702
702
  key: n.value
703
703
  }, [
704
704
  J(j, q({ ref_for: !0 }, L(Ce)(n, (V) => V != "children"), {
@@ -812,7 +812,7 @@ const mt = /* @__PURE__ */ ll(al), Ge = (f, c) => {
812
812
  modelValue: c.value,
813
813
  "onUpdate:modelValue": o[8] || (o[8] = (n) => c.value = n),
814
814
  placeholder: E.value[e.value].label
815
- }, t.value, { data: T.value }), fe({ _: 2 }, [
815
+ }, t.value, { data: F.value }), fe({ _: 2 }, [
816
816
  R(N(), (n) => ({
817
817
  name: n,
818
818
  fn: y((V) => [
@@ -886,7 +886,7 @@ const mt = /* @__PURE__ */ ll(al), Ge = (f, c) => {
886
886
  key: 15,
887
887
  modelValue: c.value,
888
888
  "onUpdate:modelValue": o[17] || (o[17] = (n) => c.value = n)
889
- }, t.value, { options: F.value }), fe({ _: 2 }, [
889
+ }, t.value, { options: T.value }), fe({ _: 2 }, [
890
890
  R(N(), (n) => ({
891
891
  name: n,
892
892
  fn: y((V) => [
@@ -1086,7 +1086,7 @@ const mt = /* @__PURE__ */ ll(al), Ge = (f, c) => {
1086
1086
  emits: /* @__PURE__ */ Le(["submit", "reset"], ["update:modelValue"]),
1087
1087
  setup(f, { expose: c, emit: r }) {
1088
1088
  var le, be, se, b;
1089
- const t = Ne(f, "modelValue"), e = r, d = te(null), E = gt("options"), T = te({}), F = te(""), k = f, $ = {
1089
+ const t = Ne(f, "modelValue"), e = r, d = te(null), E = gt("options"), F = te({}), T = te(""), k = f, $ = {
1090
1090
  inline: !0,
1091
1091
  type: "hidden",
1092
1092
  "scroll-to-error": !0,
@@ -1224,7 +1224,7 @@ const mt = /* @__PURE__ */ ll(al), Ge = (f, c) => {
1224
1224
  return _;
1225
1225
  }, ae = (o, _ = !1) => {
1226
1226
  var p, g, s, D, C;
1227
- const v = _ ? o : o == null ? void 0 : o.item, a = typeof (v == null ? void 0 : v.editor) == "function" ? v.editor(T.value, (p = t.value.form) == null ? void 0 : p.modalState) : (v == null ? void 0 : v.editor) || {};
1227
+ const v = _ ? o : o == null ? void 0 : o.item, a = typeof (v == null ? void 0 : v.editor) == "function" ? v.editor(F.value, (p = t.value.form) == null ? void 0 : p.modalState) : (v == null ? void 0 : v.editor) || {};
1228
1228
  if (((g = t.value.form) == null ? void 0 : g.modalState) === "edit") {
1229
1229
  const j = typeof (v == null ? void 0 : v.editor) == "object" ? (s = v.editor) == null ? void 0 : s.ep : typeof (v == null ? void 0 : v.editor) == "function" ? a == null ? void 0 : a.ep : {};
1230
1230
  return { ...a, ...j };
@@ -1236,21 +1236,21 @@ const mt = /* @__PURE__ */ ll(al), Ge = (f, c) => {
1236
1236
  return a;
1237
1237
  }, Q = (o) => {
1238
1238
  var v, a, p, g, s;
1239
- const _ = typeof o.editor == "function" ? o.editor(T.value, (v = t.value.form) == null ? void 0 : v.modalState) : o.editor;
1239
+ const _ = typeof o.editor == "function" ? o.editor(F.value, (v = t.value.form) == null ? void 0 : v.modalState) : o.editor;
1240
1240
  return ((a = t.value.form) == null ? void 0 : a.modalState) === "edit" ? ((p = _ == null ? void 0 : _.ep) == null ? void 0 : p.type) ?? (_ == null ? void 0 : _.type) ?? o.type : ((g = t.value.form) == null ? void 0 : g.modalState) === "add" ? ((s = _ == null ? void 0 : _.ap) == null ? void 0 : s.type) ?? (_ == null ? void 0 : _.type) ?? o.type : (_ == null ? void 0 : _.type) ?? o.type;
1241
1241
  };
1242
1242
  at(() => {
1243
- me(), k != null && k.editForm ? T.value = k.editForm : T.value = ge.value;
1243
+ me(), k != null && k.editForm ? F.value = k.editForm : F.value = ge.value;
1244
1244
  }), Yt(() => {
1245
1245
  d.value = null;
1246
1246
  });
1247
1247
  const me = () => {
1248
- F.value = Math.random().toString(36).substring(2);
1248
+ T.value = Math.random().toString(36).substring(2);
1249
1249
  for (const [o, _] of Object.entries(ye.value))
1250
1250
  t.value[o].formItem = { ...t.value[o].formItem, ..._.formItem }, t.value[o].formItem.style = { ...t.value[o].formItem.style, ..._.formItem.style };
1251
1251
  }, ye = Xe(() => 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) => {
1252
1252
  var v, a, p;
1253
- const _ = typeof o[1].editor == "function" ? o[1].editor(T.value, (v = t.value.form) == null ? void 0 : v.modalState) : o[1].editor;
1253
+ const _ = typeof o[1].editor == "function" ? o[1].editor(F.value, (v = t.value.form) == null ? void 0 : v.modalState) : o[1].editor;
1254
1254
  return t.value.form.modalState === "edit" ? ((a = _ == null ? void 0 : _.ep) == null ? void 0 : a.editor) !== !1 : t.value.form.modalState === "add" ? ((p = _ == null ? void 0 : _.ap) == null ? void 0 : p.editor) !== !1 : !0;
1255
1255
  }).map((o) => [o[0], o[1]]))), ge = Xe(() => 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 = Xe(() => {
1256
1256
  const o = /* @__PURE__ */ new Map();
@@ -1290,14 +1290,15 @@ const mt = /* @__PURE__ */ ll(al), Ge = (f, c) => {
1290
1290
  }
1291
1291
  ], ne = Xe(() => de.filter((o) => !o.hidden).sort((o, _) => o.sort - _.sort || o.originalOrder - _.originalOrder));
1292
1292
  return c({
1293
- submitClickHandler: N,
1294
- resetClickHandler: ee
1293
+ submit: N,
1294
+ reset: ee,
1295
+ formData: F
1295
1296
  }), (o, _) => {
1296
1297
  const v = Y("el-form-item"), a = Y("el-col"), p = Y("el-tab-pane"), g = Y("el-tabs"), s = Y("el-button"), D = Y("el-form");
1297
1298
  return i(), M(D, q({
1298
1299
  ref_key: "gform",
1299
1300
  ref: d,
1300
- model: T.value,
1301
+ model: F.value,
1301
1302
  style: { width: "98%", padding: 0, margin: 0, "box-sizing": "border-box" }
1302
1303
  }, L(Ce)(t.value.form, (C) => !["footer", "submit", "reset", "slots", "type", "sort"].includes(C)), { class: "g-form-container" }), {
1303
1304
  default: y(() => [
@@ -1335,20 +1336,20 @@ const mt = /* @__PURE__ */ ll(al), Ge = (f, c) => {
1335
1336
  default: y(() => [
1336
1337
  h(o.$slots, "f-" + A.key, {
1337
1338
  item: A == null ? void 0 : A.item,
1338
- formInfo: T.value,
1339
+ formInfo: F.value,
1339
1340
  model: t.value
1340
1341
  }, () => [
1341
1342
  (i(), M(ft, {
1342
- modelValue: T.value[A.key],
1343
- "onUpdate:modelValue": (De) => T.value[A.key] = De,
1343
+ modelValue: F.value[A.key],
1344
+ "onUpdate:modelValue": (De) => F.value[A.key] = De,
1344
1345
  item: ae(A),
1345
1346
  ctrlKey: A.key,
1346
1347
  ctrlType: Q(A == null ? void 0 : A.item),
1347
1348
  model: t.value,
1348
- key: `${A.key}-${F.value}`,
1349
+ key: `${A.key}-${T.value}`,
1349
1350
  class: "g-ctrl-container",
1350
1351
  t: "f",
1351
- formInfo: T.value
1352
+ formInfo: F.value
1352
1353
  }, fe({ _: 2 }, [
1353
1354
  R(o.$slots, (De, Ve) => ({
1354
1355
  name: Ve,
@@ -1384,7 +1385,7 @@ const mt = /* @__PURE__ */ ll(al), Ge = (f, c) => {
1384
1385
  h(o.$slots, O.name + "-left"),
1385
1386
  h(o.$slots, O.name, {}, () => [
1386
1387
  J(s, q({ ref_for: !0 }, O.info, {
1387
- onClick: lt((A) => O.click(T.value, t.value), ["stop"])
1388
+ onClick: lt((A) => O.click(F.value, t.value), ["stop"])
1388
1389
  }), {
1389
1390
  default: y(() => [
1390
1391
  _e(he(O == null ? void 0 : O.label), 1)
@@ -1426,20 +1427,20 @@ const mt = /* @__PURE__ */ ll(al), Ge = (f, c) => {
1426
1427
  default: y(() => [
1427
1428
  h(o.$slots, "f-" + A, {
1428
1429
  item: O,
1429
- formInfo: T.value,
1430
+ formInfo: F.value,
1430
1431
  model: t.value
1431
1432
  }, () => [
1432
1433
  (i(), M(ft, {
1433
- modelValue: T.value[A],
1434
- "onUpdate:modelValue": (Ee) => T.value[A] = Ee,
1434
+ modelValue: F.value[A],
1435
+ "onUpdate:modelValue": (Ee) => F.value[A] = Ee,
1435
1436
  item: ae(O, !0),
1436
1437
  ctrlKey: A,
1437
1438
  ctrlType: Q(O),
1438
- key: `${A}-${F.value}`,
1439
+ key: `${A}-${T.value}`,
1439
1440
  model: t.value,
1440
1441
  class: "g-ctrl-container",
1441
1442
  t: "f",
1442
- formInfo: T.value
1443
+ formInfo: F.value
1443
1444
  }, fe({ _: 2 }, [
1444
1445
  R(o.$slots, (Ee, we) => ({
1445
1446
  name: we,
@@ -1469,7 +1470,7 @@ const mt = /* @__PURE__ */ ll(al), Ge = (f, c) => {
1469
1470
  h(o.$slots, O.name + "-left"),
1470
1471
  h(o.$slots, O.name, {}, () => [
1471
1472
  J(s, q({ ref_for: !0 }, O.info, {
1472
- onClick: lt((A) => O.click(T.value, t.value), ["stop"])
1473
+ onClick: lt((A) => O.click(F.value, t.value), ["stop"])
1473
1474
  }), {
1474
1475
  default: y(() => [
1475
1476
  _e(he(O == null ? void 0 : O.label), 1)
@@ -1499,16 +1500,16 @@ const mt = /* @__PURE__ */ ll(al), Ge = (f, c) => {
1499
1500
  }),
1500
1501
  emits: ["update:modelValue", "update:info"],
1501
1502
  setup(f) {
1502
- const c = Ne(f, "modelValue"), r = f, t = Ne(f, "info"), e = (T) => Xe(() => Object.fromEntries(Object.entries(c.value).filter((F) => {
1503
+ const c = Ne(f, "modelValue"), r = f, t = Ne(f, "info"), e = (F) => Xe(() => Object.fromEntries(Object.entries(c.value).filter((T) => {
1503
1504
  var k;
1504
- return typeof F[1].search == "function" ? F[1].search && ((k = F[1].search(t.value, c.value.table)) == null ? void 0 : k.more) === T : F[1].search && F[1].search.more === T;
1505
- }).map((F) => [F[0], F[1]]))).value, d = (T) => typeof T.search == "function" ? T.search(t.value, c.value.table) : T.search || {}, E = (T) => {
1506
- const F = d(T);
1507
- return (F == null ? void 0 : F.type) || T.type;
1505
+ return typeof T[1].search == "function" ? T[1].search && ((k = T[1].search(t.value, c.value.table)) == null ? void 0 : k.more) === F : T[1].search && T[1].search.more === F;
1506
+ }).map((T) => [T[0], T[1]]))).value, d = (F) => typeof F.search == "function" ? F.search(t.value, c.value.table) : F.search || {}, E = (F) => {
1507
+ const T = d(F);
1508
+ return (T == null ? void 0 : T.type) || F.type;
1508
1509
  };
1509
- return (T, F) => {
1510
+ return (F, T) => {
1510
1511
  const k = Y("el-form-item");
1511
- return i(!0), x(W, null, R(e(r.more), ($, N) => h(T.$slots, `q-${N}`, {
1512
+ return i(!0), x(W, null, R(e(r.more), ($, N) => h(F.$slots, `q-${N}`, {
1512
1513
  key: N,
1513
1514
  item: $,
1514
1515
  queryModel: t.value,
@@ -1519,7 +1520,7 @@ const mt = /* @__PURE__ */ ll(al), Ge = (f, c) => {
1519
1520
  ref_for: !0
1520
1521
  }, { ...c.value.queryItems, ...d($) }), {
1521
1522
  label: y(() => [
1522
- h(T.$slots, `q-${N}-label`, {
1523
+ h(F.$slots, `q-${N}-label`, {
1523
1524
  item: $,
1524
1525
  model: c.value
1525
1526
  })
@@ -1535,10 +1536,10 @@ const mt = /* @__PURE__ */ ll(al), Ge = (f, c) => {
1535
1536
  t: "q",
1536
1537
  formInfo: t.value
1537
1538
  }, fe({ _: 2 }, [
1538
- R(Object.keys(T.$slots), (ee) => ({
1539
+ R(Object.keys(F.$slots), (ee) => ({
1539
1540
  name: ee,
1540
1541
  fn: y((I) => [
1541
- h(T.$slots, ee, {
1542
+ h(F.$slots, ee, {
1542
1543
  data: I,
1543
1544
  item: $,
1544
1545
  model: c.value
@@ -1565,7 +1566,7 @@ const mt = /* @__PURE__ */ ll(al), Ge = (f, c) => {
1565
1566
  },
1566
1567
  emits: /* @__PURE__ */ Le(["query", "reset"], ["update:modelValue", "update:info"]),
1567
1568
  setup(f, { emit: c }) {
1568
- const r = Ne(f, "modelValue"), t = c, e = gt("options"), d = te(!1), E = Ne(f, "info"), T = {
1569
+ const r = Ne(f, "modelValue"), t = c, e = gt("options"), d = te(!1), E = Ne(f, "info"), F = {
1569
1570
  hidden: !1,
1570
1571
  type: "hidden",
1571
1572
  labelWidth: 100,
@@ -1613,8 +1614,8 @@ const mt = /* @__PURE__ */ ll(al), Ge = (f, c) => {
1613
1614
  }
1614
1615
  }
1615
1616
  };
1616
- r.value.query = Se(T, e == null ? void 0 : e.query, r.value.query);
1617
- const F = {
1617
+ r.value.query = Se(F, e == null ? void 0 : e.query, r.value.query);
1618
+ const T = {
1618
1619
  2: {
1619
1620
  title: "更多查询",
1620
1621
  showClose: !1,
@@ -1632,7 +1633,7 @@ const mt = /* @__PURE__ */ ll(al), Ge = (f, c) => {
1632
1633
  }
1633
1634
  };
1634
1635
  r.value.query.more.dialog = Se(
1635
- F[r.value.query.more.mode] || {},
1636
+ T[r.value.query.more.mode] || {},
1636
1637
  r.value.query.more.dialog
1637
1638
  );
1638
1639
  const k = {
@@ -1882,39 +1883,39 @@ const mt = /* @__PURE__ */ ll(al), Ge = (f, c) => {
1882
1883
  emits: ["excel"],
1883
1884
  setup(f, { emit: c }) {
1884
1885
  const r = f, t = c, e = te(r.items), d = () => {
1885
- e.value.forEach((F) => {
1886
- F.value = !0;
1886
+ e.value.forEach((T) => {
1887
+ T.value = !0;
1887
1888
  });
1888
1889
  }, E = () => {
1889
- e.value.forEach((F) => {
1890
- F.value = !1;
1890
+ e.value.forEach((T) => {
1891
+ T.value = !1;
1891
1892
  });
1892
- }, T = () => {
1893
- t("excel", e.value, (F, k = "excel.xls") => {
1894
- if (!F) {
1893
+ }, F = () => {
1894
+ t("excel", e.value, (T, k = "excel.xls") => {
1895
+ if (!T) {
1895
1896
  console.error("下载链接无效");
1896
1897
  return;
1897
1898
  }
1898
1899
  try {
1899
1900
  const $ = document.createElement("a");
1900
- $.href = F, $.download = k, $.style.display = "none", document.body.appendChild($), $.click(), document.body.removeChild($);
1901
+ $.href = T, $.download = k, $.style.display = "none", document.body.appendChild($), $.click(), document.body.removeChild($);
1901
1902
  } catch ($) {
1902
1903
  console.error("下载文件时出现错误:", $);
1903
1904
  }
1904
1905
  });
1905
1906
  };
1906
1907
  return at(() => {
1907
- const F = new Ft(document.getElementById("excelSortEl"), {
1908
+ const T = new Ft(document.getElementById("excelSortEl"), {
1908
1909
  animation: 150,
1909
1910
  onEnd: () => {
1910
- let $ = F.toArray();
1911
+ let $ = T.toArray();
1911
1912
  console.log($);
1912
1913
  }
1913
- }), k = F;
1914
+ }), k = T;
1914
1915
  zt(() => {
1915
1916
  k && k.destroy();
1916
1917
  });
1917
- }), (F, k) => {
1918
+ }), (T, k) => {
1918
1919
  const $ = Y("el-divider"), N = Y("el-alert"), ee = Y("el-checkbox"), I = Y("el-button");
1919
1920
  return i(), x("div", yl, [
1920
1921
  G("div", gl, [
@@ -1960,7 +1961,7 @@ const mt = /* @__PURE__ */ ll(al), Ge = (f, c) => {
1960
1961
  G("div", El, [
1961
1962
  J(I, {
1962
1963
  type: "primary",
1963
- onClick: T,
1964
+ onClick: F,
1964
1965
  disabled: e.value.filter((U) => U.value).length < 1
1965
1966
  }, {
1966
1967
  default: y(() => [
@@ -2075,7 +2076,7 @@ const Sl = {
2075
2076
  message: "全选列保存信息失败!"
2076
2077
  });
2077
2078
  }
2078
- }, T = async () => {
2079
+ }, F = async () => {
2079
2080
  try {
2080
2081
  const k = r.value.filter(($) => !$.alwaysShow);
2081
2082
  for (const $ of k) {
@@ -2093,7 +2094,7 @@ const Sl = {
2093
2094
  message: "清除列保存信息失败!"
2094
2095
  });
2095
2096
  }
2096
- }, F = () => {
2097
+ }, T = () => {
2097
2098
  Vt.confirm("确定要复位吗?", "提示", {
2098
2099
  confirmButtonText: "确定",
2099
2100
  cancelButtonText: "取消",
@@ -2124,9 +2125,9 @@ const Sl = {
2124
2125
  G("div", Sl, [
2125
2126
  G("a", { onClick: E }, "全选"),
2126
2127
  J(N, { direction: "vertical" }),
2127
- G("a", { onClick: T }, "全不选"),
2128
+ G("a", { onClick: F }, "全不选"),
2128
2129
  J(N, { direction: "vertical" }),
2129
- G("a", { onClick: F }, "复位")
2130
+ G("a", { onClick: T }, "复位")
2130
2131
  ]),
2131
2132
  J(ee, {
2132
2133
  title: "拖动表格列标题可以改变表格列显示顺序 !",
@@ -2183,7 +2184,7 @@ const Sl = {
2183
2184
  emits: /* @__PURE__ */ Le(["load", "open", "delete", "submit", "reset", "download", "row-save"], ["update:modelValue"]),
2184
2185
  setup(f, { expose: c, emit: r }) {
2185
2186
  var Ye, ot, Ze, rt, ut, nt, Je;
2186
- const t = r, e = Ne(f, "modelValue"), d = gt("options"), E = te({}), T = te(null), F = te(null), k = Object.entries(e.value).filter(([l, u]) => (u == null ? void 0 : u.search) !== void 0).map(([l, u]) => [l, u.value]);
2187
+ const t = r, e = Ne(f, "modelValue"), d = gt("options"), E = te({}), F = te(null), T = te(null), k = Object.entries(e.value).filter(([l, u]) => (u == null ? void 0 : u.search) !== void 0).map(([l, u]) => [l, u.value]);
2187
2188
  E.value = Object.fromEntries(k);
2188
2189
  const $ = te(!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"], ee = te([]), I = f, U = bt(), re = te({}), ae = te([]), Q = te(null), me = te(""), ye = te({
2189
2190
  autoWatch: !1,
@@ -2591,10 +2592,10 @@ const Sl = {
2591
2592
  return l.table ? (P = l.table(u, m, S)) != null && P.auth ? (n = l.table(u, m, S)) == null ? void 0 : n.auth(u, m, S) : !0 : !1;
2592
2593
  }, Me = (l, u) => l.name === "control-save" && u === 0 && e.value.control.add.inline === !0 ? l.attr.addLabel : l.label, Ie = () => {
2593
2594
  if (e.value.dialog.mode == "drawer")
2594
- F.value.handleClose();
2595
+ T.value.handleClose();
2595
2596
  else if (e.value.dialog.mode == "dialog")
2596
2597
  try {
2597
- T.value.handleClose();
2598
+ F.value.handleClose();
2598
2599
  } catch {
2599
2600
  $.value = !1;
2600
2601
  }
@@ -3024,7 +3025,7 @@ const Sl = {
3024
3025
  e.value.dialog.mode == "dialog" && $.value ? (i(), x("div", Yl, [
3025
3026
  J(xe, q({
3026
3027
  ref_key: "dialogRef",
3027
- ref: T,
3028
+ ref: F,
3028
3029
  id: "dialogRef",
3029
3030
  modelValue: $.value,
3030
3031
  "onUpdate:modelValue": u[8] || (u[8] = (z) => $.value = z),
@@ -3105,7 +3106,7 @@ const Sl = {
3105
3106
  e.value.dialog.mode == "drawer" && $.value ? (i(), x("div", Ll, [
3106
3107
  J(ze, q({
3107
3108
  ref_key: "drawerRef",
3108
- ref: F,
3109
+ ref: T,
3109
3110
  modelValue: $.value,
3110
3111
  "onUpdate:modelValue": u[10] || (u[10] = (z) => $.value = z)
3111
3112
  }, L(Ce)(e.value.dialog, (z) => !["width"].includes(z))), {
@@ -3155,17 +3156,17 @@ const Sl = {
3155
3156
  var I, U, re, ae;
3156
3157
  const r = c, t = Ne(f, "modelValue"), e = bt(), d = te(
3157
3158
  typeof ((I = e == null ? void 0 : e.tree) == null ? void 0 : I.width) == "number" ? `${e.tree.width}px` : ((U = e == null ? void 0 : e.tree) == null ? void 0 : U.width) || "180px"
3158
- ), E = te(((re = e == null ? void 0 : e.tree) == null ? void 0 : re.search) === void 0 ? !0 : (ae = e == null ? void 0 : e.tree) == null ? void 0 : ae.search), T = te({}), F = te(""), k = te(null), $ = (Q, me) => {
3159
+ ), E = te(((re = e == null ? void 0 : e.tree) == null ? void 0 : re.search) === void 0 ? !0 : (ae = e == null ? void 0 : e.tree) == null ? void 0 : ae.search), F = te({}), T = te(""), k = te(null), $ = (Q, me) => {
3159
3160
  var ge, ie;
3160
3161
  if (!Q) return !0;
3161
3162
  const ye = ((ie = (ge = e.tree) == null ? void 0 : ge.props) == null ? void 0 : ie.label) || "label";
3162
3163
  return me[ye].includes(Q);
3163
3164
  }, N = (Q, me) => {
3164
- r("load", T.value, Q, me);
3165
+ r("load", F.value, Q, me);
3165
3166
  }, ee = (Q) => {
3166
- T.value = Q, t.value.table.load();
3167
+ F.value = Q, t.value.table.load();
3167
3168
  };
3168
- return Ht(F, (Q) => {
3169
+ return Ht(T, (Q) => {
3169
3170
  k.value.filter(Q);
3170
3171
  }), (Q, me) => {
3171
3172
  const ye = Y("el-input"), ge = Y("el-tree"), ie = Y("g-table");
@@ -3176,8 +3177,8 @@ const Sl = {
3176
3177
  }, [
3177
3178
  E.value ? (i(), M(ye, {
3178
3179
  key: 0,
3179
- modelValue: F.value,
3180
- "onUpdate:modelValue": me[0] || (me[0] = (de) => F.value = de),
3180
+ modelValue: T.value,
3181
+ "onUpdate:modelValue": me[0] || (me[0] = (de) => T.value = de),
3181
3182
  style: { width: "100%", padding: "0 10px", "box-sizing": "border-box" },
3182
3183
  placeholder: "输入节点查询",
3183
3184
  clearable: ""
@@ -3300,7 +3301,7 @@ const pa = {
3300
3301
  E.unmount(), r.remove();
3301
3302
  }, 300);
3302
3303
  }, () => {
3303
- var T, F, k;
3304
+ var F, T, k;
3304
3305
  return Oe(e, {
3305
3306
  modelValue: d.value,
3306
3307
  "onUpdate:modelValue": ($) => d.value = $,
@@ -3311,8 +3312,8 @@ const pa = {
3311
3312
  "close-on-click-modal": !1,
3312
3313
  ...f
3313
3314
  }, {
3314
- default: (T = f.slots) == null ? void 0 : T.default,
3315
- header: (F = f.slots) == null ? void 0 : F.header,
3315
+ default: (F = f.slots) == null ? void 0 : F.default,
3316
+ header: (T = f.slots) == null ? void 0 : T.header,
3316
3317
  footer: (k = f.slots) == null ? void 0 : k.footer
3317
3318
  });
3318
3319
  };
@@ -3321,8 +3322,8 @@ const pa = {
3321
3322
  dt();
3322
3323
  }
3323
3324
  });
3324
- return qt.forEach((T) => {
3325
- E.component(T.name, T);
3325
+ return qt.forEach((F) => {
3326
+ E.component(F.name, F);
3326
3327
  }), E.provide("options", pt), E.use(At, { locale: el }), document.body.appendChild(r), E.mount(r), t;
3327
3328
  };
3328
3329
  function xt(f, c = window.innerWidth) {
@@ -3341,13 +3342,13 @@ function xt(f, c = window.innerWidth) {
3341
3342
  return c * parseFloat(f) / 100;
3342
3343
  }
3343
3344
  if (f.startsWith("calc(") && f.endsWith(")")) {
3344
- let d = function(T) {
3345
- if (/[0-9+\-*/().\s]+$/.test(T))
3346
- return new Function("return " + T)();
3345
+ let d = function(F) {
3346
+ if (/[0-9+\-*/().\s]+$/.test(F))
3347
+ return new Function("return " + F)();
3347
3348
  throw new Error("Invalid calc expression");
3348
3349
  };
3349
3350
  const e = f.slice(5, -1).trim();
3350
- return d(e.replace(/([0-9.]+)([a-z%]+)/g, (T, F, k) => xt(F + k, c)));
3351
+ return d(e.replace(/([0-9.]+)([a-z%]+)/g, (F, T, k) => xt(T + k, c)));
3351
3352
  }
3352
3353
  throw new Error("Unsupported unit in value: " + f);
3353
3354
  }
@@ -3387,10 +3388,10 @@ function yt(f) {
3387
3388
  d += (r[Math.floor(f * 10 * Math.pow(10, E)) % 10] + c[E]).replace(/零./, "");
3388
3389
  d = d || "整", f = Math.floor(f);
3389
3390
  for (let E = 0; E < t[0].length && f > 0; E++) {
3390
- let T = "";
3391
- for (let F = 0; F < t[1].length && f > 0; F++)
3392
- T = r[f % 10] + t[1][F] + T, f = Math.floor(f / 10);
3393
- d = T.replace(/(零.)*零$/, "").replace(/^$/, "零") + t[0][E] + d;
3391
+ let F = "";
3392
+ for (let T = 0; T < t[1].length && f > 0; T++)
3393
+ F = r[f % 10] + t[1][T] + F, f = Math.floor(f / 10);
3394
+ d = F.replace(/(零.)*零$/, "").replace(/^$/, "零") + t[0][E] + d;
3394
3395
  }
3395
3396
  return e + d.replace(/(零.)*零元/, "元").replace(/(零.)+/g, "零").replace(/^整$/, "零元整");
3396
3397
  }
@@ -3462,16 +3463,16 @@ const pe = {
3462
3463
  });
3463
3464
  }, ia = (f, c) => {
3464
3465
  let r = !1, t, e, d, E;
3465
- const T = ($) => {
3466
- $.preventDefault(), r = !0, t = $.clientX, e = $.clientY, d = parseInt(document.defaultView.getComputedStyle(f).width), E = parseInt(document.defaultView.getComputedStyle(f).height), document.addEventListener("mousemove", F), document.addEventListener("mouseup", k);
3467
- }, F = ($) => {
3466
+ const F = ($) => {
3467
+ $.preventDefault(), r = !0, t = $.clientX, e = $.clientY, d = parseInt(document.defaultView.getComputedStyle(f).width), E = parseInt(document.defaultView.getComputedStyle(f).height), document.addEventListener("mousemove", T), document.addEventListener("mouseup", k);
3468
+ }, T = ($) => {
3468
3469
  if (!r) return;
3469
3470
  const N = Math.max(300, d + $.clientX - t), ee = Math.max(200, E + $.clientY - e);
3470
3471
  f.style.width = `${N}px`, f.style.height = `${ee}px`;
3471
3472
  }, k = () => {
3472
- r = !1, document.removeEventListener("mousemove", F), document.removeEventListener("mouseup", k);
3473
+ r = !1, document.removeEventListener("mousemove", T), document.removeEventListener("mouseup", k);
3473
3474
  };
3474
- c.addEventListener("mousedown", T);
3475
+ c.addEventListener("mousedown", F);
3475
3476
  };
3476
3477
  export {
3477
3478
  pe as CT,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue-2024-ui",
3
- "version": "0.1.10",
3
+ "version": "0.1.12",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "A Vue 3 and Element Plus based plugin",