mgacn-commonsdk 1.1.7 → 1.1.9

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