iking-web-ui-pro 0.1.6 → 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 (74) hide show
  1. package/dist/IKDetailPreviewFiles/index.es.js +148 -140
  2. package/dist/IKDetailPreviewFiles/index.umd.js +1 -1
  3. package/dist/IKDetailPreviewFiles/style.css +1 -1
  4. package/dist/IKExpandCollapse/index.es.js +73 -65
  5. package/dist/IKExpandCollapse/index.umd.js +1 -1
  6. package/dist/IKHorizontalStepBar/index.es.js +22 -22
  7. package/dist/IKHorizontalStepBar/index.umd.js +1 -1
  8. package/dist/IKHorizontalStepBar/style.css +1 -1
  9. package/dist/IKPreviewFile/index.es.js +29 -24
  10. package/dist/IKPreviewFile/index.umd.js +1 -1
  11. package/dist/IKPreviewFile/style.css +1 -1
  12. package/dist/IKSearch/index.es.js +1213 -1005
  13. package/dist/IKSearch/index.umd.js +2 -2
  14. package/dist/IKSearch/style.css +1 -1
  15. package/dist/IKVerticalStepBar/index.es.js +92 -84
  16. package/dist/IKVerticalStepBar/index.umd.js +3 -3
  17. package/dist/IkApprovalProcess/index.es.js +2227 -0
  18. package/dist/IkApprovalProcess/index.umd.js +1 -0
  19. package/dist/IkApprovalProcess/style.css +1 -0
  20. package/dist/{IKApprovalProcessDetail → IkApprovalProcessDetail}/index.es.js +27 -28
  21. package/dist/IkApprovalProcessDetail/index.umd.js +1 -0
  22. package/dist/{IKApprovalProcessDetail → IkApprovalProcessDetail}/style.css +1 -1
  23. package/dist/IkBaseDialog/index.es.js +58 -50
  24. package/dist/IkBaseDialog/index.umd.js +1 -1
  25. package/dist/IkBtnSetting/index.es.js +105 -97
  26. package/dist/IkBtnSetting/index.umd.js +1 -1
  27. package/dist/IkBtnSetting/style.css +1 -1
  28. package/dist/{IKCalendar → IkCalendar}/index.es.js +2392 -2184
  29. package/dist/IkCalendar/index.umd.js +1 -0
  30. package/dist/IkCalendar/style.css +1 -0
  31. package/dist/{IKDescription → IkDescription}/index.es.js +13 -13
  32. package/dist/IkDescription/index.umd.js +1 -0
  33. package/dist/IkDescription/style.css +1 -0
  34. package/dist/IkIconPicker/index.es.js +271 -371
  35. package/dist/IkIconPicker/index.umd.js +1 -1
  36. package/dist/IkIconPicker/style.css +1 -1
  37. package/dist/IkMonacoEditor/index.es.js +891 -0
  38. package/dist/IkMonacoEditor/index.umd.js +11 -0
  39. package/dist/IkMonacoEditor/style.css +1 -0
  40. package/dist/IkOnlyOffice/index.es.js +4 -4
  41. package/dist/IkOnlyOffice/index.umd.js +1 -1
  42. package/dist/IkPageFull/index.es.js +1607 -1391
  43. package/dist/IkPageFull/index.umd.js +3 -3
  44. package/dist/IkPageFull/style.css +1 -1
  45. package/dist/IkPickerUser/index.es.js +838 -630
  46. package/dist/IkPickerUser/index.umd.js +1 -1
  47. package/dist/IkPickerUser/style.css +1 -1
  48. package/dist/IkRadioGroup/index.es.js +18 -18
  49. package/dist/IkRadioGroup/index.umd.js +1 -1
  50. package/dist/IkRadioGroup/style.css +1 -1
  51. package/dist/IkSchedule/index.es.js +79 -71
  52. package/dist/IkSchedule/index.umd.js +1 -1
  53. package/dist/IkSvgIcon/index.es.js +64 -56
  54. package/dist/IkSvgIcon/index.umd.js +1 -1
  55. package/dist/IkTemplateOfficeConfig/index.es.js +31 -31
  56. package/dist/IkTemplateOfficeConfig/index.umd.js +1 -1
  57. package/dist/IkUploadFile/index.es.js +290 -272
  58. package/dist/IkUploadFile/index.umd.js +1 -1
  59. package/dist/IkUploadFile/style.css +1 -1
  60. package/dist/index.es.js +5405 -4580
  61. package/dist/index.umd.js +16 -6
  62. package/dist/style.css +1 -1
  63. package/package.json +1 -1
  64. package/dist/IKApprovalProcess/index.es.js +0 -2019
  65. package/dist/IKApprovalProcess/index.umd.js +0 -1
  66. package/dist/IKApprovalProcess/style.css +0 -1
  67. package/dist/IKApprovalProcessDetail/index.umd.js +0 -1
  68. package/dist/IKCalendar/index.umd.js +0 -1
  69. package/dist/IKCalendar/style.css +0 -1
  70. package/dist/IKDescription/index.umd.js +0 -1
  71. package/dist/IKDescription/style.css +0 -1
  72. /package/dist/{IKApprovalProcess → IkApprovalProcess}/package.json +0 -0
  73. /package/dist/{IKApprovalProcessDetail → IkApprovalProcessDetail}/package.json +0 -0
  74. /package/dist/{IKCalendar → IkCalendar}/package.json +0 -0
