mgacn-commonsdk 1.1.4 → 1.1.5

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