iking-web-ui-pro 0.1.6 → 0.1.7

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 (63) hide show
  1. package/dist/IKDetailPreviewFiles/index.es.js +63 -55
  2. package/dist/IKDetailPreviewFiles/index.umd.js +1 -1
  3. package/dist/IKExpandCollapse/index.es.js +73 -65
  4. package/dist/IKExpandCollapse/index.umd.js +1 -1
  5. package/dist/IKHorizontalStepBar/index.es.js +22 -22
  6. package/dist/IKHorizontalStepBar/index.umd.js +1 -1
  7. package/dist/IKHorizontalStepBar/style.css +1 -1
  8. package/dist/IKSearch/index.es.js +808 -695
  9. package/dist/IKSearch/index.umd.js +2 -2
  10. package/dist/IKSearch/style.css +1 -1
  11. package/dist/IKVerticalStepBar/index.es.js +92 -84
  12. package/dist/IKVerticalStepBar/index.umd.js +3 -3
  13. package/dist/{IKApprovalProcess → IkApprovalProcess}/index.es.js +746 -633
  14. package/dist/IkApprovalProcess/index.umd.js +1 -0
  15. package/dist/IkApprovalProcess/style.css +1 -0
  16. package/dist/{IKApprovalProcessDetail → IkApprovalProcessDetail}/index.es.js +27 -28
  17. package/dist/IkApprovalProcessDetail/index.umd.js +1 -0
  18. package/dist/{IKApprovalProcessDetail → IkApprovalProcessDetail}/style.css +1 -1
  19. package/dist/IkBaseDialog/index.es.js +58 -50
  20. package/dist/IkBaseDialog/index.umd.js +1 -1
  21. package/dist/IkBtnSetting/index.es.js +96 -88
  22. package/dist/IkBtnSetting/index.umd.js +1 -1
  23. package/dist/{IKCalendar → IkCalendar}/index.es.js +1745 -1632
  24. package/dist/{IKCalendar → IkCalendar}/index.umd.js +1 -1
  25. package/dist/IkCalendar/style.css +1 -0
  26. package/dist/{IKDescription → IkDescription}/index.es.js +13 -13
  27. package/dist/IkDescription/index.umd.js +1 -0
  28. package/dist/IkDescription/style.css +1 -0
  29. package/dist/IkIconPicker/index.es.js +271 -371
  30. package/dist/IkIconPicker/index.umd.js +1 -1
  31. package/dist/IkIconPicker/style.css +1 -1
  32. package/dist/IkMonacoEditor/index.es.js +891 -0
  33. package/dist/IkMonacoEditor/index.umd.js +11 -0
  34. package/dist/IkMonacoEditor/style.css +1 -0
  35. package/dist/IkPageFull/index.es.js +1289 -1168
  36. package/dist/IkPageFull/index.umd.js +3 -3
  37. package/dist/IkPageFull/style.css +1 -1
  38. package/dist/IkPickerUser/index.es.js +676 -563
  39. package/dist/IkPickerUser/index.umd.js +1 -1
  40. package/dist/IkPickerUser/style.css +1 -1
  41. package/dist/IkRadioGroup/index.es.js +18 -18
  42. package/dist/IkRadioGroup/index.umd.js +1 -1
  43. package/dist/IkRadioGroup/style.css +1 -1
  44. package/dist/IkSchedule/index.es.js +79 -71
  45. package/dist/IkSchedule/index.umd.js +1 -1
  46. package/dist/IkSvgIcon/index.es.js +64 -56
  47. package/dist/IkSvgIcon/index.umd.js +1 -1
  48. package/dist/IkUploadFile/index.es.js +253 -240
  49. package/dist/IkUploadFile/index.umd.js +1 -1
  50. package/dist/IkUploadFile/style.css +1 -1
  51. package/dist/index.es.js +5180 -4455
  52. package/dist/index.umd.js +16 -6
  53. package/dist/style.css +1 -1
  54. package/package.json +1 -1
  55. package/dist/IKApprovalProcess/index.umd.js +0 -1
  56. package/dist/IKApprovalProcess/style.css +0 -1
  57. package/dist/IKApprovalProcessDetail/index.umd.js +0 -1
  58. package/dist/IKCalendar/style.css +0 -1
  59. package/dist/IKDescription/index.umd.js +0 -1
  60. package/dist/IKDescription/style.css +0 -1
  61. /package/dist/{IKApprovalProcess → IkApprovalProcess}/package.json +0 -0
  62. /package/dist/{IKApprovalProcessDetail → IkApprovalProcessDetail}/package.json +0 -0
  63. /package/dist/{IKCalendar → IkCalendar}/package.json +0 -0