@@ -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 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
- 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), te = ["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(x(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, te)
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), ie = { class: "inline-block ik-svg-icon ik-icon line-height-[0] inline-flex justify-center" }, 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: {
@@ -129,6 +134,7 @@ const ne = B(re), ie = { class: "inline-block ik-svg-icon ik-icon line-height-[0
129
134
  bg: { type: Boolean, default: !1 },
130
135
  showBg: { type: Boolean, default: !1 },
131
136
  padding: { default: "0" },
137
+ primary: { type: Boolean },
132
138
  warning: { type: Boolean },
133
139
  notip: { type: Boolean, default: !1 },
134
140
  title: {},
@@ -137,10 +143,10 @@ const ne = B(re), ie = { class: "inline-block ik-svg-icon ik-icon line-height-[0
137
143
  disabled: { type: Boolean, default: !1 }
138
144
  },
139
145
  setup(l) {
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(() => {
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(() => {
144
150
  const o = [];
145
151
  if (e.flip)
146
152
  switch (e.flip) {
@@ -159,11 +165,11 @@ const ne = B(re), ie = { class: "inline-block ik-svg-icon ik-icon line-height-[0
159
165
  ...e.size && { fontSize: typeof e.size == "number" ? `${e.size}px` : e.size },
160
166
  ...o.length && { transform: o.join(" ") },
161
167
  padding: e.padding,
162
- ...e.color && r.value !== "iksig" ? {
168
+ ...e.color && n.value !== "iksig" ? {
163
169
  "--ik-color-icon-dark": e.color,
164
- "--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)
165
171
  } : {},
166
- ...e.type === "primary" ? {
172
+ ...e.type === "primary" || e.primary ? {
167
173
  "--ik-color-icon-dark": "var(--ik-theme-color)",
168
174
  "--ik-color-icon-light": "var(--ik-color-icon-light-hover)",
169
175
  "--ik-color-bg-icon": "var(--ik-color-bg-button-secondary)"
@@ -174,84 +180,91 @@ const ne = B(re), ie = { class: "inline-block ik-svg-icon ik-icon line-height-[0
174
180
  } : {}
175
181
  };
176
182
  });
177
- return (o, c) => {
178
- const u = N("el-tooltip");
179
- return s(), a("span", ie, [
180
- 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(
181
187
  "i",
182
188
  {
183
189
  key: 0,
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",
190
+ class: w(["ik-svg-icon ik-icon relative h-[1em] w-[1em] inline-flex items-center justify-center fill-current leading-[1em] transition", {
191
+ [o.name]: n.value === "unocss",
186
192
  "show-bg": o.showBg || o.bg,
187
193
  default: o.size === "default",
188
194
  small: o.size === "small",
189
195
  big: o.size === "big",
190
- warning: o.warning
196
+ warning: o.warning,
197
+ primary: o.primary,
198
+ active: o.active,
199
+ disabled: o.disabled
191
200
  }]),
192
- style: h(n.value)
201
+ style: k(t.value)
193
202
  },
194
203
  [
195
- r.value === "iksig" ? (s(), a(
204
+ b(` <Icon v-if="outputType === 'iconify'" :icon="name" /> `),
205
+ n.value === "iksig" ? (s(), c(
196
206
  "i",
197
207
  {
198
208
  key: 0,
199
- class: b(`iksig ${o.name}`),
200
- style: h(n.value)
209
+ class: w(`iksig ${o.name}`),
210
+ style: k(t.value)
201
211
  },
202
212
  null,
203
213
  6
204
214
  /* CLASS, STYLE */
205
- )) : r.value === "svg" ? (s(), a("svg", se, [
215
+ )) : n.value === "svg" ? (s(), c("svg", ae, [
206
216
  p("use", {
207
217
  "xlink:href": `#${o.name}`
208
- }, null, 8, ae)
209
- ])) : r.value === "img" ? (s(), a("img", {
218
+ }, null, 8, ce)
219
+ ])) : n.value === "img" ? (s(), c("img", {
210
220
  key: 2,
211
221
  src: o.name,
212
222
  class: "h-[1em] w-[1em]"
213
- }, null, 8, ce)) : $("v-if", !0)
223
+ }, null, 8, ue)) : b("v-if", !0)
214
224
  ],
215
225
  6
216
226
  /* CLASS, STYLE */
217
- )) : (s(), T(u, {
227
+ )) : (s(), P(u, {
218
228
  key: 1,
219
- content: o.title
229
+ content: o.title,
230
+ placement: "right"
220
231
  }, {
221
232
  default: j(() => [
222
233
  p(
223
234
  "i",
224
235
  {
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",
236
+ class: w(["ik-svg-icon ik-icon relative h-[1em] w-[1em] inline-flex items-center justify-center fill-current leading-[1em] transition", {
237
+ [o.name]: n.value === "unocss",
227
238
  "show-bg": o.showBg || o.bg,
228
239
  default: o.size === "default",
240
+ primary: o.primary,
229
241
  small: o.size === "small",
230
242
  big: o.size === "big",
231
- warning: o.warning
243
+ warning: o.warning,
244
+ active: o.active
232
245
  }]),
233
- style: h(n.value)
246
+ style: k(t.value)
234
247
  },
235
248
  [
236
- r.value === "iksig" ? (s(), a(
249
+ n.value === "iksig" ? (s(), c(
237
250
  "i",
238
251
  {
239
252
  key: 0,
240
- class: b(`iksig ${o.name}`),
241
- style: h(n.value)
253
+ class: w(`iksig ${o.name}`),
254
+ style: k(t.value)
242
255
  },
243
256
  null,
244
257
  6
245
258
  /* CLASS, STYLE */
246
- )) : r.value === "svg" ? (s(), a("svg", ue, [
259
+ )) : n.value === "svg" ? (s(), c("svg", fe, [
247
260
  p("use", {
248
261
  "xlink:href": `#${o.name}`
249
- }, null, 8, fe)
250
- ])) : r.value === "img" ? (s(), a("img", {
262
+ }, null, 8, de)
263
+ ])) : n.value === "img" ? (s(), c("img", {
251
264
  key: 2,
252
265
  src: o.name,
253
266
  class: "h-[1em] w-[1em]"
254
- }, null, 8, de)) : $("v-if", !0)
267
+ }, null, 8, pe)) : b("v-if", !0)
255
268
  ],
256
269
  6
257
270
  /* CLASS, STYLE */
@@ -263,22 +276,22 @@ const ne = B(re), ie = { class: "inline-block ik-svg-icon ik-icon line-height-[0
263
276
  ]);
264
277
  };
265
278
  }
266
- }), 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 = {
267
280
  key: 0,
268
281
  class: "preview-files"
269
- }, me = {
282
+ }, ye = {
270
283
  class: "flex",
271
284
  style: { width: "80%", "align-items": "center" }
272
- }, ye = ["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(
273
286
  "span",
274
287
  null,
275
288
  "预览",
276
289
  -1
277
290
  /* HOISTED */
278
- )), we = {
291
+ )), xe = {
279
292
  key: 1,
280
293
  class: "flex preview-img"
281
- }, xe = /* @__PURE__ */ S({
294
+ }, Ce = /* @__PURE__ */ B({
282
295
  __name: "IKDetailPreviewFiles",
283
296
  props: {
284
297
  // 文件列表 [{originName:'',path:'',fileSize:''}] //文件大小
@@ -300,66 +313,61 @@ const ne = B(re), ie = { class: "inline-block ik-svg-icon ik-icon line-height-[0
300
313
  type: String,
301
314
  default: ""
302
315
  },
303
- // kkFile的地址 预览地址
304
- previewUrl: {
316
+ // kkFile的地址 预览地址
317
+ kkUrl: {
305
318
  required: !0,
306
319
  type: String,
307
320
  default: ""
308
- },
309
- // 文件服务器下载地址
310
- urlPreview: {
311
- type: String,
312
- default: `"${window.location.origin}/server/oss/download?fileUrl="`
313
321
  }
314
322
  },
315
323
  setup(l) {
316
- const e = l, r = _(e.fileList);
317
- P(
324
+ const e = l, n = _(e.fileList);
325
+ T(
318
326
  () => e.fileList,
319
- (t) => {
320
- t && (r.value = t);
327
+ (r) => {
328
+ r && (n.value = r);
321
329
  },
322
330
  { immediate: !0 }
323
331
  );
324
- const n = _(!1), o = _({}), c = (t) => {
332
+ const t = _(!1), o = _({}), a = (r) => {
325
333
  o.value = {
326
- id: t.ossFileId || t.url,
327
- name: `${t.id}.${t.suffix}`
334
+ url: r.url,
335
+ name: r.name
328
336
  // row.originName
329
- }, n.value = !0;
330
- }, u = (t) => {
337
+ }, t.value = !0;
338
+ }, u = (r) => {
331
339
  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) => {
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) => {
334
342
  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) => {
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) => {
337
345
  const f = document.createElement("a");
338
- f.href = loadUrl + t.ossFileId, f.download = t.originName, f.click();
346
+ f.href = G.assembleUrl(e.loadUrl, r.url), f.download = r.name, f.click();
339
347
  };
340
- return (t, f) => {
348
+ return (r, f) => {
341
349
  var v, m;
342
- const y = N("el-image");
343
- return s(), a("div", null, [
344
- e.fileType === "file" ? (s(), a("div", ve, [
345
- (s(!0), a(
350
+ const y = K("el-image");
351
+ return s(), c("div", null, [
352
+ e.fileType === "file" ? (s(), c("div", me, [
353
+ (s(!0), c(
346
354
  z,
347
355
  null,
348
- I(r.value, (i, C) => (s(), a(
356
+ I(n.value, (i, $) => (s(), c(
349
357
  "div",
350
358
  {
351
- key: C,
359
+ key: $,
352
360
  class: "files-item",
353
- style: h({
361
+ style: k({
354
362
  width: e.fileWidth,
355
363
  "margin-right": e.fileWidth === "100%" ? "0px" : ""
356
364
  })
357
365
  },
358
366
  [
359
- p("div", me, [
360
- w(x(E), {
367
+ p("div", ye, [
368
+ x(C(E), {
361
369
  name: u(i),
362
- style: h(`color:${g(i)}`),
370
+ style: k(`color:${g(i)}`),
363
371
  size: 36
364
372
  }, null, 8, ["name", "style"]),
365
373
  p("div", {
@@ -367,24 +375,24 @@ const ne = B(re), ie = { class: "inline-block ik-svg-icon ik-icon line-height-[0
367
375
  onClick: (O) => L(i)
368
376
  }, [
369
377
  p("p", {
370
- title: i.originName
371
- }, A(i.originName), 9, he),
378
+ title: i.name
379
+ }, A(i.name), 9, he),
372
380
  p(
373
381
  "p",
374
- ke,
375
- A((i.fileSize / 1024).toFixed(2)) + "KB",
382
+ _e,
383
+ A((i.size / 1024).toFixed(2)) + "KB",
376
384
  1
377
385
  /* TEXT */
378
386
  )
379
- ], 8, ye)
387
+ ], 8, ke)
380
388
  ]),
381
389
  p("div", {
382
390
  class: "file-preview",
383
- onClick: (O) => c(i)
391
+ onClick: (O) => a(i)
384
392
  }, [
385
- w(x(E), { name: "iksvg_yulan" }),
386
- be
387
- ], 8, _e)
393
+ x(C(E), { name: "iksvg_yulan" }),
394
+ we
395
+ ], 8, be)
388
396
  ],
389
397
  4
390
398
  /* STYLE */
@@ -392,16 +400,16 @@ const ne = B(re), ie = { class: "inline-block ik-svg-icon ik-icon line-height-[0
392
400
  128
393
401
  /* KEYED_FRAGMENT */
394
402
  ))
395
- ])) : $("v-if", !0),
396
- e.fileType === "img" ? (s(), a("div", we, [
397
- (s(!0), a(
403
+ ])) : b("v-if", !0),
404
+ e.fileType === "img" ? (s(), c("div", xe, [
405
+ (s(!0), c(
398
406
  z,
399
407
  null,
400
- I(r.value, (i, C) => (s(), a("div", {
401
- key: C,
408
+ I(n.value, (i, $) => (s(), c("div", {
409
+ key: $,
402
410
  class: "preview-img"
403
411
  }, [
404
- w(y, {
412
+ x(y, {
405
413
  class: "show-img",
406
414
  src: l.loadUrl + i.url,
407
415
  "preview-src-list": [l.loadUrl + i.url],
@@ -411,21 +419,21 @@ const ne = B(re), ie = { class: "inline-block ik-svg-icon ik-icon line-height-[0
411
419
  128
412
420
  /* KEYED_FRAGMENT */
413
421
  ))
414
- ])) : $("v-if", !0),
415
- w(x(ne), {
416
- modelValue: n.value,
417
- "onUpdate:modelValue": f[0] || (f[0] = (i) => n.value = i),
418
- "load-url": e.urlPreview,
419
- url: (v = o.value) == null ? void 0 : v.id,
420
- "kk-url": l.previewUrl,
422
+ ])) : b("v-if", !0),
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,
421
429
  "file-name": (m = o.value) == null ? void 0 : m.name
422
430
  }, null, 8, ["modelValue", "load-url", "url", "kk-url", "file-name"])
423
431
  ]);
424
432
  };
425
433
  }
426
434
  });
427
- 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);
428
436
  export {
429
- Be as IKDetailPreviewFiles,
430
- Be as default
437
+ Se as IKDetailPreviewFiles,
438
+ Se as default
431
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,$){"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"}})});
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"}})});