mgacn-commonsdk 1.2.3 → 1.2.4

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.
@@ -1,10 +1,10 @@
1
- import { Plus as ot, Delete as it, CircleCloseFilled as ut, Document as ct, Close as dt, CircleClose as De, CircleCheck as pt, ArrowUp as ft, ArrowDown as ht } from "@element-plus/icons-vue";
1
+ import { Plus as ot, Delete as it, CircleCloseFilled as ut, Document as ct, Close as dt, CircleClose as Ve, CircleCheck as pt, ArrowUp as ft, ArrowDown as ht } from "@element-plus/icons-vue";
2
2
  import { ElMessage as K, ElMessageBox as Oe } from "element-plus";
3
3
  import mt from "cropperjs";
4
4
  import * as $e from "ali-oss";
5
5
  import { g as gt, _ as G, o as yt, k as Ie, t as vt, l as bt, m as Ae, F as _t, n as wt, p as Ct, q as kt, r as Ut, u as xt } from "./FilePreview-DVaCq1Fr.js";
6
6
  import { i as ul, j as cl, c as dl, v as pl, w as fl, b as hl, x as ml, y as gl, a as yl, s as vl, z as bl } from "./FilePreview-DVaCq1Fr.js";
7
- import { resolveComponent as F, openBlock as u, createElementBlock as b, createElementVNode as w, toDisplayString as T, createCommentVNode as V, createTextVNode as j, Fragment as W, renderList as q, normalizeStyle as re, normalizeClass as H, createVNode as U, withCtx as S, withModifiers as de, withDirectives as ee, vShow as te, createBlock as P, computed as ye, ref as A, watch as se, onMounted as ve, reactive as Le, nextTick as Z, onBeforeUnmount as He, withKeys as Ne, unref as ne, renderSlot as ae, mergeProps as Me, createSlots as St } from "vue";
7
+ import { resolveComponent as F, openBlock as p, createElementBlock as v, createElementVNode as _, toDisplayString as T, createCommentVNode as D, createTextVNode as j, Fragment as W, renderList as q, normalizeStyle as re, normalizeClass as H, createVNode as U, withCtx as S, withModifiers as de, withDirectives as ee, vShow as te, createBlock as P, computed as ye, ref as A, watch as se, onMounted as ve, reactive as Le, nextTick as Z, onBeforeUnmount as He, withKeys as Ne, unref as ne, renderSlot as ae, mergeProps as Me, createSlots as St } from "vue";
8
8
  const Ft = $e.default ?? $e, ze = "__MGACN_COMMONSDK_OSS_URL__";
9
9
  function $t(e = "") {
10
10
  globalThis[ze] = String(e || "").replace(/\/$/, "");
@@ -62,8 +62,8 @@ async function _e(e = {}) {
62
62
  success_action_status: "200"
63
63
  };
64
64
  h.region && ($.region = h.region), h.endPoint && ($.endpoint = h.endPoint);
65
- const _ = new Ft($);
66
- return _.options.ossUrl = h.ossUrl || Ee(), _.options.uploadDir = o, _;
65
+ const b = new Ft($);
66
+ return b.options.ossUrl = h.ossUrl || Ee(), b.options.uploadDir = o, b;
67
67
  }