@@ -1,4 +1,4 @@
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";
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
2
  import { ElDialog as R } from "element-plus";
3
3
  import { ikColor as G } from "iking-utils-pro";
4
4
  const B = (l, e) => {
@@ -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
+ }, 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({
50
50
  __name: "IKPreviewFile",
51
51
  props: {
52
52
  modelValue: {
@@ -82,7 +82,7 @@ const J = (l) => l.replace(/=/g, "").replace(/[+\/]/g, (e) => e == "+" ? "-" : "
82
82
  )}`), o = _(e.modelValue);
83
83
  return P(() => e.modelValue, (c) => {
84
84
  o.value = c;
85
- }), (c, u) => (s(), T(x(R), {
85
+ }), (c, u) => (s(), T($(R), {
86
86
  fullscreen: "",
87
87
  modelValue: o.value,
88
88
  "onUpdate:modelValue": u[0] || (u[0] = (g) => o.value = g),
@@ -101,14 +101,14 @@ const J = (l) => l.replace(/=/g, "").replace(/[+\/]/g, (e) => e == "+" ? "-" : "
101
101
  frameborder: "0",
102
102
  allowfullscreen: "",
103
103
  seamless: ""
104
- }, null, 8, te)
104
+ }, null, 8, ie)
105
105
  ]),
106
106
  _: 1
107
107
  /* STABLE */
108
108
  }, 8, ["modelValue"]));
109
109
  }
110
110
  });
111
- const ne = B(re), ie = { class: "inline-block ik-svg-icon ik-icon line-height-[0] inline-flex justify-center" }, se = {
111
+ const ne = B(re), te = { class: "ik-svg-icon ik-icon inline-block inline-flex justify-center line-height-[0]" }, se = {
112
112
  key: 1,
113
113
  class: "h-[1em] w-[1em]",
114
114
  "aria-hidden": "true"
@@ -129,6 +129,7 @@ const ne = B(re), ie = { class: "inline-block ik-svg-icon ik-icon line-height-[0
129
129
  bg: { type: Boolean, default: !1 },
130
130
  showBg: { type: Boolean, default: !1 },
131
131
  padding: { default: "0" },
132
+ primary: { type: Boolean },
132
133
  warning: { type: Boolean },
133
134
  notip: { type: Boolean, default: !1 },
134
135
  title: {},
@@ -163,7 +164,7 @@ const ne = B(re), ie = { class: "inline-block ik-svg-icon ik-icon line-height-[0
163
164
  "--ik-color-icon-dark": e.color,
164
165
  "--ik-color-icon-light": G.setOpacity(e.color, e.opacity || 0.4)
165
166
  } : {},
166
- ...e.type === "primary" ? {
167
+ ...e.type === "primary" || e.primary ? {
167
168
  "--ik-color-icon-dark": "var(--ik-theme-color)",
168
169
  "--ik-color-icon-light": "var(--ik-color-icon-light-hover)",
169
170
  "--ik-color-bg-icon": "var(--ik-color-bg-button-secondary)"
@@ -176,27 +177,31 @@ const ne = B(re), ie = { class: "inline-block ik-svg-icon ik-icon line-height-[0
176
177
  });
177
178
  return (o, c) => {
178
179
  const u = N("el-tooltip");
179
- return s(), a("span", ie, [
180
+ return s(), a("span", te, [
180
181
  o.notip || !o.title ? (s(), a(
181
182
  "i",
182
183
  {
183
184
  key: 0,
184
- class: b(["relative h-[1em] w-[1em] flex-inline items-center justify-center fill-current leading-[1em] transition", {
185
+ class: w(["ik-svg-icon ik-icon relative h-[1em] w-[1em] inline-flex items-center justify-center fill-current leading-[1em] transition", {
185
186
  [o.name]: r.value === "unocss",
186
187
  "show-bg": o.showBg || o.bg,
187
188
  default: o.size === "default",
188
189
  small: o.size === "small",
189
190
  big: o.size === "big",
190
- warning: o.warning
191
+ warning: o.warning,
192
+ primary: o.primary,
193
+ active: o.active,
194
+ disabled: o.disabled
191
195
  }]),
192
196
  style: h(n.value)
193
197
  },
194
198
  [
199
+ b(` <Icon v-if="outputType === 'iconify'" :icon="name" /> `),
195
200
  r.value === "iksig" ? (s(), a(
196
201
  "i",
197
202
  {
198
203
  key: 0,
199
- class: b(`iksig ${o.name}`),
204
+ class: w(`iksig ${o.name}`),
200
205
  style: h(n.value)
201
206
  },
202
207
  null,
@@ -210,25 +215,28 @@ const ne = B(re), ie = { class: "inline-block ik-svg-icon ik-icon line-height-[0
210
215
  key: 2,
211
216
  src: o.name,
212
217
  class: "h-[1em] w-[1em]"
213
- }, null, 8, ce)) : $("v-if", !0)
218
+ }, null, 8, ce)) : b("v-if", !0)
214
219
  ],
215
220
  6
216
221
  /* CLASS, STYLE */
217
222
  )) : (s(), T(u, {
218
223
  key: 1,
219
- content: o.title
224
+ content: o.title,
225
+ placement: "right"
220
226
  }, {
221
227
  default: j(() => [
222
228
  p(
223
229
  "i",
224
230
  {
225
- class: b(["ik-svg-icon ik-icon relative h-[1em] w-[1em] flex-inline items-center justify-center fill-current leading-[1em] transition", {
231
+ class: w(["ik-svg-icon ik-icon relative h-[1em] w-[1em] inline-flex items-center justify-center fill-current leading-[1em] transition", {
226
232
  [o.name]: r.value === "unocss",
227
233
  "show-bg": o.showBg || o.bg,
228
234
  default: o.size === "default",
235
+ primary: o.primary,
229
236
  small: o.size === "small",
230
237
  big: o.size === "big",
231
- warning: o.warning
238
+ warning: o.warning,
239
+ active: o.active
232
240
  }]),
233
241
  style: h(n.value)
234
242
  },
@@ -237,7 +245,7 @@ const ne = B(re), ie = { class: "inline-block ik-svg-icon ik-icon line-height-[0
237
245
  "i",
238
246
  {
239
247
  key: 0,
240
- class: b(`iksig ${o.name}`),
248
+ class: w(`iksig ${o.name}`),
241
249
  style: h(n.value)
242
250
  },
243
251
  null,
@@ -251,7 +259,7 @@ const ne = B(re), ie = { class: "inline-block ik-svg-icon ik-icon line-height-[0
251
259
  key: 2,
252
260
  src: o.name,
253
261
  class: "h-[1em] w-[1em]"
254
- }, null, 8, de)) : $("v-if", !0)
262
+ }, null, 8, de)) : b("v-if", !0)
255
263
  ],
256
264
  6
257
265
  /* CLASS, STYLE */
@@ -266,10 +274,10 @@ const ne = B(re), ie = { class: "inline-block ik-svg-icon ik-icon line-height-[0
266
274
  }), E = B(pe), ge = (l) => (W("data-v-bbc42bc9"), l = l(), q(), l), ve = {
267
275
  key: 0,
268
276
  class: "preview-files"
269
- }, me = {
277
+ }, ye = {
270
278
  class: "flex",
271
279
  style: { width: "80%", "align-items": "center" }
272
- }, ye = ["onClick"], he = ["title"], ke = { style: { color: "#b8c6d9" } }, _e = ["onClick"], be = /* @__PURE__ */ ge(() => /* @__PURE__ */ p(
280
+ }, me = ["onClick"], he = ["title"], ke = { style: { color: "#b8c6d9" } }, _e = ["onClick"], be = /* @__PURE__ */ ge(() => /* @__PURE__ */ p(
273
281
  "span",
274
282
  null,
275
283
  "预览",
@@ -316,36 +324,36 @@ const ne = B(re), ie = { class: "inline-block ik-svg-icon ik-icon line-height-[0
316
324
  const e = l, r = _(e.fileList);
317
325
  P(
318
326
  () => e.fileList,
319
- (t) => {
320
- t && (r.value = t);
327
+ (i) => {
328
+ i && (r.value = i);
321
329
  },
322
330
  { immediate: !0 }
323
331
  );
324
- const n = _(!1), o = _({}), c = (t) => {
332
+ const n = _(!1), o = _({}), c = (i) => {
325
333
  o.value = {
326
- id: t.ossFileId || t.url,
327
- name: `${t.id}.${t.suffix}`
334
+ id: i.ossFileId || i.url,
335
+ name: `${i.id}.${i.suffix}`
328
336
  // row.originName
329
337
  }, 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) => {
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
345
  const f = document.createElement("a");
338
- f.href = loadUrl + t.ossFileId, f.download = t.originName, f.click();
346
+ f.href = loadUrl + i.ossFileId, f.download = i.originName, f.click();
339
347
  };
340
- return (t, f) => {
341
- var v, m;
342
- const y = N("el-image");
348
+ return (i, f) => {
349
+ var v, y;
350
+ const m = N("el-image");
343
351
  return s(), a("div", null, [
344
352
  e.fileType === "file" ? (s(), a("div", ve, [
345
353
  (s(!0), a(
346
354
  z,
347
355
  null,
348
- I(r.value, (i, C) => (s(), a(
356
+ I(r.value, (t, C) => (s(), a(
349
357
  "div",
350
358
  {
351
359
  key: C,
@@ -356,33 +364,33 @@ const ne = B(re), ie = { class: "inline-block ik-svg-icon ik-icon line-height-[0
356
364
  })
357
365
  },
358
366
  [
359
- p("div", me, [
360
- w(x(E), {
361
- name: u(i),
362
- style: h(`color:${g(i)}`),
367
+ p("div", ye, [
368
+ x($(E), {
369
+ name: u(t),
370
+ style: h(`color:${g(t)}`),
363
371
  size: 36
364
372
  }, null, 8, ["name", "style"]),
365
373
  p("div", {
366
374
  class: "file-name",
367
- onClick: (O) => L(i)
375
+ onClick: (O) => L(t)
368
376
  }, [
369
377
  p("p", {
370
- title: i.originName
371
- }, A(i.originName), 9, he),
378
+ title: t.originName
379
+ }, A(t.originName), 9, he),
372
380
  p(
373
381
  "p",
374
382
  ke,
375
- A((i.fileSize / 1024).toFixed(2)) + "KB",
383
+ A((t.fileSize / 1024).toFixed(2)) + "KB",
376
384
  1
377
385
  /* TEXT */
378
386
  )
379
- ], 8, ye)
387
+ ], 8, me)
380
388
  ]),
381
389
  p("div", {
382
390
  class: "file-preview",
383
- onClick: (O) => c(i)
391
+ onClick: (O) => c(t)
384
392
  }, [
385
- w(x(E), { name: "iksvg_yulan" }),
393
+ x($(E), { name: "iksvg_yulan" }),
386
394
  be
387
395
  ], 8, _e)
388
396
  ],
@@ -392,33 +400,33 @@ 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),
403
+ ])) : b("v-if", !0),
396
404
  e.fileType === "img" ? (s(), a("div", we, [
397
405
  (s(!0), a(
398
406
  z,
399
407
  null,
400
- I(r.value, (i, C) => (s(), a("div", {
408
+ I(r.value, (t, C) => (s(), a("div", {
401
409
  key: C,
402
410
  class: "preview-img"
403
411
  }, [
404
- w(y, {
412
+ x(m, {
405
413
  class: "show-img",
406
- src: l.loadUrl + i.url,
407
- "preview-src-list": [l.loadUrl + i.url],
414
+ src: l.loadUrl + t.url,
415
+ "preview-src-list": [l.loadUrl + t.url],
408
416
  fit: "cover"
409
417
  }, null, 8, ["src", "preview-src-list"])
410
418
  ]))),
411
419
  128
412
420
  /* KEYED_FRAGMENT */
413
421
  ))
414
- ])) : $("v-if", !0),
415
- w(x(ne), {
422
+ ])) : b("v-if", !0),
423
+ x($(ne), {
416
424
  modelValue: n.value,
417
- "onUpdate:modelValue": f[0] || (f[0] = (i) => n.value = i),
425
+ "onUpdate:modelValue": f[0] || (f[0] = (t) => n.value = t),
418
426
  "load-url": e.urlPreview,
419
427
  url: (v = o.value) == null ? void 0 : v.id,
420
428
  "kk-url": l.previewUrl,
421
- "file-name": (m = o.value) == null ? void 0 : m.name
429
+ "file-name": (y = o.value) == null ? void 0 : y.name
422
430
  }, null, 8, ["modelValue", "load-url", "url", "kk-url", "file-name"])
423
431
  ]);
424
432
  };
@@ -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("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,28 +1,28 @@
1
- import { defineComponent as g, computed as m, resolveComponent as k, openBlock as s, createElementBlock as l, normalizeClass as c, normalizeStyle as u, createElementVNode as p, createCommentVNode as d, createBlock as f, withCtx as y, toDisplayString as v, unref as w } from "vue";
1
+ import { defineComponent as g, computed as m, resolveComponent as k, openBlock as s, createElementBlock as a, normalizeClass as u, normalizeStyle as p, createCommentVNode as l, createElementVNode as d, createBlock as f, withCtx as y, toDisplayString as v, unref as w } from "vue";
2
2
  import { ikColor as b } from "iking-utils-pro";
3
- const h = (t, o) => {
4
- if (t.install = (n) => {
5
- for (const i of [t, ...Object.values(o ?? {})])
6
- n.component(i.name, i);
3
+ const h = (n, o) => {
4
+ if (n.install = (i) => {
5
+ for (const t of [n, ...Object.values(o ?? {})])
6
+ i.component(t.name, t);
7
7
  }, o)
8
- for (const [n, i] of Object.entries(o))
9
- t[n] = i;
10
- return t;
11
- };
12
- const z = (t, o) => {
13
- const n = t.__vccOpts || t;
14
- for (const [i, e] of o)
15
- n[i] = e;
8
+ for (const [i, t] of Object.entries(o))
9
+ n[i] = t;
16
10
  return n;
17
- }, _ = { class: "inline-block ik-svg-icon ik-icon line-height-[0] inline-flex justify-center" }, C = {
11
+ };
12
+ const z = (n, o) => {
13
+ const i = n.__vccOpts || n;
14
+ for (const [t, e] of o)
15
+ i[t] = e;
16
+ return i;
17
+ }, B = { class: "ik-svg-icon ik-icon inline-block inline-flex justify-center line-height-[0]" }, C = {
18
18
  key: 1,
19
19
  class: "h-[1em] w-[1em]",
20
20
  "aria-hidden": "true"
21
- }, B = ["xlink:href"], I = ["src"], S = {
21
+ }, I = ["xlink:href"], _ = ["src"], S = {
22
22
  key: 1,
23
23
  class: "h-[1em] w-[1em]",
24
24
  "aria-hidden": "true"
25
- }, $ = ["xlink:href"], E = ["src"], j = /* @__PURE__ */ g({
25
+ }, $ = ["xlink:href"], E = ["src"], T = /* @__PURE__ */ g({
26
26
  name: "IkSvgIcon",
27
27
  __name: "index",
28
28
  props: {
@@ -35,6 +35,7 @@ const z = (t, o) => {
35
35
  bg: { type: Boolean, default: !1 },
36
36
  showBg: { type: Boolean, default: !1 },
37
37
  padding: { default: "0" },
38
+ primary: { type: Boolean },
38
39
  warning: { type: Boolean },
39
40
  notip: { type: Boolean, default: !1 },
40
41
  title: {},
@@ -42,11 +43,11 @@ const z = (t, o) => {
42
43
  active: { type: Boolean, default: !1 },
43
44
  disabled: { type: Boolean, default: !1 }
44
45
  },
45
- setup(t) {
46
- const o = t, n = m(() => {
47
- var e, a;
48
- return /^http?:\/\//.test(o.name) ? "img" : /i-[^:]+:[^:]+/.test(o.name) ? "unocss" : (e = o.name) != null && e.startsWith("iksig") ? "iksig" : (a = o.name) != null && a.includes(":") ? "iconify" : "svg";
49
- }), i = m(() => {
46
+ setup(n) {
47
+ const o = n, i = m(() => {
48
+ var e, r;
49
+ return /^http?:\/\//.test(o.name) ? "img" : /i-[^:]+:[^:]+/.test(o.name) ? "unocss" : (e = o.name) != null && e.startsWith("iksig") ? "iksig" : (r = o.name) != null && r.includes(":") ? "iconify" : "svg";
50
+ }), t = m(() => {
50
51
  const e = [];
51
52
  if (o.flip)
52
53
  switch (o.flip) {
@@ -65,11 +66,11 @@ const z = (t, o) => {
65
66
  ...o.size && { fontSize: typeof o.size == "number" ? `${o.size}px` : o.size },
66
67
  ...e.length && { transform: e.join(" ") },
67
68
  padding: o.padding,
68
- ...o.color && n.value !== "iksig" ? {
69
+ ...o.color && i.value !== "iksig" ? {
69
70
  "--ik-color-icon-dark": o.color,
70
71
  "--ik-color-icon-light": b.setOpacity(o.color, o.opacity || 0.4)
71
72
  } : {},
72
- ...o.type === "primary" ? {
73
+ ...o.type === "primary" || o.primary ? {
73
74
  "--ik-color-icon-dark": "var(--ik-theme-color)",
74
75
  "--ik-color-icon-light": "var(--ik-color-icon-light-hover)",
75
76
  "--ik-color-bg-icon": "var(--ik-color-bg-button-secondary)"
@@ -80,84 +81,91 @@ const z = (t, o) => {
80
81
  } : {}
81
82
  };
82
83
  });
83
- return (e, a) => {
84
- const r = k("el-tooltip");
85
- return s(), l("span", _, [
86
- e.notip || !e.title ? (s(), l(
84
+ return (e, r) => {
85
+ const c = k("el-tooltip");
86
+ return s(), a("span", B, [
87
+ e.notip || !e.title ? (s(), a(
87
88
  "i",
88
89
  {
89
90
  key: 0,
90
- class: c(["relative h-[1em] w-[1em] flex-inline items-center justify-center fill-current leading-[1em] transition", {
91
- [e.name]: n.value === "unocss",
91
+ class: u(["ik-svg-icon ik-icon relative h-[1em] w-[1em] inline-flex items-center justify-center fill-current leading-[1em] transition", {
92
+ [e.name]: i.value === "unocss",
92
93
  "show-bg": e.showBg || e.bg,
93
94
  default: e.size === "default",
94
95
  small: e.size === "small",
95
96
  big: e.size === "big",
96
- warning: e.warning
97
+ warning: e.warning,
98
+ primary: e.primary,
99
+ active: e.active,
100
+ disabled: e.disabled
97
101
  }]),
98
- style: u(i.value)
102
+ style: p(t.value)
99
103
  },
100
104
  [
101
- n.value === "iksig" ? (s(), l(
105
+ l(` <Icon v-if="outputType === 'iconify'" :icon="name" /> `),
106
+ i.value === "iksig" ? (s(), a(
102
107
  "i",
103
108
  {
104
109
  key: 0,
105
- class: c(`iksig ${e.name}`),
106
- style: u(i.value)
110
+ class: u(`iksig ${e.name}`),
111
+ style: p(t.value)
107
112
  },
108
113
  null,
109
114
  6
110
115
  /* CLASS, STYLE */
111
- )) : n.value === "svg" ? (s(), l("svg", C, [
112
- p("use", {
116
+ )) : i.value === "svg" ? (s(), a("svg", C, [
117
+ d("use", {
113
118
  "xlink:href": `#${e.name}`
114
- }, null, 8, B)
115
- ])) : n.value === "img" ? (s(), l("img", {
119
+ }, null, 8, I)
120
+ ])) : i.value === "img" ? (s(), a("img", {
116
121
  key: 2,
117
122
  src: e.name,
118
123
  class: "h-[1em] w-[1em]"
119
- }, null, 8, I)) : d("v-if", !0)
124
+ }, null, 8, _)) : l("v-if", !0)
120
125
  ],
