iking-web-ui-pro 0.2.19 → 0.2.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
- import { defineComponent as $, openBlock as u, createElementBlock as r, createElementVNode as o, inject as C, computed as y, resolveComponent as H, normalizeClass as b, normalizeStyle as z, createCommentVNode as M, createBlock as E, withCtx as m, createTextVNode as R, toDisplayString as U, mergeModels as F, useModel as ue, watch as re, ref as S, Fragment as N, createVNode as _, unref as p, mergeProps as ce, createSlots as de, renderSlot as ve, withDirectives as O, vShow as P, renderList as pe, pushScopeId as _e, popScopeId as he } from "vue";
2
- import { ElUpload as ge, ElIcon as x, ElImage as fe, ElImageViewer as me, ElMessage as W } from "element-plus";
3
- import { ikColor as ye, _ as we, ikFile as ke } from "iking-utils-pro";
4
- const G = (l, c) => {
1
+ import { defineComponent as $, openBlock as u, createElementBlock as r, createElementVNode as o, inject as B, computed as h, resolveComponent as W, normalizeClass as k, normalizeStyle as z, createCommentVNode as V, createBlock as H, withCtx as f, createTextVNode as J, toDisplayString as U, mergeModels as F, useCssVars as ce, useModel as de, watch as pe, ref as M, Fragment as O, createVNode as _, unref as v, mergeProps as ve, createSlots as _e, renderSlot as he, withDirectives as P, vShow as R, renderList as ge, pushScopeId as fe, popScopeId as me } from "vue";
2
+ import { ElUpload as ye, ElIcon as C, ElImage as we, ElImageViewer as ke, ElMessage as G } from "element-plus";
3
+ import { ikColor as be, _ as ze, ikFile as $e } from "iking-utils-pro";
4
+ const X = (l, c) => {
5
5
  if (l.install = (i) => {
6
6
  for (const e of [l, ...Object.values(c ?? {})])
7
7
  i.component(e.name, e);
@@ -11,7 +11,7 @@ const G = (l, c) => {
11
11
  return l;
12
12
  };
13
13
  /*! Element Plus Icons Vue v2.3.1 */
14
- var be = /* @__PURE__ */ $({
14
+ var xe = /* @__PURE__ */ $({
15
15
  name: "Close",
16
16
  __name: "close",
17
17
  setup(l) {
@@ -25,7 +25,7 @@ var be = /* @__PURE__ */ $({
25
25
  })
26
26
  ]));
27
27
  }
28
- }), ze = be, $e = /* @__PURE__ */ $({
28
+ }), Ce = xe, Be = /* @__PURE__ */ $({
29
29
  name: "Delete",
30
30
  __name: "delete",
31
31
  setup(l) {
@@ -39,7 +39,7 @@ var be = /* @__PURE__ */ $({
39
39
  })
40
40
  ]));
41
41
  }
42
- }), xe = $e, Ce = /* @__PURE__ */ $({
42
+ }), Ie = Be, Le = /* @__PURE__ */ $({
43
43
  name: "Download",
44
44
  __name: "download",
45
45
  setup(l) {
@@ -53,7 +53,7 @@ var be = /* @__PURE__ */ $({
53
53
  })
54
54
  ]));
55
55
  }
56
- }), Be = Ce, Ie = /* @__PURE__ */ $({
56
+ }), Se = Le, Me = /* @__PURE__ */ $({
57
57
  name: "Refresh",
58
58
  __name: "refresh",
59
59
  setup(l) {
@@ -67,7 +67,7 @@ var be = /* @__PURE__ */ $({
67
67
  })
68
68
  ]));
69
69
  }
70
- }), Le = Ie, Se = /* @__PURE__ */ $({
70
+ }), Ve = Me, Ue = /* @__PURE__ */ $({
71
71
  name: "ZoomIn",
72
72
  __name: "zoom-in",
73
73
  setup(l) {
@@ -81,13 +81,13 @@ var be = /* @__PURE__ */ $({
81
81
  })
82
82
  ]));
83
83
  }