68
68
  async function We(e = {}) {
69
69
  var R, X;
@@ -71,49 +71,49 @@ async function We(e = {}) {
71
71
  if (!n)
72
72
  throw new Error("[mgacn-commonsdk] uploadToOss 缺少 file");
73
73
  const h = t || await _e({ dir: r, foldName: s }), $ = r || h.options.uploadDir || be(s);
74
- let _ = o;
75
- if (!_) {
76
- const D = n.name || "file", z = D.lastIndexOf("."), J = z > -1 ? D.slice(z) : "";
77
- _ = `${$}${je(10)}${J}`;
74
+ let b = o;
75
+ if (!b) {
76
+ const V = n.name || "file", z = V.lastIndexOf("."), J = z > -1 ? V.slice(z) : "";
77
+ b = `${$}${je(10)}${J}`;
78
78
  }
79
- const L = (D) => {
80
- typeof m == "function" && m(Math.min(100, Math.max(0, Math.floor(Number(D) * 100))));
81
- }, g = n.size > 1 * 1024 * 1024, p = {
82
- progress: async (D) => {
83
- L(D);
79
+ const x = (V) => {
80
+ typeof m == "function" && m(Math.min(100, Math.max(0, Math.floor(Number(V) * 100))));
81
+ }, M = n.size > 1 * 1024 * 1024, u = {
82
+ progress: async (V) => {
83
+ x(V);
84
84
  }
85
85
  };
86
- let d;
87
- const c = async (D) => {
88
- const z = D ? { "x-oss-object-acl": "public-read" } : void 0;
89
- return g ? h.multipartUpload(_, n, {
90
- ...p,
86
+ let c;
87
+ const d = async (V) => {
88
+ const z = V ? { "x-oss-object-acl": "public-read" } : void 0;
89
+ return M ? h.multipartUpload(b, n, {
90
+ ...u,
91
91
  ...z ? { headers: z } : {}
92
- }) : h.put(_, n, {
93
- ...p,
92
+ }) : h.put(b, n, {
93
+ ...u,
94
94
  ...z ? { headers: z } : {}
95
95
  });
96
96
  };
97
97
  try {
98
- L(0.01), d = await c(!0);
98
+ x(0.01), c = await d(!0);
99
99
  } catch {
100
- L(0.01), d = await c(!1);
100
+ x(0.01), c = await d(!1);
101
101
  }
102
- const x = ((R = d == null ? void 0 : d.res) == null ? void 0 : R.statusCode) ?? ((X = d == null ? void 0 : d.res) == null ? void 0 : X.status);
103
- if (x && x !== 200)
102
+ const k = ((R = c == null ? void 0 : c.res) == null ? void 0 : R.statusCode) ?? ((X = c == null ? void 0 : c.res) == null ? void 0 : X.status);
103
+ if (k && k !== 200)
104
104
  throw new Error("[mgacn-commonsdk] 上传失败");
105
- L(1);
106
- const N = (h.options.ossUrl || "").replace(/\/$/, ""), y = N ? `${N}/${_}` : _;
107
- let B = y;
105
+ x(1);
106
+ const L = (h.options.ossUrl || "").replace(/\/$/, ""), g = L ? `${L}/${b}` : b;
107
+ let B = g;
108
108
  try {
109
- B = h.signatureUrl(_, { expires: 3600 * 24 });
109
+ B = h.signatureUrl(b, { expires: 3600 * 24 });
110
110
  } catch {
111
111
  }
112
112
  return {
113
- name: _,
114
- url: y,
113
+ name: b,
114
+ url: g,
115
115
  previewUrl: B,
116
- raw: d,
116
+ raw: c,
117
117
  client: h
118
118
  };
119
119
  }
@@ -185,7 +185,7 @@ function Bt(e = "") {
185
185
  const t = e.lastIndexOf(".");
186
186
  return t > -1 ? e.slice(t + 1).toLowerCase() : "";
187
187
  }
188
- const Vt = {
188
+ const Dt = {
189
189
  name: "MgImageUpload",
190
190
  mixins: [Ye],
191
191
  components: { CircleCloseFilled: ut, Delete: it, Plus: ot },
@@ -484,7 +484,7 @@ const Vt = {
484
484
  !t || t.status === "uploading" || (this.revokePreview(t), this.fileList.splice(e, 1), this.emitFile());
485
485
  }
486
486
  }
487
- }, Dt = { class: "upload-image-cropper" }, Ot = ["multiple", "accept"], It = {
487
+ }, Vt = { class: "upload-image-cropper" }, Ot = ["multiple", "accept"], It = {
488
488
  key: 0,
489
489
  class: "grey-tips"
490
490
  }, At = { key: 0 }, Ht = { class: "list-box" }, zt = {
@@ -501,45 +501,45 @@ const Vt = {
501
501
  class: "btn-box btn-box--rotate"
502
502
  }, Jt = { class: "btn-box" };
503
503
  function Qt(e, t, n, r, s, o) {
504
- const m = F("el-image"), h = F("el-progress"), $ = F("CircleCloseFilled"), _ = F("el-icon"), L = F("Delete"), g = F("Plus"), p = F("el-button"), d = F("el-dialog");
505
- return u(), b("div", Dt, [
506
- w("input", {
504
+ const m = F("el-image"), h = F("el-progress"), $ = F("CircleCloseFilled"), b = F("el-icon"), x = F("Delete"), M = F("Plus"), u = F("el-button"), c = F("el-dialog");
505
+ return p(), v("div", Vt, [
506
+ _("input", {
507
507
  ref: "fileInput",
508
508
  type: "file",
509
509
  class: "file-input",
510
510
  multiple: o.multiple,
511
511
  accept: n.accept,
512
- onChange: t[0] || (t[0] = (...c) => o.onFileChange && o.onFileChange(...c))
512
+ onChange: t[0] || (t[0] = (...d) => o.onFileChange && o.onFileChange(...d))
513
513
  }, null, 40, Ot),
514
- n.greyTips ? (u(), b("div", It, [
515
- n.otherTips ? (u(), b("div", At, T(n.otherTips), 1)) : V("", !0),
514
+ n.greyTips ? (p(), v("div", It, [
515
+ n.otherTips ? (p(), v("div", At, T(n.otherTips), 1)) : D("", !0),
516
516
  j(" " + T(n.greyTips), 1)
517
- ])) : V("", !0),
518
- w("div", Ht, [
519
- (u(!0), b(W, null, q(s.fileList, (c, x) => (u(), b("div", {
520
- key: c.uid,
521
- class: H(["image-box", [`is-${c.status}`]]),
517
+ ])) : D("", !0),
518
+ _("div", Ht, [
519
+ (p(!0), v(W, null, q(s.fileList, (d, k) => (p(), v("div", {
520
+ key: d.uid,
521
+ class: H(["image-box", [`is-${d.status}`]]),
522
522
  style: re(n.imageStyle)
523
523
  }, [
524
524
  U(m, {
525
- src: c.previewUrl || c.url,
525
+ src: d.previewUrl || d.url,
526
526
  fit: "cover",
527
527
  class: "img"
528
528
  }, null, 8, ["src"]),
529
- c.status === "uploading" ? (u(), b("div", zt, [
530
- w("div", Et, [
529
+ d.status === "uploading" ? (p(), v("div", zt, [
530
+ _("div", Et, [
531
531
  U(h, {
532
532
  type: "circle",
533
- percentage: c.percent,
533
+ percentage: d.percent,
534
534
  width: 30,
535
535
  "stroke-width": 3,
536
536
  "show-text": !1,
537
537
  color: "var(--mg-primary, #ff5722)"
538
538
  }, null, 8, ["percentage"]),
539
- w("span", jt, T(c.percent) + "%", 1)
539
+ _("span", jt, T(d.percent) + "%", 1)
540
540
  ])
541
- ])) : c.status === "fail" ? (u(), b("div", Kt, [
542
- U(_, {
541
+ ])) : d.status === "fail" ? (p(), v("div", Kt, [
542
+ U(b, {
543
543
  class: "fail-icon",
544
544
  size: 16
545
545
  }, {
@@ -548,56 +548,56 @@ function Qt(e, t, n, r, s, o) {
548
548
  ]),
549
549
  _: 1
550
550
  }),
551
- t[5] || (t[5] = w("span", { class: "fail-text" }, "失败", -1)),
552
- U(_, {
551
+ t[5] || (t[5] = _("span", { class: "fail-text" }, "失败", -1)),
552
+ U(b, {
553
553
  class: "remove-icon",
554
554
  size: 14,
555
555
  title: "删除",
556
- onClick: de((N) => o.removeImg(x), ["stop"])
556
+ onClick: de((L) => o.removeImg(k), ["stop"])
557
557
  }, {
558
558
  default: S(() => [
559
- U(L)
559
+ U(x)
560
560
  ]),
561
561
  _: 1
562
562
  }, 8, ["onClick"])
563
- ])) : (u(), b("div", {
563
+ ])) : (p(), v("div", {
564
564
  key: 2,
565
565
  class: "status-mask is-success",
566
- onClick: (N) => o.removeImg(x)
566
+ onClick: (L) => o.removeImg(k)
567
567
  }, [
568
- U(_, {
568
+ U(b, {
569
569
  class: "remove-icon",
570
570
  size: 16
571
571
  }, {
572
572
  default: S(() => [
573
- U(L)
573
+ U(x)
574
574
  ]),
575
575
  _: 1
576
576
  })
577
577
  ], 8, Wt))
578
578
  ], 6))), 128)),
579
- ee(w("div", {
579
+ ee(_("div", {
580
580
  class: "image-box upload-btn",
581
581
  style: re(n.imageStyle),
582
- onClick: t[1] || (t[1] = (...c) => o.handleUpload && o.handleUpload(...c))
582
+ onClick: t[1] || (t[1] = (...d) => o.handleUpload && o.handleUpload(...d))
583
583
  }, [
584
- U(_, {
584
+ U(b, {
585
585
  class: "icon",
586
586
  size: 14
587
587
  }, {
588
588
  default: S(() => [
589
- U(g)
589
+ U(M)
590
590
  ]),
591
591
  _: 1
592
592
  }),
593
- t[6] || (t[6] = w("div", null, "上传图片", -1))
593
+ t[6] || (t[6] = _("div", null, "上传图片", -1))
594
594
  ], 4), [
595
595
  [te, o.showUploadBtn]
596
596
  ])
597
597
  ]),
598
- U(d, {
598
+ U(c, {
599
599
  modelValue: s.dialogVisible,
600
- "onUpdate:modelValue": t[4] || (t[4] = (c) => s.dialogVisible = c),
600
+ "onUpdate:modelValue": t[4] || (t[4] = (d) => s.dialogVisible = d),
601
601
  title: "裁剪图片",
602
602
  width: "650px",
603
603
  top: "5vh",
@@ -607,26 +607,26 @@ function Qt(e, t, n, r, s, o) {
607
607
  onClose: o.handleBack
608
608
  }, {
609
609
  footer: S(() => [
610
- n.isDegree ? (u(), b("div", Xt, [
611
- U(p, {
612
- onClick: t[2] || (t[2] = (c) => o.rotate(-n.degree))
610
+ n.isDegree ? (p(), v("div", Xt, [
611
+ U(u, {
612
+ onClick: t[2] || (t[2] = (d) => o.rotate(-n.degree))
613
613
  }, {
614
614
  default: S(() => [...t[7] || (t[7] = [
615
615
  j("向左旋转", -1)
616
616
  ])]),
617
617
  _: 1
618
618
  }),
619
- U(p, {
620
- onClick: t[3] || (t[3] = (c) => o.rotate(n.degree))
619
+ U(u, {
620
+ onClick: t[3] || (t[3] = (d) => o.rotate(n.degree))
621
621
  }, {
622
622
  default: S(() => [...t[8] || (t[8] = [
623
623
  j("向右旋转", -1)
624
624
  ])]),
625
625
  _: 1
626
626
  })
627
- ])) : V("", !0),
628
- w("div", Jt, [
629
- U(p, {
627
+ ])) : D("", !0),
628
+ _("div", Jt, [
629
+ U(u, {
630
630
  type: "primary",
631
631
  onClick: o.openFilePicker
632
632
  }, {
@@ -635,7 +635,7 @@ function Qt(e, t, n, r, s, o) {
635
635
  ]),
636
636
  _: 1
637
637
  }, 8, ["onClick"]),
638
- U(p, {
638
+ U(u, {
639
639
  type: "primary",
640
640
  onClick: o.confirmCrop
641
641
  }, {
@@ -647,22 +647,22 @@ function Qt(e, t, n, r, s, o) {
647
647
  ])
648
648
  ]),
649
649
  default: S(() => [
650
- w("div", Yt, [
651
- ee(w("img", {
650
+ _("div", Yt, [
651
+ ee(_("img", {
652
652
  ref: "cropImage",
653
653
  src: s.cropImageUrl,
654
654
  class: "cropper-img"
655
655
  }, null, 8, qt), [
656
656
  [te, s.cropImageUrl]
657
657
  ]),
658
- s.cropImageUrl ? V("", !0) : (u(), b("div", Gt, "请选择图片后进行裁剪"))
658
+ s.cropImageUrl ? D("", !0) : (p(), v("div", Gt, "请选择图片后进行裁剪"))
659
659
  ])
660
660
  ]),
661
661
  _: 1
662
662
  }, 8, ["modelValue", "onClose"])
663
663
  ]);
664
664
  }
665
- const Zt = /* @__PURE__ */ G(Vt, [["render", Qt], ["__scopeId", "data-v-68531340"]]), en = ".mp4,.mov,.jpg,.jpeg,.m3u8,.png,.m4v,.doc,.docx,.xls,.xlsx,.pdf";
665
+ const Zt = /* @__PURE__ */ G(Dt, [["render", Qt], ["__scopeId", "data-v-68531340"]]), en = ".mp4,.mov,.jpg,.jpeg,.m3u8,.png,.m4v,.doc,.docx,.xls,.xlsx,.pdf";
666
666
  let Be = 0;
667
667
  function we() {
668
668
  return Be += 1, `mg-file-${Date.now()}-${Be}`;
@@ -695,7 +695,7 @@ function oe(e = "") {
695
695
  return "file";
696
696
  }
697
697
  }
698
- function Ve(e) {
698
+ function De(e) {
699
699
  return e.map((t) => ({
700
700
  uid: we(),
701
701
  name: oe(t),
@@ -722,7 +722,7 @@ function an(e = "") {
722
722
  const rn = {
723
723
  name: "MgFileUpload",
724
724
  mixins: [Ye],
725
- components: { CircleCheck: pt, CircleClose: De, Close: dt, Document: ct },
725
+ components: { CircleCheck: pt, CircleClose: Ve, Close: dt, Document: ct },
726
726
  props: {
727
727
  /** v-model:valueFormat=url 时为 string[];valueFormat=file 时为 { fileName, fileUrl }[] */
728
728
  modelValue: { type: [Array, String], default: () => [] },
@@ -798,7 +798,7 @@ const rn = {
798
798
  deep: !0,
799
799
  immediate: !0,
800
800
  handler(e) {
801
- e != null && e.length && (this.fileList = Ve(e));
801
+ e != null && e.length && (this.fileList = De(e));
802
802
  }
803
803
  },
804
804
  modelValue: {
@@ -813,7 +813,7 @@ const rn = {
813
813
  return;
814
814
  }
815
815
  const t = tn(e), n = this.successUrls;
816
- t.length === n.length && t.every((s, o) => s === n[o]) || (this.fileList = Ve(t));
816
+ t.length === n.length && t.every((s, o) => s === n[o]) || (this.fileList = De(t));
817
817
  }
818
818
  }
819
819
  },
@@ -925,18 +925,18 @@ const rn = {
925
925
  class: "el-upload-list el-upload-list--text"
926
926
  }, pn = { class: "el-upload-list__item-info" }, fn = ["href", "target", "onClick"], hn = { class: "el-upload-list__item-file-name" }, mn = { class: "el-upload-list__item-status-label" };
927
927
  function gn(e, t, n, r, s, o) {
928
- const m = F("el-button"), h = F("Document"), $ = F("el-icon"), _ = F("CircleCheck"), L = F("CircleClose"), g = F("Close"), p = F("el-progress");
929
- return u(), b("div", on, [
930
- w("input", {
928
+ const m = F("el-button"), h = F("Document"), $ = F("el-icon"), b = F("CircleCheck"), x = F("CircleClose"), M = F("Close"), u = F("el-progress");
929
+ return p(), v("div", on, [
930
+ _("input", {
931
931
  ref: "fileInput",
932
932
  type: "file",
933
933
  class: "file-input",
934
934
  multiple: o.multiple,
935
935
  accept: n.accept,
936
936
  disabled: n.disabled,
937
- onChange: t[0] || (t[0] = (...d) => o.onFileChange && o.onFileChange(...d))
937
+ onChange: t[0] || (t[0] = (...c) => o.onFileChange && o.onFileChange(...c))
938
938
  }, null, 40, un),
939
- n.showButton ? (u(), P(m, {
939
+ n.showButton ? (p(), P(m, {
940
940
  key: 0,
941
941
  type: "primary",
942
942
  disabled: n.disabled || !o.showUploadBtn,
@@ -946,21 +946,21 @@ function gn(e, t, n, r, s, o) {
946
946
  j(T(n.buttonText), 1)
947
947
  ]),
948
948
  _: 1
949
- }, 8, ["disabled", "onClick"])) : V("", !0),
950
- o.tipText ? (u(), b("div", cn, T(o.tipText), 1)) : V("", !0),
951
- n.showFileList ? (u(), b("ul", dn, [
952
- (u(!0), b(W, null, q(s.fileList, (d, c) => (u(), b("li", {
953
- key: d.uid,
954
- class: H(["el-upload-list__item", [`is-${d.status}`]]),
949
+ }, 8, ["disabled", "onClick"])) : D("", !0),
950
+ o.tipText ? (p(), v("div", cn, T(o.tipText), 1)) : D("", !0),
951
+ n.showFileList ? (p(), v("ul", dn, [
952
+ (p(!0), v(W, null, q(s.fileList, (c, d) => (p(), v("li", {
953
+ key: c.uid,
954
+ class: H(["el-upload-list__item", [`is-${c.status}`]]),
955
955
  tabindex: "0"
956
956
  }, [
957
- w("div", pn, [
958
- w("a", {
957
+ _("div", pn, [
958
+ _("a", {
959
959
  class: "el-upload-list__item-name",
960
- href: d.url || void 0,
961
- target: d.url ? "_blank" : void 0,
960
+ href: c.url || void 0,
961
+ target: c.url ? "_blank" : void 0,
962
962
  rel: "noopener noreferrer",
963
- onClick: de((x) => o.onFileClick(d), ["prevent"])
963
+ onClick: de((k) => o.onFileClick(c), ["prevent"])
964
964
  }, [
965
965
  U($, { class: "el-icon--document" }, {
966
966
  default: S(() => [
@@ -968,48 +968,48 @@ function gn(e, t, n, r, s, o) {
968
968
  ]),
969
969
  _: 1
970
970
  }),
971
- w("span", hn, T(d.name), 1)
971
+ _("span", hn, T(c.name), 1)
972
972
  ], 8, fn)
973
973
  ]),
974
- w("label", mn, [
975
- d.status === "success" ? (u(), P($, {
974
+ _("label", mn, [
975
+ c.status === "success" ? (p(), P($, {
976
976
  key: 0,
977
977
  class: "el-icon--upload-success el-icon--circle-check"
978
978
  }, {
979
979
  default: S(() => [
980
- U(_)
980
+ U(b)
981
981
  ]),
982
982
  _: 1
983
- })) : d.status === "fail" ? (u(), P($, {
983
+ })) : c.status === "fail" ? (p(), P($, {
984
984
  key: 1,
985
985
  class: "el-icon--upload-fail"
986
986
  }, {
987
987
  default: S(() => [
988
- U(L)
988
+ U(x)
989
989
  ]),
990
990
  _: 1
991
- })) : V("", !0)
991
+ })) : D("", !0)
992
992
  ]),
993
- d.status !== "uploading" ? (u(), P($, {
993
+ c.status !== "uploading" ? (p(), P($, {
994
994
  key: 0,
995
995
  class: "el-icon--close",
996
996
  title: "删除",
997
- onClick: de((x) => o.removeFile(c), ["stop"])
997
+ onClick: de((k) => o.removeFile(d), ["stop"])
998
998
  }, {
999
999
  default: S(() => [
1000
- U(g)
1000
+ U(M)
1001
1001
  ]),
1002
1002
  _: 1
1003
- }, 8, ["onClick"])) : V("", !0),
1004
- d.status === "uploading" ? (u(), P(p, {
1003
+ }, 8, ["onClick"])) : D("", !0),
1004
+ c.status === "uploading" ? (p(), P(u, {
1005
1005
  key: 1,
1006
1006
  class: "el-upload-list__item-progress",
1007
1007
  type: "line",
1008
- percentage: d.percent,
1008
+ percentage: c.percent,
1009
1009
  "stroke-width": 2
1010
- }, null, 8, ["percentage"])) : V("", !0)
1010
+ }, null, 8, ["percentage"])) : D("", !0)
1011
1011
  ], 2))), 128))
1012
- ])) : V("", !0)
1012
+ ])) : D("", !0)
1013
1013
  ]);
1014
1014
  }
1015
1015
  const yn = /* @__PURE__ */ G(rn, [["render", gn], ["__scopeId", "data-v-0cf84609"]]), vn = {
@@ -1044,58 +1044,66 @@ const yn = /* @__PURE__ */ G(rn, [["render", gn], ["__scopeId", "data-v-0cf84609
1044
1044
  emits: ["update:start", "update:end", "change"],
1045
1045
  setup(e, { emit: t }) {
1046
1046
  const n = t, r = e;
1047
- function s(g) {
1048
- const p = new Date(g);
1049
- return p.setHours(0, 0, 0, 0), p;
1047
+ function s(u) {
1048
+ const c = new Date(u);
1049
+ return c.setHours(0, 0, 0, 0), c;
1050
1050
  }
1051
- function o(g) {
1052
- const p = new Date(g);
1053
- return p.setHours(23, 59, 59, 0), p;
1051
+ function o(u) {
1052
+ const c = new Date(u);
1053
+ return c.setHours(23, 59, 59, 0), c;
1054
1054
  }
1055
- function m(g) {
1056
- const p = o(/* @__PURE__ */ new Date()), d = s(/* @__PURE__ */ new Date());
1057
- return g(d), [d, p];
1055
+ function m(u) {
1056
+ const c = o(/* @__PURE__ */ new Date()), d = s(/* @__PURE__ */ new Date());
1057
+ return u(d), [d, c];
1058
1058
  }
1059
1059
  const h = [
1060
1060
  {
1061
1061
  text: "七天内",
1062
- value: () => m((g) => {
1063
- g.setDate(g.getDate() - 6);
1062
+ value: () => m((u) => {
1063
+ u.setDate(u.getDate() - 6);
1064
1064
  })
1065
1065
  },
1066
1066
  {
1067
1067
  text: "一个月内",
1068
- value: () => m((g) => {
1069
- g.setMonth(g.getMonth() - 1);
1068
+ value: () => m((u) => {
1069
+ u.setMonth(u.getMonth() - 1);
1070
1070
  })
1071
1071
  },
1072
1072
  {
1073
1073
  text: "一年内",
1074
- value: () => m((g) => {
1075
- g.setFullYear(g.getFullYear() - 1);
1074
+ value: () => m((u) => {
1075
+ u.setFullYear(u.getFullYear() - 1);
1076
1076
  })
1077
1077
  }
1078
1078
  ], $ = ye(() => {
1079
- var g;
1079
+ var u;
1080
1080
  if (r.showShortcuts)
1081
- return (g = r.shortcuts) != null && g.length ? r.shortcuts : h;
1082
- }), _ = A([]);
1081
+ return (u = r.shortcuts) != null && u.length ? r.shortcuts : h;
1082
+ }), b = A([]);
1083
+ function x(u, c) {
1084
+ if (u && c) {
1085
+ b.value = [u, c];
1086
+ return;
1087
+ }
1088
+ b.value = [];
1089
+ }
1083
1090
  se(
1084
1091
  () => [r.start, r.end],
1085
- ([g, p]) => {
1086
- _.value = g || p ? [g, p] : [];
1092
+ ([u, c]) => {
1093
+ x(u, c);
1087
1094
  }
1088
1095
  ), ve(() => {
1089
- _.value = r.start || r.end ? [r.start, r.end] : [];
1096
+ x(r.start, r.end);
1090
1097
  });
1091
- function L(g) {
1092
- n("update:start", g ? g[0] : ""), n("update:end", g ? g[1] : ""), n("change");
1098
+ function M(u) {
1099
+ const c = Array.isArray(u) ? u[0] : "", d = Array.isArray(u) ? u[1] : "";
1100
+ c && d ? (n("update:start", c), n("update:end", d)) : (n("update:start", ""), n("update:end", "")), n("change");
1093
1101
  }
1094
- return (g, p) => {
1102
+ return (u, c) => {
1095
1103
  const d = F("el-date-picker");
1096
- return u(), P(d, {
1097
- modelValue: _.value,
1098
- "onUpdate:modelValue": p[0] || (p[0] = (c) => _.value = c),
1104
+ return p(), P(d, {
1105
+ modelValue: b.value,
1106
+ "onUpdate:modelValue": c[0] || (c[0] = (k) => b.value = k),
1099
1107
  type: e.type,
1100
1108
  "range-separator": "至",
1101
1109
  "start-placeholder": e.title ? `${e.title} 开始` : "开始",
@@ -1104,12 +1112,12 @@ const yn = /* @__PURE__ */ G(rn, [["render", gn], ["__scopeId", "data-v-0cf84609
1104
1112
  "default-time": e.defaultTime,
1105
1113
  shortcuts: $.value,
1106
1114
  class: "date-range-picker",
1107
- onChange: L,
1115
+ onChange: M,
1108
1116
  clearable: e.canClearable
1109
1117
  }, null, 8, ["modelValue", "type", "start-placeholder", "value-format", "default-time", "shortcuts", "clearable"]);
1110
1118
  };
1111
1119
  }
1112
- }, Ge = /* @__PURE__ */ G(vn, [["__scopeId", "data-v-88a05aae"]]), bn = { class: "common-search__body" }, _n = { class: "common-search__control-wrap" }, wn = ["onKeyup"], Cn = { class: "common-search__range-sep" }, kn = {
1120
+ }, Ge = /* @__PURE__ */ G(vn, [["__scopeId", "data-v-0dfa12ab"]]), bn = { class: "common-search__body" }, _n = { class: "common-search__control-wrap" }, wn = ["onKeyup"], Cn = { class: "common-search__range-sep" }, kn = {
1113
1121
  key: 5,
1114
1122
  class: "common-search__range"
1115
1123
  }, Un = {
@@ -1128,19 +1136,19 @@ const yn = /* @__PURE__ */ G(rn, [["render", gn], ["__scopeId", "data-v-0cf84609
1128
1136
  function $(l, i) {
1129
1137
  return JSON.stringify(l ?? {}) === JSON.stringify(i ?? {});
1130
1138
  }
1131
- const _ = A(null), L = A(!1), g = A(!1), p = A(0), d = A(0), c = A(0), x = A(null);
1132
- let N = null, y = !1, B = !1;
1139
+ const b = A(null), x = A(!1), M = A(!1), u = A(0), c = A(0), d = A(0), k = A(null);
1140
+ let L = null, g = !1, B = !1;
1133
1141
  const R = ye(() => {
1134
- if (!(!g.value || x.value == null))
1142
+ if (!(!M.value || k.value == null))
1135
1143
  return {
1136
- maxHeight: `${x.value}px`,
1144
+ maxHeight: `${k.value}px`,
1137
1145
  overflow: "hidden"
1138
1146
  };
1139
1147
  });
1140
1148
  function X(l = {}) {
1141
1149
  return String(l.label || l.title || "").trim();
1142
1150
  }
1143
- function D(l = {}) {
1151
+ function V(l = {}) {
1144
1152
  return String(l.tip || X(l) || "").trim();
1145
1153
  }
1146
1154
  function z(l = "") {
@@ -1149,15 +1157,15 @@ const yn = /* @__PURE__ */ G(rn, [["render", gn], ["__scopeId", "data-v-0cf84609
1149
1157
  }
1150
1158
  function J(l = {}, i = "") {
1151
1159
  if (l.placeholder != null && l.placeholder !== "") {
1152
- const k = z(l.placeholder);
1153
- if (k) return k;
1160
+ const C = z(l.placeholder);
1161
+ if (C) return C;
1154
1162
  }
1155
1163
  const f = X(l);
1156
1164
  return f || z(i) || i;
1157
1165
  }
1158
1166
  function Ce(l = {}, i = "min") {
1159
- const f = i === "min" ? l.minPlaceholder : l.maxPlaceholder, C = X(l), k = i === "min" ? "最小值" : "最大值", M = /* @__PURE__ */ new Set(["最小", "最大", "最小值", "最大值"]);
1160
- return f != null && f !== "" ? C && M.has(String(f).trim()) ? `${C}${f}` : f : C ? `${C}${k}` : k;
1167
+ const f = i === "min" ? l.minPlaceholder : l.maxPlaceholder, w = X(l), C = i === "min" ? "最小值" : "最大值", N = /* @__PURE__ */ new Set(["最小", "最大", "最小值", "最大值"]);
1168
+ return f != null && f !== "" ? w && N.has(String(f).trim()) ? `${w}${f}` : f : w ? `${w}${C}` : C;
1161
1169
  }
1162
1170
  se(
1163
1171
  () => n.modelValue,
@@ -1176,56 +1184,56 @@ const yn = /* @__PURE__ */ G(rn, [["render", gn], ["__scopeId", "data-v-0cf84609
1176
1184
  ), se(
1177
1185
  () => n.itemList,
1178
1186
  () => {
1179
- L.value = !1, p.value = 0, Z(() => Q());
1187
+ x.value = !1, u.value = 0, Z(() => Q());
1180
1188
  },
1181
1189
  { deep: !0 }
1182
1190
  ), ve(() => {
1183
- Z(() => Q()), typeof ResizeObserver < "u" && (N = new ResizeObserver(() => {
1184
- !y && !B && Q();
1185
- }), _.value && N.observe(_.value)), window.addEventListener("resize", ke);
1191
+ Z(() => Q()), typeof ResizeObserver < "u" && (L = new ResizeObserver(() => {
1192
+ !g && !B && Q();
1193
+ }), b.value && L.observe(b.value)), window.addEventListener("resize", ke);
1186
1194
  }), He(() => {
1187
- N == null || N.disconnect(), window.removeEventListener("resize", ke);
1195
+ L == null || L.disconnect(), window.removeEventListener("resize", ke);
1188
1196
  });
1189
1197
  function ke() {
1190
- !y && !B && Q();
1198
+ !g && !B && Q();
1191
1199
  }
1192
1200
  function Je(l) {
1193
1201
  const i = n.itemList.length;
1194
1202
  if (!i) return !1;
1195
- const f = p.value > 0 ? p.value : i;
1203
+ const f = u.value > 0 ? u.value : i;
1196
1204
  return l === Math.min(f, i) - 1;
1197
1205
  }
1198
- function Qe(l, i, f, C) {
1199
- let k = 1, M = l[i].offsetWidth;
1206
+ function Qe(l, i, f, w) {
1207
+ let C = 1, N = l[i].offsetWidth;
1200
1208
  for (let O = i + 1; O < l.length; O += 1) {
1201
1209
  const I = l[O].offsetWidth;
1202
- M + C + I > f ? (k += 1, M = I) : M += C + I;
1210
+ N + w + I > f ? (C += 1, N = I) : N += w + I;
1203
1211
  }
1204
- return k;
1212
+ return C;
1205
1213
  }
1206
- function Ze(l, i, f, C) {
1207
- let k = 0, M = 0;
1214
+ function Ze(l, i, f, w) {
1215
+ let C = 0, N = 0;
1208
1216
  for (let O = 0; O < l.length; O += 1) {
1209
- const I = l[O].offsetWidth, Y = k === 0 ? I : k + C + I;
1210
- if (Y + C + f <= i)
1211
- k = Y, M = O + 1;
1217
+ const I = l[O].offsetWidth, Y = C === 0 ? I : C + w + I;
1218
+ if (Y + w + f <= i)
1219
+ C = Y, N = O + 1;
1212
1220
  else
1213
1221
  break;
1214
1222
  }
1215
- return M || 1;
1223
+ return N || 1;
1216
1224
  }
1217
1225
  function et(l) {
1218
1226
  const i = l.type === "number-range" || l.type === "numberRange", f = 360;
1219
1227
  if (!l.width) {
1220
1228
  if (i) {
1221
- const M = `${f}px`;
1222
- return { width: M, minWidth: M };
1229
+ const N = `${f}px`;
1230
+ return { width: N, minWidth: N };
1223
1231
  }
1224
1232
  return;
1225
1233
  }
1226
- let C = typeof l.width == "number" ? l.width : parseInt(String(l.width), 10);
1227
- const k = typeof l.width == "number" || Number.isFinite(C) ? `${C}px` : l.width;
1228
- return { width: k, minWidth: k };
1234
+ let w = typeof l.width == "number" ? l.width : parseInt(String(l.width), 10);
1235
+ const C = typeof l.width == "number" || Number.isFinite(w) ? `${w}px` : l.width;
1236
+ return { width: C, minWidth: C };
1229
1237
  }
1230
1238
  function Ue(l, i) {
1231
1239
  if (l == null) return "";
@@ -1246,20 +1254,20 @@ const yn = /* @__PURE__ */ G(rn, [["render", gn], ["__scopeId", "data-v-0cf84609
1246
1254
  if (l == null || l === "") return;
1247
1255
  const f = Ie(l, i);
1248
1256
  if (f == null || f === "") return;
1249
- const C = Number(String(f).replace(/,/g, ""));
1250
- return Number.isFinite(C) ? C : void 0;
1257
+ const w = Number(String(f).replace(/,/g, ""));
1258
+ return Number.isFinite(w) ? w : void 0;
1251
1259
  }
1252
1260
  function fe(l) {
1253
- const { startKey: i, endKey: f } = pe(l), C = l.precision ?? 2;
1254
- let k = xe(s.value[i], C), M = xe(s.value[f], C);
1255
- k != null && M != null && k > M && ([k, M] = [M, k]), s.value[i] = k, s.value[f] = M;
1261
+ const { startKey: i, endKey: f } = pe(l), w = l.precision ?? 2;
1262
+ let C = xe(s.value[i], w), N = xe(s.value[f], w);
1263
+ C != null && N != null && C > N && ([C, N] = [N, C]), s.value[i] = C, s.value[f] = N;
1256
1264
  }
1257
1265
  function tt(l) {
1258
1266
  fe(l), E();
1259
1267
  }
1260
1268
  function nt(l) {
1261
- const { startKey: i, endKey: f } = pe(l), C = s.value[i], k = s.value[f];
1262
- return C != null && C !== "" || k != null && k !== "";
1269
+ const { startKey: i, endKey: f } = pe(l), w = s.value[i], C = s.value[f];
1270
+ return w != null && w !== "" || C != null && C !== "";
1263
1271
  }
1264
1272
  function lt(l) {
1265
1273
  if (l.disabled) return;
@@ -1278,51 +1286,51 @@ const yn = /* @__PURE__ */ G(rn, [["render", gn], ["__scopeId", "data-v-0cf84609
1278
1286
  }
1279
1287
  }
1280
1288
  function he(l) {
1281
- const i = l.style.maxHeight, f = l.style.overflow, C = l.style.transition;
1289
+ const i = l.style.maxHeight, f = l.style.overflow, w = l.style.transition;
1282
1290
  l.style.transition = "none", l.style.maxHeight = "none", l.style.overflow = "visible";
1283
- const k = l.scrollHeight;
1284
- return l.style.maxHeight = i, l.style.overflow = f, l.offsetHeight, l.style.transition = C, k;
1291
+ const C = l.scrollHeight;
1292
+ return l.style.maxHeight = i, l.style.overflow = f, l.offsetHeight, l.style.transition = w, C;
1285
1293
  }
1286
1294
  function Q() {
1287
- const l = _.value;
1288
- if (!l || y || B) return;
1289
- y = !0;
1290
- const i = l.closest(".common-search"), f = Array.from(l.querySelectorAll(".common-search__field")), C = l.querySelector(".common-search__actions");
1295
+ const l = b.value;
1296
+ if (!l || g || B) return;
1297
+ g = !0;
1298
+ const i = l.closest(".common-search"), f = Array.from(l.querySelectorAll(".common-search__field")), w = l.querySelector(".common-search__actions");
1291
1299
  if (!f.length || !i) {
1292
- g.value = !1, d.value = 0, c.value = 0, x.value = null, p.value = 0, y = !1;
1300
+ M.value = !1, c.value = 0, d.value = 0, k.value = null, u.value = 0, g = !1;
1293
1301
  return;
1294
1302
  }
1295
- d.value = f[0].offsetHeight, c.value = he(l);
1296
- const k = 16, M = i.clientWidth, O = (C == null ? void 0 : C.offsetWidth) || 220, I = Ze(f, M, O, k);
1303
+ c.value = f[0].offsetHeight, d.value = he(l);
1304
+ const C = 16, N = i.clientWidth, O = (w == null ? void 0 : w.offsetWidth) || 220, I = Ze(f, N, O, C);
1297
1305
  let Y = 1;
1298
- f.length > I && (Y += Qe(f, I, M, k));
1299
- const le = p.value;
1300
- p.value = I;
1301
- const a = Y > 1, ue = g.value;
1302
- g.value = a, a ? L.value ? x.value = null : x.value = d.value : (L.value = !1, x.value = null), y = !1, (ue !== a || le !== I) && Z(() => Q());
1306
+ f.length > I && (Y += Qe(f, I, N, C));
1307
+ const le = u.value;
1308
+ u.value = I;
1309
+ const a = Y > 1, ue = M.value;
1310
+ M.value = a, a ? x.value ? k.value = null : k.value = c.value : (x.value = !1, k.value = null), g = !1, (ue !== a || le !== I) && Z(() => Q());
1303
1311
  }
1304
1312
  function at() {
1305
- const l = _.value;
1313
+ const l = b.value;
1306
1314
  if (!l || B) return;
1307
1315
  B = !0;
1308
- const i = l.getBoundingClientRect().height || d.value;
1309
- if (L.value)
1310
- x.value = i || he(l), L.value = !1, requestAnimationFrame(() => {
1316
+ const i = l.getBoundingClientRect().height || c.value;
1317
+ if (x.value)
1318
+ k.value = i || he(l), x.value = !1, requestAnimationFrame(() => {
1311
1319
  requestAnimationFrame(() => {
1312
- x.value = d.value;
1320
+ k.value = c.value;
1313
1321
  });
1314
1322
  });
1315
1323
  else {
1316
- x.value = i;
1324
+ k.value = i;
1317
1325
  const f = he(l);
1318
- c.value = f, L.value = !0, requestAnimationFrame(() => {
1326
+ d.value = f, x.value = !0, requestAnimationFrame(() => {
1319
1327
  requestAnimationFrame(() => {
1320
- x.value = Math.max(f, d.value || 0);
1328
+ k.value = Math.max(f, c.value || 0);
1321
1329
  });
1322
1330
  });
1323
1331
  }
1324
1332
  window.setTimeout(() => {
1325
- B = !1, L.value && (x.value = null), Q();
1333
+ B = !1, x.value && (k.value = null), Q();
1326
1334
  }, 380);
1327
1335
  }
1328
1336
  function rt() {
@@ -1341,41 +1349,41 @@ const yn = /* @__PURE__ */ G(rn, [["render", gn], ["__scopeId", "data-v-0cf84609
1341
1349
  s.value = rt(), Se(), r("reset", { ...s.value }), r("change", { ...s.value });
1342
1350
  }
1343
1351
  return (l, i) => {
1344
- const f = F("el-input"), C = F("el-option"), k = F("el-select"), M = F("el-input-number"), O = F("el-icon"), I = F("el-date-picker"), Y = F("el-tooltip"), le = F("el-button");
1345
- return ee((u(), b("div", {
1352
+ const f = F("el-input"), w = F("el-option"), C = F("el-select"), N = F("el-input-number"), O = F("el-icon"), I = F("el-date-picker"), Y = F("el-tooltip"), le = F("el-button");
1353
+ return ee((p(), v("div", {
1346
1354
  class: H(["common-search", {
1347
- "is-single-row": !g.value,
1348
- "is-multi-row": g.value,
1349
- "is-expanded": g.value && L.value,
1350
- "is-collapsed": g.value && !L.value
1355
+ "is-single-row": !M.value,
1356
+ "is-multi-row": M.value,
1357
+ "is-expanded": M.value && x.value,
1358
+ "is-collapsed": M.value && !x.value
1351
1359
  }])
1352
1360
  }, [
1353
- w("div", bn, [
1354
- w("div", {
1361
+ _("div", bn, [
1362
+ _("div", {
1355
1363
  ref_key: "fieldsRef",
1356
- ref: _,
1364
+ ref: b,
1357
1365
  class: "common-search__fields",
1358
1366
  style: re(R.value)
1359
1367
  }, [
1360
- (u(!0), b(W, null, q(e.itemList, (a, ue) => (u(), b(W, {
1368
+ (p(!0), v(W, null, q(e.itemList, (a, ue) => (p(), v(W, {
1361
1369
  key: a.prop || a.start || ue
1362
1370
  }, [
1363
- w("div", {
1371
+ _("div", {
1364
1372
  class: H(["common-search__field", [`is-${a.type}`, a.className]]),
1365
1373
  style: re(et(a))
1366
1374
  }, [
1367
1375
  U(Y, {
1368
- content: D(a),
1369
- disabled: !D(a),
1376
+ content: V(a),
1377
+ disabled: !V(a),
1370
1378
  placement: "top",
1371
1379
  "show-after": 280
1372
1380
  }, {
1373
1381
  default: S(() => [
1374
- w("div", _n, [
1375
- a.type === "input" || a.type === "text" ? (u(), P(f, {
1382
+ _("div", _n, [
1383
+ a.type === "input" || a.type === "text" ? (p(), P(f, {
1376
1384
  key: 0,
1377
1385
  modelValue: s.value[a.prop],
1378
- "onUpdate:modelValue": (v) => s.value[a.prop] = v,
1386
+ "onUpdate:modelValue": (y) => s.value[a.prop] = y,
1379
1387
  modelModifiers: { trim: !0 },
1380
1388
  clearable: "",
1381
1389
  placeholder: J(a, "请输入"),
@@ -1384,10 +1392,10 @@ const yn = /* @__PURE__ */ G(rn, [["render", gn], ["__scopeId", "data-v-0cf84609
1384
1392
  class: "common-search__control",
1385
1393
  onKeyup: Ne(E, ["enter"]),
1386
1394
  onClear: E
1387
- }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder", "maxlength", "disabled"])) : a.type === "select" ? (u(), P(k, {
1395
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder", "maxlength", "disabled"])) : a.type === "select" ? (p(), P(C, {
1388
1396
  key: 1,
1389
1397
  modelValue: s.value[a.prop],
1390
- "onUpdate:modelValue": (v) => s.value[a.prop] = v,
1398
+ "onUpdate:modelValue": (y) => s.value[a.prop] = y,
1391
1399
  placeholder: J(a, "请选择"),
1392
1400
  clearable: "",
1393
1401
  filterable: a.filterable !== !1,
@@ -1399,18 +1407,18 @@ const yn = /* @__PURE__ */ G(rn, [["render", gn], ["__scopeId", "data-v-0cf84609
1399
1407
  onChange: E
1400
1408
  }, {
1401
1409
  default: S(() => [
1402
- (u(!0), b(W, null, q(a.options || [], (v, me) => (u(), P(C, {
1403
- key: `${ie(v, a)}-${me}`,
1404
- label: Ue(v, a),
1405
- value: ie(v, a),
1406
- disabled: typeof v == "object" && (v == null ? void 0 : v.disabled)
1410
+ (p(!0), v(W, null, q(a.options || [], (y, me) => (p(), P(w, {
1411
+ key: `${ie(y, a)}-${me}`,
1412
+ label: Ue(y, a),
1413
+ value: ie(y, a),
1414
+ disabled: typeof y == "object" && (y == null ? void 0 : y.disabled)
1407
1415
  }, null, 8, ["label", "value", "disabled"]))), 128))
1408
1416
  ]),
1409
1417
  _: 2
1410
- }, 1032, ["modelValue", "onUpdate:modelValue", "placeholder", "filterable", "multiple", "collapse-tags", "collapse-tags-tooltip", "disabled"])) : a.type === "remote-select" || a.type === "remoteSelect" ? (u(), P(k, {
1418
+ }, 1032, ["modelValue", "onUpdate:modelValue", "placeholder", "filterable", "multiple", "collapse-tags", "collapse-tags-tooltip", "disabled"])) : a.type === "remote-select" || a.type === "remoteSelect" ? (p(), P(C, {
1411
1419
  key: 2,
1412
1420
  modelValue: s.value[a.prop],
1413
- "onUpdate:modelValue": (v) => s.value[a.prop] = v,
1421
+ "onUpdate:modelValue": (y) => s.value[a.prop] = y,
1414
1422
  placeholder: J(a, "请输入关键词搜索"),
1415
1423
  clearable: "",
1416
1424
  filterable: "",
@@ -1419,66 +1427,66 @@ const yn = /* @__PURE__ */ G(rn, [["render", gn], ["__scopeId", "data-v-0cf84609
1419
1427
  "collapse-tags": a.multiple,
1420
1428
  "collapse-tags-tooltip": a.multiple,
1421
1429
  "reserve-keyword": !1,
1422
- "remote-method": (v) => st(a, v),
1430
+ "remote-method": (y) => st(a, y),
1423
1431
  loading: !!m[a.prop],
1424
1432
  disabled: a.disabled,
1425
1433
  class: "common-search__control",
1426
- onClear: (v) => o[a.prop] = [],
1434
+ onClear: (y) => o[a.prop] = [],
1427
1435
  onChange: E
1428
1436
  }, {
1429
1437
  default: S(() => [
1430
- (u(!0), b(W, null, q(o[a.prop] || a.options || [], (v, me) => (u(), P(C, {
1431
- key: `${ie(v, a)}-${me}`,
1432
- label: Ue(v, a),
1433
- value: ie(v, a),
1434
- disabled: typeof v == "object" && (v == null ? void 0 : v.disabled)
1438
+ (p(!0), v(W, null, q(o[a.prop] || a.options || [], (y, me) => (p(), P(w, {
1439
+ key: `${ie(y, a)}-${me}`,
1440
+ label: Ue(y, a),
1441
+ value: ie(y, a),
1442
+ disabled: typeof y == "object" && (y == null ? void 0 : y.disabled)
1435
1443
  }, null, 8, ["label", "value", "disabled"]))), 128))
1436
1444
  ]),
1437
1445
  _: 2
1438
- }, 1032, ["modelValue", "onUpdate:modelValue", "placeholder", "multiple", "collapse-tags", "collapse-tags-tooltip", "remote-method", "loading", "disabled", "onClear"])) : a.type === "number-range" || a.type === "numberRange" ? (u(), b("div", {
1446
+ }, 1032, ["modelValue", "onUpdate:modelValue", "placeholder", "multiple", "collapse-tags", "collapse-tags-tooltip", "remote-method", "loading", "disabled", "onClear"])) : a.type === "number-range" || a.type === "numberRange" ? (p(), v("div", {
1439
1447
  key: 3,
1440
1448
  class: "common-search__range common-search__range--number",
1441
- onKeyup: Ne((v) => tt(a), ["enter"])
1449
+ onKeyup: Ne((y) => tt(a), ["enter"])
1442
1450
  }, [
1443
- U(M, {
1451
+ U(N, {
1444
1452
  modelValue: s.value[a.start || `${a.prop}Min`],
1445
- "onUpdate:modelValue": (v) => s.value[a.start || `${a.prop}Min`] = v,
1453
+ "onUpdate:modelValue": (y) => s.value[a.start || `${a.prop}Min`] = y,
1446
1454
  controls: !1,
1447
1455
  min: a.min,
1448
1456
  max: a.max,
1449
1457
  placeholder: Ce(a, "min"),
1450
1458
  disabled: a.disabled,
1451
1459
  class: "common-search__range-input",
1452
- onBlur: (v) => fe(a)
1460
+ onBlur: (y) => fe(a)
1453
1461
  }, null, 8, ["modelValue", "onUpdate:modelValue", "min", "max", "placeholder", "disabled", "onBlur"]),
1454
- w("span", Cn, T(a.separator || "至"), 1),
1455
- U(M, {
1462
+ _("span", Cn, T(a.separator || "至"), 1),
1463
+ U(N, {
1456
1464
  modelValue: s.value[a.end || `${a.prop}Max`],
1457
- "onUpdate:modelValue": (v) => s.value[a.end || `${a.prop}Max`] = v,
1465
+ "onUpdate:modelValue": (y) => s.value[a.end || `${a.prop}Max`] = y,
1458
1466
  controls: !1,
1459
1467
  min: a.min,
1460
1468
  max: a.max,
1461
1469
  placeholder: Ce(a, "max"),
1462
1470
  disabled: a.disabled,
1463
1471
  class: "common-search__range-input",
1464
- onBlur: (v) => fe(a)
1472
+ onBlur: (y) => fe(a)
1465
1473
  }, null, 8, ["modelValue", "onUpdate:modelValue", "min", "max", "placeholder", "disabled", "onBlur"]),
1466
- a.clearable !== !1 && nt(a) ? (u(), P(O, {
1474
+ a.clearable !== !1 && nt(a) ? (p(), P(O, {
1467
1475
  key: 0,
1468
1476
  class: "common-search__range-clear",
1469
1477
  onMousedown: i[0] || (i[0] = de(() => {
1470
1478
  }, ["prevent"])),
1471
- onClick: (v) => lt(a)
1479
+ onClick: (y) => lt(a)
1472
1480
  }, {
1473
1481
  default: S(() => [
1474
- U(ne(De))
1482
+ U(ne(Ve))
1475
1483
  ]),
1476
1484
  _: 1
1477
- }, 8, ["onClick"])) : V("", !0)
1478
- ], 40, wn)) : a.type === "date" ? (u(), P(I, {
1485
+ }, 8, ["onClick"])) : D("", !0)
1486
+ ], 40, wn)) : a.type === "date" ? (p(), P(I, {
1479
1487
  key: 4,
1480
1488
  modelValue: s.value[a.prop],
1481
- "onUpdate:modelValue": (v) => s.value[a.prop] = v,
1489
+ "onUpdate:modelValue": (y) => s.value[a.prop] = y,
1482
1490
  type: a.dateType || "date",
1483
1491
  placeholder: J(a, "年/月/日"),
1484
1492
  "value-format": a.valueFormat || "YYYY-MM-DD",
@@ -1487,12 +1495,12 @@ const yn = /* @__PURE__ */ G(rn, [["render", gn], ["__scopeId", "data-v-0cf84609
1487
1495
  disabled: a.disabled,
1488
1496
  class: "common-search__control",
1489
1497
  onChange: E
1490
- }, null, 8, ["modelValue", "onUpdate:modelValue", "type", "placeholder", "value-format", "format", "clearable", "disabled"])) : a.type === "daterange" || a.type === "dateRange" ? (u(), b("div", kn, [
1498
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "type", "placeholder", "value-format", "format", "clearable", "disabled"])) : a.type === "daterange" || a.type === "dateRange" ? (p(), v("div", kn, [
1491
1499
  U(Ge, {
1492
1500
  start: s.value[a.start || a.startProp],
1493
- "onUpdate:start": (v) => s.value[a.start || a.startProp] = v,
1501
+ "onUpdate:start": (y) => s.value[a.start || a.startProp] = y,
1494
1502
  end: s.value[a.end || a.endProp],
1495
- "onUpdate:end": (v) => s.value[a.end || a.endProp] = v,
1503
+ "onUpdate:end": (y) => s.value[a.end || a.endProp] = y,
1496
1504
  title: a.label || a.title || "",
1497
1505
  type: a.dateType || a.pickerType || "daterange",
1498
1506
  "value-format": a.valueFormat || "YYYY-MM-DD HH:mm:ss",
@@ -1511,8 +1519,8 @@ const yn = /* @__PURE__ */ G(rn, [["render", gn], ["__scopeId", "data-v-0cf84609
1511
1519
  _: 2
1512
1520
  }, 1032, ["content", "disabled"])
1513
1521
  ], 6),
1514
- Je(ue) ? (u(), b("div", Un, [
1515
- w("div", xn, [
1522
+ Je(ue) ? (p(), v("div", Un, [
1523
+ _("div", xn, [
1516
1524
  ae(l.$slots, "actions", {
1517
1525
  search: E,
1518
1526
  reset: Fe,
@@ -1538,25 +1546,25 @@ const yn = /* @__PURE__ */ G(rn, [["render", gn], ["__scopeId", "data-v-0cf84609
1538
1546
  _: 1
1539
1547
  })
1540
1548
  ], !0),
1541
- g.value ? (u(), P(le, {
1549
+ M.value ? (p(), P(le, {
1542
1550
  key: 0,
1543
1551
  link: "",
1544
1552
  type: "primary",
1545
1553
  onClick: at
1546
1554
  }, {
1547
1555
  default: S(() => [
1548
- j(T(L.value ? "收起" : "展开") + " ", 1),
1556
+ j(T(x.value ? "收起" : "展开") + " ", 1),
1549
1557
  U(O, { class: "el-icon--right" }, {
1550
1558
  default: S(() => [
1551
- L.value ? (u(), P(ne(ft), { key: 0 })) : (u(), P(ne(ht), { key: 1 }))
1559
+ x.value ? (p(), P(ne(ft), { key: 0 })) : (p(), P(ne(ht), { key: 1 }))
1552
1560
  ]),
1553
1561
  _: 1
1554
1562
  })
1555
1563
  ]),
1556
1564
  _: 1
1557
- })) : V("", !0)
1565
+ })) : D("", !0)
1558
1566
  ])
1559
- ])) : V("", !0)
1567
+ ])) : D("", !0)
1560
1568
  ], 64))), 128))
1561
1569
  ], 4)
1562
1570
  ])
@@ -1591,50 +1599,50 @@ const yn = /* @__PURE__ */ G(rn, [["render", gn], ["__scopeId", "data-v-0cf84609
1591
1599
  }, Ln = { class: "tableOverflowHid" }, Nn = ["innerHTML"], Mn = { class: "name-wrapper" }, Pn = ["innerHTML"], Tn = { key: 1 }, Rn = ["innerHTML"];
1592
1600
  function Bn(e, t, n, r, s, o) {
1593
1601
  const m = F("el-popover");
1594
- return u(), b("div", Ln, [
1595
- n.value && n.value.length > n.maxLength ? (u(), P(m, {
1602
+ return p(), v("div", Ln, [
1603
+ n.value && n.value.length > n.maxLength ? (p(), P(m, {
1596
1604
  key: 0,
1597
1605
  trigger: "hover",
1598
1606
  placement: "bottom",
1599
1607
  width: "400"
1600
1608
  }, {
1601
1609
  reference: S(() => [
1602
- w("div", Mn, [
1603
- ee(w("span", {
1610
+ _("div", Mn, [
1611
+ ee(_("span", {
1604
1612
  class: H(n.labelClassName)
1605
1613
  }, T(n.label) + ":", 3), [
1606
1614
  [te, n.label]
1607
1615
  ]),
1608
- w("span", {
1616
+ _("span", {
1609
1617
  class: H(n.valueClassName),
1610
1618
  innerHTML: o.cutString(n.value, n.maxLength)
1611
1619
  }, null, 10, Pn)
1612
1620
  ])
1613
1621
  ]),
1614
1622
  default: S(() => [
1615
- ee(w("span", {
1623
+ ee(_("span", {
1616
1624
  class: H(n.labelClassName)
1617
1625
  }, T(n.label) + ":", 3), [
1618
1626
  [te, n.label]
1619
1627
  ]),
1620
- w("span", { innerHTML: n.value }, null, 8, Nn)
1628
+ _("span", { innerHTML: n.value }, null, 8, Nn)
1621
1629
  ]),
1622
1630
  _: 1
1623
- })) : (u(), b("div", Tn, [
1624
- ee(w("span", {
1631
+ })) : (p(), v("div", Tn, [
1632
+ ee(_("span", {
1625
1633
  class: H(n.labelClassName)
1626
1634
  }, T(n.label) + ":", 3), [
1627
1635
  [te, n.label]
1628
1636
  ]),
1629
- w("span", {
1637
+ _("span", {
1630
1638
  class: H([n.valueClassName, "value"])
1631
1639
  }, [
1632
- w("span", { innerHTML: n.value }, null, 8, Rn)
1640
+ _("span", { innerHTML: n.value }, null, 8, Rn)
1633
1641
  ], 2)
1634
1642
  ]))
1635
1643
  ]);
1636
1644
  }
1637
- const Xe = /* @__PURE__ */ G($n, [["render", Bn], ["__scopeId", "data-v-ef86ea54"]]), Vn = { class: "common-table__main" }, Dn = { key: 0 }, On = { key: 1 }, In = {
1645
+ const Xe = /* @__PURE__ */ G($n, [["render", Bn], ["__scopeId", "data-v-ef86ea54"]]), Dn = { class: "common-table__main" }, Vn = { key: 0 }, On = { key: 1 }, In = {
1638
1646
  key: 2,
1639
1647
  class: "price-text"
1640
1648
  }, An = {
@@ -1728,103 +1736,103 @@ const Xe = /* @__PURE__ */ G($n, [["render", Bn], ["__scopeId", "data-v-ef86ea54
1728
1736
  headerCellStyle: s,
1729
1737
  ...n.tableBind
1730
1738
  }));
1731
- function m(p) {
1732
- const { slotName: d, headerSlotName: c, maxLength: x, ...N } = p || {};
1739
+ function m(u) {
1740
+ const { slotName: c, headerSlotName: d, maxLength: k, ...L } = u || {};
1733
1741
  return {
1734
- ...N
1742
+ ...L
1735
1743
  };
1736
1744
  }
1737
- function h(p) {
1738
- return n.pagination ? (n.pagination.page - 1) * n.pagination.limit + p + 1 : p + 1;
1745
+ function h(u) {
1746
+ return n.pagination ? (n.pagination.page - 1) * n.pagination.limit + u + 1 : u + 1;
1739
1747
  }
1740
- function $(p) {
1741
- var d;
1742
- r("pageChange", { page: (d = n.pagination) == null ? void 0 : d.page, limit: p });
1748
+ function $(u) {
1749
+ var c;
1750
+ r("pageChange", { page: (c = n.pagination) == null ? void 0 : c.page, limit: u });
1743
1751
  }
1744
- function _(p) {
1745
- var d;
1746
- r("pageChange", { page: p, limit: (d = n.pagination) == null ? void 0 : d.limit });
1752
+ function b(u) {
1753
+ var c;
1754
+ r("pageChange", { page: u, limit: (c = n.pagination) == null ? void 0 : c.limit });
1747
1755
  }
1748
- function L(p, d, c, x) {
1749
- r("cellClick", p, d, c, x), n.canCellClick && (d == null ? void 0 : d.label) !== "操作" && window.getSelection().toString();
1756
+ function x(u, c, d, k) {
1757
+ r("cellClick", u, c, d, k), n.canCellClick && (c == null ? void 0 : c.label) !== "操作" && window.getSelection().toString();
1750
1758
  }
1751
- function g(p) {
1752
- r("selectionChange", p);
1759
+ function M(u) {
1760
+ r("selectionChange", u);
1753
1761
  }
1754
- return (p, d) => {
1755
- const c = F("el-table-column"), x = F("el-table"), N = F("el-pagination");
1756
- return u(), b("div", {
1762
+ return (u, c) => {
1763
+ const d = F("el-table-column"), k = F("el-table"), L = F("el-pagination");
1764
+ return p(), v("div", {
1757
1765
  class: H(["common-table", { "is-fill-height": e.fillHeight }])
1758
1766
  }, [
1759
- w("div", Vn, [
1760
- U(x, Me({
1767
+ _("div", Dn, [
1768
+ U(k, Me({
1761
1769
  data: e.dataList,
1762
1770
  height: e.fillHeight ? "100%" : void 0,
1763
1771
  class: { "common-pointer-table": e.canCellClick }
1764
1772
  }, o.value, {
1765
- onCellClick: L,
1766
- onSelectionChange: g
1773
+ onCellClick: x,
1774
+ onSelectionChange: M
1767
1775
  }), {
1768
1776
  default: S(() => [
1769
- e.showSelection ? (u(), P(c, {
1777
+ e.showSelection ? (p(), P(d, {
1770
1778
  key: 0,
1771
1779
  type: "selection",
1772
1780
  width: e.selectionWidth,
1773
1781
  align: "center",
1774
1782
  selectable: e.selectable,
1775
1783
  fixed: "left"
1776
- }, null, 8, ["width", "selectable"])) : V("", !0),
1777
- e.showIndex ? (u(), P(c, {
1784
+ }, null, 8, ["width", "selectable"])) : D("", !0),
1785
+ e.showIndex ? (p(), P(d, {
1778
1786
  key: 1,
1779
1787
  type: "index",
1780
1788
  label: e.indexLabel,
1781
1789
  width: e.indexWidth,
1782
1790
  index: h,
1783
1791
  align: "center"
1784
- }, null, 8, ["label", "width"])) : V("", !0),
1785
- (u(!0), b(W, null, q(e.propList, (y, B) => (u(), P(c, Me({
1786
- key: y.prop || y.slotName || B
1787
- }, { ref_for: !0 }, m(y)), St({ _: 2 }, [
1788
- y.headerSlotName ? {
1792
+ }, null, 8, ["label", "width"])) : D("", !0),
1793
+ (p(!0), v(W, null, q(e.propList, (g, B) => (p(), P(d, Me({
1794
+ key: g.prop || g.slotName || B
1795
+ }, { ref_for: !0 }, m(g)), St({ _: 2 }, [
1796
+ g.headerSlotName ? {
1789
1797
  name: "header",
1790
1798
  fn: S(() => [
1791
- ae(p.$slots, y.headerSlotName, { column: y }, void 0, !0)
1799
+ ae(u.$slots, g.headerSlotName, { column: g }, void 0, !0)
1792
1800
  ]),
1793
1801
  key: "0"
1794
1802
  } : void 0,
1795
- y.slotName ? {
1803
+ g.slotName ? {
1796
1804
  name: "default",
1797
1805
  fn: S((R) => [
1798
- y.slotName === "overtext" ? (u(), b("div", Dn, [
1806
+ g.slotName === "overtext" ? (p(), v("div", Vn, [
1799
1807
  U(Xe, {
1800
- value: String(R.row[y.prop] ?? ""),
1801
- "max-length": y.maxLength || 18
1808
+ value: String(R.row[g.prop] ?? ""),
1809
+ "max-length": g.maxLength || 18
1802
1810
  }, null, 8, ["value", "max-length"])
1803
- ])) : y.slotName === "whether" ? (u(), b("div", On, [
1804
- w("span", {
1811
+ ])) : g.slotName === "whether" ? (p(), v("div", On, [
1812
+ _("span", {
1805
1813
  class: H({
1806
- "whether-yes": R.row[y.prop] == 1,
1807
- "whether-no": R.row[y.prop] == 0
1814
+ "whether-yes": R.row[g.prop] == 1,
1815
+ "whether-no": R.row[g.prop] == 0
1808
1816
  })
1809
- }, T(R.row[y.prop] == 0 ? "否" : R.row[y.prop] == 1 ? "是" : ""), 3)
1810
- ])) : y.slotName === "price" ? (u(), b("div", In, T(ne(Ie)(R.row[y.prop], 2)), 1)) : y.slotName === "rate" ? (u(), b("div", An, T(ne(vt)(R.row[y.prop], 2, "toPercentText")), 1)) : y.slotName === "boldtext" ? (u(), b("div", Hn, T(R.row[y.prop]), 1)) : ae(p.$slots, y.slotName, {
1817
+ }, T(R.row[g.prop] == 0 ? "否" : R.row[g.prop] == 1 ? "是" : ""), 3)
1818
+ ])) : g.slotName === "price" ? (p(), v("div", In, T(ne(Ie)(R.row[g.prop], 2)), 1)) : g.slotName === "rate" ? (p(), v("div", An, T(ne(vt)(R.row[g.prop], 2, "toPercentText")), 1)) : g.slotName === "boldtext" ? (p(), v("div", Hn, T(R.row[g.prop]), 1)) : ae(u.$slots, g.slotName, {
1811
1819
  row: R.row,
1812
1820
  index: R.$index,
1813
- column: y
1821
+ column: g
1814
1822
  }, () => [
1815
- j(T(ne(bt)(R.row[y.prop])), 1)
1823
+ j(T(ne(bt)(R.row[g.prop])), 1)
1816
1824
  ], !0, 5)
1817
1825
  ]),
1818
1826
  key: "1"
1819
1827
  } : void 0
1820
1828
  ]), 1040))), 128)),
1821
- ae(p.$slots, "default", {}, void 0, !0)
1829
+ ae(u.$slots, "default", {}, void 0, !0)
1822
1830
  ]),
1823
1831
  _: 3
1824
1832
  }, 16, ["data", "height", "class"])
1825
1833
  ]),
1826
- e.pagination ? (u(), b("div", zn, [
1827
- U(N, {
1834
+ e.pagination ? (p(), v("div", zn, [
1835
+ U(L, {
1828
1836
  background: "",
1829
1837
  "current-page": e.pagination.page,
1830
1838
  "page-size": e.pagination.limit,
@@ -1832,9 +1840,9 @@ const Xe = /* @__PURE__ */ G($n, [["render", Bn], ["__scopeId", "data-v-ef86ea54
1832
1840
  total: e.pagination.total,
1833
1841
  layout: e.paginationLayout,
1834
1842
  onSizeChange: $,
1835
- onCurrentChange: _
1843
+ onCurrentChange: b
1836
1844
  }, null, 8, ["current-page", "page-size", "page-sizes", "total", "layout"])
1837
- ])) : V("", !0)
1845
+ ])) : D("", !0)
1838
1846
  ], 2);
1839
1847
  };
1840
1848
  }
@@ -1855,65 +1863,65 @@ const Xe = /* @__PURE__ */ G($n, [["render", Bn], ["__scopeId", "data-v-ef86ea54
1855
1863
  transform: "translateX(0px)"
1856
1864
  });
1857
1865
  let $ = null;
1858
- function _(c) {
1859
- return (c == null ? void 0 : c.count) != null || (c == null ? void 0 : c.badge) != null;
1866
+ function b(d) {
1867
+ return (d == null ? void 0 : d.count) != null || (d == null ? void 0 : d.badge) != null;
1860
1868
  }
1861
- function L(c) {
1862
- return c.count != null ? c.count : c.badge;
1869
+ function x(d) {
1870
+ return d.count != null ? d.count : d.badge;
1863
1871
  }
1864
- function g(c, x) {
1865
- c && (o.value[x] = c);
1872
+ function M(d, k) {
1873
+ d && (o.value[k] = d);
1866
1874
  }
1867
- function p() {
1868
- const c = s.value;
1869
- if (!c) return;
1870
- const x = n.options.findIndex((R) => R.value === n.modelValue), N = o.value[x];
1871
- if (!N) {
1875
+ function u() {
1876
+ const d = s.value;
1877
+ if (!d) return;
1878
+ const k = n.options.findIndex((R) => R.value === n.modelValue), L = o.value[k];
1879
+ if (!L) {
1872
1880
  h.value = { width: "0px", transform: "translateX(0px)" };
1873
1881
  return;
1874
1882
  }
1875
- const y = c.getBoundingClientRect(), B = N.getBoundingClientRect();
1883
+ const g = d.getBoundingClientRect(), B = L.getBoundingClientRect();
1876
1884
  h.value = {
1877
1885
  width: `${B.width}px`,
1878
- transform: `translateX(${B.left - y.left}px)`
1886
+ transform: `translateX(${B.left - g.left}px)`
1879
1887
  }, m.value = !0;
1880
1888
  }
1881
- function d(c) {
1882
- c.disabled || (r("update:modelValue", c.value), r("change", c.value));
1889
+ function c(d) {
1890
+ d.disabled || (r("update:modelValue", d.value), r("change", d.value));
1883
1891
  }
1884
1892
  return se(
1885
1893
  () => [n.modelValue, n.options],
1886
1894
  async () => {
1887
- await Z(), p();
1895
+ await Z(), u();
1888
1896
  },
1889
1897
  { deep: !0 }
1890
1898
  ), ve(async () => {
1891
- await Z(), p(), typeof ResizeObserver < "u" && s.value && ($ = new ResizeObserver(() => p()), $.observe(s.value));
1899
+ await Z(), u(), typeof ResizeObserver < "u" && s.value && ($ = new ResizeObserver(() => u()), $.observe(s.value));
1892
1900
  }), He(() => {
1893
1901
  $ == null || $.disconnect(), $ = null;
1894
- }), (c, x) => (u(), b("div", {
1902
+ }), (d, k) => (p(), v("div", {
1895
1903
  ref_key: "rootRef",
1896
1904
  ref: s,
1897
1905
  class: "segmented",
1898
1906
  role: "radiogroup"
1899
1907
  }, [
1900
- w("div", {
1908
+ _("div", {
1901
1909
  class: H(["segmented__thumb", { "is-ready": m.value }]),
1902
1910
  style: re(h.value)
1903
1911
  }, null, 6),
1904
- (u(!0), b(W, null, q(e.options, (N, y) => (u(), b("button", {
1905
- key: String(N.value),
1912
+ (p(!0), v(W, null, q(e.options, (L, g) => (p(), v("button", {
1913
+ key: String(L.value),
1906
1914
  ref_for: !0,
1907
- ref: (B) => g(B, y),
1915
+ ref: (B) => M(B, g),
1908
1916
  type: "button",
1909
- class: H(["segmented__item", { "is-active": e.modelValue === N.value }]),
1917
+ class: H(["segmented__item", { "is-active": e.modelValue === L.value }]),
1910
1918
  role: "radio",
1911
- "aria-checked": e.modelValue === N.value,
1912
- disabled: N.disabled,
1913
- onClick: (B) => d(N)
1919
+ "aria-checked": e.modelValue === L.value,
1920
+ disabled: L.disabled,
1921
+ onClick: (B) => c(L)
1914
1922
  }, [
1915
- w("span", Wn, T(N.label), 1),
1916
- _(N) ? (u(), b("span", Yn, T(L(N)), 1)) : V("", !0)
1923
+ _("span", Wn, T(L.label), 1),
1924
+ b(L) ? (p(), v("span", Yn, T(x(L)), 1)) : D("", !0)
1917
1925
  ], 10, Kn))), 128))
1918
1926
  ], 512));
1919
1927
  }