iking-web-ui-pro 0.1.0 → 0.1.2

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,43 +1,43 @@
1
- import { defineComponent as S, ref as _, computed as F, watch as P, openBlock as i, createBlock as T, unref as x, withCtx as j, createElementVNode as p, resolveComponent as N, createElementBlock as a, normalizeClass as w, normalizeStyle as h, createCommentVNode as $, Fragment as B, renderList as I, createVNode as b, toDisplayString as A, pushScopeId as W, popScopeId as q } from "vue";
1
+ import { defineComponent as S, ref as _, computed as F, watch as P, openBlock as s, createBlock as T, unref as x, withCtx as j, createElementVNode as p, resolveComponent as N, createElementBlock as a, normalizeClass as b, normalizeStyle as h, createCommentVNode as $, Fragment as z, renderList as I, createVNode as w, toDisplayString as A, pushScopeId as W, popScopeId as q } from "vue";
2
2
  import { ElDialog as R } from "element-plus";
3
3
  import { ikColor as G } from "iking-utils-pro";
4
- const U = (l, e) => {
5
- if (l.install = (s) => {
6
- for (const o of [l, ...Object.values(e ?? {})])
7
- s.component(o.name, o);
4
+ const B = (l, e) => {
5
+ if (l.install = (r) => {
6
+ for (const n of [l, ...Object.values(e ?? {})])
7
+ r.component(n.name, n);
8
8
  }, e)
9
- for (const [s, o] of Object.entries(e))
10
- l[s] = o;
9
+ for (const [r, n] of Object.entries(e))
10
+ l[r] = n;
11
11
  return l;
12
12
  }, X = (l, e) => {
13
- const s = l.__vccOpts || l;
14
- for (const [o, t] of e)
15
- s[o] = t;
16
- return s;
13
+ const r = l.__vccOpts || l;
14
+ for (const [n, o] of e)
15
+ r[n] = o;
16
+ return r;
17
17
  };
18
- const Y = typeof btoa == "function", z = typeof Buffer == "function";
18
+ const Y = typeof btoa == "function", U = typeof Buffer == "function";
19
19
  typeof TextDecoder == "function" && new TextDecoder();
20
20
  const D = typeof TextEncoder == "function" ? new TextEncoder() : void 0, H = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", k = Array.prototype.slice.call(H);
21
21
  ((l) => {
22
22
  let e = {};
23
- return l.forEach((s, o) => e[s] = o), e;
23
+ return l.forEach((r, n) => e[r] = n), e;
24
24
  })(k);
25
25
  const d = String.fromCharCode.bind(String);
26
26
  typeof Uint8Array.from == "function" && Uint8Array.from.bind(Uint8Array);
27
27
  const J = (l) => l.replace(/=/g, "").replace(/[+\/]/g, (e) => e == "+" ? "-" : "_"), M = (l) => {
28
- let e, s, o, t, c = "";
28
+ let e, r, n, o, c = "";
29
29
  const u = l.length % 3;
30
30
  for (let g = 0; g < l.length; ) {
31
- if ((s = l.charCodeAt(g++)) > 255 || (o = l.charCodeAt(g++)) > 255 || (t = l.charCodeAt(g++)) > 255)
31
+ if ((r = l.charCodeAt(g++)) > 255 || (n = l.charCodeAt(g++)) > 255 || (o = l.charCodeAt(g++)) > 255)
32
32
  throw new TypeError("invalid character found");
33
- e = s << 16 | o << 8 | t, c += k[e >> 18 & 63] + k[e >> 12 & 63] + k[e >> 6 & 63] + k[e & 63];
33
+ e = r << 16 | n << 8 | o, c += k[e >> 18 & 63] + k[e >> 12 & 63] + k[e >> 6 & 63] + k[e & 63];
34
34
  }
35
35
  return u ? c.slice(0, u - 3) + "===".substring(u) : c;
36
- }, K = Y ? (l) => btoa(l) : z ? (l) => Buffer.from(l, "binary").toString("base64") : M, Q = z ? (l) => Buffer.from(l).toString("base64") : (l) => {
37
- let s = [];
38
- for (let o = 0, t = l.length; o < t; o += 4096)
39
- s.push(d.apply(null, l.subarray(o, o + 4096)));
40
- return K(s.join(""));
36
+ }, K = Y ? (l) => btoa(l) : U ? (l) => Buffer.from(l, "binary").toString("base64") : M, Q = U ? (l) => Buffer.from(l).toString("base64") : (l) => {
37
+ let r = [];
38
+ for (let n = 0, o = l.length; n < o; n += 4096)
39
+ r.push(d.apply(null, l.subarray(n, n + 4096)));
40
+ return K(r.join(""));
41
41
  }, Z = (l) => {
42
42
  if (l.length < 2) {
43
43
  var e = l.charCodeAt(0);
@@ -46,7 +46,7 @@ const J = (l) => l.replace(/=/g, "").replace(/[+\/]/g, (e) => e == "+" ? "-" : "
46
46
  var e = 65536 + (l.charCodeAt(0) - 55296) * 1024 + (l.charCodeAt(1) - 56320);
47
47
  return d(240 | e >>> 18 & 7) + d(128 | e >>> 12 & 63) + d(128 | e >>> 6 & 63) + d(128 | e & 63);
48
48
  }
49
- }, ee = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g, le = (l) => l.replace(ee, Z), V = z ? (l) => Buffer.from(l, "utf8").toString("base64") : D ? (l) => Q(D.encode(l)) : (l) => K(le(l)), te = (l, e = !1) => e ? J(V(l)) : V(l), ne = ["src"], se = /* @__PURE__ */ S({
49
+ }, ee = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g, le = (l) => l.replace(ee, Z), V = U ? (l) => Buffer.from(l, "utf8").toString("base64") : D ? (l) => Q(D.encode(l)) : (l) => K(le(l)), oe = (l, e = !1) => e ? J(V(l)) : V(l), te = ["src"], re = /* @__PURE__ */ S({
50
50
  __name: "IKPreviewFile",
51
51
  props: {
52
52
  modelValue: {
@@ -77,15 +77,15 @@ const J = (l) => l.replace(/=/g, "").replace(/[+\/]/g, (e) => e == "+" ? "-" : "
77
77
  }
78
78
  },
79
79
  setup(l) {
80
- const e = l, s = _(null), o = F(() => !e.kkUrl || !e.url ? "" : `${e.kkUrl}${encodeURIComponent(
81
- te(`${e.loadUrl}${e.url}${e.fileName ? `&fullfilename=${e.fileName}` : ""}`)
82
- )}`), t = _(e.modelValue);
80
+ const e = l, r = _(null), n = F(() => !e.kkUrl || !e.url ? "" : `${e.kkUrl}${encodeURIComponent(
81
+ oe(`${e.loadUrl}${e.url}${e.fileName ? `&fullfilename=${e.fileName}` : ""}`)
82
+ )}`), o = _(e.modelValue);
83
83
  return P(() => e.modelValue, (c) => {
84
- t.value = c;
85
- }), (c, u) => (i(), T(x(R), {
84
+ o.value = c;
85
+ }), (c, u) => (s(), T(x(R), {
86
86
  fullscreen: "",
87
- modelValue: t.value,
88
- "onUpdate:modelValue": u[0] || (u[0] = (g) => t.value = g),
87
+ modelValue: o.value,
88
+ "onUpdate:modelValue": u[0] || (u[0] = (g) => o.value = g),
89
89
  "destroy-on-close": "",
90
90
  "append-to-body": "",
91
91
  "modal-class": "ik-file-preview-modal",
@@ -95,28 +95,28 @@ const J = (l) => l.replace(/=/g, "").replace(/[+\/]/g, (e) => e == "+" ? "-" : "
95
95
  default: j(() => [
96
96
  p("iframe", {
97
97
  ref_key: "freamRef",
98
- ref: s,
98
+ ref: r,
99
99
  "cross-origin": "",
100
- src: o.value,
100
+ src: n.value,
101
101
  frameborder: "0",
102
102
  allowfullscreen: "",
103
103
  seamless: ""
104
- }, null, 8, ne)
104
+ }, null, 8, te)
105
105
  ]),
106
106
  _: 1
107
107
  /* STABLE */
108
108
  }, 8, ["modelValue"]));
109
109
  }
110
110
  });
111
- const oe = U(se), re = { class: "inline-block ik-svg-icon ik-icon line-height-[0] inline-flex justify-center" }, ie = {
111
+ const ne = B(re), ie = { class: "inline-block ik-svg-icon ik-icon line-height-[0] inline-flex justify-center" }, se = {
112
112
  key: 1,
113
113
  class: "h-[1em] w-[1em]",
114
114
  "aria-hidden": "true"
115
- }, ae = ["xlink:href"], ue = ["src"], fe = {
115
+ }, ae = ["xlink:href"], ce = ["src"], ue = {
116
116
  key: 1,
117
117
  class: "h-[1em] w-[1em]",
118
118
  "aria-hidden": "true"
119
- }, ce = ["xlink:href"], de = ["src"], pe = /* @__PURE__ */ S({
119
+ }, fe = ["xlink:href"], de = ["src"], pe = /* @__PURE__ */ S({
120
120
  name: "IkSvgIcon",
121
121
  __name: "index",
122
122
  props: {
@@ -131,113 +131,125 @@ const oe = U(se), re = { class: "inline-block ik-svg-icon ik-icon line-height-[0
131
131
  padding: { default: "0" },
132
132
  warning: { type: Boolean },
133
133
  notip: { type: Boolean, default: !1 },
134
- title: {}
134
+ title: {},
135
+ type: {},
136
+ active: { type: Boolean, default: !1 },
137
+ disabled: { type: Boolean, default: !1 }
135
138
  },
136
139
  setup(l) {
137
- const e = l, s = F(() => {
138
- var t;
139
- return /^http?:\/\//.test(e.name) ? "img" : /i-[^:]+:[^:]+/.test(e.name) ? "unocss" : e.name.startsWith("iksig") ? "iksig" : (t = e.name) != null && t.includes(":") ? "iconify" : "svg";
140
- }), o = F(() => {
141
- const t = [];
140
+ const e = l, r = F(() => {
141
+ var o, c;
142
+ return /^http?:\/\//.test(e.name) ? "img" : /i-[^:]+:[^:]+/.test(e.name) ? "unocss" : (o = e.name) != null && o.startsWith("iksig") ? "iksig" : (c = e.name) != null && c.includes(":") ? "iconify" : "svg";
143
+ }), n = F(() => {
144
+ const o = [];
142
145
  if (e.flip)
143
146
  switch (e.flip) {
144
147
  case "horizontal":
145
- t.push("rotateY(180deg)");
148
+ o.push("rotateY(180deg)");
146
149
  break;
147
150
  case "vertical":
148
- t.push("rotateX(180deg)");
151
+ o.push("rotateX(180deg)");
149
152
  break;
150
153
  case "both":
151
- t.push("rotateX(180deg)"), t.push("rotateY(180deg)");
154
+ o.push("rotateX(180deg)"), o.push("rotateY(180deg)");
152
155
  break;
153
156
  }
154
- return e.rotate && t.push(`rotate(${e.rotate % 360}deg)`), {
157
+ return e.rotate && o.push(`rotate(${e.rotate % 360}deg)`), {
155
158
  ...e.color && { color: e.color },
156
159
  ...e.size && { fontSize: typeof e.size == "number" ? `${e.size}px` : e.size },
157
- ...t.length && { transform: t.join(" ") },
160
+ ...o.length && { transform: o.join(" ") },
158
161
  padding: e.padding,
159
- ...e.color && s.value !== "iksig" ? {
162
+ ...e.color && r.value !== "iksig" ? {
160
163
  "--ik-color-icon-dark": e.color,
161
164
  "--ik-color-icon-light": G.setOpacity(e.color, e.opacity || 0.4)
165
+ } : {},
166
+ ...e.type === "primary" ? {
167
+ "--ik-color-icon-dark": "var(--ik-theme-color)",
168
+ "--ik-color-icon-light": "var(--ik-color-icon-light-hover)",
169
+ "--ik-color-bg-icon": "var(--ik-color-bg-button-secondary)"
170
+ } : e.type === "warning" ? {
171
+ "--ik-color-icon-dark": "var(--ik-color-error)",
172
+ "--ik-color-icon-light": "var(--ik-color-icon-error-light)",
173
+ "--ik-color-bg-icon": "var(--ik-color-icon-error-bg)"
162
174
  } : {}
163
175
  };
164
176
  });
165
- return (t, c) => {
177
+ return (o, c) => {
166
178
  const u = N("el-tooltip");
167
- return i(), a("span", re, [
168
- t.notip || !t.title ? (i(), a(
179
+ return s(), a("span", ie, [
180
+ o.notip || !o.title ? (s(), a(
169
181
  "i",
170
182
  {
171
183
  key: 0,
172
- class: w(["relative h-[1em] w-[1em] flex-inline items-center justify-center fill-current leading-[1em] transition", {
173
- [t.name]: s.value === "unocss",
174
- "show-bg": t.showBg || t.bg,
175
- default: t.size === "default",
176
- small: t.size === "small",
177
- big: t.size === "big",
178
- warning: t.warning
184
+ class: b(["relative h-[1em] w-[1em] flex-inline items-center justify-center fill-current leading-[1em] transition", {
185
+ [o.name]: r.value === "unocss",
186
+ "show-bg": o.showBg || o.bg,
187
+ default: o.size === "default",
188
+ small: o.size === "small",
189
+ big: o.size === "big",
190
+ warning: o.warning
179
191
  }]),
180
- style: h(o.value)
192
+ style: h(n.value)
181
193
  },
182
194
  [
183
- s.value === "iksig" ? (i(), a(
195
+ r.value === "iksig" ? (s(), a(
184
196
  "i",
185
197
  {
186
198
  key: 0,
187
- class: w(`iksig ${t.name}`),
188
- style: h(o.value)
199
+ class: b(`iksig ${o.name}`),
200
+ style: h(n.value)
189
201
  },
190
202
  null,
191
203
  6
192
204
  /* CLASS, STYLE */
193
- )) : s.value === "svg" ? (i(), a("svg", ie, [
205
+ )) : r.value === "svg" ? (s(), a("svg", se, [
194
206
  p("use", {
195
- "xlink:href": `#${t.name}`
207
+ "xlink:href": `#${o.name}`
196
208
  }, null, 8, ae)
197
- ])) : s.value === "img" ? (i(), a("img", {
209
+ ])) : r.value === "img" ? (s(), a("img", {
198
210
  key: 2,
199
- src: t.name,
211
+ src: o.name,
200
212
  class: "h-[1em] w-[1em]"
201
- }, null, 8, ue)) : $("v-if", !0)
213
+ }, null, 8, ce)) : $("v-if", !0)
202
214
  ],
203
215
  6
204
216
  /* CLASS, STYLE */
205
- )) : (i(), T(u, {
217
+ )) : (s(), T(u, {
206
218
  key: 1,
207
- content: t.title
219
+ content: o.title
208
220
  }, {
209
221
  default: j(() => [
210
222
  p(
211
223
  "i",
212
224
  {
213
- class: w(["ik-svg-icon ik-icon relative h-[1em] w-[1em] flex-inline items-center justify-center fill-current leading-[1em] transition", {
214
- [t.name]: s.value === "unocss",
215
- "show-bg": t.showBg || t.bg,
216
- default: t.size === "default",
217
- small: t.size === "small",
218
- big: t.size === "big",
219
- warning: t.warning
225
+ class: b(["ik-svg-icon ik-icon relative h-[1em] w-[1em] flex-inline items-center justify-center fill-current leading-[1em] transition", {
226
+ [o.name]: r.value === "unocss",
227
+ "show-bg": o.showBg || o.bg,
228
+ default: o.size === "default",
229
+ small: o.size === "small",
230
+ big: o.size === "big",
231
+ warning: o.warning
220
232
  }]),
221
- style: h(o.value)
233
+ style: h(n.value)
222
234
  },
223
235
  [
224
- s.value === "iksig" ? (i(), a(
236
+ r.value === "iksig" ? (s(), a(
225
237
  "i",
226
238
  {
227
239
  key: 0,
228
- class: w(`iksig ${t.name}`),
229
- style: h(o.value)
240
+ class: b(`iksig ${o.name}`),
241
+ style: h(n.value)
230
242
  },
231
243
  null,
232
244
  6
233
245
  /* CLASS, STYLE */
234
- )) : s.value === "svg" ? (i(), a("svg", fe, [
246
+ )) : r.value === "svg" ? (s(), a("svg", ue, [
235
247
  p("use", {
236
- "xlink:href": `#${t.name}`
237
- }, null, 8, ce)
238
- ])) : s.value === "img" ? (i(), a("img", {
248
+ "xlink:href": `#${o.name}`
249
+ }, null, 8, fe)
250
+ ])) : r.value === "img" ? (s(), a("img", {
239
251
  key: 2,
240
- src: t.name,
252
+ src: o.name,
241
253
  class: "h-[1em] w-[1em]"
242
254
  }, null, 8, de)) : $("v-if", !0)
243
255
  ],
@@ -251,19 +263,19 @@ const oe = U(se), re = { class: "inline-block ik-svg-icon ik-icon line-height-[0
251
263
  ]);
252
264
  };
253
265
  }
254
- }), E = U(pe), ge = (l) => (W("data-v-bbc42bc9"), l = l(), q(), l), ve = {
266
+ }), E = B(pe), ge = (l) => (W("data-v-bbc42bc9"), l = l(), q(), l), ve = {
255
267
  key: 0,
256
268
  class: "preview-files"
257
269
  }, me = {
258
270
  class: "flex",
259
271
  style: { width: "80%", "align-items": "center" }
260
- }, ye = ["onClick"], he = ["title"], ke = { style: { color: "#b8c6d9" } }, _e = ["onClick"], we = /* @__PURE__ */ ge(() => /* @__PURE__ */ p(
272
+ }, ye = ["onClick"], he = ["title"], ke = { style: { color: "#b8c6d9" } }, _e = ["onClick"], be = /* @__PURE__ */ ge(() => /* @__PURE__ */ p(
261
273
  "span",
262
274
  null,
263
275
  "预览",
264
276
  -1
265
277
  /* HOISTED */
266
- )), be = {
278
+ )), we = {
267
279
  key: 1,
268
280
  class: "flex preview-img"
269
281
  }, xe = /* @__PURE__ */ S({
@@ -301,39 +313,39 @@ const oe = U(se), re = { class: "inline-block ik-svg-icon ik-icon line-height-[0
301
313
  }
302
314
  },
303
315
  setup(l) {
304
- const e = l, s = _(e.fileList);
316
+ const e = l, r = _(e.fileList);
305
317
  P(
306
318
  () => e.fileList,
307
- (n) => {
308
- n && (s.value = n);
319
+ (t) => {
320
+ t && (r.value = t);
309
321
  },
310
322
  { immediate: !0 }
311
323
  );
312
- const o = _(!1), t = _({}), c = (n) => {
313
- t.value = {
314
- id: n.ossFileId || n.url,
315
- name: `${n.id}.${n.suffix}`
324
+ const n = _(!1), o = _({}), c = (t) => {
325
+ o.value = {
326
+ id: t.ossFileId || t.url,
327
+ name: `${t.id}.${t.suffix}`
316
328
  // row.originName
317
- }, o.value = !0;
318
- }, u = (n) => {
319
- var f, y, v, m, r;
320
- return (f = n == null ? void 0 : n.suffix) != null && f.includes("pdf") ? "iksvg_pdf" : (y = n == null ? void 0 : n.suffix) != null && y.includes("doc") ? "iksvg_word" : (v = n == null ? void 0 : n.suffix) != null && v.includes("xls") ? "iksvg_excel" : (m = n == null ? void 0 : n.suffix) != null && m.includes("mov") ? "iksvg_mov" : (r = n == null ? void 0 : n.suffix) != null && r.includes("zip") ? "iksvg_zip" : "icon-jpg";
321
- }, g = (n) => {
322
- var f, y, v, m, r;
323
- return (f = n == null ? void 0 : n.suffix) != null && f.includes("pdf") ? "#FA4E4E" : (y = n == null ? void 0 : n.suffix) != null && y.includes("doc") ? "#2c69e0" : (v = n.suffix) != null && v.includes("xls") ? "#39BFBF" : (m = n.suffix) != null && m.includes("txt") ? "#2c69e0" : (r = n.suffix) != null && r.includes("zip") ? "#FF9000" : "#32CD79";
324
- }, L = (n) => {
329
+ }, n.value = !0;
330
+ }, u = (t) => {
331
+ var f, y, v, m, i;
332
+ return (f = t == null ? void 0 : t.suffix) != null && f.includes("pdf") ? "iksvg_pdf" : (y = t == null ? void 0 : t.suffix) != null && y.includes("doc") ? "iksvg_word" : (v = t == null ? void 0 : t.suffix) != null && v.includes("xls") ? "iksvg_excel" : (m = t == null ? void 0 : t.suffix) != null && m.includes("mov") ? "iksvg_mov" : (i = t == null ? void 0 : t.suffix) != null && i.includes("zip") ? "iksvg_zip" : "icon-jpg";
333
+ }, g = (t) => {
334
+ var f, y, v, m, i;
335
+ return (f = t == null ? void 0 : t.suffix) != null && f.includes("pdf") ? "#FA4E4E" : (y = t == null ? void 0 : t.suffix) != null && y.includes("doc") ? "#2c69e0" : (v = t.suffix) != null && v.includes("xls") ? "#39BFBF" : (m = t.suffix) != null && m.includes("txt") ? "#2c69e0" : (i = t.suffix) != null && i.includes("zip") ? "#FF9000" : "#32CD79";
336
+ }, L = (t) => {
325
337
  const f = document.createElement("a");
326
- f.href = loadUrl + n.ossFileId, f.download = n.originName, f.click();
338
+ f.href = loadUrl + t.ossFileId, f.download = t.originName, f.click();
327
339
  };
328
- return (n, f) => {
340
+ return (t, f) => {
329
341
  var v, m;
330
342
  const y = N("el-image");
331
- return i(), a("div", null, [
332
- e.fileType === "file" ? (i(), a("div", ve, [
333
- (i(!0), a(
334
- B,
343
+ return s(), a("div", null, [
344
+ e.fileType === "file" ? (s(), a("div", ve, [
345
+ (s(!0), a(
346
+ z,
335
347
  null,
336
- I(s.value, (r, C) => (i(), a(
348
+ I(r.value, (i, C) => (s(), a(
337
349
  "div",
338
350
  {
339
351
  key: C,
@@ -345,22 +357,22 @@ const oe = U(se), re = { class: "inline-block ik-svg-icon ik-icon line-height-[0
345
357
  },
346
358
  [
347
359
  p("div", me, [
348
- b(x(E), {
349
- name: u(r),
350
- style: h(`color:${g(r)}`),
360
+ w(x(E), {
361
+ name: u(i),
362
+ style: h(`color:${g(i)}`),
351
363
  size: 36
352
364
  }, null, 8, ["name", "style"]),
353
365
  p("div", {
354
366
  class: "file-name",
355
- onClick: (O) => L(r)
367
+ onClick: (O) => L(i)
356
368
  }, [
357
369
  p("p", {
358
- title: r.originName
359
- }, A(r.originName), 9, he),
370
+ title: i.originName
371
+ }, A(i.originName), 9, he),
360
372
  p(
361
373
  "p",
362
374
  ke,
363
- A((r.fileSize / 1024).toFixed(2)) + "KB",
375
+ A((i.fileSize / 1024).toFixed(2)) + "KB",
364
376
  1
365
377
  /* TEXT */
366
378
  )
@@ -368,10 +380,10 @@ const oe = U(se), re = { class: "inline-block ik-svg-icon ik-icon line-height-[0
368
380
  ]),
369
381
  p("div", {
370
382
  class: "file-preview",
371
- onClick: (O) => c(r)
383
+ onClick: (O) => c(i)
372
384
  }, [
373
- b(x(E), { name: "iksvg_yulan" }),
374
- we
385
+ w(x(E), { name: "iksvg_yulan" }),
386
+ be
375
387
  ], 8, _e)
376
388
  ],
377
389
  4
@@ -381,18 +393,18 @@ const oe = U(se), re = { class: "inline-block ik-svg-icon ik-icon line-height-[0
381
393
  /* KEYED_FRAGMENT */
382
394
  ))
383
395
  ])) : $("v-if", !0),
384
- e.fileType === "img" ? (i(), a("div", be, [
385
- (i(!0), a(
386
- B,
396
+ e.fileType === "img" ? (s(), a("div", we, [
397
+ (s(!0), a(
398
+ z,
387
399
  null,
388
- I(s.value, (r, C) => (i(), a("div", {
400
+ I(r.value, (i, C) => (s(), a("div", {
389
401
  key: C,
390
402
  class: "preview-img"
391
403
  }, [
392
- b(y, {
404
+ w(y, {
393
405
  class: "show-img",
394
- src: l.loadUrl + r.url,
395
- "preview-src-list": [l.loadUrl + r.url],
406
+ src: l.loadUrl + i.url,
407
+ "preview-src-list": [l.loadUrl + i.url],
396
408
  fit: "cover"
397
409
  }, null, 8, ["src", "preview-src-list"])
398
410
  ]))),
@@ -400,20 +412,20 @@ const oe = U(se), re = { class: "inline-block ik-svg-icon ik-icon line-height-[0
400
412
  /* KEYED_FRAGMENT */
401
413
  ))
402
414
  ])) : $("v-if", !0),
403
- b(x(oe), {
404
- modelValue: o.value,
405
- "onUpdate:modelValue": f[0] || (f[0] = (r) => o.value = r),
415
+ w(x(ne), {
416
+ modelValue: n.value,
417
+ "onUpdate:modelValue": f[0] || (f[0] = (i) => n.value = i),
406
418
  "load-url": e.urlPreview,
407
- url: (v = t.value) == null ? void 0 : v.id,
419
+ url: (v = o.value) == null ? void 0 : v.id,
408
420
  "kk-url": l.previewUrl,
409
- "file-name": (m = t.value) == null ? void 0 : m.name
421
+ "file-name": (m = o.value) == null ? void 0 : m.name
410
422
  }, null, 8, ["modelValue", "load-url", "url", "kk-url", "file-name"])
411
423
  ]);
412
424
  };
413
425
  }
414
426
  });
415
- const $e = /* @__PURE__ */ X(xe, [["__scopeId", "data-v-bbc42bc9"]]), Ue = U($e);
427
+ const $e = /* @__PURE__ */ X(xe, [["__scopeId", "data-v-bbc42bc9"]]), Be = B($e);
416
428
  export {
417
- Ue as IKDetailPreviewFiles,
418
- Ue as default
429
+ Be as IKDetailPreviewFiles,
430
+ Be as default
419
431
  };
@@ -1 +1 @@
1
- (function(f,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("element-plus"),require("iking-utils-pro")):typeof define=="function"&&define.amd?define(["exports","vue","element-plus","iking-utils-pro"],e):(f=typeof globalThis<"u"?globalThis:f||self,e(f.index={},f.Vue,f["element-plus"],f["iking-utils-pro"]))})(this,function(f,e,S,$){"use strict";const h=(t,l)=>{if(t.install=r=>{for(const i of[t,...Object.values(l??{})])r.component(i.name,i)},l)for(const[r,i]of Object.entries(l))t[r]=i;return t},V=(t,l)=>{const r=t.__vccOpts||t;for(const[i,n]of l)r[i]=n;return r},re="",z=typeof btoa=="function",_=typeof Buffer=="function";typeof TextDecoder=="function"&&new TextDecoder;const B=typeof TextEncoder=="function"?new TextEncoder:void 0,F="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",y=Array.prototype.slice.call(F);(t=>{let l={};return t.forEach((r,i)=>l[r]=i),l})(y);const d=String.fromCharCode.bind(String);typeof Uint8Array.from=="function"&&Uint8Array.from.bind(Uint8Array);const N=t=>t.replace(/=/g,"").replace(/[+\/]/g,l=>l=="+"?"-":"_"),b=z?t=>btoa(t):_?t=>Buffer.from(t,"binary").toString("base64"):t=>{let l,r,i,n,u="";const a=t.length%3;for(let p=0;p<t.length;){if((r=t.charCodeAt(p++))>255||(i=t.charCodeAt(p++))>255||(n=t.charCodeAt(p++))>255)throw new TypeError("invalid character found");l=r<<16|i<<8|n,u+=y[l>>18&63]+y[l>>12&63]+y[l>>6&63]+y[l&63]}return a?u.slice(0,a-3)+"===".substring(a):u},U=_?t=>Buffer.from(t).toString("base64"):t=>{let r=[];for(let i=0,n=t.length;i<n;i+=4096)r.push(d.apply(null,t.subarray(i,i+4096)));return b(r.join(""))},I=t=>{if(t.length<2){var l=t.charCodeAt(0);return l<128?t:l<2048?d(192|l>>>6)+d(128|l&63):d(224|l>>>12&15)+d(128|l>>>6&63)+d(128|l&63)}else{var l=65536+(t.charCodeAt(0)-55296)*1024+(t.charCodeAt(1)-56320);return d(240|l>>>18&7)+d(128|l>>>12&63)+d(128|l>>>6&63)+d(128|l&63)}},D=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,A=t=>t.replace(D,I),x=_?t=>Buffer.from(t,"utf8").toString("base64"):B?t=>U(B.encode(t)):t=>b(A(t)),P=(t,l=!1)=>l?N(x(t)):x(t),v=["src"],T=e.defineComponent({__name:"IKPreviewFile",props:{modelValue:{type:Boolean,default:!1},kkUrl:{required:!0,type:String,default:""},url:{required:!0,type:String,default:""},loadUrl:{type:String,default:""},fileName:{type:String,default:""}},setup(t){const l=t,r=e.ref(null),i=e.computed(()=>!l.kkUrl||!l.url?"":`${l.kkUrl}${encodeURIComponent(P(`${l.loadUrl}${l.url}${l.fileName?`&fullfilename=${l.fileName}`:""}`))}`),n=e.ref(l.modelValue);return e.watch(()=>l.modelValue,u=>{n.value=u}),(u,a)=>(e.openBlock(),e.createBlock(e.unref(S.ElDialog),{fullscreen:"",modelValue:n.value,"onUpdate:modelValue":a[0]||(a[0]=p=>n.value=p),"destroy-on-close":"","append-to-body":"","modal-class":"ik-file-preview-modal",onClose:a[1]||(a[1]=p=>u.$emit("update:modelValue",!1)),class:"ik-file-preview"},{default:e.withCtx(()=>[e.createElementVNode("iframe",{ref_key:"freamRef",ref:r,"cross-origin":"",src:i.value,frameborder:"0",allowfullscreen:"",seamless:""},null,8,v)]),_:1},8,["modelValue"]))}}),se="",j=h(T),K={class:"inline-block ik-svg-icon ik-icon line-height-[0] inline-flex justify-center"},q={key:1,class:"h-[1em] w-[1em]","aria-hidden":"true"},L=["xlink:href"],O=["src"],W={key:1,class:"h-[1em] w-[1em]","aria-hidden":"true"},R=["xlink:href"],G=["src"],C=h(e.defineComponent({name:"IkSvgIcon",__name:"index",props:{name:{},flip:{},rotate:{},color:{},opacity:{default:.5},size:{default:""},bg:{type:Boolean,default:!1},showBg:{type:Boolean,default:!1},padding:{default:"0"},warning:{type:Boolean},notip:{type:Boolean,default:!1},title:{}},setup(t){const l=t,r=e.computed(()=>{var n;return/^http?:\/\//.test(l.name)?"img":/i-[^:]+:[^:]+/.test(l.name)?"unocss":l.name.startsWith("iksig")?"iksig":(n=l.name)!=null&&n.includes(":")?"iconify":"svg"}),i=e.computed(()=>{const n=[];if(l.flip)switch(l.flip){case"horizontal":n.push("rotateY(180deg)");break;case"vertical":n.push("rotateX(180deg)");break;case"both":n.push("rotateX(180deg)"),n.push("rotateY(180deg)");break}return l.rotate&&n.push(`rotate(${l.rotate%360}deg)`),{...l.color&&{color:l.color},...l.size&&{fontSize:typeof l.size=="number"?`${l.size}px`:l.size},...n.length&&{transform:n.join(" ")},padding:l.padding,...l.color&&r.value!=="iksig"?{"--ik-color-icon-dark":l.color,"--ik-color-icon-light":$.ikColor.setOpacity(l.color,l.opacity||.4)}:{}}});return(n,u)=>{const a=e.resolveComponent("el-tooltip");return e.openBlock(),e.createElementBlock("span",K,[n.notip||!n.title?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(["relative h-[1em] w-[1em] flex-inline items-center justify-center fill-current leading-[1em] transition",{[n.name]:r.value==="unocss","show-bg":n.showBg||n.bg,default:n.size==="default",small:n.size==="small",big:n.size==="big",warning:n.warning}]),style:e.normalizeStyle(i.value)},[r.value==="iksig"?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(`iksig ${n.name}`),style:e.normalizeStyle(i.value)},null,6)):r.value==="svg"?(e.openBlock(),e.createElementBlock("svg",q,[e.createElementVNode("use",{"xlink:href":`#${n.name}`},null,8,L)])):r.value==="img"?(e.openBlock(),e.createElementBlock("img",{key:2,src:n.name,class:"h-[1em] w-[1em]"},null,8,O)):e.createCommentVNode("v-if",!0)],6)):(e.openBlock(),e.createBlock(a,{key:1,content:n.title},{default:e.withCtx(()=>[e.createElementVNode("i",{class:e.normalizeClass(["ik-svg-icon ik-icon relative h-[1em] w-[1em] flex-inline items-center justify-center fill-current leading-[1em] transition",{[n.name]:r.value==="unocss","show-bg":n.showBg||n.bg,default:n.size==="default",small:n.size==="small",big:n.size==="big",warning:n.warning}]),style:e.normalizeStyle(i.value)},[r.value==="iksig"?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(`iksig ${n.name}`),style:e.normalizeStyle(i.value)},null,6)):r.value==="svg"?(e.openBlock(),e.createElementBlock("svg",W,[e.createElementVNode("use",{"xlink:href":`#${n.name}`},null,8,R)])):r.value==="img"?(e.openBlock(),e.createElementBlock("img",{key:2,src:n.name,class:"h-[1em] w-[1em]"},null,8,G)):e.createCommentVNode("v-if",!0)],6)]),_:1},8,["content"]))])}}})),M=t=>(e.pushScopeId("data-v-bbc42bc9"),t=t(),e.popScopeId(),t),X={key:0,class:"preview-files"},Y={class:"flex",style:{width:"80%","align-items":"center"}},H=["onClick"],J=["title"],Q={style:{color:"#b8c6d9"}},Z=["onClick"],ee=M(()=>e.createElementVNode("span",null,"预览",-1)),le={key:1,class:"flex preview-img"},te=e.defineComponent({__name:"IKDetailPreviewFiles",props:{fileList:{type:Array,default:()=>[]},fileType:{type:String,default:"file"},fileWidth:{type:String,default:"100%"},loadUrl:{type:String,default:""},previewUrl:{required:!0,type:String,default:""},urlPreview:{type:String,default:`"${window.location.origin}/server/oss/download?fileUrl="`}},setup(t){const l=t,r=e.ref(l.fileList);e.watch(()=>l.fileList,o=>{o&&(r.value=o)},{immediate:!0});const i=e.ref(!1),n=e.ref({}),u=o=>{n.value={id:o.ossFileId||o.url,name:`${o.id}.${o.suffix}`},i.value=!0},a=o=>{var c,k,m,g,s;return(c=o==null?void 0:o.suffix)!=null&&c.includes("pdf")?"iksvg_pdf":(k=o==null?void 0:o.suffix)!=null&&k.includes("doc")?"iksvg_word":(m=o==null?void 0:o.suffix)!=null&&m.includes("xls")?"iksvg_excel":(g=o==null?void 0:o.suffix)!=null&&g.includes("mov")?"iksvg_mov":(s=o==null?void 0:o.suffix)!=null&&s.includes("zip")?"iksvg_zip":"icon-jpg"},p=o=>{var c,k,m,g,s;return(c=o==null?void 0:o.suffix)!=null&&c.includes("pdf")?"#FA4E4E":(k=o==null?void 0:o.suffix)!=null&&k.includes("doc")?"#2c69e0":(m=o.suffix)!=null&&m.includes("xls")?"#39BFBF":(g=o.suffix)!=null&&g.includes("txt")?"#2c69e0":(s=o.suffix)!=null&&s.includes("zip")?"#FF9000":"#32CD79"},ne=o=>{const c=document.createElement("a");c.href=loadUrl+o.ossFileId,c.download=o.originName,c.click()};return(o,c)=>{var m,g;const k=e.resolveComponent("el-image");return e.openBlock(),e.createElementBlock("div",null,[l.fileType==="file"?(e.openBlock(),e.createElementBlock("div",X,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(s,w)=>(e.openBlock(),e.createElementBlock("div",{key:w,class:"files-item",style:e.normalizeStyle({width:l.fileWidth,"margin-right":l.fileWidth==="100%"?"0px":""})},[e.createElementVNode("div",Y,[e.createVNode(e.unref(C),{name:a(s),style:e.normalizeStyle(`color:${p(s)}`),size:36},null,8,["name","style"]),e.createElementVNode("div",{class:"file-name",onClick:oe=>ne(s)},[e.createElementVNode("p",{title:s.originName},e.toDisplayString(s.originName),9,J),e.createElementVNode("p",Q,e.toDisplayString((s.fileSize/1024).toFixed(2))+"KB",1)],8,H)]),e.createElementVNode("div",{class:"file-preview",onClick:oe=>u(s)},[e.createVNode(e.unref(C),{name:"iksvg_yulan"}),ee],8,Z)],4))),128))])):e.createCommentVNode("v-if",!0),l.fileType==="img"?(e.openBlock(),e.createElementBlock("div",le,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(s,w)=>(e.openBlock(),e.createElementBlock("div",{key:w,class:"preview-img"},[e.createVNode(k,{class:"show-img",src:t.loadUrl+s.url,"preview-src-list":[t.loadUrl+s.url],fit:"cover"},null,8,["src","preview-src-list"])]))),128))])):e.createCommentVNode("v-if",!0),e.createVNode(e.unref(j),{modelValue:i.value,"onUpdate:modelValue":c[0]||(c[0]=s=>i.value=s),"load-url":l.urlPreview,url:(m=n.value)==null?void 0:m.id,"kk-url":t.previewUrl,"file-name":(g=n.value)==null?void 0:g.name},null,8,["modelValue","load-url","url","kk-url","file-name"])])}}}),ce="",E=h(V(te,[["__scopeId","data-v-bbc42bc9"]]));f.IKDetailPreviewFiles=E,f.default=E,Object.defineProperties(f,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
1
+ (function(d,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("element-plus"),require("iking-utils-pro")):typeof define=="function"&&define.amd?define(["exports","vue","element-plus","iking-utils-pro"],e):(d=typeof globalThis<"u"?globalThis:d||self,e(d.index={},d.Vue,d["element-plus"],d["iking-utils-pro"]))})(this,function(d,e,S,$){"use strict";const h=(o,l)=>{if(o.install=r=>{for(const i of[o,...Object.values(l??{})])r.component(i.name,i)},l)for(const[r,i]of Object.entries(l))o[r]=i;return o},V=(o,l)=>{const r=o.__vccOpts||o;for(const[i,t]of l)r[i]=t;return r},re="",z=typeof btoa=="function",_=typeof Buffer=="function";typeof TextDecoder=="function"&&new TextDecoder;const b=typeof TextEncoder=="function"?new TextEncoder:void 0,F="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",y=Array.prototype.slice.call(F);(o=>{let l={};return o.forEach((r,i)=>l[r]=i),l})(y);const u=String.fromCharCode.bind(String);typeof Uint8Array.from=="function"&&Uint8Array.from.bind(Uint8Array);const N=o=>o.replace(/=/g,"").replace(/[+\/]/g,l=>l=="+"?"-":"_"),B=z?o=>btoa(o):_?o=>Buffer.from(o,"binary").toString("base64"):o=>{let l,r,i,t,a="";const c=o.length%3;for(let p=0;p<o.length;){if((r=o.charCodeAt(p++))>255||(i=o.charCodeAt(p++))>255||(t=o.charCodeAt(p++))>255)throw new TypeError("invalid character found");l=r<<16|i<<8|t,a+=y[l>>18&63]+y[l>>12&63]+y[l>>6&63]+y[l&63]}return c?a.slice(0,c-3)+"===".substring(c):a},v=_?o=>Buffer.from(o).toString("base64"):o=>{let r=[];for(let i=0,t=o.length;i<t;i+=4096)r.push(u.apply(null,o.subarray(i,i+4096)));return B(r.join(""))},U=o=>{if(o.length<2){var l=o.charCodeAt(0);return l<128?o:l<2048?u(192|l>>>6)+u(128|l&63):u(224|l>>>12&15)+u(128|l>>>6&63)+u(128|l&63)}else{var l=65536+(o.charCodeAt(0)-55296)*1024+(o.charCodeAt(1)-56320);return u(240|l>>>18&7)+u(128|l>>>12&63)+u(128|l>>>6&63)+u(128|l&63)}},I=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,D=o=>o.replace(I,U),x=_?o=>Buffer.from(o,"utf8").toString("base64"):b?o=>v(b.encode(o)):o=>B(D(o)),A=(o,l=!1)=>l?N(x(o)):x(o),P=["src"],T=e.defineComponent({__name:"IKPreviewFile",props:{modelValue:{type:Boolean,default:!1},kkUrl:{required:!0,type:String,default:""},url:{required:!0,type:String,default:""},loadUrl:{type:String,default:""},fileName:{type:String,default:""}},setup(o){const l=o,r=e.ref(null),i=e.computed(()=>!l.kkUrl||!l.url?"":`${l.kkUrl}${encodeURIComponent(A(`${l.loadUrl}${l.url}${l.fileName?`&fullfilename=${l.fileName}`:""}`))}`),t=e.ref(l.modelValue);return e.watch(()=>l.modelValue,a=>{t.value=a}),(a,c)=>(e.openBlock(),e.createBlock(e.unref(S.ElDialog),{fullscreen:"",modelValue:t.value,"onUpdate:modelValue":c[0]||(c[0]=p=>t.value=p),"destroy-on-close":"","append-to-body":"","modal-class":"ik-file-preview-modal",onClose:c[1]||(c[1]=p=>a.$emit("update:modelValue",!1)),class:"ik-file-preview"},{default:e.withCtx(()=>[e.createElementVNode("iframe",{ref_key:"freamRef",ref:r,"cross-origin":"",src:i.value,frameborder:"0",allowfullscreen:"",seamless:""},null,8,P)]),_:1},8,["modelValue"]))}}),se="",j=h(T),K={class:"inline-block ik-svg-icon ik-icon line-height-[0] inline-flex justify-center"},q={key:1,class:"h-[1em] w-[1em]","aria-hidden":"true"},L=["xlink:href"],O=["src"],W={key:1,class:"h-[1em] w-[1em]","aria-hidden":"true"},R=["xlink:href"],G=["src"],C=h(e.defineComponent({name:"IkSvgIcon",__name:"index",props:{name:{},flip:{},rotate:{},color:{},opacity:{default:.5},size:{default:""},bg:{type:Boolean,default:!1},showBg:{type:Boolean,default:!1},padding:{default:"0"},warning:{type:Boolean},notip:{type:Boolean,default:!1},title:{},type:{},active:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},setup(o){const l=o,r=e.computed(()=>{var t,a;return/^http?:\/\//.test(l.name)?"img":/i-[^:]+:[^:]+/.test(l.name)?"unocss":(t=l.name)!=null&&t.startsWith("iksig")?"iksig":(a=l.name)!=null&&a.includes(":")?"iconify":"svg"}),i=e.computed(()=>{const t=[];if(l.flip)switch(l.flip){case"horizontal":t.push("rotateY(180deg)");break;case"vertical":t.push("rotateX(180deg)");break;case"both":t.push("rotateX(180deg)"),t.push("rotateY(180deg)");break}return l.rotate&&t.push(`rotate(${l.rotate%360}deg)`),{...l.color&&{color:l.color},...l.size&&{fontSize:typeof l.size=="number"?`${l.size}px`:l.size},...t.length&&{transform:t.join(" ")},padding:l.padding,...l.color&&r.value!=="iksig"?{"--ik-color-icon-dark":l.color,"--ik-color-icon-light":$.ikColor.setOpacity(l.color,l.opacity||.4)}:{},...l.type==="primary"?{"--ik-color-icon-dark":"var(--ik-theme-color)","--ik-color-icon-light":"var(--ik-color-icon-light-hover)","--ik-color-bg-icon":"var(--ik-color-bg-button-secondary)"}:l.type==="warning"?{"--ik-color-icon-dark":"var(--ik-color-error)","--ik-color-icon-light":"var(--ik-color-icon-error-light)","--ik-color-bg-icon":"var(--ik-color-icon-error-bg)"}:{}}});return(t,a)=>{const c=e.resolveComponent("el-tooltip");return e.openBlock(),e.createElementBlock("span",K,[t.notip||!t.title?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(["relative h-[1em] w-[1em] flex-inline items-center justify-center fill-current leading-[1em] transition",{[t.name]:r.value==="unocss","show-bg":t.showBg||t.bg,default:t.size==="default",small:t.size==="small",big:t.size==="big",warning:t.warning}]),style:e.normalizeStyle(i.value)},[r.value==="iksig"?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(`iksig ${t.name}`),style:e.normalizeStyle(i.value)},null,6)):r.value==="svg"?(e.openBlock(),e.createElementBlock("svg",q,[e.createElementVNode("use",{"xlink:href":`#${t.name}`},null,8,L)])):r.value==="img"?(e.openBlock(),e.createElementBlock("img",{key:2,src:t.name,class:"h-[1em] w-[1em]"},null,8,O)):e.createCommentVNode("v-if",!0)],6)):(e.openBlock(),e.createBlock(c,{key:1,content:t.title},{default:e.withCtx(()=>[e.createElementVNode("i",{class:e.normalizeClass(["ik-svg-icon ik-icon relative h-[1em] w-[1em] flex-inline items-center justify-center fill-current leading-[1em] transition",{[t.name]:r.value==="unocss","show-bg":t.showBg||t.bg,default:t.size==="default",small:t.size==="small",big:t.size==="big",warning:t.warning}]),style:e.normalizeStyle(i.value)},[r.value==="iksig"?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(`iksig ${t.name}`),style:e.normalizeStyle(i.value)},null,6)):r.value==="svg"?(e.openBlock(),e.createElementBlock("svg",W,[e.createElementVNode("use",{"xlink:href":`#${t.name}`},null,8,R)])):r.value==="img"?(e.openBlock(),e.createElementBlock("img",{key:2,src:t.name,class:"h-[1em] w-[1em]"},null,8,G)):e.createCommentVNode("v-if",!0)],6)]),_:1},8,["content"]))])}}})),M=o=>(e.pushScopeId("data-v-bbc42bc9"),o=o(),e.popScopeId(),o),X={key:0,class:"preview-files"},Y={class:"flex",style:{width:"80%","align-items":"center"}},H=["onClick"],J=["title"],Q={style:{color:"#b8c6d9"}},Z=["onClick"],ee=M(()=>e.createElementVNode("span",null,"预览",-1)),le={key:1,class:"flex preview-img"},oe=e.defineComponent({__name:"IKDetailPreviewFiles",props:{fileList:{type:Array,default:()=>[]},fileType:{type:String,default:"file"},fileWidth:{type:String,default:"100%"},loadUrl:{type:String,default:""},previewUrl:{required:!0,type:String,default:""},urlPreview:{type:String,default:`"${window.location.origin}/server/oss/download?fileUrl="`}},setup(o){const l=o,r=e.ref(l.fileList);e.watch(()=>l.fileList,n=>{n&&(r.value=n)},{immediate:!0});const i=e.ref(!1),t=e.ref({}),a=n=>{t.value={id:n.ossFileId||n.url,name:`${n.id}.${n.suffix}`},i.value=!0},c=n=>{var f,k,m,g,s;return(f=n==null?void 0:n.suffix)!=null&&f.includes("pdf")?"iksvg_pdf":(k=n==null?void 0:n.suffix)!=null&&k.includes("doc")?"iksvg_word":(m=n==null?void 0:n.suffix)!=null&&m.includes("xls")?"iksvg_excel":(g=n==null?void 0:n.suffix)!=null&&g.includes("mov")?"iksvg_mov":(s=n==null?void 0:n.suffix)!=null&&s.includes("zip")?"iksvg_zip":"icon-jpg"},p=n=>{var f,k,m,g,s;return(f=n==null?void 0:n.suffix)!=null&&f.includes("pdf")?"#FA4E4E":(k=n==null?void 0:n.suffix)!=null&&k.includes("doc")?"#2c69e0":(m=n.suffix)!=null&&m.includes("xls")?"#39BFBF":(g=n.suffix)!=null&&g.includes("txt")?"#2c69e0":(s=n.suffix)!=null&&s.includes("zip")?"#FF9000":"#32CD79"},te=n=>{const f=document.createElement("a");f.href=loadUrl+n.ossFileId,f.download=n.originName,f.click()};return(n,f)=>{var m,g;const k=e.resolveComponent("el-image");return e.openBlock(),e.createElementBlock("div",null,[l.fileType==="file"?(e.openBlock(),e.createElementBlock("div",X,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(s,w)=>(e.openBlock(),e.createElementBlock("div",{key:w,class:"files-item",style:e.normalizeStyle({width:l.fileWidth,"margin-right":l.fileWidth==="100%"?"0px":""})},[e.createElementVNode("div",Y,[e.createVNode(e.unref(C),{name:c(s),style:e.normalizeStyle(`color:${p(s)}`),size:36},null,8,["name","style"]),e.createElementVNode("div",{class:"file-name",onClick:ne=>te(s)},[e.createElementVNode("p",{title:s.originName},e.toDisplayString(s.originName),9,J),e.createElementVNode("p",Q,e.toDisplayString((s.fileSize/1024).toFixed(2))+"KB",1)],8,H)]),e.createElementVNode("div",{class:"file-preview",onClick:ne=>a(s)},[e.createVNode(e.unref(C),{name:"iksvg_yulan"}),ee],8,Z)],4))),128))])):e.createCommentVNode("v-if",!0),l.fileType==="img"?(e.openBlock(),e.createElementBlock("div",le,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(s,w)=>(e.openBlock(),e.createElementBlock("div",{key:w,class:"preview-img"},[e.createVNode(k,{class:"show-img",src:o.loadUrl+s.url,"preview-src-list":[o.loadUrl+s.url],fit:"cover"},null,8,["src","preview-src-list"])]))),128))])):e.createCommentVNode("v-if",!0),e.createVNode(e.unref(j),{modelValue:i.value,"onUpdate:modelValue":f[0]||(f[0]=s=>i.value=s),"load-url":l.urlPreview,url:(m=t.value)==null?void 0:m.id,"kk-url":o.previewUrl,"file-name":(g=t.value)==null?void 0:g.name},null,8,["modelValue","load-url","url","kk-url","file-name"])])}}}),ce="",E=h(V(oe,[["__scopeId","data-v-bbc42bc9"]]));d.IKDetailPreviewFiles=E,d.default=E,Object.defineProperties(d,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});