84
- }), Me = Se;
85
- const D = (l, c) => {
84
+ }), je = Ue;
85
+ const N = (l, c) => {
86
86
  const i = l.__vccOpts || l;
87
87
  for (const [e, d] of c)
88
88
  i[e] = d;
89
89
  return i;
90
- }, Ue = {}, Ve = {
90
+ }, Ee = {}, De = {
91
91
  t: "1686214149488",
92
92
  class: "icon",
93
93
  viewBox: "0 0 1024 1024",
@@ -96,7 +96,7 @@ const D = (l, c) => {
96
96
  "p-id": "8490",
97
97
  width: "200",
98
98
  height: "200"
99
- }, je = /* @__PURE__ */ o(
99
+ }, He = /* @__PURE__ */ o(
100
100
  "path",
101
101
  {
102
102
  d: "M369.569592 512.011256c0-14.328333-11.010775-25.945929-24.591071-25.945929L86.980515 486.065328c-13.580297 0-24.591071 11.618619-24.591071 25.945929 0 14.33038 11.010775 25.947975 24.591071 25.947975l257.998005 0C358.55984 537.959232 369.569592 526.341636 369.569592 512.011256z",
@@ -105,7 +105,7 @@ const D = (l, c) => {
105
105
  null,
106
106
  -1
107
107
  /* HOISTED */
108
- ), Ee = /* @__PURE__ */ o(
108
+ ), Ne = /* @__PURE__ */ o(
109
109
  "path",
110
110
  {
111
111
  d: "M937.019485 486.064304 679.020456 486.064304c-13.580297 0-24.591071 11.618619-24.591071 25.945929 0 14.33038 11.010775 25.947975 24.591071 25.947975l257.999029 0c13.580297 0 24.590048-11.618619 24.590048-25.947975C961.609533 497.682923 950.598758 486.064304 937.019485 486.064304z",
@@ -114,7 +114,7 @@ const D = (l, c) => {
114
114
  null,
115
115
  -1
116
116
  /* HOISTED */
117
- ), De = /* @__PURE__ */ o(
117
+ ), Te = /* @__PURE__ */ o(
118
118
  "path",
119
119
  {
120
120
  d: "M512.011768 62.389956c-13.580297 0-24.590048 11.618619-24.590048 25.945929l0 257.170151c0 14.329357 11.010775 25.946952 24.590048 25.946952s24.591071-11.618619 24.591071-25.946952L536.602839 88.335884C536.602839 74.008574 525.591041 62.389956 512.011768 62.389956z",
@@ -123,7 +123,7 @@ const D = (l, c) => {
123
123
  null,
124
124
  -1
125
125
  /* HOISTED */
126
- ), Te = /* @__PURE__ */ o(
126
+ ), Ae = /* @__PURE__ */ o(
127
127
  "path",
128
128
  {
129
129
  d: "M512.011768 652.544967c-13.580297 0-24.590048 11.618619-24.590048 25.946952l0 257.169127c0 14.33038 11.010775 25.947975 24.590048 25.947975s24.591071-11.618619 24.591071-25.947975L536.602839 678.491918C536.602839 664.162562 525.591041 652.544967 512.011768 652.544967z",
@@ -132,7 +132,7 @@ const D = (l, c) => {
132
132
  null,
133
133
  -1
134
134
  /* HOISTED */
135
- ), Ae = /* @__PURE__ */ o(
135
+ ), We = /* @__PURE__ */ o(
136
136
  "path",
137
137
  {
138
138
  d: "M377.001865 413.125085c4.744048 4.737908 10.818393 7.082302 16.882506 7.082302 6.519484 0 13.039991-2.724041 17.879206-8.134261 9.317203-10.414187 8.885368-26.834158-0.9967-36.678364L228.341057 193.559391c-9.832949-9.830903-25.406646-9.388834-34.760688 1.050935-9.317203 10.414187-8.885368 26.834158 0.9967 36.678364L377.001865 413.125085z",
@@ -141,7 +141,7 @@ const D = (l, c) => {
141
141
  null,
142
142
  -1
143
143
  /* HOISTED */
144
- ), He = /* @__PURE__ */ o(
144
+ ), Fe = /* @__PURE__ */ o(
145
145
  "path",
146
146
  {
147
147
  d: "M646.997112 610.873892c-9.846252-9.831926-25.419949-9.388834-34.761712 1.051959-9.317203 10.414187-8.885368 26.834158 0.997724 36.678364l182.41354 181.834348c4.743024 4.738931 10.818393 7.083326 16.881482 7.083326 6.520507 0 13.039991-2.723018 17.879206-8.134261 9.317203-10.41521 8.886391-26.834158-0.9967-36.678364L646.997112 610.873892z",
@@ -150,7 +150,7 @@ const D = (l, c) => {
150
150
  null,
151
151
  -1
152
152
  /* HOISTED */
153
- ), Fe = /* @__PURE__ */ o(
153
+ ), Oe = /* @__PURE__ */ o(
154
154
  "path",
155
155
  {
156
156
  d: "M630.114606 420.207387c6.064113 0 12.139481-2.344395 16.882506-7.082302l182.425819-181.836395c9.882068-9.844206 10.313903-26.264177 0.9967-36.678364-9.341762-10.43977-24.915459-10.882861-34.760688-1.050935L613.233124 375.394762c-9.882068 9.844206-10.314926 26.264177-0.997724 36.678364C617.074615 417.483346 623.595123 420.207387 630.114606 420.207387z",
@@ -159,7 +159,7 @@ const D = (l, c) => {
159
159
  null,
160
160
  -1
161
161
  /* HOISTED */
162
- ), Ne = /* @__PURE__ */ o(
162
+ ), Pe = /* @__PURE__ */ o(
163
163
  "path",
164
164
  {
165
165
  d: "M377.025401 610.873892 194.600605 792.710286c-9.881045 9.844206-10.313903 26.263154-0.9967 36.678364 4.839215 5.411243 11.358699 8.134261 17.879206 8.134261 6.064113 0 12.138458-2.344395 16.881482-7.083326l182.425819-181.834348c9.881045-9.844206 10.313903-26.264177 0.9967-36.678364C402.469909 601.485057 386.872676 601.041966 377.025401 610.873892z",
@@ -168,40 +168,40 @@ const D = (l, c) => {
168
168
  null,
169
169
  -1
170
170
  /* HOISTED */
171
- ), Oe = [
172
- je,
173
- Ee,
174
- De,
171
+ ), Re = [
172
+ He,
173
+ Ne,
175
174
  Te,
176
175
  Ae,
177
- He,
176
+ We,
178
177
  Fe,
179
- Ne
178
+ Oe,
179
+ Pe
180
180
  ];
181
- function Pe(l, c) {
182
- return u(), r("svg", Ve, Oe);
181
+ function Ge(l, c) {
182
+ return u(), r("svg", De, Re);
183
183
  }
184
- const We = /* @__PURE__ */ D(Ue, [["render", Pe]]), Re = (l) => {
185
- const c = C("loadUrl"), i = y(() => l.loadUrl || l.fileUrl || (c == null ? void 0 : c.value)), e = C("uploadUrl"), d = y(() => l.action || l.uploadUrl || (e == null ? void 0 : e.value)), h = C("token"), n = y(() => l.token || (h == null ? void 0 : h.value)), w = C("onlyofficeConfig"), B = y(() => l.onlyofficeConfig || (w == null ? void 0 : w.value)), g = C("userInfo"), f = y(() => l.userInfo || (g == null ? void 0 : g.value));
184
+ const Je = /* @__PURE__ */ N(Ee, [["render", Ge]]), Xe = (l) => {
185
+ const c = B("loadUrl"), i = h(() => l.loadUrl || l.fileUrl || (c == null ? void 0 : c.value)), e = B("uploadUrl"), d = h(() => l.action || l.uploadUrl || (e == null ? void 0 : e.value)), g = B("token"), n = h(() => l.token || (g == null ? void 0 : g.value)), m = B("onlyofficeConfig"), I = h(() => l.onlyofficeConfig || (m == null ? void 0 : m.value)), b = B("userInfo"), j = h(() => l.userInfo || (b == null ? void 0 : b.value));
186
186
  return {
187
187
  cLoadUrl: i,
188
188
  cUploadUrl: d,
189
189
  cToken: n,
190
- cOnlyofficeConfig: B,
191
- cUserInfo: f
190
+ cOnlyofficeConfig: I,
191
+ cUserInfo: j
192
192
  };
193
- }, Ge = Re, Je = {
193
+ }, Ye = Xe, Ze = {
194
194
  key: 0,
195
195
  class: "ik-svg-icon ik-icon-span inline-block inline-flex justify-center box-content line-height-[0]"
196
- }, Xe = {
196
+ }, qe = {
197
197
  key: 1,
198
198
  class: "h-[1em] w-[1em]",
199
199
  "aria-hidden": "true"
200
- }, Ye = ["xlink:href"], Ze = ["src"], qe = {
200
+ }, Ke = ["xlink:href"], Qe = ["src"], et = {
201
201
  key: 1,
202
202
  class: "h-[1em] w-[1em]",
203
203
  "aria-hidden": "true"
204
- }, Ke = ["xlink:href"], Qe = ["src"], et = /* @__PURE__ */ $({
204
+ }, tt = ["xlink:href"], lt = ["src"], at = /* @__PURE__ */ $({
205
205
  name: "IkSvgIcon",
206
206
  __name: "index",
207
207
  props: {
@@ -228,13 +228,13 @@ const We = /* @__PURE__ */ D(Ue, [["render", Pe]]), Re = (l) => {
228
228
  width: {}
229
229
  },
230
230
  setup(l) {
231
- const c = l, i = C("iconConfig"), e = y(() => ({
231
+ const c = l, i = B("iconConfig"), e = h(() => ({
232
232
  ...(i == null ? void 0 : i.value) || {},
233
233
  ...c
234
- })), d = y(() => {
234
+ })), d = h(() => {
235
235
  const { name: n } = e.value;
236
236
  return /^http?:\/\//.test(n) ? "img" : /i-[^:]+:[^:]+/.test(n) ? "unocss" : n != null && n.startsWith("iksig") ? "iksig" : n != null && n.includes(":") ? "iconify" : n != null && n.startsWith("iksvg") ? "svg" : "i";
237
- }), h = y(() => {
237
+ }), g = h(() => {
238
238
  const n = [];
239
239
  if (e.value.flip)
240
240
  switch (e.value.flip) {
@@ -249,26 +249,26 @@ const We = /* @__PURE__ */ D(Ue, [["render", Pe]]), Re = (l) => {
249
249
  break;
250
250
  }
251
251
  e.value.rotate && n.push(`rotate(${e.value.rotate % 360}deg)`);
252
- const w = {
252
+ const m = {
253
253
  ...e.value.color && { color: e.value.color },
254
254
  ...e.value.size && { fontSize: typeof e.value.size == "number" ? `${e.value.size}px` : e.value.size },
255
255
  ...n.length && { transform: n.join(" ") },
256
256
  padding: e.value.showBg || e.value.bg ? e.value.padding : 0,
257
257
  ...e.value.color && d.value !== "iksig" ? {
258
258
  "--ik-color-icon-dark": e.value.color,
259
- "--ik-color-icon-light": e.value.colorLight || ye.setOpacity(e.value.color, e.value.opacity)
259
+ "--ik-color-icon-light": e.value.colorLight || be.setOpacity(e.value.color, e.value.opacity)
260
260
  } : {}
261
261
  };
262
- return e.value.width && (w.width = w.height = typeof e.value.width == "number" ? `${e.value.width}px` : e.value.width), w;
262
+ return e.value.width && (m.width = m.height = typeof e.value.width == "number" ? `${e.value.width}px` : e.value.width), m;
263
263
  });
264
- return (n, w) => {
265
- const B = H("el-tooltip"), g = H("el-button");
266
- return e.value.tableIconType === "icon" || !e.value.tableIconType ? (u(), r("span", Je, [
264
+ return (n, m) => {
265
+ const I = W("el-tooltip"), b = W("el-button");
266
+ return e.value.tableIconType === "icon" || !e.value.tableIconType ? (u(), r("span", Ze, [
267
267
  e.value.notip || !e.value.title ? (u(), r(
268
268
  "i",
269
269
  {
270
270
  key: 0,
271
- class: b(["ik-svg-icon ik-icon relative h-[1em] w-[1em] inline-flex items-center justify-center fill-current leading-[1em] transition", {
271
+ class: k(["ik-svg-icon ik-icon relative h-[1em] w-[1em] inline-flex items-center justify-center fill-current leading-[1em] transition", {
272
272
  [n.name]: d.value === "unocss",
273
273
  "show-bg": e.value.showBg || e.value.bg,
274
274
  default: e.value.size === "default",
@@ -281,34 +281,34 @@ const We = /* @__PURE__ */ D(Ue, [["render", Pe]]), Re = (l) => {
281
281
  active: e.value.active,
282
282
  disabled: e.value.disabled
283
283
  }]),
284
- style: z(h.value)
284
+ style: z(g.value)
285
285
  },
286
286
  [
287
- M(` <Icon v-if="outputType === 'iconify'" :icon="name" /> `),
287
+ V(` <Icon v-if="outputType === 'iconify'" :icon="name" /> `),
288
288
  d.value === "iksig" ? (u(), r(
289
289
  "i",
290
290
  {
291
291
  key: 0,
292
- class: b(`iksig ${e.value.name}`),
293
- style: z(h.value)
292
+ class: k(`iksig ${e.value.name}`),
293
+ style: z(g.value)
294
294
  },
295
295
  null,
296
296
  6
297
297
  /* CLASS, STYLE */
298
- )) : d.value === "svg" ? (u(), r("svg", Xe, [
298
+ )) : d.value === "svg" ? (u(), r("svg", qe, [
299
299
  o("use", {
300
300
  "xlink:href": `#${e.value.name}`
301
- }, null, 8, Ye)
301
+ }, null, 8, Ke)
302
302
  ])) : d.value === "img" ? (u(), r("img", {
303
303
  key: 2,
304
304
  src: e.value.name,
305
305
  class: "h-[1em] w-[1em]"
306
- }, null, 8, Ze)) : (u(), r(
306
+ }, null, 8, Qe)) : (u(), r(
307
307
  "i",
308
308
  {
309
309
  key: 3,
310
- class: b(e.value.name),
311
- style: z(h.value)
310
+ class: k(e.value.name),
311
+ style: z(g.value)
312
312
  },
313
313
  null,
314
314
  6
@@ -317,16 +317,16 @@ const We = /* @__PURE__ */ D(Ue, [["render", Pe]]), Re = (l) => {
317
317
  ],
318
318
  6
319
319
  /* CLASS, STYLE */
320
- )) : (u(), E(B, {
320
+ )) : (u(), H(I, {
321
321
  key: 1,
322
322
  content: e.value.title,
323
323
  placement: "top"
324
324
  }, {
325
- default: m(() => [
325
+ default: f(() => [
326
326
  o(
327
327
  "i",
328
328
  {
329
- class: b(["ik-svg-icon ik-icon relative h-[1em] w-[1em] inline-flex items-center justify-center fill-current leading-[1em] transition", {
329
+ class: k(["ik-svg-icon ik-icon relative h-[1em] w-[1em] inline-flex items-center justify-center fill-current leading-[1em] transition", {
330
330
  [n.name]: d.value === "unocss",
331
331
  "show-bg": e.value.showBg || e.value.bg,
332
332
  default: e.value.size === "default",
@@ -338,33 +338,33 @@ const We = /* @__PURE__ */ D(Ue, [["render", Pe]]), Re = (l) => {
338
338
  error: e.value.error || e.value.type === "error",
339
339
  active: e.value.active
340
340
  }]),
341
- style: z(h.value)
341
+ style: z(g.value)
342
342
  },
343
343
  [
344
344
  d.value === "iksig" ? (u(), r(
345
345
  "i",
346
346
  {
347
347
  key: 0,
348
- class: b(`iksig ${e.value.name}`),
349
- style: z(h.value)
348
+ class: k(`iksig ${e.value.name}`),
349
+ style: z(g.value)
350
350
  },
351
351
  null,
352
352
  6
353
353
  /* CLASS, STYLE */
354
- )) : d.value === "svg" ? (u(), r("svg", qe, [
354
+ )) : d.value === "svg" ? (u(), r("svg", et, [
355
355
  o("use", {
356
356
  "xlink:href": `#${e.value.name}`
357
- }, null, 8, Ke)
357
+ }, null, 8, tt)
358
358
  ])) : d.value === "img" ? (u(), r("img", {
359
359
  key: 2,
360
360
  src: e.value.name,
361
361
  class: "h-[1em] w-[1em]"
362
- }, null, 8, Qe)) : (u(), r(
362
+ }, null, 8, lt)) : (u(), r(
363
363
  "i",
364
364
  {
365
365
  key: 3,
366
- class: b(e.value.name),
367
- style: z(h.value)
366
+ class: k(e.value.name),
367
+ style: z(g.value)
368
368
  },
369
369
  null,
370
370
  6
@@ -378,12 +378,12 @@ const We = /* @__PURE__ */ D(Ue, [["render", Pe]]), Re = (l) => {
378
378
  _: 1
379
379
  /* STABLE */
380
380
  }, 8, ["content"]))
381
- ])) : (u(), E(g, {
381
+ ])) : (u(), H(b, {
382
382
  key: 1,
383
383
  type: ["warning", "error"].includes(e.value.type) ? "danger" : ""
384
384
  }, {
385
- default: m(() => [
386
- R(
385
+ default: f(() => [
386
+ J(
387
387
  U(e.value.title),
388
388
  1
389
389
  /* TEXT */
@@ -395,25 +395,25 @@ const We = /* @__PURE__ */ D(Ue, [["render", Pe]]), Re = (l) => {
395
395
  };
396
396
  }
397
397
  });
398
- const tt = /* @__PURE__ */ D(et, [["__scopeId", "data-v-ec9fdc8a"]]), lt = G(tt), J = (l) => (_e("data-v-3ef6eeda"), l = l(), he(), l), at = {
398
+ const st = /* @__PURE__ */ N(at, [["__scopeId", "data-v-ec9fdc8a"]]), ot = X(st), Y = (l) => (fe("data-v-d12a12c0"), l = l(), me(), l), nt = {
399
399
  key: 1,
400
400
  class: "upload-btn"
401
- }, st = { class: "tip" }, ot = { class: "loading-statu" }, nt = { class: "operate-btn" }, it = { key: 0 }, ut = {
401
+ }, it = { class: "tip" }, ut = { class: "loading-statu" }, rt = { class: "operate-btn" }, ct = { key: 0 }, dt = {
402
402
  class: "el-upload-list el-upload-list--picture-card",
403
403
  style: { float: "left" }
404
- }, rt = ["onClick"], ct = /* @__PURE__ */ J(() => /* @__PURE__ */ o(
404
+ }, pt = ["onClick"], vt = /* @__PURE__ */ Y(() => /* @__PURE__ */ o(
405
405
  "span",
406
406
  { class: "error" },
407
407
  "上传错误",
408
408
  -1
409
409
  /* HOISTED */
410
- )), dt = /* @__PURE__ */ J(() => /* @__PURE__ */ o(
410
+ )), _t = /* @__PURE__ */ Y(() => /* @__PURE__ */ o(
411
411
  "p",
412
412
  null,
413
413
  "点击重新上传",
414
414
  -1
415
415
  /* HOISTED */
416
- )), vt = ["src"], pt = { class: "demo-image__preview" }, _t = /* @__PURE__ */ $({
416
+ )), ht = ["src"], gt = { class: "demo-image__preview" }, ft = /* @__PURE__ */ $({
417
417
  __name: "index",
418
418
  props: /* @__PURE__ */ F({
419
419
  // 显示的文字
@@ -488,6 +488,16 @@ const tt = /* @__PURE__ */ D(et, [["__scopeId", "data-v-ec9fdc8a"]]), lt = G(tt)
488
488
  disabled: {
489
489
  type: Boolean,
490
490
  default: !1
491
+ },
492
+ // 展示宽度
493
+ width: {
494
+ type: Number,
495
+ default: 106
496
+ },
497
+ // 展示高度
498
+ height: {
499
+ type: Number,
500
+ default: 106
491
501
  }
492
502
  }, {
493
503
  modelValue: {
@@ -498,12 +508,16 @@ const tt = /* @__PURE__ */ D(et, [["__scopeId", "data-v-ec9fdc8a"]]), lt = G(tt)
498
508
  }),
499
509
  emits: /* @__PURE__ */ F(["delete", "success"], ["update:modelValue"]),
500
510
  setup(l, { emit: c }) {
501
- const i = l, e = ue(l, "modelValue"), d = (t) => Array.isArray(t) ? t.map((a) => {
502
- var k, L;
503
- const s = ((k = a.url) == null ? void 0 : k.startsWith("http")) || ((L = a.url) == null ? void 0 : L.startsWith("blob")), v = (a == null ? void 0 : a.url) || a;
511
+ ce((t) => ({
512
+ "48c07ec5": I.value,
513
+ "94ff3ff0": b.value
514
+ }));
515
+ const i = l, e = de(l, "modelValue"), d = (t) => Array.isArray(t) ? t.map((a) => {
516
+ var w, S;
517
+ const s = ((w = a.url) == null ? void 0 : w.startsWith("http")) || ((S = a.url) == null ? void 0 : S.startsWith("blob")), p = (a == null ? void 0 : a.url) || a;
504
518
  return {
505
- ...a.url ? a : { url: v },
506
- __url: s ? v : `${n.value}${v}`
519
+ ...a.url ? a : { url: p },
520
+ __url: s ? p : `${n.value}${p}`
507
521
  };
508
522
  }) : t ? [
509
523
  {
@@ -511,98 +525,98 @@ const tt = /* @__PURE__ */ D(et, [["__scopeId", "data-v-ec9fdc8a"]]), lt = G(tt)
511
525
  __url: t != null && t.startsWith("http") || t != null && t.startsWith("blob") ? t : `${n.value}${t}`
512
526
  }
513
527
  ] : [];
514
- re(
528
+ pe(
515
529
  () => e.value,
516
530
  (t) => {
517
- !t || !t.length ? f.value = [] : f.value = we.cloneDeep(d(t));
531
+ !t || !t.length ? y.value = [] : y.value = ze.cloneDeep(d(t));
518
532
  },
519
533
  { deep: !0 }
520
534
  );
521
- const h = c, { cLoadUrl: n, cUploadUrl: w } = Ge(i), B = y(() => i.size), g = S(null), f = S(d(e.value)), I = S([]), V = S(!1), T = S(0), X = y(
535
+ const g = c, { cLoadUrl: n, cUploadUrl: m } = Ye(i), I = h(() => `${i.width}px`), b = h(() => `${i.height}px`), j = h(() => i.size), x = M(null), y = M(d(e.value)), L = M([]), E = M(!1), T = M(0), Z = h(
522
536
  () => i.tipText || `最多可上传${i.limit}张图片, 每张图片不能超过${i.size}MB`
523
- ), Y = (t, a) => {
524
- }, Z = (t) => {
537
+ ), q = (t, a) => {
538
+ }, K = (t) => {
525
539
  if (!t.type.includes("image")) {
526
- W.warning("只允许上传图片!");
540
+ G.warning("只允许上传图片!");
527
541
  try {
528
- f.value.pop();
542
+ y.value.pop();
529
543
  } catch {
530
544
  }
531
545
  return !1;
532
546
  }
533
- if (!(t.size / 1024 / 1024 < B.value)) {
534
- W.warning("图片大小超出限制!");
547
+ if (!(t.size / 1024 / 1024 < j.value)) {
548
+ G.warning("图片大小超出限制!");
535
549
  try {
536
- f.value.pop();
550
+ y.value.pop();
537
551
  } catch {
538
552
  }
539
553
  return !1;
540
554
  }
541
555
  return !0;
542
- }, q = () => !1, K = (t, a) => {
543
- var s, v;
544
- t.status = "ready", a !== void 0 && I.value.splice(a, 1), (s = g.value) == null || s.handleStart(t.raw), (v = g.value) == null || v.submit();
545
- }, Q = (t, a) => {
546
- var L, A;
547
- const s = e.value.length, v = i.limit - s;
548
- let k = 0;
549
- for (; k < v && k < (t == null ? void 0 : t.length); )
550
- (L = g.value) == null || L.handleStart(t == null ? void 0 : t[k]), (A = g.value) == null || A.submit(), k++;
551
- }, ee = (t, a, s) => {
552
- h("success", t, a, s), e.value = f.value;
553
- }, te = (t, a, s) => {
554
- I.value.push({
556
+ }, Q = () => !1, ee = (t, a) => {
557
+ var s, p;
558
+ t.status = "ready", a !== void 0 && L.value.splice(a, 1), (s = x.value) == null || s.handleStart(t.raw), (p = x.value) == null || p.submit();
559
+ }, te = (t, a) => {
560
+ var S, A;
561
+ const s = e.value.length, p = i.limit - s;
562
+ let w = 0;
563
+ for (; w < p && w < (t == null ? void 0 : t.length); )
564
+ (S = x.value) == null || S.handleStart(t == null ? void 0 : t[w]), (A = x.value) == null || A.submit(), w++;
565
+ }, le = (t, a, s) => {
566
+ g("success", t, a, s), e.value = y.value;
567
+ }, ae = (t, a, s) => {
568
+ L.value.push({
555
569
  ...a,
556
570
  __url: a.url
557
571
  });
558
- }, le = (t) => {
559
- var a;
560
- V.value = !0, T.value = (a = e.value) == null ? void 0 : a.findIndex((s) => s.url === t.url);
561
- }, ae = (t) => {
562
- ke.downloadFile(t.__url || t.url, t.name || t.url);
563
572
  }, se = (t) => {
564
573
  var a;
565
- (a = g.value) == null || a.abort(t);
574
+ E.value = !0, T.value = (a = e.value) == null ? void 0 : a.findIndex((s) => s.url === t.url);
566
575
  }, oe = (t) => {
576
+ $e.downloadFile(t.__url || t.url, t.name || t.url);
577
+ }, ne = (t) => {
578
+ var a;
579
+ (a = x.value) == null || a.abort(t);
580
+ }, ie = (t) => {
567
581
  var a;
568
- t.status !== "success" && se(t), e.value = (a = f.value) == null ? void 0 : a.filter((s) => s.uid !== t.uid), h("delete", t);
569
- }, ne = (t, a) => {
570
- I.value.splice(a, 1);
571
- }, ie = y(() => f.value.length + I.value.length < i.limit), j = y(
582
+ t.status !== "success" && ne(t), e.value = (a = y.value) == null ? void 0 : a.filter((s) => s.uid !== t.uid), g("delete", t);
583
+ }, ue = (t, a) => {
584
+ L.value.splice(a, 1);
585
+ }, re = h(() => y.value.length + L.value.length < i.limit), D = h(
572
586
  () => e.value.length >= i.limit || i.disabled
573
587
  );
574
588
  return (t, a) => (u(), r(
575
- N,
589
+ O,
576
590
  null,
577
591
  [
578
- _(p(ge), ce({
579
- class: ["ik-image-upload", { preview: l.preview, "hide-upload": !ie.value, disabled: j.value }],
592
+ _(v(ye), ve({
593
+ class: ["ik-image-upload", { preview: l.preview, "hide-upload": !re.value, disabled: D.value }],
580
594
  ref_key: "refUpload",
581
- ref: g,
595
+ ref: x,
582
596
  "list-type": "picture-card",
583
597
  accept: l.accept,
584
- action: p(w),
598
+ action: v(m),
585
599
  headers: l.headers,
586
600
  data: l.data,
587
- "file-list": f.value,
588
- "onUpdate:fileList": a[0] || (a[0] = (s) => f.value = s),
601
+ "file-list": y.value,
602
+ "onUpdate:fileList": a[0] || (a[0] = (s) => y.value = s),
589
603
  multiple: l.multiple,
590
604
  limit: l.limit,
591
- "on-change": Y,
592
- "before-upload": Z,
593
- "before-remove": q,
594
- "on-exceed": Q,
595
- "on-success": ee,
596
- "on-error": te,
605
+ "on-change": q,
606
+ "before-upload": K,
607
+ "before-remove": Q,
608
+ "on-exceed": te,
609
+ "on-success": le,
610
+ "on-error": ae,
597
611
  drag: ""
598
- }, t.$attrs, { disabled: j.value }), de({
599
- trigger: m(() => [
600
- t.$slots.trigger ? ve(t.$slots, "trigger", { key: 0 }, void 0, !0) : (u(), r("div", at, [
601
- _(p(x), { size: 20 }, {
602
- default: m(() => [
603
- _(p(lt), {
612
+ }, t.$attrs, { disabled: D.value }), _e({
613
+ trigger: f(() => [
614
+ t.$slots.trigger ? he(t.$slots, "trigger", { key: 0 }, void 0, !0) : (u(), r("div", nt, [
615
+ _(v(C), { size: 20 }, {
616
+ default: f(() => [
617
+ _(v(ot), {
604
618
  name: "iksvg_guanbibeifen",
605
- disabled: j.value
619
+ disabled: D.value
606
620
  }, null, 8, ["disabled"])
607
621
  ]),
608
622
  _: 1
@@ -617,20 +631,20 @@ const tt = /* @__PURE__ */ D(et, [["__scopeId", "data-v-ec9fdc8a"]]), lt = G(tt)
617
631
  )
618
632
  ]))
619
633
  ]),
620
- file: m(({ file: s }) => [
634
+ file: f(({ file: s }) => [
621
635
  o(
622
636
  "div",
623
637
  {
624
- class: b(["load-list", { loading: s.status === "uploading" }]),
638
+ class: k(["load-list", { loading: s.status === "uploading" }]),
625
639
  "element-loading-background": "var(--ik-upload-bg)"
626
640
  },
627
641
  [
628
- O(o(
642
+ P(o(
629
643
  "div",
630
- ot,
644
+ ut,
631
645
  [
632
- _(We),
633
- R(
646
+ _(Je),
647
+ J(
634
648
  " 上传" + U(s.percentage) + "% ",
635
649
  1
636
650
  /* TEXT */
@@ -639,46 +653,46 @@ const tt = /* @__PURE__ */ D(et, [["__scopeId", "data-v-ec9fdc8a"]]), lt = G(tt)
639
653
  512
640
654
  /* NEED_PATCH */
641
655
  ), [
642
- [P, s.status === "uploading"]
656
+ [R, s.status === "uploading"]
643
657
  ]),
644
- M(` <img :src="file.url" alt="" :style="{ 'object-fit': fit }" /> `),
645
- _(p(fe), {
658
+ V(` <img :src="file.url" alt="" :style="{ 'object-fit': fit }" /> `),
659
+ _(v(we), {
646
660
  style: { width: "100%", height: "100%" },
647
661
  src: s.__url || s.url,
648
662
  "zoom-rate": 1.2,
649
663
  "initial-index": 0,
650
664
  fit: "contain"
651
665
  }, null, 8, ["src"]),
652
- o("span", nt, [
666
+ o("span", rt, [
653
667
  o("span", null, [
654
- _(p(x), {
655
- onClick: (v) => le(s)
668
+ _(v(C), {
669
+ onClick: (p) => se(s)
656
670
  }, {
657
- default: m(() => [
658
- _(p(Me))
671
+ default: f(() => [
672
+ _(v(je))
659
673
  ]),
660
674
  _: 2
661
675
  /* DYNAMIC */
662
676
  }, 1032, ["onClick"])
663
677
  ]),
664
678
  o("span", null, [
665
- _(p(x), {
666
- onClick: (v) => ae(s)
679
+ _(v(C), {
680
+ onClick: (p) => oe(s)
667
681
  }, {
668
- default: m(() => [
669
- _(p(Be))
682
+ default: f(() => [
683
+ _(v(Se))
670
684
  ]),
671
685
  _: 2
672
686
  /* DYNAMIC */
673
687
  }, 1032, ["onClick"])
674
688
  ]),
675
- l.preview ? M("v-if", !0) : (u(), r("span", it, [
676
- _(p(x), {
689
+ l.preview ? V("v-if", !0) : (u(), r("span", ct, [
690
+ _(v(C), {
677
691
  type: "warning",
678
- onClick: (v) => oe(s)
692
+ onClick: (p) => ie(s)
679
693
  }, {
680
- default: m(() => [
681
- _(p(xe))
694
+ default: f(() => [
695
+ _(v(Ie))
682
696
  ]),
683
697
  _: 2
684
698
  /* DYNAMIC */
@@ -690,21 +704,21 @@ const tt = /* @__PURE__ */ D(et, [["__scopeId", "data-v-ec9fdc8a"]]), lt = G(tt)
690
704
  /* CLASS */
691
705
  )
692
706
  ]),
693
- default: m(() => [
694
- o("ul", ut, [
707
+ default: f(() => [
708
+ o("ul", dt, [
695
709
  (u(!0), r(
696
- N,
710
+ O,
697
711
  null,
698
- pe(I.value, (s, v) => (u(), r("li", {
712
+ ge(L.value, (s, p) => (u(), r("li", {
699
713
  class: "el-upload-list__item",
700
714
  key: s.uid
701
715
  }, [
702
716
  o("span", null, [
703
- _(p(x), {
704
- onClick: (k) => ne(s, v)
717
+ _(v(C), {
718
+ onClick: (w) => ue(s, p)
705
719
  }, {
706
- default: m(() => [
707
- _(p(ze))
720
+ default: f(() => [
721
+ _(v(Ce))
708
722
  ]),
709
723
  _: 2
710
724
  /* DYNAMIC */
@@ -713,34 +727,34 @@ const tt = /* @__PURE__ */ D(et, [["__scopeId", "data-v-ec9fdc8a"]]), lt = G(tt)
713
727
  o(
714
728
  "div",
715
729
  {
716
- class: b(["load-list", {
730
+ class: k(["load-list", {
717
731
  loading: s.status === "uploading",
718
732
  fail: s.status === "fail"
719
733
  }]),
720
734
  "element-loading-background": "var(--ik-upload-bg)"
721
735
  },
722
736
  [
723
- O(o("div", {
737
+ P(o("div", {
724
738
  class: "loading-statu",
725
- onClick: (k) => K(s, v)
739
+ onClick: (w) => ee(s, p)
726
740
  }, [
727
- _(p(x), { size: 24 }, {
728
- default: m(() => [
729
- _(p(Le))
741
+ _(v(C), { size: 24 }, {
742
+ default: f(() => [
743
+ _(v(Ve))
730
744
  ]),
731
745
  _: 1
732
746
  /* STABLE */
733
747
  }),
734
- ct,
735
- dt
736
- ], 8, rt), [
737
- [P, s.status === "fail"]
748
+ vt,
749
+ _t
750
+ ], 8, pt), [
751
+ [R, s.status === "fail"]
738
752
  ]),
739
753
  o("img", {
740
754
  src: s.__url,
741
755
  alt: "",
742
756
  style: z({ "object-fit": l.fit })
743
- }, null, 12, vt)
757
+ }, null, 12, ht)
744
758
  ],
745
759
  2
746
760
  /* CLASS */
@@ -756,11 +770,11 @@ const tt = /* @__PURE__ */ D(et, [["__scopeId", "data-v-ec9fdc8a"]]), lt = G(tt)
756
770
  }, [
757
771
  l.tip ? {
758
772
  name: "tip",
759
- fn: m(() => [
773
+ fn: f(() => [
760
774
  o(
761
775
  "span",
762
- st,
763
- U(X.value),
776
+ it,
777
+ U(Z.value),
764
778
  1
765
779
  /* TEXT */
766
780
  )
@@ -768,18 +782,18 @@ const tt = /* @__PURE__ */ D(et, [["__scopeId", "data-v-ec9fdc8a"]]), lt = G(tt)
768
782
  key: "0"
769
783
  } : void 0
770
784
  ]), 1040, ["class", "accept", "action", "headers", "data", "file-list", "multiple", "limit", "disabled"]),
771
- M(" 文件预览 "),
772
- o("div", pt, [
773
- V.value ? (u(), E(p(me), {
785
+ V(" 文件预览 "),
786
+ o("div", gt, [
787
+ E.value ? (u(), H(v(ke), {
774
788
  key: 0,
775
789
  "lock-scroll": "",
776
790
  "hide-on-click-modal": "",
777
791
  onClose: a[1] || (a[1] = () => {
778
- V.value = !1;
792
+ E.value = !1;
779
793
  }),
780
- "url-list": d(f.value).map((s) => s.__url),
794
+ "url-list": d(y.value).map((s) => s.__url),
781
795
  "initial-index": T.value
782
- }, null, 8, ["url-list", "initial-index"])) : M("v-if", !0)
796
+ }, null, 8, ["url-list", "initial-index"])) : V("v-if", !0)
783
797
  ])
784
798
  ],
785
799
  64
@@ -787,8 +801,8 @@ const tt = /* @__PURE__ */ D(et, [["__scopeId", "data-v-ec9fdc8a"]]), lt = G(tt)
787
801
  ));
788
802
  }
789
803
  });
790
- const ht = /* @__PURE__ */ D(_t, [["__scopeId", "data-v-3ef6eeda"]]), yt = G(ht);
804
+ const mt = /* @__PURE__ */ N(ft, [["__scopeId", "data-v-d12a12c0"]]), bt = X(mt);
791
805
  export {
792
- yt as IkUploadImage,
793
- yt as default
806
+ bt as IkUploadImage,
807
+ bt as default
794
808
  };