mgacn-commonsdk 1.1.7 → 1.1.8

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,54 +1,54 @@
1
- import { Plus as nt, Delete as lt, CircleCloseFilled as st, Document as at, Close as ot, CircleClose as Te, CircleCheck as rt, ArrowDown as ke, ArrowUp as it } from "@element-plus/icons-vue";
2
- import { ElMessage as E, ElMessageBox as Be } from "element-plus";
3
- import ct from "cropperjs";
4
- import * as Ue from "ali-oss";
5
- import { g as ut, _ as X, h as De, i as Ve, j as dt, k as pt, l as ft, m as ht, n as mt } from "./_plugin-vue_export-helper-BQvqIi3R.js";
6
- import { c as Zn, o as el, p as tl, b as nl, q as ll, r as sl, a as al, s as ol, t as rl } from "./_plugin-vue_export-helper-BQvqIi3R.js";
7
- import { resolveComponent as $, openBlock as d, createElementBlock as m, createElementVNode as b, toDisplayString as M, createCommentVNode as N, createTextVNode as A, Fragment as q, renderList as G, normalizeStyle as se, normalizeClass as R, createVNode as C, withCtx as k, withModifiers as ue, withDirectives as Q, vShow as Z, createBlock as F, computed as me, ref as I, watch as le, onMounted as ge, reactive as Se, nextTick as W, onBeforeUnmount as Oe, withKeys as xe, unref as ne, renderSlot as ee, mergeProps as $e, createSlots as gt } from "vue";
8
- const yt = Ue.default ?? Ue, Re = "__MGACN_COMMONSDK_OSS_URL__";
9
- function vt(e = "") {
10
- globalThis[Re] = String(e || "").replace(/\/$/, "");
1
+ import { Plus as lt, Delete as st, CircleCloseFilled as at, Document as rt, Close as ot, CircleClose as Be, CircleCheck as it, ArrowUp as ct, ArrowDown as ut } from "@element-plus/icons-vue";
2
+ import { ElMessage as j, ElMessageBox as De } from "element-plus";
3
+ import dt from "cropperjs";
4
+ import * as xe from "ali-oss";
5
+ import { g as pt, _ as W, h as Ve, i as Oe, j as ft, k as ht, l as mt, m as gt, n as yt } from "./_plugin-vue_export-helper-BQvqIi3R.js";
6
+ import { c as Qn, o as Zn, p as el, b as tl, q as nl, r as ll, a as sl, s as al, t as rl } from "./_plugin-vue_export-helper-BQvqIi3R.js";
7
+ import { resolveComponent as x, openBlock as d, createElementBlock as _, createElementVNode as b, toDisplayString as T, createCommentVNode as D, createTextVNode as H, Fragment as K, renderList as Y, normalizeStyle as le, normalizeClass as O, createVNode as w, withCtx as U, withModifiers as de, withDirectives as Q, vShow as Z, createBlock as N, computed as ye, ref as R, watch as te, onMounted as ve, reactive as Se, nextTick as J, onBeforeUnmount as Re, withKeys as $e, unref as ue, renderSlot as ne, mergeProps as Le, createSlots as vt } from "vue";
8
+ const _t = xe.default ?? xe, Ie = "__MGACN_COMMONSDK_OSS_URL__";
9
+ function bt(e = "") {
10
+ globalThis[Ie] = String(e || "").replace(/\/$/, "");
11
11
  }
12
- function Ie() {
13
- return globalThis[Re] || "";
12
+ function Ae() {
13
+ return globalThis[Ie] || "";
14
14
  }
15
- function Le(e) {
15
+ function Fe(e) {
16
16
  return String(e).padStart(2, "0");
17
17
  }
18
- function _t() {
18
+ function Ct() {
19
19
  const e = /* @__PURE__ */ new Date();
20
- return `${e.getFullYear()}${Le(e.getMonth() + 1)}${Le(e.getDate())}`;
20
+ return `${e.getFullYear()}${Fe(e.getMonth() + 1)}${Fe(e.getDate())}`;
21
21
  }
22
- function Ae(e = 10) {
22
+ function ze(e = 10) {
23
23
  const n = "0123456789abcdefghijklmnopqrstuvwxyz";
24
24
  let t = "";
25
25
  for (let a = 0; a < e; a++)
26
26
  t += n[Math.floor(Math.random() * n.length)];
27
27
  return t;
28
28
  }
29
- function ye(e = "portal_cms") {
30
- return `${e}/${_t()}/`;
29
+ function _e(e = "portal_cms") {
30
+ return `${e}/${Ct()}/`;
31
31
  }
32
32
  function He(e) {
33
- return ut().getOssSts(e);
33
+ return pt().getOssSts(e);
34
34
  }
35
- function bt(e = {}) {
35
+ function wt(e = {}) {
36
36
  const n = e.accessKeyId || e.AccessKeyId || e.accessKeyID || "", t = e.accessKeySecret || e.AccessKeySecret || "", a = e.securityToken || e.SecurityToken || e.stsToken || e.token || "", s = e.bucketName || e.bucket || e.BucketName || "";
37
- let r = String(e.endPoint || e.endpoint || e.EndPoint || "").replace(/^https?:\/\//i, "").replace(/\/$/, "");
38
- s && r.startsWith(`${s}.`) && (r = r.slice(s.length + 1));
39
- const h = e.region || (r.startsWith("oss-") ? r.replace(/\.aliyuncs\.com.*$/i, "") : ""), p = String(e.ossUrl || e.domain || e.cdnDomain || "").replace(/\/$/, ""), S = s && r ? `https://${s}.${r}` : Ie();
37
+ let o = String(e.endPoint || e.endpoint || e.EndPoint || "").replace(/^https?:\/\//i, "").replace(/\/$/, "");
38
+ s && o.startsWith(`${s}.`) && (o = o.slice(s.length + 1));
39
+ const f = e.region || (o.startsWith("oss-") ? o.replace(/\.aliyuncs\.com.*$/i, "") : ""), p = String(e.ossUrl || e.domain || e.cdnDomain || "").replace(/\/$/, ""), S = s && o ? `https://${s}.${o}` : Ae();
40
40
  return {
41
41
  accessKeyId: n,
42
42
  accessKeySecret: t,
43
43
  securityToken: a,
44
44
  bucketName: s,
45
- endPoint: r,
46
- region: h,
45
+ endPoint: o,
46
+ region: f,
47
47
  ossUrl: p || S
48
48
  };
49
49
  }
50
- async function ve(e = {}) {
51
- const { dir: n, foldName: t, getOss: a, ossinfo: s } = e, r = n || ye(t || "portal_cms"), h = s || (typeof a == "function" ? await a(r) : await He(r)), p = bt(h || {});
50
+ async function be(e = {}) {
51
+ const { dir: n, foldName: t, getOss: a, ossinfo: s } = e, o = n || _e(t || "portal_cms"), f = s || (typeof a == "function" ? await a(o) : await He(o)), p = wt(f || {});
52
52
  if (!p.accessKeyId || !p.accessKeySecret || !p.bucketName)
53
53
  throw new Error("[mgacn-commonsdk] 获取 OSS STS 失败:凭证字段不完整");
54
54
  if (!p.securityToken)
@@ -62,62 +62,62 @@ async function ve(e = {}) {
62
62
  success_action_status: "200"
63
63
  };
64
64
  p.region && (S.region = p.region), p.endPoint && (S.endpoint = p.endPoint);
65
- const v = new yt(S);
66
- return v.options.ossUrl = p.ossUrl || Ie(), v.options.uploadDir = r, v;
65
+ const v = new _t(S);
66
+ return v.options.ossUrl = p.ossUrl || Ae(), v.options.uploadDir = o, v;
67
67
  }
68
- async function ze(e = {}) {
69
- var j, D;
70
- const { client: n, file: t, dir: a, foldName: s, fileName: r, onProgress: h } = e;
68
+ async function je(e = {}) {
69
+ var I, B;
70
+ const { client: n, file: t, dir: a, foldName: s, fileName: o, onProgress: f } = e;
71
71
  if (!t)
72
72
  throw new Error("[mgacn-commonsdk] uploadToOss 缺少 file");
73
- const p = n || await ve({ dir: a, foldName: s }), S = a || p.options.uploadDir || ye(s);
74
- let v = r;
73
+ const p = n || await be({ dir: a, foldName: s }), S = a || p.options.uploadDir || _e(s);
74
+ let v = o;
75
75
  if (!v) {
76
- const O = t.name || "file", z = O.lastIndexOf("."), ae = z > -1 ? O.slice(z) : "";
77
- v = `${S}${Ae(10)}${ae}`;
76
+ const V = t.name || "file", A = V.lastIndexOf("."), se = A > -1 ? V.slice(A) : "";
77
+ v = `${S}${ze(10)}${se}`;
78
78
  }
79
- const U = (O) => {
80
- typeof h == "function" && h(Math.min(100, Math.max(0, Math.floor(Number(O) * 100))));
81
- }, f = t.size > 1 * 1024 * 1024, _ = {
82
- progress: async (O) => {
83
- U(O);
79
+ const $ = (V) => {
80
+ typeof f == "function" && f(Math.min(100, Math.max(0, Math.floor(Number(V) * 100))));
81
+ }, h = t.size > 1 * 1024 * 1024, y = {
82
+ progress: async (V) => {
83
+ $(V);
84
84
  }
85
85
  };
86
86
  let u;
87
- const i = async (O) => {
88
- const z = O ? { "x-oss-object-acl": "public-read" } : void 0;
89
- return f ? p.multipartUpload(v, t, {
90
- ..._,
91
- ...z ? { headers: z } : {}
87
+ const i = async (V) => {
88
+ const A = V ? { "x-oss-object-acl": "public-read" } : void 0;
89
+ return h ? p.multipartUpload(v, t, {
90
+ ...y,
91
+ ...A ? { headers: A } : {}
92
92
  }) : p.put(v, t, {
93
- ..._,
94
- ...z ? { headers: z } : {}
93
+ ...y,
94
+ ...A ? { headers: A } : {}
95
95
  });
96
96
  };
97
97
  try {
98
- U(0.01), u = await i(!0);
98
+ $(0.01), u = await i(!0);
99
99
  } catch {
100
- U(0.01), u = await i(!1);
100
+ $(0.01), u = await i(!1);
101
101
  }
102
- const L = ((j = u == null ? void 0 : u.res) == null ? void 0 : j.statusCode) ?? ((D = u == null ? void 0 : u.res) == null ? void 0 : D.status);
102
+ const L = ((I = u == null ? void 0 : u.res) == null ? void 0 : I.statusCode) ?? ((B = u == null ? void 0 : u.res) == null ? void 0 : B.status);
103
103
  if (L && L !== 200)
104
104
  throw new Error("[mgacn-commonsdk] 上传失败");
105
- U(1);
106
- const x = (p.options.ossUrl || "").replace(/\/$/, ""), B = x ? `${x}/${v}` : v;
107
- let g = B;
105
+ $(1);
106
+ const k = (p.options.ossUrl || "").replace(/\/$/, ""), P = k ? `${k}/${v}` : v;
107
+ let C = P;
108
108
  try {
109
- g = p.signatureUrl(v, { expires: 3600 * 24 });
109
+ C = p.signatureUrl(v, { expires: 3600 * 24 });
110
110
  } catch {
111
111
  }
112
112
  return {
113
113
  name: v,
114
- url: B,
115
- previewUrl: g,
114
+ url: P,
115
+ previewUrl: C,
116
116
  raw: u,
117
117
  client: p
118
118
  };
119
119
  }
120
- function Ct(e = "", n = "") {
120
+ function kt(e = "", n = "") {
121
121
  const t = String(e || "").trim();
122
122
  if (!t) return "";
123
123
  if (!/^https?:\/\//i.test(t)) return t.replace(/^\//, "");
@@ -125,16 +125,16 @@ function Ct(e = "", n = "") {
125
125
  const a = new URL(t);
126
126
  let s = decodeURIComponent(a.pathname.replace(/^\//, ""));
127
127
  if (n) {
128
- const r = String(n).replace(/\/$/, "");
129
- t.startsWith(`${r}/`) && (s = decodeURIComponent(t.slice(r.length + 1).split("?")[0]));
128
+ const o = String(n).replace(/\/$/, "");
129
+ t.startsWith(`${o}/`) && (s = decodeURIComponent(t.slice(o.length + 1).split("?")[0]));
130
130
  }
131
131
  return s.split("?")[0];
132
132
  } catch {
133
133
  return "";
134
134
  }
135
135
  }
136
- async function wt(e, n = {}) {
137
- const t = n.client || await ve(n), a = Ct(e, t.options.ossUrl);
136
+ async function Ut(e, n = {}) {
137
+ const t = n.client || await be(n), a = kt(e, t.options.ossUrl);
138
138
  if (!a) return e;
139
139
  try {
140
140
  return t.signatureUrl(a, { expires: n.expires || 3600 * 24 });
@@ -145,30 +145,30 @@ async function wt(e, n = {}) {
145
145
  const Ee = {
146
146
  methods: {
147
147
  getDir() {
148
- return ye(this.foldName || "portal_cms");
148
+ return _e(this.foldName || "portal_cms");
149
149
  },
150
- randomString: Ae,
150
+ randomString: ze,
151
151
  getOss() {
152
152
  return He(this.getDir());
153
153
  },
154
154
  async createOssClient() {
155
- return ve({
155
+ return be({
156
156
  dir: this.getDir(),
157
157
  getOss: () => this.getOss()
158
158
  });
159
159
  }
160
160
  }
161
161
  };
162
- let Fe = 0;
163
- function je() {
164
- return Fe += 1, `mg-img-${Date.now()}-${Fe}`;
162
+ let Ne = 0;
163
+ function Ke() {
164
+ return Ne += 1, `mg-img-${Date.now()}-${Ne}`;
165
165
  }
166
- function kt(e) {
166
+ function xt(e) {
167
167
  return Array.isArray(e) ? e.filter(Boolean) : e ? [e] : [];
168
168
  }
169
- function Ne(e) {
169
+ function Me(e) {
170
170
  return e.map((n) => ({
171
- uid: je(),
171
+ uid: Ke(),
172
172
  url: n,
173
173
  status: "success",
174
174
  percent: 100,
@@ -178,17 +178,17 @@ function Ne(e) {
178
178
  function ce(e = "") {
179
179
  return String(e).startsWith("blob:");
180
180
  }
181
- function Ut(e = "") {
181
+ function St(e = "") {
182
182
  return /[?&](Expires|Signature|OSSAccessKeyId)=/i.test(String(e));
183
183
  }
184
- function St(e = "") {
184
+ function $t(e = "") {
185
185
  const n = e.lastIndexOf(".");
186
186
  return n > -1 ? e.slice(n + 1).toLowerCase() : "";
187
187
  }
188
- const xt = {
188
+ const Lt = {
189
189
  name: "MgImageUpload",
190
190
  mixins: [Ee],
191
- components: { CircleCloseFilled: st, Delete: lt, Plus: nt },
191
+ components: { CircleCloseFilled: at, Delete: st, Plus: lt },
192
192
  props: {
193
193
  /** v-model 统一为 string[];入参兼容 string / string[] */
194
194
  modelValue: { type: [Array, String], default: () => [] },
@@ -253,22 +253,22 @@ const xt = {
253
253
  deep: !0,
254
254
  immediate: !0,
255
255
  handler(e) {
256
- e != null && e.length && (this.replaceList(Ne(e)), this.ensureSignedPreviews());
256
+ e != null && e.length && (this.replaceList(Me(e)), this.ensureSignedPreviews());
257
257
  }
258
258
  },
259
259
  modelValue: {
260
260
  immediate: !0,
261
261
  handler(e) {
262
- var r;
263
- if ((r = this.initFileList) != null && r.length) return;
264
- const n = kt(e), t = this.successUrls;
265
- if (n.length === t.length && n.every((h, p) => h === t[p]))
262
+ var o;
263
+ if ((o = this.initFileList) != null && o.length) return;
264
+ const n = xt(e), t = this.successUrls;
265
+ if (n.length === t.length && n.every((f, p) => f === t[p]))
266
266
  return;
267
267
  const a = new Map(
268
- this.fileList.map((h) => [h.url, h.previewUrl]).filter(([h]) => h)
269
- ), s = Ne(n).map((h) => ({
270
- ...h,
271
- previewUrl: a.get(h.url) || ""
268
+ this.fileList.map((f) => [f.url, f.previewUrl]).filter(([f]) => f)
269
+ ), s = Me(n).map((f) => ({
270
+ ...f,
271
+ previewUrl: a.get(f.url) || ""
272
272
  }));
273
273
  this.replaceList(s), this.ensureSignedPreviews();
274
274
  }
@@ -302,14 +302,14 @@ const xt = {
302
302
  /** 私有桶回显:给已有 url 补签名预览 */
303
303
  async ensureSignedPreviews() {
304
304
  const e = this.fileList.filter(
305
- (n) => n.status === "success" && n.url && !ce(n.previewUrl) && !Ut(n.previewUrl || n.url)
305
+ (n) => n.status === "success" && n.url && !ce(n.previewUrl) && !St(n.previewUrl || n.url)
306
306
  );
307
307
  if (e.length)
308
308
  try {
309
309
  const n = await this.createOssClient();
310
310
  await Promise.all(
311
311
  e.map(async (t) => {
312
- const a = await wt(t.url, { client: n });
312
+ const a = await Ut(t.url, { client: n });
313
313
  a && (t.previewUrl = a);
314
314
  })
315
315
  );
@@ -346,7 +346,7 @@ const xt = {
346
346
  handleUpload() {
347
347
  if (!this.disabled) {
348
348
  if (this.fileList.length >= this.fileNum) {
349
- E.error(`文件数量不超过${this.fileNum}`);
349
+ j.error(`文件数量不超过${this.fileNum}`);
350
350
  return;
351
351
  }
352
352
  this.openFilePicker();
@@ -357,16 +357,16 @@ const xt = {
357
357
  if (!n.length) return;
358
358
  const t = this.dialogVisible || this.isCropper, a = this.fileNum - this.fileList.length;
359
359
  if (!t && n.length > a) {
360
- E.error(`文件数量不超过${this.fileNum}个`);
360
+ j.error(`文件数量不超过${this.fileNum}个`);
361
361
  return;
362
362
  }
363
- const s = [], r = [];
364
- if (n.forEach((h) => {
365
- this.acceptList.includes(St(h.name)) ? s.push(h) : r.push(h);
366
- }), r.length) {
367
- const h = r.map((p) => p.name).join(",");
368
- Be.confirm(
369
- `已过滤以下 ${r.length} 个不符合要求的文件:<br/><p style="color:#f56c6c;font-size:12px;">${h}</p><br/>只接受:${this.acceptList.join("/")}`,
363
+ const s = [], o = [];
364
+ if (n.forEach((f) => {
365
+ this.acceptList.includes($t(f.name)) ? s.push(f) : o.push(f);
366
+ }), o.length) {
367
+ const f = o.map((p) => p.name).join(",");
368
+ De.confirm(
369
+ `已过滤以下 ${o.length} 个不符合要求的文件:<br/><p style="color:#f56c6c;font-size:12px;">${f}</p><br/>只接受:${this.acceptList.join("/")}`,
370
370
  "提示",
371
371
  {
372
372
  confirmButtonText: "确认",
@@ -406,18 +406,18 @@ const xt = {
406
406
  const n = this.maxFileSize * 1024 * 1024, t = [];
407
407
  return e.forEach((a) => {
408
408
  if (a.size > n) {
409
- E.error(`「${a.name}」超出 ${this.maxFileSize}MB 限制`);
409
+ j.error(`「${a.name}」超出 ${this.maxFileSize}MB 限制`);
410
410
  return;
411
411
  }
412
- const s = URL.createObjectURL(a), r = {
413
- uid: je(),
412
+ const s = URL.createObjectURL(a), o = {
413
+ uid: Ke(),
414
414
  url: s,
415
415
  previewUrl: s,
416
416
  status: "uploading",
417
417
  percent: 0,
418
418
  raw: a
419
419
  };
420
- this.fileList.push(r), t.push(this.uploadOne(r));
420
+ this.fileList.push(o), t.push(this.uploadOne(o));
421
421
  }), Promise.all(t);
422
422
  },
423
423
  async uploadOne(e) {
@@ -428,19 +428,19 @@ const xt = {
428
428
  this.activeUploadCount += 1, this.$emit("update:uploading", !0);
429
429
  try {
430
430
  t(0);
431
- const a = await ze({
431
+ const a = await je({
432
432
  file: e.raw,
433
433
  dir: this.getDir(),
434
434
  onProgress: t
435
435
  });
436
436
  e.url = a.url, e.previewUrl = n || a.previewUrl || a.url, e.status = "success", t(100), e.raw = null, this.activeUploadCount = Math.max(0, this.activeUploadCount - 1), this.$emit("update:uploading", this.activeUploadCount > 0), this.emitFile(), this.$emit("success", a, e);
437
437
  } catch (a) {
438
- e.status = "fail", t(0), this.activeUploadCount = Math.max(0, this.activeUploadCount - 1), this.$emit("update:uploading", this.activeUploadCount > 0), E.error((a == null ? void 0 : a.message) || "上传失败"), this.$emit("error", a, e);
438
+ e.status = "fail", t(0), this.activeUploadCount = Math.max(0, this.activeUploadCount - 1), this.$emit("update:uploading", this.activeUploadCount > 0), j.error((a == null ? void 0 : a.message) || "上传失败"), this.$emit("error", a, e);
439
439
  }
440
440
  },
441
441
  initCropper() {
442
442
  const e = this.$refs.cropImage;
443
- !e || !this.cropImageUrl || (this.destroyCropper(), this.cropper = new ct(e, {
443
+ !e || !this.cropImageUrl || (this.destroyCropper(), this.cropper = new dt(e, {
444
444
  aspectRatio: this.aspectRatio,
445
445
  autoCropArea: 0.8,
446
446
  viewMode: 1,
@@ -464,7 +464,7 @@ const xt = {
464
464
  },
465
465
  confirmCrop() {
466
466
  if (this.uploadingCount) {
467
- E.error("上传中,请稍后!");
467
+ j.error("上传中,请稍后!");
468
468
  return;
469
469
  }
470
470
  if (!this.cropper) return;
@@ -472,9 +472,9 @@ const xt = {
472
472
  this.handleBack(), this.$nextTick(() => this.startUpload([n]));
473
473
  },
474
474
  base64ToFile(e) {
475
- const [n, t] = e.split(","), a = n.match(/:(.*?);/)[1], s = a.split("/")[1], r = atob(t), h = new Uint8Array(r.length);
476
- for (let p = 0; p < r.length; p++) h[p] = r.charCodeAt(p);
477
- return new File([h], `${Date.now()}.${s}`, { type: a });
475
+ const [n, t] = e.split(","), a = n.match(/:(.*?);/)[1], s = a.split("/")[1], o = atob(t), f = new Uint8Array(o.length);
476
+ for (let p = 0; p < o.length; p++) f[p] = o.charCodeAt(p);
477
+ return new File([f], `${Date.now()}.${s}`, { type: a });
478
478
  },
479
479
  handleBack() {
480
480
  this.cropImageUrl = "", this.dialogVisible = !1;
@@ -484,51 +484,51 @@ const xt = {
484
484
  !n || n.status === "uploading" || (this.revokePreview(n), this.fileList.splice(e, 1), this.emitFile());
485
485
  }
486
486
  }
487
- }, $t = { class: "upload-image-cropper" }, Lt = ["multiple", "accept"], Ft = {
487
+ }, Ft = { class: "upload-image-cropper" }, Nt = ["multiple", "accept"], Mt = {
488
488
  key: 0,
489
489
  class: "grey-tips"
490
- }, Nt = { key: 0 }, Mt = { class: "list-box" }, Pt = {
490
+ }, Tt = { key: 0 }, Pt = { class: "list-box" }, Bt = {
491
491
  key: 0,
492
492
  class: "status-mask is-uploading"
493
- }, Tt = { class: "progress-wrap" }, Bt = { class: "percent-text" }, Dt = {
493
+ }, Dt = { class: "progress-wrap" }, Vt = { class: "percent-text" }, Ot = {
494
494
  key: 1,
495
495
  class: "status-mask is-fail"
496
- }, Vt = ["onClick"], Ot = { class: "cropper-box" }, Rt = ["src"], It = {
496
+ }, Rt = ["onClick"], It = { class: "cropper-box" }, At = ["src"], zt = {
497
497
  key: 0,
498
498
  class: "cropper-placeholder"
499
- }, At = {
499
+ }, Ht = {
500
500
  key: 0,
501
501
  class: "btn-box btn-box--rotate"
502
- }, Ht = { class: "btn-box" };
503
- function zt(e, n, t, a, s, r) {
504
- const h = $("el-image"), p = $("el-progress"), S = $("CircleCloseFilled"), v = $("el-icon"), U = $("Delete"), f = $("Plus"), _ = $("el-button"), u = $("el-dialog");
505
- return d(), m("div", $t, [
502
+ }, jt = { class: "btn-box" };
503
+ function Et(e, n, t, a, s, o) {
504
+ const f = x("el-image"), p = x("el-progress"), S = x("CircleCloseFilled"), v = x("el-icon"), $ = x("Delete"), h = x("Plus"), y = x("el-button"), u = x("el-dialog");
505
+ return d(), _("div", Ft, [
506
506
  b("input", {
507
507
  ref: "fileInput",
508
508
  type: "file",
509
509
  class: "file-input",
510
- multiple: r.multiple,
510
+ multiple: o.multiple,
511
511
  accept: t.accept,
512
- onChange: n[0] || (n[0] = (...i) => r.onFileChange && r.onFileChange(...i))
513
- }, null, 40, Lt),
514
- t.greyTips ? (d(), m("div", Ft, [
515
- t.otherTips ? (d(), m("div", Nt, M(t.otherTips), 1)) : N("", !0),
516
- A(" " + M(t.greyTips), 1)
517
- ])) : N("", !0),
518
- b("div", Mt, [
519
- (d(!0), m(q, null, G(s.fileList, (i, L) => (d(), m("div", {
512
+ onChange: n[0] || (n[0] = (...i) => o.onFileChange && o.onFileChange(...i))
513
+ }, null, 40, Nt),
514
+ t.greyTips ? (d(), _("div", Mt, [
515
+ t.otherTips ? (d(), _("div", Tt, T(t.otherTips), 1)) : D("", !0),
516
+ H(" " + T(t.greyTips), 1)
517
+ ])) : D("", !0),
518
+ b("div", Pt, [
519
+ (d(!0), _(K, null, Y(s.fileList, (i, L) => (d(), _("div", {
520
520
  key: i.uid,
521
- class: R(["image-box", [`is-${i.status}`]]),
522
- style: se(t.imageStyle)
521
+ class: O(["image-box", [`is-${i.status}`]]),
522
+ style: le(t.imageStyle)
523
523
  }, [
524
- C(h, {
524
+ w(f, {
525
525
  src: i.previewUrl || i.url,
526
526
  fit: "cover",
527
527
  class: "img"
528
528
  }, null, 8, ["src"]),
529
- i.status === "uploading" ? (d(), m("div", Pt, [
530
- b("div", Tt, [
531
- C(p, {
529
+ i.status === "uploading" ? (d(), _("div", Bt, [
530
+ b("div", Dt, [
531
+ w(p, {
532
532
  type: "circle",
533
533
  percentage: i.percent,
534
534
  width: 30,
@@ -536,66 +536,66 @@ function zt(e, n, t, a, s, r) {
536
536
  "show-text": !1,
537
537
  color: "var(--mg-primary, #ff5722)"
538
538
  }, null, 8, ["percentage"]),
539
- b("span", Bt, M(i.percent) + "%", 1)
539
+ b("span", Vt, T(i.percent) + "%", 1)
540
540
  ])
541
- ])) : i.status === "fail" ? (d(), m("div", Dt, [
542
- C(v, {
541
+ ])) : i.status === "fail" ? (d(), _("div", Ot, [
542
+ w(v, {
543
543
  class: "fail-icon",
544
544
  size: 16
545
545
  }, {
546
- default: k(() => [
547
- C(S)
546
+ default: U(() => [
547
+ w(S)
548
548
  ]),
549
549
  _: 1
550
550
  }),
551
551
  n[5] || (n[5] = b("span", { class: "fail-text" }, "失败", -1)),
552
- C(v, {
552
+ w(v, {
553
553
  class: "remove-icon",
554
554
  size: 14,
555
555
  title: "删除",
556
- onClick: ue((x) => r.removeImg(L), ["stop"])
556
+ onClick: de((k) => o.removeImg(L), ["stop"])
557
557
  }, {
558
- default: k(() => [
559
- C(U)
558
+ default: U(() => [
559
+ w($)
560
560
  ]),
561
561
  _: 1
562
562
  }, 8, ["onClick"])
563
- ])) : (d(), m("div", {
563
+ ])) : (d(), _("div", {
564
564
  key: 2,
565
565
  class: "status-mask is-success",
566
- onClick: (x) => r.removeImg(L)
566
+ onClick: (k) => o.removeImg(L)
567
567
  }, [
568
- C(v, {
568
+ w(v, {
569
569
  class: "remove-icon",
570
570
  size: 16
571
571
  }, {
572
- default: k(() => [
573
- C(U)
572
+ default: U(() => [
573
+ w($)
574
574
  ]),
575
575
  _: 1
576
576
  })
577
- ], 8, Vt))
577
+ ], 8, Rt))
578
578
  ], 6))), 128)),
579
579
  Q(b("div", {
580
580
  class: "image-box upload-btn",
581
- style: se(t.imageStyle),
582
- onClick: n[1] || (n[1] = (...i) => r.handleUpload && r.handleUpload(...i))
581
+ style: le(t.imageStyle),
582
+ onClick: n[1] || (n[1] = (...i) => o.handleUpload && o.handleUpload(...i))
583
583
  }, [
584
- C(v, {
584
+ w(v, {
585
585
  class: "icon",
586
586
  size: 14
587
587
  }, {
588
- default: k(() => [
589
- C(f)
588
+ default: U(() => [
589
+ w(h)
590
590
  ]),
591
591
  _: 1
592
592
  }),
593
593
  n[6] || (n[6] = b("div", null, "上传图片", -1))
594
594
  ], 4), [
595
- [Z, r.showUploadBtn]
595
+ [Z, o.showUploadBtn]
596
596
  ])
597
597
  ]),
598
- C(u, {
598
+ w(u, {
599
599
  modelValue: s.dialogVisible,
600
600
  "onUpdate:modelValue": n[4] || (n[4] = (i) => s.dialogVisible = i),
601
601
  title: "裁剪图片",
@@ -604,73 +604,73 @@ function zt(e, n, t, a, s, r) {
604
604
  "append-to-body": "",
605
605
  class: "mg-image-upload-dialog",
606
606
  "close-on-click-modal": !1,
607
- onClose: r.handleBack
607
+ onClose: o.handleBack
608
608
  }, {
609
- footer: k(() => [
610
- t.isDegree ? (d(), m("div", At, [
611
- C(_, {
612
- onClick: n[2] || (n[2] = (i) => r.rotate(-t.degree))
609
+ footer: U(() => [
610
+ t.isDegree ? (d(), _("div", Ht, [
611
+ w(y, {
612
+ onClick: n[2] || (n[2] = (i) => o.rotate(-t.degree))
613
613
  }, {
614
- default: k(() => [...n[7] || (n[7] = [
615
- A("向左旋转", -1)
614
+ default: U(() => [...n[7] || (n[7] = [
615
+ H("向左旋转", -1)
616
616
  ])]),
617
617
  _: 1
618
618
  }),
619
- C(_, {
620
- onClick: n[3] || (n[3] = (i) => r.rotate(t.degree))
619
+ w(y, {
620
+ onClick: n[3] || (n[3] = (i) => o.rotate(t.degree))
621
621
  }, {
622
- default: k(() => [...n[8] || (n[8] = [
623
- A("向右旋转", -1)
622
+ default: U(() => [...n[8] || (n[8] = [
623
+ H("向右旋转", -1)
624
624
  ])]),
625
625
  _: 1
626
626
  })
627
- ])) : N("", !0),
628
- b("div", Ht, [
629
- C(_, {
627
+ ])) : D("", !0),
628
+ b("div", jt, [
629
+ w(y, {
630
630
  type: "primary",
631
- onClick: r.openFilePicker
631
+ onClick: o.openFilePicker
632
632
  }, {
633
- default: k(() => [
634
- A(M(s.cropImageUrl ? "重新上传" : "点击上传"), 1)
633
+ default: U(() => [
634
+ H(T(s.cropImageUrl ? "重新上传" : "点击上传"), 1)
635
635
  ]),
636
636
  _: 1
637
637
  }, 8, ["onClick"]),
638
- C(_, {
638
+ w(y, {
639
639
  type: "primary",
640
- onClick: r.confirmCrop
640
+ onClick: o.confirmCrop
641
641
  }, {
642
- default: k(() => [...n[9] || (n[9] = [
643
- A("确定", -1)
642
+ default: U(() => [...n[9] || (n[9] = [
643
+ H("确定", -1)
644
644
  ])]),
645
645
  _: 1
646
646
  }, 8, ["onClick"])
647
647
  ])
648
648
  ]),
649
- default: k(() => [
650
- b("div", Ot, [
649
+ default: U(() => [
650
+ b("div", It, [
651
651
  Q(b("img", {
652
652
  ref: "cropImage",
653
653
  src: s.cropImageUrl,
654
654
  class: "cropper-img"
655
- }, null, 8, Rt), [
655
+ }, null, 8, At), [
656
656
  [Z, s.cropImageUrl]
657
657
  ]),
658
- s.cropImageUrl ? N("", !0) : (d(), m("div", It, "请选择图片后进行裁剪"))
658
+ s.cropImageUrl ? D("", !0) : (d(), _("div", zt, "请选择图片后进行裁剪"))
659
659
  ])
660
660
  ]),
661
661
  _: 1
662
662
  }, 8, ["modelValue", "onClose"])
663
663
  ]);
664
664
  }
665
- const Et = /* @__PURE__ */ X(xt, [["render", zt], ["__scopeId", "data-v-68531340"]]), jt = ".mp4,.mov,.jpg,.jpeg,.m3u8,.png,.m4v,.doc,.docx,.xls,.xlsx,.pdf";
666
- let Me = 0;
667
- function Ke() {
668
- return Me += 1, `mg-file-${Date.now()}-${Me}`;
665
+ const Kt = /* @__PURE__ */ W(Lt, [["render", Et], ["__scopeId", "data-v-68531340"]]), Yt = ".mp4,.mov,.jpg,.jpeg,.m3u8,.png,.m4v,.doc,.docx,.xls,.xlsx,.pdf";
666
+ let Te = 0;
667
+ function Ye() {
668
+ return Te += 1, `mg-file-${Date.now()}-${Te}`;
669
669
  }
670
- function Kt(e) {
670
+ function Wt(e) {
671
671
  return Array.isArray(e) ? e.filter(Boolean) : e ? [e] : [];
672
672
  }
673
- function Ye(e = "") {
673
+ function We(e = "") {
674
674
  try {
675
675
  return decodeURIComponent(String(e).split("?")[0]).split("/").filter(Boolean).pop() || "file";
676
676
  } catch {
@@ -679,22 +679,22 @@ function Ye(e = "") {
679
679
  }
680
680
  function Pe(e) {
681
681
  return e.map((n) => ({
682
- uid: Ke(),
683
- name: Ye(n),
682
+ uid: Ye(),
683
+ name: We(n),
684
684
  url: n,
685
685
  status: "success",
686
686
  percent: 100,
687
687
  raw: null
688
688
  }));
689
689
  }
690
- function Yt(e = "") {
690
+ function qt(e = "") {
691
691
  const n = e.lastIndexOf(".");
692
692
  return n > -1 ? e.slice(n + 1).toLowerCase() : "";
693
693
  }
694
- const Wt = {
694
+ const Gt = {
695
695
  name: "MgFileUpload",
696
696
  mixins: [Ee],
697
- components: { CircleCheck: rt, CircleClose: Te, Close: ot, Document: at },
697
+ components: { CircleCheck: it, CircleClose: Be, Close: ot, Document: rt },
698
698
  props: {
699
699
  /** v-model 统一为 string[];入参兼容 string / string[] */
700
700
  modelValue: { type: [Array, String], default: () => [] },
@@ -707,7 +707,7 @@ const Wt = {
707
707
  initFileList: { type: Array, default: () => [] },
708
708
  /** 选满后是否清空再传 */
709
709
  resetFilelist: Boolean,
710
- accept: { type: String, default: jt },
710
+ accept: { type: String, default: Yt },
711
711
  foldName: { type: String, default: "portal_cms" },
712
712
  disabled: Boolean,
713
713
  buttonText: { type: String, default: "点击上传" },
@@ -765,8 +765,8 @@ const Wt = {
765
765
  handler(e) {
766
766
  var a;
767
767
  if ((a = this.initFileList) != null && a.length) return;
768
- const n = Kt(e), t = this.successUrls;
769
- n.length === t.length && n.every((s, r) => s === t[r]) || (this.fileList = Pe(n));
768
+ const n = Wt(e), t = this.successUrls;
769
+ n.length === t.length && n.every((s, o) => s === t[o]) || (this.fileList = Pe(n));
770
770
  }
771
771
  }
772
772
  },
@@ -785,7 +785,7 @@ const Wt = {
785
785
  handleUpload() {
786
786
  if (!this.disabled) {
787
787
  if (this.fileList.length >= this.fileNum) {
788
- E.error(`文件数量不超过${this.fileNum}`);
788
+ j.error(`文件数量不超过${this.fileNum}`);
789
789
  return;
790
790
  }
791
791
  this.openFilePicker();
@@ -800,16 +800,16 @@ const Wt = {
800
800
  if (!n.length || this.disabled) return;
801
801
  const t = this.fileNum - this.fileList.length;
802
802
  if (n.length > t && !(this.resetFilelist || this.fileNum === 1)) {
803
- E.error(`文件数量不超过${this.fileNum}个`);
803
+ j.error(`文件数量不超过${this.fileNum}个`);
804
804
  return;
805
805
  }
806
806
  const a = [], s = [];
807
- if (n.forEach((r) => {
808
- this.acceptList.includes(Yt(r.name)) ? a.push(r) : s.push(r);
807
+ if (n.forEach((o) => {
808
+ this.acceptList.includes(qt(o.name)) ? a.push(o) : s.push(o);
809
809
  }), s.length) {
810
- const r = s.map((h) => h.name).join(",");
811
- Be.confirm(
812
- `已过滤以下 ${s.length} 个不符合要求的文件:<br/><p style="color:#f56c6c;font-size:12px;">${r}</p><br/>只接受:${this.acceptList.join("/")}`,
810
+ const o = s.map((f) => f.name).join(",");
811
+ De.confirm(
812
+ `已过滤以下 ${s.length} 个不符合要求的文件:<br/><p style="color:#f56c6c;font-size:12px;">${o}</p><br/>只接受:${this.acceptList.join("/")}`,
813
813
  "提示",
814
814
  {
815
815
  confirmButtonText: "确认",
@@ -827,11 +827,11 @@ const Wt = {
827
827
  const n = this.maxFileSize * 1024 * 1024, t = [];
828
828
  return e.forEach((a) => {
829
829
  if (a.size > n) {
830
- E.error(`「${a.name}」超出 ${this.maxFileSize}MB 限制`);
830
+ j.error(`「${a.name}」超出 ${this.maxFileSize}MB 限制`);
831
831
  return;
832
832
  }
833
833
  const s = {
834
- uid: Ke(),
834
+ uid: Ye(),
835
835
  name: a.name,
836
836
  url: "",
837
837
  status: "uploading",
@@ -849,14 +849,14 @@ const Wt = {
849
849
  this.activeUploadCount += 1, this.$emit("update:uploading", !0);
850
850
  try {
851
851
  n(0);
852
- const t = await ze({
852
+ const t = await je({
853
853
  file: e.raw,
854
854
  dir: this.getDir(),
855
855
  onProgress: n
856
856
  });
857
- e.url = t.url, e.name = e.name || Ye(t.url), e.status = "success", n(100), e.raw = null, this.activeUploadCount = Math.max(0, this.activeUploadCount - 1), this.$emit("update:uploading", this.activeUploadCount > 0), this.emitFile(), this.$emit("success", t, e);
857
+ e.url = t.url, e.name = e.name || We(t.url), e.status = "success", n(100), e.raw = null, this.activeUploadCount = Math.max(0, this.activeUploadCount - 1), this.$emit("update:uploading", this.activeUploadCount > 0), this.emitFile(), this.$emit("success", t, e);
858
858
  } catch (t) {
859
- e.status = "fail", n(0), this.activeUploadCount = Math.max(0, this.activeUploadCount - 1), this.$emit("update:uploading", this.activeUploadCount > 0), E.error((t == null ? void 0 : t.message) || "上传失败"), this.$emit("error", t, e);
859
+ e.status = "fail", n(0), this.activeUploadCount = Math.max(0, this.activeUploadCount - 1), this.$emit("update:uploading", this.activeUploadCount > 0), j.error((t == null ? void 0 : t.message) || "上传失败"), this.$emit("error", t, e);
860
860
  }
861
861
  },
862
862
  onFileClick(e) {
@@ -867,102 +867,102 @@ const Wt = {
867
867
  !n || n.status === "uploading" || (this.fileList.splice(e, 1), this.emitFile());
868
868
  }
869
869
  }
870
- }, qt = { class: "mg-file-upload" }, Gt = ["multiple", "accept", "disabled"], Xt = {
870
+ }, Xt = { class: "mg-file-upload" }, Jt = ["multiple", "accept", "disabled"], Qt = {
871
871
  key: 1,
872
872
  class: "el-upload__tip"
873
- }, Jt = {
873
+ }, Zt = {
874
874
  key: 2,
875
875
  class: "el-upload-list el-upload-list--text"
876
- }, Qt = { class: "el-upload-list__item-info" }, Zt = ["href", "target", "onClick"], en = { class: "el-upload-list__item-file-name" }, tn = { class: "el-upload-list__item-status-label" };
877
- function nn(e, n, t, a, s, r) {
878
- const h = $("el-button"), p = $("Document"), S = $("el-icon"), v = $("CircleCheck"), U = $("CircleClose"), f = $("Close"), _ = $("el-progress");
879
- return d(), m("div", qt, [
876
+ }, en = { class: "el-upload-list__item-info" }, tn = ["href", "target", "onClick"], nn = { class: "el-upload-list__item-file-name" }, ln = { class: "el-upload-list__item-status-label" };
877
+ function sn(e, n, t, a, s, o) {
878
+ const f = x("el-button"), p = x("Document"), S = x("el-icon"), v = x("CircleCheck"), $ = x("CircleClose"), h = x("Close"), y = x("el-progress");
879
+ return d(), _("div", Xt, [
880
880
  b("input", {
881
881
  ref: "fileInput",
882
882
  type: "file",
883
883
  class: "file-input",
884
- multiple: r.multiple,
884
+ multiple: o.multiple,
885
885
  accept: t.accept,
886
886
  disabled: t.disabled,
887
- onChange: n[0] || (n[0] = (...u) => r.onFileChange && r.onFileChange(...u))
888
- }, null, 40, Gt),
889
- t.showButton ? (d(), F(h, {
887
+ onChange: n[0] || (n[0] = (...u) => o.onFileChange && o.onFileChange(...u))
888
+ }, null, 40, Jt),
889
+ t.showButton ? (d(), N(f, {
890
890
  key: 0,
891
891
  type: "primary",
892
- disabled: t.disabled || !r.showUploadBtn,
893
- onClick: r.handleUpload
892
+ disabled: t.disabled || !o.showUploadBtn,
893
+ onClick: o.handleUpload
894
894
  }, {
895
- default: k(() => [
896
- A(M(t.buttonText), 1)
895
+ default: U(() => [
896
+ H(T(t.buttonText), 1)
897
897
  ]),
898
898
  _: 1
899
- }, 8, ["disabled", "onClick"])) : N("", !0),
900
- r.tipText ? (d(), m("div", Xt, M(r.tipText), 1)) : N("", !0),
901
- t.showFileList ? (d(), m("ul", Jt, [
902
- (d(!0), m(q, null, G(s.fileList, (u, i) => (d(), m("li", {
899
+ }, 8, ["disabled", "onClick"])) : D("", !0),
900
+ o.tipText ? (d(), _("div", Qt, T(o.tipText), 1)) : D("", !0),
901
+ t.showFileList ? (d(), _("ul", Zt, [
902
+ (d(!0), _(K, null, Y(s.fileList, (u, i) => (d(), _("li", {
903
903
  key: u.uid,
904
- class: R(["el-upload-list__item", [`is-${u.status}`]]),
904
+ class: O(["el-upload-list__item", [`is-${u.status}`]]),
905
905
  tabindex: "0"
906
906
  }, [
907
- b("div", Qt, [
907
+ b("div", en, [
908
908
  b("a", {
909
909
  class: "el-upload-list__item-name",
910
910
  href: u.url || void 0,
911
911
  target: u.url ? "_blank" : void 0,
912
912
  rel: "noopener noreferrer",
913
- onClick: ue((L) => r.onFileClick(u), ["prevent"])
913
+ onClick: de((L) => o.onFileClick(u), ["prevent"])
914
914
  }, [
915
- C(S, { class: "el-icon--document" }, {
916
- default: k(() => [
917
- C(p)
915
+ w(S, { class: "el-icon--document" }, {
916
+ default: U(() => [
917
+ w(p)
918
918
  ]),
919
919
  _: 1
920
920
  }),
921
- b("span", en, M(u.name), 1)
922
- ], 8, Zt)
921
+ b("span", nn, T(u.name), 1)
922
+ ], 8, tn)
923
923
  ]),
924
- b("label", tn, [
925
- u.status === "success" ? (d(), F(S, {
924
+ b("label", ln, [
925
+ u.status === "success" ? (d(), N(S, {
926
926
  key: 0,
927
927
  class: "el-icon--upload-success el-icon--circle-check"
928
928
  }, {
929
- default: k(() => [
930
- C(v)
929
+ default: U(() => [
930
+ w(v)
931
931
  ]),
932
932
  _: 1
933
- })) : u.status === "fail" ? (d(), F(S, {
933
+ })) : u.status === "fail" ? (d(), N(S, {
934
934
  key: 1,
935
935
  class: "el-icon--upload-fail"
936
936
  }, {
937
- default: k(() => [
938
- C(U)
937
+ default: U(() => [
938
+ w($)
939
939
  ]),
940
940
  _: 1
941
- })) : N("", !0)
941
+ })) : D("", !0)
942
942
  ]),
943
- u.status !== "uploading" ? (d(), F(S, {
943
+ u.status !== "uploading" ? (d(), N(S, {
944
944
  key: 0,
945
945
  class: "el-icon--close",
946
946
  title: "删除",
947
- onClick: ue((L) => r.removeFile(i), ["stop"])
947
+ onClick: de((L) => o.removeFile(i), ["stop"])
948
948
  }, {
949
- default: k(() => [
950
- C(f)
949
+ default: U(() => [
950
+ w(h)
951
951
  ]),
952
952
  _: 1
953
- }, 8, ["onClick"])) : N("", !0),
954
- u.status === "uploading" ? (d(), F(_, {
953
+ }, 8, ["onClick"])) : D("", !0),
954
+ u.status === "uploading" ? (d(), N(y, {
955
955
  key: 1,
956
956
  class: "el-upload-list__item-progress",
957
957
  type: "line",
958
958
  percentage: u.percent,
959
959
  "stroke-width": 2
960
- }, null, 8, ["percentage"])) : N("", !0)
960
+ }, null, 8, ["percentage"])) : D("", !0)
961
961
  ], 2))), 128))
962
- ])) : N("", !0)
962
+ ])) : D("", !0)
963
963
  ]);
964
964
  }
965
- const ln = /* @__PURE__ */ X(Wt, [["render", nn], ["__scopeId", "data-v-07dac048"]]), sn = {
965
+ const an = /* @__PURE__ */ W(Gt, [["render", sn], ["__scopeId", "data-v-07dac048"]]), rn = {
966
966
  __name: "DateRangePicker",
967
967
  props: {
968
968
  start: {
@@ -988,94 +988,81 @@ const ln = /* @__PURE__ */ X(Wt, [["render", nn], ["__scopeId", "data-v-07dac048
988
988
  canClearable: { type: Boolean, default: !0 },
989
989
  /** 是否展示快捷区间;默认开启 */
990
990
  showShortcuts: { type: Boolean, default: !0 },
991
- /** 自定义快捷项;不传则使用内置:7天内 / 一个月内 / 一年内 */
991
+ /** 自定义快捷项;不传则使用内置:七天内 / 一个月内 / 一年内 */
992
992
  shortcuts: { type: Array, default: void 0 }
993
993
  },
994
994
  emits: ["update:start", "update:end", "change"],
995
995
  setup(e, { emit: n }) {
996
996
  const t = n, a = e;
997
- function s(f) {
998
- const _ = new Date(f);
999
- return _.setHours(0, 0, 0, 0), _;
997
+ function s(h) {
998
+ const y = new Date(h);
999
+ return y.setHours(0, 0, 0, 0), y;
1000
1000
  }
1001
- function r(f) {
1002
- const _ = new Date(f);
1003
- return _.setHours(23, 59, 59, 0), _;
1001
+ function o(h) {
1002
+ const y = new Date(h);
1003
+ return y.setHours(23, 59, 59, 0), y;
1004
1004
  }
1005
- function h(f) {
1006
- const _ = r(/* @__PURE__ */ new Date()), u = s(/* @__PURE__ */ new Date());
1007
- return f(u), [u, _];
1005
+ function f(h) {
1006
+ const y = o(/* @__PURE__ */ new Date()), u = s(/* @__PURE__ */ new Date());
1007
+ return h(u), [u, y];
1008
1008
  }
1009
1009
  const p = [
1010
1010
  {
1011
- text: "7天内",
1012
- value: () => h((f) => {
1013
- f.setDate(f.getDate() - 6);
1011
+ text: "七天内",
1012
+ value: () => f((h) => {
1013
+ h.setDate(h.getDate() - 6);
1014
1014
  })
1015
1015
  },
1016
1016
  {
1017
1017
  text: "一个月内",
1018
- value: () => h((f) => {
1019
- f.setMonth(f.getMonth() - 1);
1018
+ value: () => f((h) => {
1019
+ h.setMonth(h.getMonth() - 1);
1020
1020
  })
1021
1021
  },
1022
1022
  {
1023
1023
  text: "一年内",
1024
- value: () => h((f) => {
1025
- f.setFullYear(f.getFullYear() - 1);
1024
+ value: () => f((h) => {
1025
+ h.setFullYear(h.getFullYear() - 1);
1026
1026
  })
1027
1027
  }
1028
- ], S = me(() => {
1029
- var f;
1028
+ ], S = ye(() => {
1029
+ var h;
1030
1030
  if (a.showShortcuts)
1031
- return (f = a.shortcuts) != null && f.length ? a.shortcuts : p;
1032
- }), v = I([]);
1033
- le(
1031
+ return (h = a.shortcuts) != null && h.length ? a.shortcuts : p;
1032
+ }), v = R([]);
1033
+ te(
1034
1034
  () => [a.start, a.end],
1035
- ([f, _]) => {
1036
- v.value = f || _ ? [f, _] : [];
1035
+ ([h, y]) => {
1036
+ v.value = h || y ? [h, y] : [];
1037
1037
  }
1038
- ), ge(() => {
1038
+ ), ve(() => {
1039
1039
  v.value = a.start || a.end ? [a.start, a.end] : [];
1040
1040
  });
1041
- function U(f) {
1042
- t("update:start", f ? f[0] : ""), t("update:end", f ? f[1] : ""), t("change");
1041
+ function $(h) {
1042
+ t("update:start", h ? h[0] : ""), t("update:end", h ? h[1] : ""), t("change");
1043
1043
  }
1044
- return (f, _) => {
1045
- const u = $("el-date-picker");
1046
- return d(), F(u, {
1044
+ return (h, y) => {
1045
+ const u = x("el-date-picker");
1046
+ return d(), N(u, {
1047
1047
  modelValue: v.value,
1048
- "onUpdate:modelValue": _[0] || (_[0] = (i) => v.value = i),
1048
+ "onUpdate:modelValue": y[0] || (y[0] = (i) => v.value = i),
1049
1049
  type: e.type,
1050
1050
  "range-separator": "至",
1051
- "start-placeholder": `${e.title} 开始`,
1051
+ "start-placeholder": e.title ? `${e.title} 开始` : "开始",
1052
1052
  "end-placeholder": "结束",
1053
1053
  "value-format": e.valueFormat,
1054
1054
  "default-time": e.defaultTime,
1055
1055
  shortcuts: S.value,
1056
1056
  class: "date-range-picker",
1057
- onChange: U,
1057
+ onChange: $,
1058
1058
  clearable: e.canClearable
1059
1059
  }, null, 8, ["modelValue", "type", "start-placeholder", "value-format", "default-time", "shortcuts", "clearable"]);
1060
1060
  };
1061
1061
  }
1062
- }, We = /* @__PURE__ */ X(sn, [["__scopeId", "data-v-2371549b"]]), an = { class: "common-search__body" }, on = {
1063
- key: 0,
1064
- class: "common-search__label"
1065
- }, rn = ["onKeyup"], cn = { class: "common-search__range-sep" }, un = {
1066
- key: 6,
1062
+ }, qe = /* @__PURE__ */ W(rn, [["__scopeId", "data-v-88a05aae"]]), on = { class: "common-search__body" }, cn = { class: "common-search__fields-wrap" }, un = { class: "common-search__control-wrap" }, dn = ["onKeyup"], pn = { class: "common-search__range-sep" }, fn = {
1063
+ key: 5,
1067
1064
  class: "common-search__range"
1068
- }, dn = {
1069
- key: 0,
1070
- class: "common-search__scroll-hint",
1071
- "aria-hidden": "true"
1072
- }, pn = {
1073
- key: 0,
1074
- class: "common-search__actions is-inline"
1075
- }, fn = { class: "common-search__actions-main" }, hn = {
1076
- key: 0,
1077
- class: "common-search__footer"
1078
- }, mn = { class: "common-search__actions is-bottom" }, gn = { class: "common-search__actions-main" }, yn = /* @__PURE__ */ Object.assign({ name: "MgSearchForm" }, {
1065
+ }, hn = { class: "common-search__actions is-inline" }, mn = { class: "common-search__actions-main" }, gn = /* @__PURE__ */ Object.assign({ name: "MgSearchForm" }, {
1079
1066
  __name: "SearchForm",
1080
1067
  props: {
1081
1068
  modelValue: { type: Object, default: () => ({}) },
@@ -1083,448 +1070,413 @@ const ln = /* @__PURE__ */ X(Wt, [["render", nn], ["__scopeId", "data-v-07dac048
1083
1070
  },
1084
1071
  emits: ["change", "search", "reset", "update:modelValue"],
1085
1072
  setup(e, { emit: n }) {
1086
- const t = e, a = n, s = I({}), r = Se({}), h = Se({});
1073
+ const t = e, a = n, s = R({}), o = Se({}), f = Se({});
1087
1074
  let p = !1;
1088
- function S(o, c) {
1089
- return JSON.stringify(o ?? {}) === JSON.stringify(c ?? {});
1075
+ function S(r, c) {
1076
+ return JSON.stringify(r ?? {}) === JSON.stringify(c ?? {});
1090
1077
  }
1091
- const v = I(null), U = I(!1), f = I(!1), _ = I(0), u = I(0), i = I(null), L = I(!1);
1092
- let x = null, B = !1, g = !1;
1093
- const j = me(() => {
1094
- if (!(!f.value || i.value == null))
1078
+ const v = R(null), $ = R(!1), h = R(!1), y = R(0), u = R(0), i = R(null);
1079
+ let L = null, k = !1, P = !1;
1080
+ const C = ye(() => {
1081
+ if (!(!h.value || i.value == null))
1095
1082
  return {
1096
1083
  maxHeight: `${i.value}px`,
1097
- // 展开且内容被限高时允许内部滚动,避免撑满视口把表格挤没
1098
- overflow: U.value ? "auto" : "hidden"
1084
+ overflow: "hidden"
1099
1085
  };
1100
1086
  });
1101
- function D(o) {
1102
- const c = _.value || 0, T = c * 2 + 16 + 4, V = c > 0 ? c : 120, K = Math.max(V, T);
1103
- return Math.min(o, K);
1087
+ function I(r = {}) {
1088
+ return String(r.label || r.title || "").trim();
1104
1089
  }
1105
- function O() {
1106
- const o = v.value;
1107
- if (!o || !U.value || !f.value) {
1108
- L.value = !1;
1109
- return;
1110
- }
1111
- L.value = o.scrollHeight - o.clientHeight - o.scrollTop > 6;
1090
+ function B(r = {}) {
1091
+ return String(r.tip || I(r) || "").trim();
1092
+ }
1093
+ function V(r = {}, c = "") {
1094
+ if (r.placeholder != null && r.placeholder !== "") return r.placeholder;
1095
+ const g = I(r);
1096
+ return g && c && c !== "年/月/日" ? `${c}${g}` : g || c;
1112
1097
  }
1113
- function z() {
1114
- O();
1098
+ function A(r = {}, c = "min") {
1099
+ const g = c === "min" ? r.minPlaceholder : r.maxPlaceholder;
1100
+ if (g != null && g !== "") return g;
1101
+ const F = I(r), M = c === "min" ? "最小值" : "最大值";
1102
+ return F ? `${F}${M}` : M;
1115
1103
  }
1116
- le(
1104
+ te(
1117
1105
  () => t.modelValue,
1118
- (o) => {
1119
- S(o, s.value) || (p = !0, s.value = { ...o || {} }, W(() => {
1106
+ (r) => {
1107
+ S(r, s.value) || (p = !0, s.value = { ...r || {} }, J(() => {
1120
1108
  p = !1;
1121
1109
  }));
1122
1110
  },
1123
1111
  { deep: !0, immediate: !0 }
1124
- ), le(
1112
+ ), te(
1125
1113
  s,
1126
1114
  () => {
1127
1115
  p || a("update:modelValue", { ...s.value });
1128
1116
  },
1129
1117
  { deep: !0 }
1130
- ), le(
1118
+ ), te(
1131
1119
  () => t.itemList,
1132
1120
  () => {
1133
- U.value = !1, W(() => te());
1121
+ $.value = !1, J(() => q());
1134
1122
  },
1135
1123
  { deep: !0 }
1136
- ), ge(() => {
1137
- W(() => te()), typeof ResizeObserver < "u" && (x = new ResizeObserver(() => {
1138
- !B && !g && te();
1139
- }), v.value && x.observe(v.value)), window.addEventListener("resize", ae);
1140
- }), Oe(() => {
1141
- x == null || x.disconnect(), window.removeEventListener("resize", ae);
1124
+ ), ve(() => {
1125
+ J(() => q()), typeof ResizeObserver < "u" && (L = new ResizeObserver(() => {
1126
+ !k && !P && q();
1127
+ }), v.value && L.observe(v.value)), window.addEventListener("resize", se);
1128
+ }), Re(() => {
1129
+ L == null || L.disconnect(), window.removeEventListener("resize", se);
1142
1130
  });
1143
- function ae() {
1144
- !B && !g && te();
1131
+ function se() {
1132
+ !k && !P && q();
1145
1133
  }
1146
- function Ge(o) {
1147
- if (!o.width) return;
1148
- const c = typeof o.width == "number" ? `${o.width}px` : o.width;
1134
+ function Xe(r) {
1135
+ if (!r.width) return;
1136
+ const c = typeof r.width == "number" ? `${r.width}px` : r.width;
1149
1137
  return { width: c, minWidth: c };
1150
1138
  }
1151
- function _e(o, c) {
1152
- if (o == null) return "";
1153
- if (typeof o != "object") return String(o);
1154
- const w = c.optionsLabel || "label";
1155
- return typeof w == "string" ? o[w] : Array.isArray(w) ? `${o[w[0]]}(${o[w[1]]})` : o.label;
1139
+ function Ce(r, c) {
1140
+ if (r == null) return "";
1141
+ if (typeof r != "object") return String(r);
1142
+ const g = c.optionsLabel || "label";
1143
+ return typeof g == "string" ? r[g] : Array.isArray(g) ? `${r[g[0]]}(${r[g[1]]})` : r.label;
1156
1144
  }
1157
- function oe(o, c) {
1158
- return o == null || typeof o != "object" ? o : o[c.optionsValue || "value"];
1145
+ function ae(r, c) {
1146
+ return r == null || typeof r != "object" ? r : r[c.optionsValue || "value"];
1159
1147
  }
1160
- function de(o) {
1148
+ function pe(r) {
1161
1149
  return {
1162
- startKey: o.start || `${o.prop}Min`,
1163
- endKey: o.end || `${o.prop}Max`
1150
+ startKey: r.start || `${r.prop}Min`,
1151
+ endKey: r.end || `${r.prop}Max`
1164
1152
  };
1165
1153
  }
1166
- function be(o, c = 2) {
1167
- if (o == null || o === "") return;
1168
- const w = De(o, c);
1169
- if (w == null || w === "") return;
1170
- const P = Number(String(w).replace(/,/g, ""));
1171
- return Number.isFinite(P) ? P : void 0;
1154
+ function we(r, c = 2) {
1155
+ if (r == null || r === "") return;
1156
+ const g = Ve(r, c);
1157
+ if (g == null || g === "") return;
1158
+ const F = Number(String(g).replace(/,/g, ""));
1159
+ return Number.isFinite(F) ? F : void 0;
1172
1160
  }
1173
- function pe(o) {
1174
- const { startKey: c, endKey: w } = de(o), P = o.precision ?? 2;
1175
- let T = be(s.value[c], P), V = be(s.value[w], P);
1176
- T != null && V != null && T > V && ([T, V] = [V, T]), s.value[c] = T, s.value[w] = V;
1161
+ function fe(r) {
1162
+ const { startKey: c, endKey: g } = pe(r), F = r.precision ?? 2;
1163
+ let M = we(s.value[c], F), z = we(s.value[g], F);
1164
+ M != null && z != null && M > z && ([M, z] = [z, M]), s.value[c] = M, s.value[g] = z;
1177
1165
  }
1178
- function Xe(o) {
1179
- pe(o), H();
1166
+ function Je(r) {
1167
+ fe(r), E();
1180
1168
  }
1181
- function Je(o) {
1182
- const { startKey: c, endKey: w } = de(o), P = s.value[c], T = s.value[w];
1183
- return P != null && P !== "" || T != null && T !== "";
1169
+ function Qe(r) {
1170
+ const { startKey: c, endKey: g } = pe(r), F = s.value[c], M = s.value[g];
1171
+ return F != null && F !== "" || M != null && M !== "";
1184
1172
  }
1185
- function Qe(o) {
1186
- if (o.disabled) return;
1187
- const { startKey: c, endKey: w } = de(o);
1188
- s.value[c] = void 0, s.value[w] = void 0, H();
1173
+ function Ze(r) {
1174
+ if (r.disabled) return;
1175
+ const { startKey: c, endKey: g } = pe(r);
1176
+ s.value[c] = void 0, s.value[g] = void 0, E();
1189
1177
  }
1190
- async function Ze(o, c) {
1191
- if (typeof o.remoteMethod == "function") {
1192
- h[o.prop] = !0;
1178
+ async function et(r, c) {
1179
+ if (typeof r.remoteMethod == "function") {
1180
+ f[r.prop] = !0;
1193
1181
  try {
1194
- const w = await o.remoteMethod(c);
1195
- r[o.prop] = Array.isArray(w) ? w : [];
1182
+ const g = await r.remoteMethod(c);
1183
+ o[r.prop] = Array.isArray(g) ? g : [];
1196
1184
  } finally {
1197
- h[o.prop] = !1;
1185
+ f[r.prop] = !1;
1198
1186
  }
1199
1187
  }
1200
1188
  }
1201
- function Ce(o) {
1202
- const c = o.style.maxHeight, w = o.style.overflow, P = o.style.transition;
1203
- o.style.transition = "none", o.style.maxHeight = "none", o.style.overflow = "visible";
1204
- const T = o.scrollHeight;
1205
- return o.style.maxHeight = c, o.style.overflow = w, o.offsetHeight, o.style.transition = P, T;
1189
+ function he(r) {
1190
+ const c = r.style.maxHeight, g = r.style.overflow, F = r.style.transition;
1191
+ r.style.transition = "none", r.style.maxHeight = "none", r.style.overflow = "visible";
1192
+ const M = r.scrollHeight;
1193
+ return r.style.maxHeight = c, r.style.overflow = g, r.offsetHeight, r.style.transition = F, M;
1206
1194
  }
1207
- function te() {
1208
- const o = v.value;
1209
- if (!o || B || g) return;
1210
- B = !0;
1211
- const c = o.closest(".common-search"), w = o.querySelectorAll(".common-search__field");
1212
- if (!w.length || !c) {
1213
- f.value = !1, _.value = 0, u.value = 0, i.value = null, B = !1;
1195
+ function q() {
1196
+ const r = v.value;
1197
+ if (!r || k || P) return;
1198
+ k = !0;
1199
+ const c = r.closest(".common-search"), g = r.querySelectorAll(".common-search__field"), F = c == null ? void 0 : c.querySelector(".common-search__actions");
1200
+ if (!g.length || !c) {
1201
+ h.value = !1, y.value = 0, u.value = 0, i.value = null, k = !1;
1214
1202
  return;
1215
1203
  }
1216
- _.value = w[0].offsetHeight, u.value = Ce(o);
1217
- const P = c.clientWidth, T = 20;
1218
- let V = 0, K = 1;
1219
- Array.from(w).forEach((Y, l) => {
1220
- const J = Y.offsetWidth;
1221
- if (l === 0) {
1222
- V = J;
1204
+ y.value = g[0].offsetHeight, u.value = he(r);
1205
+ const M = 16, z = (F == null ? void 0 : F.offsetWidth) || 0, re = Math.max(0, c.clientWidth - z - M), oe = 16;
1206
+ let G = 0, X = 1;
1207
+ Array.from(g).forEach((m, ee) => {
1208
+ const ie = m.offsetWidth;
1209
+ if (ee === 0) {
1210
+ G = ie;
1223
1211
  return;
1224
1212
  }
1225
- V + T + J > P ? (K += 1, V = J) : V += T + J;
1213
+ G + oe + ie > re ? (X += 1, G = ie) : G += oe + ie;
1226
1214
  });
1227
- const ie = K > 1;
1228
- f.value = ie, ie ? U.value ? i.value = D(u.value) : i.value = _.value : (U.value = !1, i.value = null), B = !1, W(() => O());
1215
+ const l = X > 1, me = h.value;
1216
+ h.value = l, l ? $.value ? i.value = null : i.value = y.value : ($.value = !1, i.value = null), k = !1, me !== l && J(() => q());
1229
1217
  }
1230
- function et() {
1231
- const o = v.value;
1232
- if (!o || g) return;
1233
- g = !0;
1234
- const c = o.getBoundingClientRect().height || _.value;
1235
- if (U.value)
1236
- L.value = !1, i.value = c, U.value = !1, requestAnimationFrame(() => {
1218
+ function tt() {
1219
+ const r = v.value;
1220
+ if (!r || P) return;
1221
+ P = !0;
1222
+ const c = r.getBoundingClientRect().height || y.value;
1223
+ if ($.value)
1224
+ i.value = c || he(r), $.value = !1, requestAnimationFrame(() => {
1237
1225
  requestAnimationFrame(() => {
1238
- i.value = _.value;
1226
+ i.value = y.value;
1239
1227
  });
1240
1228
  });
1241
1229
  else {
1242
1230
  i.value = c;
1243
- const w = Ce(o);
1244
- u.value = w;
1245
- const P = D(w);
1246
- U.value = !0, requestAnimationFrame(() => {
1231
+ const g = he(r);
1232
+ u.value = g, $.value = !0, requestAnimationFrame(() => {
1247
1233
  requestAnimationFrame(() => {
1248
- i.value = P;
1234
+ i.value = Math.max(g, y.value || 0);
1249
1235
  });
1250
1236
  });
1251
1237
  }
1252
1238
  window.setTimeout(() => {
1253
- g = !1, te(), W(() => O());
1239
+ P = !1, $.value && (i.value = null), q();
1254
1240
  }, 380);
1255
1241
  }
1256
- function tt() {
1257
- const o = {};
1242
+ function nt() {
1243
+ const r = {};
1258
1244
  return t.itemList.forEach((c) => {
1259
- c.type === "daterange" || c.type === "dateRange" ? (o[c.start || c.startProp] = void 0, o[c.end || c.endProp] = void 0) : c.type === "number-range" || c.type === "numberRange" ? (o[c.start || `${c.prop}Min`] = void 0, o[c.end || `${c.prop}Max`] = void 0) : c.multiple ? o[c.prop] = [] : c.prop && (o[c.prop] = void 0);
1260
- }), o;
1245
+ c.type === "daterange" || c.type === "dateRange" ? (r[c.start || c.startProp] = void 0, r[c.end || c.endProp] = void 0) : c.type === "number-range" || c.type === "numberRange" ? (r[c.start || `${c.prop}Min`] = void 0, r[c.end || `${c.prop}Max`] = void 0) : c.multiple ? r[c.prop] = [] : c.prop && (r[c.prop] = void 0);
1246
+ }), r;
1261
1247
  }
1262
- function we() {
1248
+ function ke() {
1263
1249
  a("update:modelValue", { ...s.value });
1264
1250
  }
1265
- function H() {
1266
- we(), a("change", { ...s.value }), a("search", { ...s.value });
1251
+ function E() {
1252
+ ke(), a("change", { ...s.value }), a("search", { ...s.value });
1267
1253
  }
1268
- function re() {
1269
- s.value = tt(), we(), a("reset", { ...s.value }), a("change", { ...s.value });
1254
+ function Ue() {
1255
+ s.value = nt(), ke(), a("reset", { ...s.value }), a("change", { ...s.value });
1270
1256
  }
1271
- return (o, c) => {
1272
- const w = $("el-input"), P = $("el-option"), T = $("el-select"), V = $("el-input-number"), K = $("el-icon"), ie = $("el-date-picker"), Y = $("el-button");
1273
- return Q((d(), m("div", {
1274
- class: R(["common-search", {
1275
- "is-single-row": !f.value,
1276
- "is-multi-row": f.value,
1277
- "is-expanded": f.value && U.value,
1278
- "is-collapsed": f.value && !U.value
1257
+ return (r, c) => {
1258
+ const g = x("el-input"), F = x("el-option"), M = x("el-select"), z = x("el-input-number"), re = x("el-icon"), oe = x("el-date-picker"), G = x("el-tooltip"), X = x("el-button");
1259
+ return Q((d(), _("div", {
1260
+ class: O(["common-search", {
1261
+ "is-single-row": !h.value,
1262
+ "is-multi-row": h.value,
1263
+ "is-expanded": h.value && $.value,
1264
+ "is-collapsed": h.value && !$.value
1279
1265
  }])
1280
1266
  }, [
1281
- b("div", an, [
1282
- b("div", {
1283
- class: R(["common-search__fields-wrap", { "has-more-below": L.value }])
1284
- }, [
1267
+ b("div", on, [
1268
+ b("div", cn, [
1285
1269
  b("div", {
1286
1270
  ref_key: "fieldsRef",
1287
1271
  ref: v,
1288
1272
  class: "common-search__fields",
1289
- style: se(j.value),
1290
- onScrollPassive: z
1273
+ style: le(C.value)
1291
1274
  }, [
1292
- (d(!0), m(q, null, G(e.itemList, (l, J) => (d(), m("div", {
1293
- key: l.prop || l.start || J,
1294
- class: R(["common-search__field", [`is-${l.type}`, l.className]]),
1295
- style: se(Ge(l))
1275
+ (d(!0), _(K, null, Y(e.itemList, (l, me) => (d(), _("div", {
1276
+ key: l.prop || l.start || me,
1277
+ class: O(["common-search__field", [`is-${l.type}`, l.className]]),
1278
+ style: le(Xe(l))
1296
1279
  }, [
1297
- l.label ? (d(), m("label", on, M(l.label), 1)) : N("", !0),
1298
- l.type === "input" || l.type === "text" ? (d(), F(w, {
1299
- key: 1,
1300
- modelValue: s.value[l.prop],
1301
- "onUpdate:modelValue": (y) => s.value[l.prop] = y,
1302
- modelModifiers: { trim: !0 },
1303
- clearable: "",
1304
- placeholder: l.placeholder || `请输入${l.label || ""}`,
1305
- maxlength: l.maxlength || 200,
1306
- disabled: l.disabled,
1307
- onKeyup: xe(H, ["enter"])
1308
- }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder", "maxlength", "disabled"])) : l.type === "select" ? (d(), F(T, {
1309
- key: 2,
1310
- modelValue: s.value[l.prop],
1311
- "onUpdate:modelValue": (y) => s.value[l.prop] = y,
1312
- placeholder: l.placeholder || `请选择${l.label || ""}`,
1313
- clearable: "",
1314
- filterable: l.filterable !== !1,
1315
- multiple: l.multiple,
1316
- "collapse-tags": l.multiple,
1317
- "collapse-tags-tooltip": l.multiple,
1318
- disabled: l.disabled,
1319
- class: "common-search__control",
1320
- onChange: H
1280
+ w(G, {
1281
+ content: B(l),
1282
+ disabled: !B(l),
1283
+ placement: "top",
1284
+ "show-after": 280
1321
1285
  }, {
1322
- default: k(() => [
1323
- (d(!0), m(q, null, G(l.options || [], (y, fe) => (d(), F(P, {
1324
- key: `${oe(y, l)}-${fe}`,
1325
- label: _e(y, l),
1326
- value: oe(y, l),
1327
- disabled: typeof y == "object" && (y == null ? void 0 : y.disabled)
1328
- }, null, 8, ["label", "value", "disabled"]))), 128))
1286
+ default: U(() => [
1287
+ b("div", un, [
1288
+ l.type === "input" || l.type === "text" ? (d(), N(g, {
1289
+ key: 0,
1290
+ modelValue: s.value[l.prop],
1291
+ "onUpdate:modelValue": (m) => s.value[l.prop] = m,
1292
+ modelModifiers: { trim: !0 },
1293
+ clearable: "",
1294
+ placeholder: V(l, "请输入"),
1295
+ maxlength: l.maxlength || 200,
1296
+ disabled: l.disabled,
1297
+ class: "common-search__control",
1298
+ onKeyup: $e(E, ["enter"])
1299
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder", "maxlength", "disabled"])) : l.type === "select" ? (d(), N(M, {
1300
+ key: 1,
1301
+ modelValue: s.value[l.prop],
1302
+ "onUpdate:modelValue": (m) => s.value[l.prop] = m,
1303
+ placeholder: V(l, "请选择"),
1304
+ clearable: "",
1305
+ filterable: l.filterable !== !1,
1306
+ multiple: l.multiple,
1307
+ "collapse-tags": l.multiple,
1308
+ "collapse-tags-tooltip": l.multiple,
1309
+ disabled: l.disabled,
1310
+ class: "common-search__control",
1311
+ onChange: E
1312
+ }, {
1313
+ default: U(() => [
1314
+ (d(!0), _(K, null, Y(l.options || [], (m, ee) => (d(), N(F, {
1315
+ key: `${ae(m, l)}-${ee}`,
1316
+ label: Ce(m, l),
1317
+ value: ae(m, l),
1318
+ disabled: typeof m == "object" && (m == null ? void 0 : m.disabled)
1319
+ }, null, 8, ["label", "value", "disabled"]))), 128))
1320
+ ]),
1321
+ _: 2
1322
+ }, 1032, ["modelValue", "onUpdate:modelValue", "placeholder", "filterable", "multiple", "collapse-tags", "collapse-tags-tooltip", "disabled"])) : l.type === "remote-select" || l.type === "remoteSelect" ? (d(), N(M, {
1323
+ key: 2,
1324
+ modelValue: s.value[l.prop],
1325
+ "onUpdate:modelValue": (m) => s.value[l.prop] = m,
1326
+ placeholder: V(l, "请输入关键词搜索"),
1327
+ clearable: "",
1328
+ filterable: "",
1329
+ remote: "",
1330
+ multiple: l.multiple,
1331
+ "collapse-tags": l.multiple,
1332
+ "collapse-tags-tooltip": l.multiple,
1333
+ "reserve-keyword": !1,
1334
+ "remote-method": (m) => et(l, m),
1335
+ loading: !!f[l.prop],
1336
+ disabled: l.disabled,
1337
+ class: "common-search__control",
1338
+ onClear: (m) => o[l.prop] = [],
1339
+ onChange: E
1340
+ }, {
1341
+ default: U(() => [
1342
+ (d(!0), _(K, null, Y(o[l.prop] || l.options || [], (m, ee) => (d(), N(F, {
1343
+ key: `${ae(m, l)}-${ee}`,
1344
+ label: Ce(m, l),
1345
+ value: ae(m, l),
1346
+ disabled: typeof m == "object" && (m == null ? void 0 : m.disabled)
1347
+ }, null, 8, ["label", "value", "disabled"]))), 128))
1348
+ ]),
1349
+ _: 2
1350
+ }, 1032, ["modelValue", "onUpdate:modelValue", "placeholder", "multiple", "collapse-tags", "collapse-tags-tooltip", "remote-method", "loading", "disabled", "onClear"])) : l.type === "number-range" || l.type === "numberRange" ? (d(), _("div", {
1351
+ key: 3,
1352
+ class: "common-search__range common-search__range--number",
1353
+ onKeyup: $e((m) => Je(l), ["enter"])
1354
+ }, [
1355
+ w(z, {
1356
+ modelValue: s.value[l.start || `${l.prop}Min`],
1357
+ "onUpdate:modelValue": (m) => s.value[l.start || `${l.prop}Min`] = m,
1358
+ controls: !1,
1359
+ min: l.min,
1360
+ max: l.max,
1361
+ placeholder: A(l, "min"),
1362
+ disabled: l.disabled,
1363
+ class: "common-search__range-input",
1364
+ onBlur: (m) => fe(l)
1365
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "min", "max", "placeholder", "disabled", "onBlur"]),
1366
+ b("span", pn, T(l.separator || "至"), 1),
1367
+ w(z, {
1368
+ modelValue: s.value[l.end || `${l.prop}Max`],
1369
+ "onUpdate:modelValue": (m) => s.value[l.end || `${l.prop}Max`] = m,
1370
+ controls: !1,
1371
+ min: l.min,
1372
+ max: l.max,
1373
+ placeholder: A(l, "max"),
1374
+ disabled: l.disabled,
1375
+ class: "common-search__range-input",
1376
+ onBlur: (m) => fe(l)
1377
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "min", "max", "placeholder", "disabled", "onBlur"]),
1378
+ l.clearable !== !1 && Qe(l) ? (d(), N(re, {
1379
+ key: 0,
1380
+ class: "common-search__range-clear",
1381
+ onMousedown: c[0] || (c[0] = de(() => {
1382
+ }, ["prevent"])),
1383
+ onClick: (m) => Ze(l)
1384
+ }, {
1385
+ default: U(() => [
1386
+ w(ue(Be))
1387
+ ]),
1388
+ _: 1
1389
+ }, 8, ["onClick"])) : D("", !0)
1390
+ ], 40, dn)) : l.type === "date" ? (d(), N(oe, {
1391
+ key: 4,
1392
+ modelValue: s.value[l.prop],
1393
+ "onUpdate:modelValue": (m) => s.value[l.prop] = m,
1394
+ type: l.dateType || "date",
1395
+ placeholder: V(l, "年/月/日"),
1396
+ "value-format": l.valueFormat || "YYYY-MM-DD",
1397
+ format: l.format || "YYYY/MM/DD",
1398
+ clearable: l.clearable !== !1,
1399
+ disabled: l.disabled,
1400
+ class: "common-search__control"
1401
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "type", "placeholder", "value-format", "format", "clearable", "disabled"])) : l.type === "daterange" || l.type === "dateRange" ? (d(), _("div", fn, [
1402
+ w(qe, {
1403
+ start: s.value[l.start || l.startProp],
1404
+ "onUpdate:start": (m) => s.value[l.start || l.startProp] = m,
1405
+ end: s.value[l.end || l.endProp],
1406
+ "onUpdate:end": (m) => s.value[l.end || l.endProp] = m,
1407
+ title: l.label || l.title || "",
1408
+ type: l.dateType || l.pickerType || "daterange",
1409
+ "value-format": l.valueFormat || "YYYY-MM-DD HH:mm:ss",
1410
+ format: l.format,
1411
+ "show-shortcuts": l.showShortcuts !== !1,
1412
+ shortcuts: l.shortcuts,
1413
+ "can-clearable": l.clearable !== !1,
1414
+ onChange: E
1415
+ }, null, 8, ["start", "onUpdate:start", "end", "onUpdate:end", "title", "type", "value-format", "format", "show-shortcuts", "shortcuts", "can-clearable"])
1416
+ ])) : ne(r.$slots, l.slotName || l.prop, {
1417
+ item: l,
1418
+ form: s.value
1419
+ }, void 0, !0, 6)
1420
+ ])
1329
1421
  ]),
1330
1422
  _: 2
1331
- }, 1032, ["modelValue", "onUpdate:modelValue", "placeholder", "filterable", "multiple", "collapse-tags", "collapse-tags-tooltip", "disabled"])) : l.type === "remote-select" || l.type === "remoteSelect" ? (d(), F(T, {
1332
- key: 3,
1333
- modelValue: s.value[l.prop],
1334
- "onUpdate:modelValue": (y) => s.value[l.prop] = y,
1335
- placeholder: l.placeholder || "请输入关键词搜索",
1336
- clearable: "",
1337
- filterable: "",
1338
- remote: "",
1339
- multiple: l.multiple,
1340
- "collapse-tags": l.multiple,
1341
- "collapse-tags-tooltip": l.multiple,
1342
- "reserve-keyword": !1,
1343
- "remote-method": (y) => Ze(l, y),
1344
- loading: !!h[l.prop],
1345
- disabled: l.disabled,
1346
- class: "common-search__control",
1347
- onClear: (y) => r[l.prop] = [],
1348
- onChange: H
1349
- }, {
1350
- default: k(() => [
1351
- (d(!0), m(q, null, G(r[l.prop] || l.options || [], (y, fe) => (d(), F(P, {
1352
- key: `${oe(y, l)}-${fe}`,
1353
- label: _e(y, l),
1354
- value: oe(y, l),
1355
- disabled: typeof y == "object" && (y == null ? void 0 : y.disabled)
1356
- }, null, 8, ["label", "value", "disabled"]))), 128))
1357
- ]),
1358
- _: 2
1359
- }, 1032, ["modelValue", "onUpdate:modelValue", "placeholder", "multiple", "collapse-tags", "collapse-tags-tooltip", "remote-method", "loading", "disabled", "onClear"])) : l.type === "number-range" || l.type === "numberRange" ? (d(), m("div", {
1360
- key: 4,
1361
- class: "common-search__range common-search__range--number",
1362
- onKeyup: xe((y) => Xe(l), ["enter"])
1363
- }, [
1364
- C(V, {
1365
- modelValue: s.value[l.start || `${l.prop}Min`],
1366
- "onUpdate:modelValue": (y) => s.value[l.start || `${l.prop}Min`] = y,
1367
- controls: !1,
1368
- min: l.min,
1369
- max: l.max,
1370
- placeholder: l.minPlaceholder || "最小值",
1371
- disabled: l.disabled,
1372
- class: "common-search__range-input",
1373
- onBlur: (y) => pe(l)
1374
- }, null, 8, ["modelValue", "onUpdate:modelValue", "min", "max", "placeholder", "disabled", "onBlur"]),
1375
- b("span", cn, M(l.separator || "至"), 1),
1376
- C(V, {
1377
- modelValue: s.value[l.end || `${l.prop}Max`],
1378
- "onUpdate:modelValue": (y) => s.value[l.end || `${l.prop}Max`] = y,
1379
- controls: !1,
1380
- min: l.min,
1381
- max: l.max,
1382
- placeholder: l.maxPlaceholder || "最大值",
1383
- disabled: l.disabled,
1384
- class: "common-search__range-input",
1385
- onBlur: (y) => pe(l)
1386
- }, null, 8, ["modelValue", "onUpdate:modelValue", "min", "max", "placeholder", "disabled", "onBlur"]),
1387
- l.clearable !== !1 && Je(l) ? (d(), F(K, {
1388
- key: 0,
1389
- class: "common-search__range-clear",
1390
- onMousedown: c[0] || (c[0] = ue(() => {
1391
- }, ["prevent"])),
1392
- onClick: (y) => Qe(l)
1393
- }, {
1394
- default: k(() => [
1395
- C(ne(Te))
1396
- ]),
1397
- _: 1
1398
- }, 8, ["onClick"])) : N("", !0)
1399
- ], 40, rn)) : l.type === "date" ? (d(), F(ie, {
1400
- key: 5,
1401
- modelValue: s.value[l.prop],
1402
- "onUpdate:modelValue": (y) => s.value[l.prop] = y,
1403
- type: l.dateType || "date",
1404
- placeholder: l.placeholder || "年/月/日",
1405
- "value-format": l.valueFormat || "YYYY-MM-DD",
1406
- format: l.format || "YYYY/MM/DD",
1407
- clearable: l.clearable !== !1,
1408
- disabled: l.disabled,
1409
- class: "common-search__control"
1410
- }, null, 8, ["modelValue", "onUpdate:modelValue", "type", "placeholder", "value-format", "format", "clearable", "disabled"])) : l.type === "daterange" || l.type === "dateRange" ? (d(), m("div", un, [
1411
- C(We, {
1412
- start: s.value[l.start || l.startProp],
1413
- "onUpdate:start": (y) => s.value[l.start || l.startProp] = y,
1414
- end: s.value[l.end || l.endProp],
1415
- "onUpdate:end": (y) => s.value[l.end || l.endProp] = y,
1416
- title: l.label || l.title || "",
1417
- type: l.dateType || l.pickerType || "daterange",
1418
- "value-format": l.valueFormat || "YYYY-MM-DD HH:mm:ss",
1419
- format: l.format,
1420
- "show-shortcuts": l.showShortcuts !== !1,
1421
- shortcuts: l.shortcuts,
1422
- "can-clearable": l.clearable !== !1,
1423
- onChange: H
1424
- }, null, 8, ["start", "onUpdate:start", "end", "onUpdate:end", "title", "type", "value-format", "format", "show-shortcuts", "shortcuts", "can-clearable"])
1425
- ])) : ee(o.$slots, l.slotName || l.prop, {
1426
- item: l,
1427
- form: s.value
1428
- }, void 0, !0, 7)
1423
+ }, 1032, ["content", "disabled"])
1429
1424
  ], 6))), 128))
1430
- ], 36),
1431
- L.value ? (d(), m("div", dn, [
1432
- C(K, { size: 12 }, {
1433
- default: k(() => [
1434
- C(ne(ke))
1435
- ]),
1436
- _: 1
1437
- }),
1438
- c[1] || (c[1] = b("span", null, "向下滑动查看更多", -1))
1439
- ])) : N("", !0)
1440
- ], 2),
1441
- f.value ? N("", !0) : (d(), m("div", pn, [
1442
- c[4] || (c[4] = b("span", {
1443
- class: "common-search__label common-search__label--spacer",
1444
- "aria-hidden": "true"
1445
- }, " ", -1)),
1446
- b("div", fn, [
1447
- ee(o.$slots, "actions", {
1448
- search: H,
1449
- reset: re,
1425
+ ], 4)
1426
+ ]),
1427
+ b("div", hn, [
1428
+ b("div", mn, [
1429
+ ne(r.$slots, "actions", {
1430
+ search: E,
1431
+ reset: Ue,
1450
1432
  form: s.value
1451
1433
  }, () => [
1452
- C(Y, {
1434
+ w(X, {
1453
1435
  class: "common-search__reset",
1454
- onClick: re
1436
+ onClick: Ue
1455
1437
  }, {
1456
- default: k(() => [...c[2] || (c[2] = [
1457
- A("重置", -1)
1438
+ default: U(() => [...c[1] || (c[1] = [
1439
+ H("重置", -1)
1458
1440
  ])]),
1459
1441
  _: 1
1460
1442
  }),
1461
- C(Y, {
1443
+ w(X, {
1462
1444
  type: "primary",
1463
1445
  class: "common-search__submit",
1464
- onClick: H
1446
+ onClick: E
1465
1447
  }, {
1466
- default: k(() => [...c[3] || (c[3] = [
1467
- A(" 搜索 ", -1)
1448
+ default: U(() => [...c[2] || (c[2] = [
1449
+ H(" 搜索 ", -1)
1468
1450
  ])]),
1469
1451
  _: 1
1470
1452
  })
1471
- ], !0)
1453
+ ], !0),
1454
+ h.value ? (d(), N(X, {
1455
+ key: 0,
1456
+ link: "",
1457
+ type: "primary",
1458
+ onClick: tt
1459
+ }, {
1460
+ default: U(() => [
1461
+ H(T($.value ? "收起" : "展开") + " ", 1),
1462
+ w(re, { class: "el-icon--right" }, {
1463
+ default: U(() => [
1464
+ $.value ? (d(), N(ue(ct), { key: 0 })) : (d(), N(ue(ut), { key: 1 }))
1465
+ ]),
1466
+ _: 1
1467
+ })
1468
+ ]),
1469
+ _: 1
1470
+ })) : D("", !0)
1472
1471
  ])
1473
- ]))
1474
- ]),
1475
- f.value ? (d(), m("div", hn, [
1476
- b("div", mn, [
1477
- b("div", gn, [
1478
- ee(o.$slots, "actions", {
1479
- search: H,
1480
- reset: re,
1481
- form: s.value
1482
- }, () => [
1483
- C(Y, {
1484
- class: "common-search__reset",
1485
- onClick: re
1486
- }, {
1487
- default: k(() => [...c[5] || (c[5] = [
1488
- A("重置", -1)
1489
- ])]),
1490
- _: 1
1491
- }),
1492
- C(Y, {
1493
- type: "primary",
1494
- class: "common-search__submit",
1495
- onClick: H
1496
- }, {
1497
- default: k(() => [...c[6] || (c[6] = [
1498
- A(" 搜索 ", -1)
1499
- ])]),
1500
- _: 1
1501
- })
1502
- ], !0)
1503
- ]),
1504
- C(Y, {
1505
- onClick: et,
1506
- type: "primary",
1507
- plain: ""
1508
- }, {
1509
- default: k(() => [
1510
- A(M(U.value ? "收起" : "展开") + " ", 1),
1511
- C(K, { class: "el-icon--right" }, {
1512
- default: k(() => [
1513
- U.value ? (d(), F(ne(it), { key: 0 })) : (d(), F(ne(ke), { key: 1 }))
1514
- ]),
1515
- _: 1
1516
- })
1517
- ]),
1518
- _: 1
1519
- })
1520
1472
  ])
1521
- ])) : N("", !0)
1473
+ ])
1522
1474
  ], 2)), [
1523
1475
  [Z, e.itemList.length]
1524
1476
  ]);
1525
1477
  };
1526
1478
  }
1527
- }), vn = /* @__PURE__ */ X(yn, [["__scopeId", "data-v-6b5e4c60"]]), _n = {
1479
+ }), yn = /* @__PURE__ */ W(gn, [["__scopeId", "data-v-8106fb02"]]), vn = {
1528
1480
  name: "MgOverflowHid",
1529
1481
  props: {
1530
1482
  label: String,
@@ -1547,59 +1499,59 @@ const ln = /* @__PURE__ */ X(Wt, [["render", nn], ["__scopeId", "data-v-07dac048
1547
1499
  return t && t.length > n && (t = t.slice(0, n) + "..."), t;
1548
1500
  }
1549
1501
  }
1550
- }, bn = { class: "tableOverflowHid" }, Cn = ["innerHTML"], wn = { class: "name-wrapper" }, kn = ["innerHTML"], Un = { key: 1 }, Sn = ["innerHTML"];
1551
- function xn(e, n, t, a, s, r) {
1552
- const h = $("el-popover");
1553
- return d(), m("div", bn, [
1554
- t.value && t.value.length > t.maxLength ? (d(), F(h, {
1502
+ }, _n = { class: "tableOverflowHid" }, bn = ["innerHTML"], Cn = { class: "name-wrapper" }, wn = ["innerHTML"], kn = { key: 1 }, Un = ["innerHTML"];
1503
+ function xn(e, n, t, a, s, o) {
1504
+ const f = x("el-popover");
1505
+ return d(), _("div", _n, [
1506
+ t.value && t.value.length > t.maxLength ? (d(), N(f, {
1555
1507
  key: 0,
1556
1508
  trigger: "hover",
1557
1509
  placement: "bottom",
1558
1510
  width: "400"
1559
1511
  }, {
1560
- reference: k(() => [
1561
- b("div", wn, [
1512
+ reference: U(() => [
1513
+ b("div", Cn, [
1562
1514
  Q(b("span", {
1563
- class: R(t.labelClassName)
1564
- }, M(t.label) + ":", 3), [
1515
+ class: O(t.labelClassName)
1516
+ }, T(t.label) + ":", 3), [
1565
1517
  [Z, t.label]
1566
1518
  ]),
1567
1519
  b("span", {
1568
- class: R(t.valueClassName),
1569
- innerHTML: r.cutString(t.value, t.maxLength)
1570
- }, null, 10, kn)
1520
+ class: O(t.valueClassName),
1521
+ innerHTML: o.cutString(t.value, t.maxLength)
1522
+ }, null, 10, wn)
1571
1523
  ])
1572
1524
  ]),
1573
- default: k(() => [
1525
+ default: U(() => [
1574
1526
  Q(b("span", {
1575
- class: R(t.labelClassName)
1576
- }, M(t.label) + ":", 3), [
1527
+ class: O(t.labelClassName)
1528
+ }, T(t.label) + ":", 3), [
1577
1529
  [Z, t.label]
1578
1530
  ]),
1579
- b("span", { innerHTML: t.value }, null, 8, Cn)
1531
+ b("span", { innerHTML: t.value }, null, 8, bn)
1580
1532
  ]),
1581
1533
  _: 1
1582
- })) : (d(), m("div", Un, [
1534
+ })) : (d(), _("div", kn, [
1583
1535
  Q(b("span", {
1584
- class: R(t.labelClassName)
1585
- }, M(t.label) + ":", 3), [
1536
+ class: O(t.labelClassName)
1537
+ }, T(t.label) + ":", 3), [
1586
1538
  [Z, t.label]
1587
1539
  ]),
1588
1540
  b("span", {
1589
- class: R([t.valueClassName, "value"])
1541
+ class: O([t.valueClassName, "value"])
1590
1542
  }, [
1591
- b("span", { innerHTML: t.value }, null, 8, Sn)
1543
+ b("span", { innerHTML: t.value }, null, 8, Un)
1592
1544
  ], 2)
1593
1545
  ]))
1594
1546
  ]);
1595
1547
  }
1596
- const qe = /* @__PURE__ */ X(_n, [["render", xn], ["__scopeId", "data-v-ef86ea54"]]), $n = { class: "common-table__main" }, Ln = { key: 0 }, Fn = { key: 1 }, Nn = {
1548
+ const Ge = /* @__PURE__ */ W(vn, [["render", xn], ["__scopeId", "data-v-ef86ea54"]]), Sn = { class: "common-table__main" }, $n = { key: 0 }, Ln = { key: 1 }, Fn = {
1597
1549
  key: 2,
1598
1550
  class: "price-text"
1599
- }, Mn = {
1551
+ }, Nn = {
1600
1552
  key: 3,
1601
1553
  class: "bold-text"
1602
- }, Pn = {
1554
+ }, Mn = {
1603
1555
  key: 0,
1604
1556
  class: "common-table__pagination"
1605
1557
  }, Tn = /* @__PURE__ */ Object.assign({ name: "MgDataTable" }, {
@@ -1680,14 +1632,14 @@ const qe = /* @__PURE__ */ X(_n, [["render", xn], ["__scopeId", "data-v-ef86ea54
1680
1632
  color: "var(--brand-text-regular)",
1681
1633
  fontWeight: 600,
1682
1634
  fontSize: "13px"
1683
- }, r = me(() => ({
1635
+ }, o = ye(() => ({
1684
1636
  headerCellStyle: s,
1685
1637
  ...t.tableBind
1686
1638
  }));
1687
- function h(u) {
1688
- const { slotName: i, headerSlotName: L, maxLength: x, ...B } = u || {};
1639
+ function f(u) {
1640
+ const { slotName: i, headerSlotName: L, maxLength: k, ...P } = u || {};
1689
1641
  return {
1690
- ...B
1642
+ ...P
1691
1643
  };
1692
1644
  }
1693
1645
  function p(u) {
@@ -1700,90 +1652,90 @@ const qe = /* @__PURE__ */ X(_n, [["render", xn], ["__scopeId", "data-v-ef86ea54
1700
1652
  var i;
1701
1653
  a("pageChange", { page: (i = t.pagination) == null ? void 0 : i.page, limit: u });
1702
1654
  }
1703
- function U(u) {
1655
+ function $(u) {
1704
1656
  var i;
1705
1657
  a("pageChange", { page: u, limit: (i = t.pagination) == null ? void 0 : i.limit });
1706
1658
  }
1707
- function f(u, i, L, x) {
1708
- a("cellClick", u, i, L, x), t.canCellClick && (i == null ? void 0 : i.label) !== "操作" && window.getSelection().toString();
1659
+ function h(u, i, L, k) {
1660
+ a("cellClick", u, i, L, k), t.canCellClick && (i == null ? void 0 : i.label) !== "操作" && window.getSelection().toString();
1709
1661
  }
1710
- function _(u) {
1662
+ function y(u) {
1711
1663
  a("selectionChange", u);
1712
1664
  }
1713
1665
  return (u, i) => {
1714
- const L = $("el-table-column"), x = $("el-table"), B = $("el-pagination");
1715
- return d(), m("div", {
1716
- class: R(["common-table", { "is-fill-height": e.fillHeight }])
1666
+ const L = x("el-table-column"), k = x("el-table"), P = x("el-pagination");
1667
+ return d(), _("div", {
1668
+ class: O(["common-table", { "is-fill-height": e.fillHeight }])
1717
1669
  }, [
1718
- b("div", $n, [
1719
- C(x, $e({
1670
+ b("div", Sn, [
1671
+ w(k, Le({
1720
1672
  data: e.dataList,
1721
1673
  height: e.fillHeight ? "100%" : void 0,
1722
1674
  class: { "common-pointer-table": e.canCellClick }
1723
- }, r.value, {
1724
- onCellClick: f,
1725
- onSelectionChange: _
1675
+ }, o.value, {
1676
+ onCellClick: h,
1677
+ onSelectionChange: y
1726
1678
  }), {
1727
- default: k(() => [
1728
- e.showSelection ? (d(), F(L, {
1679
+ default: U(() => [
1680
+ e.showSelection ? (d(), N(L, {
1729
1681
  key: 0,
1730
1682
  type: "selection",
1731
1683
  width: e.selectionWidth,
1732
1684
  align: "center",
1733
1685
  selectable: e.selectable,
1734
1686
  fixed: "left"
1735
- }, null, 8, ["width", "selectable"])) : N("", !0),
1736
- e.showIndex ? (d(), F(L, {
1687
+ }, null, 8, ["width", "selectable"])) : D("", !0),
1688
+ e.showIndex ? (d(), N(L, {
1737
1689
  key: 1,
1738
1690
  type: "index",
1739
1691
  label: e.indexLabel,
1740
1692
  width: e.indexWidth,
1741
1693
  index: S,
1742
1694
  align: "center"
1743
- }, null, 8, ["label", "width"])) : N("", !0),
1744
- (d(!0), m(q, null, G(e.propList, (g, j) => (d(), F(L, $e({
1745
- key: g.prop || g.slotName || j
1746
- }, { ref_for: !0 }, h(g)), gt({ _: 2 }, [
1747
- g.headerSlotName ? {
1695
+ }, null, 8, ["label", "width"])) : D("", !0),
1696
+ (d(!0), _(K, null, Y(e.propList, (C, I) => (d(), N(L, Le({
1697
+ key: C.prop || C.slotName || I
1698
+ }, { ref_for: !0 }, f(C)), vt({ _: 2 }, [
1699
+ C.headerSlotName ? {
1748
1700
  name: "header",
1749
- fn: k(() => [
1750
- ee(u.$slots, g.headerSlotName, { column: g }, void 0, !0)
1701
+ fn: U(() => [
1702
+ ne(u.$slots, C.headerSlotName, { column: C }, void 0, !0)
1751
1703
  ]),
1752
1704
  key: "0"
1753
1705
  } : void 0,
1754
- g.slotName ? {
1706
+ C.slotName ? {
1755
1707
  name: "default",
1756
- fn: k((D) => [
1757
- g.slotName === "overtext" ? (d(), m("div", Ln, [
1758
- C(qe, {
1759
- value: String(D.row[g.prop] ?? ""),
1760
- "max-length": g.maxLength || 18
1708
+ fn: U((B) => [
1709
+ C.slotName === "overtext" ? (d(), _("div", $n, [
1710
+ w(Ge, {
1711
+ value: String(B.row[C.prop] ?? ""),
1712
+ "max-length": C.maxLength || 18
1761
1713
  }, null, 8, ["value", "max-length"])
1762
- ])) : g.slotName === "whether" ? (d(), m("div", Fn, [
1714
+ ])) : C.slotName === "whether" ? (d(), _("div", Ln, [
1763
1715
  b("span", {
1764
- class: R({
1765
- "whether-yes": D.row[g.prop] == 1,
1766
- "whether-no": D.row[g.prop] == 0
1716
+ class: O({
1717
+ "whether-yes": B.row[C.prop] == 1,
1718
+ "whether-no": B.row[C.prop] == 0
1767
1719
  })
1768
- }, M(D.row[g.prop] == 0 ? "否" : D.row[g.prop] == 1 ? "是" : ""), 3)
1769
- ])) : g.slotName === "price" ? (d(), m("div", Nn, M(ne(De)(D.row[g.prop], 2)), 1)) : g.slotName === "boldtext" ? (d(), m("div", Mn, M(D.row[g.prop]), 1)) : ee(u.$slots, g.slotName, {
1770
- row: D.row,
1771
- index: D.$index,
1772
- column: g
1720
+ }, T(B.row[C.prop] == 0 ? "否" : B.row[C.prop] == 1 ? "是" : ""), 3)
1721
+ ])) : C.slotName === "price" ? (d(), _("div", Fn, T(ue(Ve)(B.row[C.prop], 2)), 1)) : C.slotName === "boldtext" ? (d(), _("div", Nn, T(B.row[C.prop]), 1)) : ne(u.$slots, C.slotName, {
1722
+ row: B.row,
1723
+ index: B.$index,
1724
+ column: C
1773
1725
  }, () => [
1774
- A(M(p(D.row[g.prop])), 1)
1726
+ H(T(p(B.row[C.prop])), 1)
1775
1727
  ], !0, 4)
1776
1728
  ]),
1777
1729
  key: "1"
1778
1730
  } : void 0
1779
1731
  ]), 1040))), 128)),
1780
- ee(u.$slots, "default", {}, void 0, !0)
1732
+ ne(u.$slots, "default", {}, void 0, !0)
1781
1733
  ]),
1782
1734
  _: 3
1783
1735
  }, 16, ["data", "height", "class"])
1784
1736
  ]),
1785
- e.pagination ? (d(), m("div", Pn, [
1786
- C(B, {
1737
+ e.pagination ? (d(), _("div", Mn, [
1738
+ w(P, {
1787
1739
  background: "",
1788
1740
  "current-page": e.pagination.page,
1789
1741
  "page-size": e.pagination.limit,
@@ -1791,16 +1743,16 @@ const qe = /* @__PURE__ */ X(_n, [["render", xn], ["__scopeId", "data-v-ef86ea54
1791
1743
  total: e.pagination.total,
1792
1744
  layout: e.paginationLayout,
1793
1745
  onSizeChange: v,
1794
- onCurrentChange: U
1746
+ onCurrentChange: $
1795
1747
  }, null, 8, ["current-page", "page-size", "page-sizes", "total", "layout"])
1796
- ])) : N("", !0)
1748
+ ])) : D("", !0)
1797
1749
  ], 2);
1798
1750
  };
1799
1751
  }
1800
- }), Bn = /* @__PURE__ */ X(Tn, [["__scopeId", "data-v-641cb45c"]]), Dn = ["aria-checked", "disabled", "onClick"], Vn = { class: "segmented__label" }, On = {
1752
+ }), Pn = /* @__PURE__ */ W(Tn, [["__scopeId", "data-v-641cb45c"]]), Bn = ["aria-checked", "disabled", "onClick"], Dn = { class: "segmented__label" }, Vn = {
1801
1753
  key: 0,
1802
1754
  class: "segmented__badge"
1803
- }, Rn = {
1755
+ }, On = {
1804
1756
  __name: "SegmentedControl",
1805
1757
  props: {
1806
1758
  modelValue: { type: [String, Number, Boolean], default: void 0 },
@@ -1809,7 +1761,7 @@ const qe = /* @__PURE__ */ X(_n, [["render", xn], ["__scopeId", "data-v-ef86ea54
1809
1761
  },
1810
1762
  emits: ["update:modelValue", "change"],
1811
1763
  setup(e, { emit: n }) {
1812
- const t = e, a = n, s = I(null), r = I([]), h = I(!1), p = I({
1764
+ const t = e, a = n, s = R(null), o = R([]), f = R(!1), p = R({
1813
1765
  width: "0px",
1814
1766
  transform: "translateX(0px)"
1815
1767
  });
@@ -1817,70 +1769,70 @@ const qe = /* @__PURE__ */ X(_n, [["render", xn], ["__scopeId", "data-v-ef86ea54
1817
1769
  function v(i) {
1818
1770
  return (i == null ? void 0 : i.count) != null || (i == null ? void 0 : i.badge) != null;
1819
1771
  }
1820
- function U(i) {
1772
+ function $(i) {
1821
1773
  return i.count != null ? i.count : i.badge;
1822
1774
  }
1823
- function f(i, L) {
1824
- i && (r.value[L] = i);
1775
+ function h(i, L) {
1776
+ i && (o.value[L] = i);
1825
1777
  }
1826
- function _() {
1778
+ function y() {
1827
1779
  const i = s.value;
1828
1780
  if (!i) return;
1829
- const L = t.options.findIndex((j) => j.value === t.modelValue), x = r.value[L];
1830
- if (!x) {
1781
+ const L = t.options.findIndex((I) => I.value === t.modelValue), k = o.value[L];
1782
+ if (!k) {
1831
1783
  p.value = { width: "0px", transform: "translateX(0px)" };
1832
1784
  return;
1833
1785
  }
1834
- const B = i.getBoundingClientRect(), g = x.getBoundingClientRect();
1786
+ const P = i.getBoundingClientRect(), C = k.getBoundingClientRect();
1835
1787
  p.value = {
1836
- width: `${g.width}px`,
1837
- transform: `translateX(${g.left - B.left}px)`
1838
- }, h.value = !0;
1788
+ width: `${C.width}px`,
1789
+ transform: `translateX(${C.left - P.left}px)`
1790
+ }, f.value = !0;
1839
1791
  }
1840
1792
  function u(i) {
1841
1793
  i.disabled || (a("update:modelValue", i.value), a("change", i.value));
1842
1794
  }
1843
- return le(
1795
+ return te(
1844
1796
  () => [t.modelValue, t.options],
1845
1797
  async () => {
1846
- await W(), _();
1798
+ await J(), y();
1847
1799
  },
1848
1800
  { deep: !0 }
1849
- ), ge(async () => {
1850
- await W(), _(), typeof ResizeObserver < "u" && s.value && (S = new ResizeObserver(() => _()), S.observe(s.value));
1851
- }), Oe(() => {
1801
+ ), ve(async () => {
1802
+ await J(), y(), typeof ResizeObserver < "u" && s.value && (S = new ResizeObserver(() => y()), S.observe(s.value));
1803
+ }), Re(() => {
1852
1804
  S == null || S.disconnect(), S = null;
1853
- }), (i, L) => (d(), m("div", {
1805
+ }), (i, L) => (d(), _("div", {
1854
1806
  ref_key: "rootRef",
1855
1807
  ref: s,
1856
1808
  class: "segmented",
1857
1809
  role: "radiogroup"
1858
1810
  }, [
1859
1811
  b("div", {
1860
- class: R(["segmented__thumb", { "is-ready": h.value }]),
1861
- style: se(p.value)
1812
+ class: O(["segmented__thumb", { "is-ready": f.value }]),
1813
+ style: le(p.value)
1862
1814
  }, null, 6),
1863
- (d(!0), m(q, null, G(e.options, (x, B) => (d(), m("button", {
1864
- key: String(x.value),
1815
+ (d(!0), _(K, null, Y(e.options, (k, P) => (d(), _("button", {
1816
+ key: String(k.value),
1865
1817
  ref_for: !0,
1866
- ref: (g) => f(g, B),
1818
+ ref: (C) => h(C, P),
1867
1819
  type: "button",
1868
- class: R(["segmented__item", { "is-active": e.modelValue === x.value }]),
1820
+ class: O(["segmented__item", { "is-active": e.modelValue === k.value }]),
1869
1821
  role: "radio",
1870
- "aria-checked": e.modelValue === x.value,
1871
- disabled: x.disabled,
1872
- onClick: (g) => u(x)
1822
+ "aria-checked": e.modelValue === k.value,
1823
+ disabled: k.disabled,
1824
+ onClick: (C) => u(k)
1873
1825
  }, [
1874
- b("span", Vn, M(x.label), 1),
1875
- v(x) ? (d(), m("span", On, M(U(x)), 1)) : N("", !0)
1876
- ], 10, Dn))), 128))
1826
+ b("span", Dn, T(k.label), 1),
1827
+ v(k) ? (d(), _("span", Vn, T($(k)), 1)) : D("", !0)
1828
+ ], 10, Bn))), 128))
1877
1829
  ], 512));
1878
1830
  }
1879
- }, In = /* @__PURE__ */ X(Rn, [["__scopeId", "data-v-b7b0abe9"]]);
1880
- function An(e) {
1831
+ }, Rn = /* @__PURE__ */ W(On, [["__scopeId", "data-v-b7b0abe9"]]);
1832
+ function In(e) {
1881
1833
  return e == null || e === "" ? [] : Array.isArray(e) ? e.map((n) => String(n).trim()).filter(Boolean) : String(e).split(",").map((n) => n.trim()).filter(Boolean);
1882
1834
  }
1883
- function Hn(e) {
1835
+ function An(e) {
1884
1836
  if (!e.parentNode) {
1885
1837
  e.style.display = "none";
1886
1838
  return;
@@ -1891,75 +1843,75 @@ function Hn(e) {
1891
1843
  }
1892
1844
  e.parentNode.removeChild(e);
1893
1845
  }
1894
- function he(e, n, t, a = !1) {
1895
- const s = An(n.value);
1846
+ function ge(e, n, t, a = !1) {
1847
+ const s = In(n.value);
1896
1848
  if (!s.length) return;
1897
- let r = Ve(s, t);
1898
- a && (r = !r), r || Hn(e);
1849
+ let o = Oe(s, t);
1850
+ a && (o = !o), o || An(e);
1899
1851
  }
1900
1852
  function zn(e) {
1901
1853
  e.directive("hasPermission", {
1902
1854
  mounted(n, t) {
1903
- he(n, t, "and");
1855
+ ge(n, t, "and");
1904
1856
  }
1905
1857
  }), e.directive("hasAnyPermission", {
1906
1858
  mounted(n, t) {
1907
- he(n, t, "or");
1859
+ ge(n, t, "or");
1908
1860
  }
1909
1861
  }), e.directive("hasNoPermission", {
1910
1862
  mounted(n, t) {
1911
- he(n, t, "or", !0);
1863
+ ge(n, t, "or", !0);
1912
1864
  }
1913
1865
  });
1914
1866
  }
1915
- const En = {
1916
- MgImageUpload: Et,
1917
- MgFileUpload: ln,
1918
- MgSearchForm: vn,
1919
- MgDataTable: Bn,
1920
- MgDateRangePicker: We,
1921
- MgSegmentedControl: In,
1922
- MgOverflowHid: qe
1867
+ const Hn = {
1868
+ MgImageUpload: Kt,
1869
+ MgFileUpload: an,
1870
+ MgSearchForm: yn,
1871
+ MgDataTable: Pn,
1872
+ MgDateRangePicker: qe,
1873
+ MgSegmentedControl: Rn,
1874
+ MgOverflowHid: Ge
1923
1875
  }, jn = (e, n = {}) => {
1924
- Object.entries(En).forEach(([s, r]) => {
1925
- e.component(r.name || s, r);
1926
- }), n.ossUrl && vt(n.ossUrl), typeof n.getPermissions == "function" && dt(n.getPermissions), zn(e);
1927
- const t = pt(n), a = ft(t);
1928
- ht(t), mt(a), e.config.globalProperties.$request = t, e.config.globalProperties.$api = a, e.config.globalProperties.$hasPermission = Ve;
1929
- }, Xn = {
1876
+ Object.entries(Hn).forEach(([s, o]) => {
1877
+ e.component(o.name || s, o);
1878
+ }), n.ossUrl && bt(n.ossUrl), typeof n.getPermissions == "function" && ft(n.getPermissions), zn(e);
1879
+ const t = ht(n), a = mt(t);
1880
+ gt(t), yt(a), e.config.globalProperties.$request = t, e.config.globalProperties.$api = a, e.config.globalProperties.$hasPermission = Oe;
1881
+ }, Gn = {
1930
1882
  install: jn,
1931
1883
  version: "1.0.5"
1932
1884
  };
1933
1885
  export {
1934
- Bn as DataTable,
1935
- We as DateRangePicker,
1936
- ln as FileUpload,
1937
- Et as ImageUpload,
1938
- vn as SearchForm,
1939
- In as SegmentedControl,
1940
- qe as TableOverflowHid,
1886
+ Pn as DataTable,
1887
+ qe as DateRangePicker,
1888
+ an as FileUpload,
1889
+ Kt as ImageUpload,
1890
+ yn as SearchForm,
1891
+ Rn as SegmentedControl,
1892
+ Ge as TableOverflowHid,
1941
1893
  Ee as aliOssMixin,
1942
- Zn as checkPermission,
1943
- ft as createApi,
1944
- ve as createOssClient,
1945
- pt as createRequest,
1946
- el as createService,
1947
- Xn as default,
1948
- ut as getApi,
1894
+ Qn as checkPermission,
1895
+ mt as createApi,
1896
+ be as createOssClient,
1897
+ ht as createRequest,
1898
+ Zn as createService,
1899
+ Gn as default,
1900
+ pt as getApi,
1949
1901
  He as getOssSts,
1950
- tl as getPermissionGetter,
1951
- nl as getRequest,
1952
- ll as getSystemId,
1953
- sl as getUserId,
1954
- Ve as hasPermission,
1902
+ el as getPermissionGetter,
1903
+ tl as getRequest,
1904
+ nl as getSystemId,
1905
+ ll as getUserId,
1906
+ Oe as hasPermission,
1955
1907
  jn as install,
1956
1908
  zn as installPermissionDirectives,
1957
- mt as setApi,
1958
- vt as setDefaultOssUrl,
1959
- dt as setPermissionGetter,
1960
- ht as setRequest,
1961
- al as setSystemId,
1962
- ol as setUserId,
1963
- ze as uploadToOss,
1909
+ yt as setApi,
1910
+ bt as setDefaultOssUrl,
1911
+ ft as setPermissionGetter,
1912
+ gt as setRequest,
1913
+ sl as setSystemId,
1914
+ al as setUserId,
1915
+ je as uploadToOss,
1964
1916
  rl as utils
1965
1917
  };