121
126
  6
122
127
  /* CLASS, STYLE */
123
- )) : (s(), f(r, {
128
+ )) : (s(), f(c, {
124
129
  key: 1,
125
- content: e.title
130
+ content: e.title,
131
+ placement: "right"
126
132
  }, {
127
133
  default: y(() => [
128
- p(
134
+ d(
129
135
  "i",
130
136
  {
131
- class: c(["ik-svg-icon ik-icon relative h-[1em] w-[1em] flex-inline items-center justify-center fill-current leading-[1em] transition", {
132
- [e.name]: n.value === "unocss",
137
+ class: u(["ik-svg-icon ik-icon relative h-[1em] w-[1em] inline-flex items-center justify-center fill-current leading-[1em] transition", {
138
+ [e.name]: i.value === "unocss",
133
139
  "show-bg": e.showBg || e.bg,
134
140
  default: e.size === "default",
141
+ primary: e.primary,
135
142
  small: e.size === "small",
136
143
  big: e.size === "big",
137
- warning: e.warning
144
+ warning: e.warning,
145
+ active: e.active
138
146
  }]),
139
- style: u(i.value)
147
+ style: p(t.value)
140
148
  },
141
149
  [
142
- n.value === "iksig" ? (s(), l(
150
+ i.value === "iksig" ? (s(), a(
143
151
  "i",
144
152
  {
145
153
  key: 0,
146
- class: c(`iksig ${e.name}`),
147
- style: u(i.value)
154
+ class: u(`iksig ${e.name}`),
155
+ style: p(t.value)
148
156
  },
149
157
  null,
150
158
  6
151
159
  /* CLASS, STYLE */
152
- )) : n.value === "svg" ? (s(), l("svg", S, [
153
- p("use", {
160
+ )) : i.value === "svg" ? (s(), a("svg", S, [
161
+ d("use", {
154
162
  "xlink:href": `#${e.name}`
155
163
  }, null, 8, $)
156
- ])) : n.value === "img" ? (s(), l("img", {
164
+ ])) : i.value === "img" ? (s(), a("img", {
157
165
  key: 2,
158
166
  src: e.name,
159
167
  class: "h-[1em] w-[1em]"
160
- }, null, 8, E)) : d("v-if", !0)
168
+ }, null, 8, E)) : l("v-if", !0)
161
169
  ],
162
170
  6
163
171
  /* CLASS, STYLE */
@@ -169,7 +177,7 @@ const z = (t, o) => {
169
177
  ]);
170
178
  };
171
179
  }
172
- }), T = h(j), N = {
180
+ }), j = h(T), N = {
173
181
  key: 0,
174
182
  class: ""
175
183
  }, O = /* @__PURE__ */ g({
@@ -191,25 +199,25 @@ const z = (t, o) => {
191
199
  }
192
200
  },
193
201
  emits: ["handleChangStatus"],
194
- setup(t, { emit: o }) {
195
- const n = t, i = o, e = () => {
196
- i("handleChangStatus");
202
+ setup(n, { emit: o }) {
203
+ const i = n, t = o, e = () => {
204
+ t("handleChangStatus");
197
205
  };
198
- return (a, r) => (s(), l("div", {
206
+ return (r, c) => (s(), a("div", {
199
207
  class: "words-color",
200
- onClick: r[0] || (r[0] = (V) => e())
208
+ onClick: c[0] || (c[0] = (V) => e())
201
209
  }, [
202
- n.showType === "word" || n.showType === "wordIcon" ? (s(), l(
210
+ i.showType === "word" || i.showType === "wordIcon" ? (s(), a(
203
211
  "span",
204
212
  N,
205
- v(t.isExpand ? t.wordName || "收起" : t.wordName || "展开"),
213
+ v(n.isExpand ? n.wordName || "收起" : n.wordName || "展开"),
206
214
  1
207
215
  /* TEXT */
208
- )) : d("v-if", !0),
209
- n.showType === "icon" || n.showType === "wordIcon" ? (s(), f(w(T), {
216
+ )) : l("v-if", !0),
217
+ i.showType === "icon" || i.showType === "wordIcon" ? (s(), f(w(j), {
210
218
  key: 1,
211
- name: t.isExpand ? "iksvg_zhankai" : "iksvg_shouqi"
212
- }, null, 8, ["name"])) : d("v-if", !0)
219
+ name: n.isExpand ? "iksvg_zhankai" : "iksvg_shouqi"
220
+ }, null, 8, ["name"])) : l("v-if", !0)
213
221
  ]));
214
222
  }
215
223
  });