iking-web-ui-pro 0.1.7 → 0.1.8

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