iking-web-ui-pro 0.2.9 → 0.2.11
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.
- package/dist/IkDescription/ik.index.es.js +365 -364
- package/dist/IkDescription/ik.index.umd.js +1 -1
- package/dist/IkDescription/style.css +1 -1
- package/dist/IkTree/ik.index.es.js +30 -28
- package/dist/IkTree/ik.index.umd.js +1 -1
- package/dist/IkTree/style.css +1 -1
- package/dist/IkUploadImage/ik.index.es.js +173 -158
- package/dist/IkUploadImage/ik.index.umd.js +1 -1
- package/dist/IkUploadImage/style.css +1 -1
- package/dist/Provider/ik.index.es.js +14 -1574
- package/dist/Provider/ik.index.umd.js +1 -17
- package/dist/index.es.js +34054 -35597
- package/dist/index.umd.js +69 -85
- package/dist/src/components/IkTree/IkTree.vue.d.ts +1 -0
- package/dist/src/components/IkTree/index.d.ts +3 -0
- package/dist/src/components/IkUploadImage/index.d.ts +19 -0
- package/dist/src/components/IkUploadImage/src/index.vue.d.ts +9 -0
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/src/components/IkPageFull/src/IkSearchAuto copy.d.ts +0 -76
|
@@ -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
|
|
2
|
-
import { ElUpload as
|
|
3
|
-
import { ikColor as
|
|
4
|
-
const
|
|
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 f, createTextVNode as R, toDisplayString as U, mergeModels as O, 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 P, vShow as W, renderList as pe, pushScopeId as _e, popScopeId as he } from "vue";
|
|
2
|
+
import { ElUpload as ge, ElIcon as x, ElImage as me, ElImageViewer as fe, ElMessage as F } from "element-plus";
|
|
3
|
+
import { ikColor as ye, _ as we, ikFile as ke } from "iking-utils-pro";
|
|
4
|
+
const G = (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 R = (l, c) => {
|
|
|
11
11
|
return l;
|
|
12
12
|
};
|
|
13
13
|
/*! Element Plus Icons Vue v2.3.1 */
|
|
14
|
-
var
|
|
14
|
+
var be = /* @__PURE__ */ $({
|
|
15
15
|
name: "Close",
|
|
16
16
|
__name: "close",
|
|
17
17
|
setup(l) {
|
|
@@ -25,7 +25,7 @@ var we = /* @__PURE__ */ $({
|
|
|
25
25
|
})
|
|
26
26
|
]));
|
|
27
27
|
}
|
|
28
|
-
}),
|
|
28
|
+
}), ze = be, $e = /* @__PURE__ */ $({
|
|
29
29
|
name: "Delete",
|
|
30
30
|
__name: "delete",
|
|
31
31
|
setup(l) {
|
|
@@ -39,7 +39,7 @@ var we = /* @__PURE__ */ $({
|
|
|
39
39
|
})
|
|
40
40
|
]));
|
|
41
41
|
}
|
|
42
|
-
}),
|
|
42
|
+
}), xe = $e, Ce = /* @__PURE__ */ $({
|
|
43
43
|
name: "Download",
|
|
44
44
|
__name: "download",
|
|
45
45
|
setup(l) {
|
|
@@ -53,7 +53,7 @@ var we = /* @__PURE__ */ $({
|
|
|
53
53
|
})
|
|
54
54
|
]));
|
|
55
55
|
}
|
|
56
|
-
}),
|
|
56
|
+
}), Be = Ce, Ie = /* @__PURE__ */ $({
|
|
57
57
|
name: "Refresh",
|
|
58
58
|
__name: "refresh",
|
|
59
59
|
setup(l) {
|
|
@@ -67,7 +67,7 @@ var we = /* @__PURE__ */ $({
|
|
|
67
67
|
})
|
|
68
68
|
]));
|
|
69
69
|
}
|
|
70
|
-
}),
|
|
70
|
+
}), Le = Ie, Se = /* @__PURE__ */ $({
|
|
71
71
|
name: "ZoomIn",
|
|
72
72
|
__name: "zoom-in",
|
|
73
73
|
setup(l) {
|
|
@@ -81,13 +81,13 @@ var we = /* @__PURE__ */ $({
|
|
|
81
81
|
})
|
|
82
82
|
]));
|
|
83
83
|
}
|
|
84
|
-
}),
|
|
85
|
-
const
|
|
84
|
+
}), Me = Se;
|
|
85
|
+
const D = (l, c) => {
|
|
86
86
|
const i = l.__vccOpts || l;
|
|
87
|
-
for (const [e,
|
|
88
|
-
i[e] =
|
|
87
|
+
for (const [e, d] of c)
|
|
88
|
+
i[e] = d;
|
|
89
89
|
return i;
|
|
90
|
-
},
|
|
90
|
+
}, Ue = {}, Ve = {
|
|
91
91
|
t: "1686214149488",
|
|
92
92
|
class: "icon",
|
|
93
93
|
viewBox: "0 0 1024 1024",
|
|
@@ -96,7 +96,7 @@ const E = (l, c) => {
|
|
|
96
96
|
"p-id": "8490",
|
|
97
97
|
width: "200",
|
|
98
98
|
height: "200"
|
|
99
|
-
},
|
|
99
|
+
}, je = /* @__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 E = (l, c) => {
|
|
|
105
105
|
null,
|
|
106
106
|
-1
|
|
107
107
|
/* HOISTED */
|
|
108
|
-
),
|
|
108
|
+
), Ee = /* @__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 E = (l, c) => {
|
|
|
114
114
|
null,
|
|
115
115
|
-1
|
|
116
116
|
/* HOISTED */
|
|
117
|
-
),
|
|
117
|
+
), De = /* @__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 E = (l, c) => {
|
|
|
123
123
|
null,
|
|
124
124
|
-1
|
|
125
125
|
/* HOISTED */
|
|
126
|
-
),
|
|
126
|
+
), Te = /* @__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 E = (l, c) => {
|
|
|
132
132
|
null,
|
|
133
133
|
-1
|
|
134
134
|
/* HOISTED */
|
|
135
|
-
),
|
|
135
|
+
), Ae = /* @__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 E = (l, c) => {
|
|
|
141
141
|
null,
|
|
142
142
|
-1
|
|
143
143
|
/* HOISTED */
|
|
144
|
-
),
|
|
144
|
+
), He = /* @__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 E = (l, c) => {
|
|
|
150
150
|
null,
|
|
151
151
|
-1
|
|
152
152
|
/* HOISTED */
|
|
153
|
-
),
|
|
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 E = (l, c) => {
|
|
|
159
159
|
null,
|
|
160
160
|
-1
|
|
161
161
|
/* HOISTED */
|
|
162
|
-
),
|
|
162
|
+
), Ne = /* @__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 E = (l, c) => {
|
|
|
168
168
|
null,
|
|
169
169
|
-1
|
|
170
170
|
/* HOISTED */
|
|
171
|
-
),
|
|
172
|
-
Ue,
|
|
173
|
-
Ve,
|
|
171
|
+
), Pe = [
|
|
174
172
|
je,
|
|
175
173
|
Ee,
|
|
174
|
+
De,
|
|
176
175
|
Te,
|
|
177
176
|
Ae,
|
|
178
|
-
|
|
179
|
-
|
|
177
|
+
He,
|
|
178
|
+
Oe,
|
|
179
|
+
Ne
|
|
180
180
|
];
|
|
181
|
-
function
|
|
182
|
-
return u(), r("svg",
|
|
181
|
+
function We(l, c) {
|
|
182
|
+
return u(), r("svg", Ve, Pe);
|
|
183
183
|
}
|
|
184
|
-
const
|
|
185
|
-
const c = C("loadUrl"), i = y(() => l.loadUrl || (c == null ? void 0 : c.value)), e = C("uploadUrl"),
|
|
184
|
+
const Fe = /* @__PURE__ */ D(Ue, [["render", We]]), Re = (l) => {
|
|
185
|
+
const c = C("loadUrl"), i = y(() => l.loadUrl || (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"), m = y(() => l.userInfo || (g == null ? void 0 : g.value));
|
|
186
186
|
return {
|
|
187
187
|
cLoadUrl: i,
|
|
188
|
-
cUploadUrl:
|
|
188
|
+
cUploadUrl: d,
|
|
189
189
|
cToken: n,
|
|
190
190
|
cOnlyofficeConfig: B,
|
|
191
|
-
cUserInfo:
|
|
191
|
+
cUserInfo: m
|
|
192
192
|
};
|
|
193
|
-
},
|
|
193
|
+
}, Ge = Re, Je = {
|
|
194
194
|
key: 0,
|
|
195
195
|
class: "ik-svg-icon ik-icon inline-block inline-flex justify-center box-content line-height-[0]"
|
|
196
|
-
},
|
|
196
|
+
}, Xe = {
|
|
197
197
|
key: 1,
|
|
198
198
|
class: "h-[1em] w-[1em]",
|
|
199
199
|
"aria-hidden": "true"
|
|
200
|
-
},
|
|
200
|
+
}, Ye = ["xlink:href"], Ze = ["src"], qe = {
|
|
201
201
|
key: 1,
|
|
202
202
|
class: "h-[1em] w-[1em]",
|
|
203
203
|
"aria-hidden": "true"
|
|
204
|
-
},
|
|
204
|
+
}, Ke = ["xlink:href"], Qe = ["src"], et = /* @__PURE__ */ $({
|
|
205
205
|
name: "IkSvgIcon",
|
|
206
206
|
__name: "index",
|
|
207
207
|
props: {
|
|
@@ -231,7 +231,7 @@ const We = /* @__PURE__ */ E(Se, [["render", Ne]]), Fe = (l) => {
|
|
|
231
231
|
const c = l, i = C("iconConfig"), e = y(() => ({
|
|
232
232
|
...(i == null ? void 0 : i.value) || {},
|
|
233
233
|
...c
|
|
234
|
-
})),
|
|
234
|
+
})), d = y(() => {
|
|
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
237
|
}), h = y(() => {
|
|
@@ -254,22 +254,22 @@ const We = /* @__PURE__ */ E(Se, [["render", Ne]]), Fe = (l) => {
|
|
|
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
|
-
...e.value.color &&
|
|
257
|
+
...e.value.color && d.value !== "iksig" ? {
|
|
258
258
|
"--ik-color-icon-dark": e.value.color,
|
|
259
|
-
"--ik-color-icon-light": e.value.colorLight ||
|
|
259
|
+
"--ik-color-icon-light": e.value.colorLight || ye.setOpacity(e.value.color, e.value.opacity)
|
|
260
260
|
} : {}
|
|
261
261
|
};
|
|
262
262
|
return e.value.width && (w.width = w.height = typeof e.value.width == "number" ? `${e.value.width}px` : e.value.width), w;
|
|
263
263
|
});
|
|
264
264
|
return (n, w) => {
|
|
265
|
-
const B =
|
|
266
|
-
return e.value.tableIconType === "icon" || !e.value.tableIconType ? (u(), r("span",
|
|
265
|
+
const B = H("el-tooltip"), g = H("el-button");
|
|
266
|
+
return e.value.tableIconType === "icon" || !e.value.tableIconType ? (u(), r("span", Je, [
|
|
267
267
|
e.value.notip || !e.value.title ? (u(), r(
|
|
268
268
|
"i",
|
|
269
269
|
{
|
|
270
270
|
key: 0,
|
|
271
271
|
class: b(["ik-svg-icon ik-icon relative h-[1em] w-[1em] inline-flex items-center justify-center fill-current leading-[1em] transition", {
|
|
272
|
-
[n.name]:
|
|
272
|
+
[n.name]: d.value === "unocss",
|
|
273
273
|
"show-bg": e.value.showBg || e.value.bg,
|
|
274
274
|
default: e.value.size === "default",
|
|
275
275
|
small: e.value.size === "small",
|
|
@@ -285,7 +285,7 @@ const We = /* @__PURE__ */ E(Se, [["render", Ne]]), Fe = (l) => {
|
|
|
285
285
|
},
|
|
286
286
|
[
|
|
287
287
|
M(` <Icon v-if="outputType === 'iconify'" :icon="name" /> `),
|
|
288
|
-
|
|
288
|
+
d.value === "iksig" ? (u(), r(
|
|
289
289
|
"i",
|
|
290
290
|
{
|
|
291
291
|
key: 0,
|
|
@@ -295,15 +295,15 @@ const We = /* @__PURE__ */ E(Se, [["render", Ne]]), Fe = (l) => {
|
|
|
295
295
|
null,
|
|
296
296
|
6
|
|
297
297
|
/* CLASS, STYLE */
|
|
298
|
-
)) :
|
|
298
|
+
)) : d.value === "svg" ? (u(), r("svg", Xe, [
|
|
299
299
|
o("use", {
|
|
300
300
|
"xlink:href": `#${e.value.name}`
|
|
301
|
-
}, null, 8,
|
|
302
|
-
])) :
|
|
301
|
+
}, null, 8, Ye)
|
|
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,
|
|
306
|
+
}, null, 8, Ze)) : (u(), r(
|
|
307
307
|
"i",
|
|
308
308
|
{
|
|
309
309
|
key: 3,
|
|
@@ -317,17 +317,17 @@ const We = /* @__PURE__ */ E(Se, [["render", Ne]]), Fe = (l) => {
|
|
|
317
317
|
],
|
|
318
318
|
6
|
|
319
319
|
/* CLASS, STYLE */
|
|
320
|
-
)) : (u(),
|
|
320
|
+
)) : (u(), E(B, {
|
|
321
321
|
key: 1,
|
|
322
322
|
content: e.value.title,
|
|
323
323
|
placement: "top"
|
|
324
324
|
}, {
|
|
325
|
-
default:
|
|
325
|
+
default: f(() => [
|
|
326
326
|
o(
|
|
327
327
|
"i",
|
|
328
328
|
{
|
|
329
329
|
class: b(["ik-svg-icon ik-icon relative h-[1em] w-[1em] inline-flex items-center justify-center fill-current leading-[1em] transition", {
|
|
330
|
-
[n.name]:
|
|
330
|
+
[n.name]: d.value === "unocss",
|
|
331
331
|
"show-bg": e.value.showBg || e.value.bg,
|
|
332
332
|
default: e.value.size === "default",
|
|
333
333
|
small: e.value.size === "small",
|
|
@@ -341,7 +341,7 @@ const We = /* @__PURE__ */ E(Se, [["render", Ne]]), Fe = (l) => {
|
|
|
341
341
|
style: z(h.value)
|
|
342
342
|
},
|
|
343
343
|
[
|
|
344
|
-
|
|
344
|
+
d.value === "iksig" ? (u(), r(
|
|
345
345
|
"i",
|
|
346
346
|
{
|
|
347
347
|
key: 0,
|
|
@@ -351,15 +351,15 @@ const We = /* @__PURE__ */ E(Se, [["render", Ne]]), Fe = (l) => {
|
|
|
351
351
|
null,
|
|
352
352
|
6
|
|
353
353
|
/* CLASS, STYLE */
|
|
354
|
-
)) :
|
|
354
|
+
)) : d.value === "svg" ? (u(), r("svg", qe, [
|
|
355
355
|
o("use", {
|
|
356
356
|
"xlink:href": `#${e.value.name}`
|
|
357
|
-
}, null, 8,
|
|
358
|
-
])) :
|
|
357
|
+
}, null, 8, Ke)
|
|
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,
|
|
362
|
+
}, null, 8, Qe)) : (u(), r(
|
|
363
363
|
"i",
|
|
364
364
|
{
|
|
365
365
|
key: 3,
|
|
@@ -378,12 +378,12 @@ const We = /* @__PURE__ */ E(Se, [["render", Ne]]), Fe = (l) => {
|
|
|
378
378
|
_: 1
|
|
379
379
|
/* STABLE */
|
|
380
380
|
}, 8, ["content"]))
|
|
381
|
-
])) : (u(),
|
|
381
|
+
])) : (u(), E(g, {
|
|
382
382
|
key: 1,
|
|
383
383
|
type: ["warning", "error"].includes(e.value.type) ? "danger" : ""
|
|
384
384
|
}, {
|
|
385
|
-
default:
|
|
386
|
-
|
|
385
|
+
default: f(() => [
|
|
386
|
+
R(
|
|
387
387
|
U(e.value.title),
|
|
388
388
|
1
|
|
389
389
|
/* TEXT */
|
|
@@ -395,27 +395,27 @@ const We = /* @__PURE__ */ E(Se, [["render", Ne]]), Fe = (l) => {
|
|
|
395
395
|
};
|
|
396
396
|
}
|
|
397
397
|
});
|
|
398
|
-
const
|
|
398
|
+
const tt = /* @__PURE__ */ D(et, [["__scopeId", "data-v-7729b79a"]]), lt = G(tt), J = (l) => (_e("data-v-127175a6"), l = l(), he(), l), at = {
|
|
399
399
|
key: 1,
|
|
400
400
|
class: "upload-btn"
|
|
401
|
-
},
|
|
401
|
+
}, st = { class: "tip" }, ot = { class: "loading-statu" }, nt = { class: "operate-btn" }, it = { key: 0 }, ut = {
|
|
402
402
|
class: "el-upload-list el-upload-list--picture-card",
|
|
403
403
|
style: { float: "left" }
|
|
404
|
-
},
|
|
404
|
+
}, rt = ["onClick"], ct = /* @__PURE__ */ J(() => /* @__PURE__ */ o(
|
|
405
405
|
"span",
|
|
406
406
|
{ class: "error" },
|
|
407
407
|
"上传错误",
|
|
408
408
|
-1
|
|
409
409
|
/* HOISTED */
|
|
410
|
-
)),
|
|
410
|
+
)), dt = /* @__PURE__ */ J(() => /* @__PURE__ */ o(
|
|
411
411
|
"p",
|
|
412
412
|
null,
|
|
413
413
|
"点击重新上传",
|
|
414
414
|
-1
|
|
415
415
|
/* HOISTED */
|
|
416
|
-
)),
|
|
416
|
+
)), vt = ["src"], pt = { class: "demo-image__preview" }, _t = /* @__PURE__ */ $({
|
|
417
417
|
__name: "index",
|
|
418
|
-
props: /* @__PURE__ */
|
|
418
|
+
props: /* @__PURE__ */ O({
|
|
419
419
|
// 显示的文字
|
|
420
420
|
title: {
|
|
421
421
|
type: String,
|
|
@@ -483,6 +483,11 @@ const Qe = /* @__PURE__ */ E(Ke, [["__scopeId", "data-v-7729b79a"]]), et = R(Qe)
|
|
|
483
483
|
tipText: {
|
|
484
484
|
type: String,
|
|
485
485
|
default: ""
|
|
486
|
+
},
|
|
487
|
+
// 禁用
|
|
488
|
+
disabled: {
|
|
489
|
+
type: Boolean,
|
|
490
|
+
default: !1
|
|
486
491
|
}
|
|
487
492
|
}, {
|
|
488
493
|
modelValue: {
|
|
@@ -491,31 +496,36 @@ const Qe = /* @__PURE__ */ E(Ke, [["__scopeId", "data-v-7729b79a"]]), et = R(Qe)
|
|
|
491
496
|
},
|
|
492
497
|
modelModifiers: {}
|
|
493
498
|
}),
|
|
494
|
-
emits: /* @__PURE__ */
|
|
499
|
+
emits: /* @__PURE__ */ O(["delete", "success"], ["update:modelValue"]),
|
|
495
500
|
setup(l, { emit: c }) {
|
|
496
|
-
const i = l, e =
|
|
501
|
+
const i = l, e = ue(l, "modelValue"), d = (t) => Array.isArray(t) ? t.map((a) => {
|
|
497
502
|
var k, L;
|
|
498
|
-
const s = ((k = a.url) == null ? void 0 : k.startsWith("http")) || ((L = a.url) == null ? void 0 : L.startsWith("blob")),
|
|
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;
|
|
499
504
|
return {
|
|
500
|
-
...a.url ? a : { url:
|
|
501
|
-
__url: s ?
|
|
505
|
+
...a.url ? a : { url: v },
|
|
506
|
+
__url: s ? v : `${n.value}${v}`
|
|
502
507
|
};
|
|
503
|
-
}) : t ? [
|
|
504
|
-
|
|
508
|
+
}) : t ? [
|
|
509
|
+
{
|
|
510
|
+
url: t,
|
|
511
|
+
__url: t != null && t.startsWith("http") || t != null && t.startsWith("blob") ? t : `${n.value}${t}`
|
|
512
|
+
}
|
|
513
|
+
] : [];
|
|
514
|
+
re(
|
|
505
515
|
() => e.value,
|
|
506
516
|
(t) => {
|
|
507
|
-
!t || !t.length ?
|
|
517
|
+
!t || !t.length ? m.value = [] : m.value = we.cloneDeep(d(t));
|
|
508
518
|
},
|
|
509
519
|
{ deep: !0 }
|
|
510
520
|
);
|
|
511
|
-
const h = c, { cLoadUrl: n, cUploadUrl: w } =
|
|
521
|
+
const h = c, { cLoadUrl: n, cUploadUrl: w } = Ge(i), B = y(() => i.size), g = S(null), m = S(d(e.value)), I = S([]), V = S(!1), T = S(0), X = y(
|
|
512
522
|
() => i.tipText || `最多可上传${i.limit}张图片, 每张图片不能超过${i.size}MB`
|
|
513
|
-
),
|
|
514
|
-
},
|
|
523
|
+
), Y = (t, a) => {
|
|
524
|
+
}, Z = (t) => {
|
|
515
525
|
if (!t.type.includes("image")) {
|
|
516
526
|
F.warning("只允许上传图片!");
|
|
517
527
|
try {
|
|
518
|
-
|
|
528
|
+
m.value.pop();
|
|
519
529
|
} catch {
|
|
520
530
|
}
|
|
521
531
|
return !1;
|
|
@@ -523,72 +533,77 @@ const Qe = /* @__PURE__ */ E(Ke, [["__scopeId", "data-v-7729b79a"]]), et = R(Qe)
|
|
|
523
533
|
if (!(t.size / 1024 / 1024 < B.value)) {
|
|
524
534
|
F.warning("图片大小超出限制!");
|
|
525
535
|
try {
|
|
526
|
-
|
|
536
|
+
m.value.pop();
|
|
527
537
|
} catch {
|
|
528
538
|
}
|
|
529
539
|
return !1;
|
|
530
540
|
}
|
|
531
541
|
return !0;
|
|
532
|
-
},
|
|
533
|
-
var s,
|
|
534
|
-
t.status = "ready", a !== void 0 && I.value.splice(a, 1), (s = g.value) == null || s.handleStart(t.raw), (
|
|
535
|
-
},
|
|
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) => {
|
|
536
546
|
var L, A;
|
|
537
|
-
const s = e.value.length,
|
|
547
|
+
const s = e.value.length, v = i.limit - s;
|
|
538
548
|
let k = 0;
|
|
539
|
-
for (; k <
|
|
549
|
+
for (; k < v && k < (t == null ? void 0 : t.length); )
|
|
540
550
|
(L = g.value) == null || L.handleStart(t == null ? void 0 : t[k]), (A = g.value) == null || A.submit(), k++;
|
|
541
|
-
}, Q = (t, a, s) => {
|
|
542
|
-
h("success", t, a, s), e.value = f.value.filter((d) => d.status === "success");
|
|
543
551
|
}, ee = (t, a, s) => {
|
|
552
|
+
h("success", t, a, s), e.value = m.value;
|
|
553
|
+
}, te = (t, a, s) => {
|
|
544
554
|
I.value.push({
|
|
545
555
|
...a,
|
|
546
556
|
__url: a.url
|
|
547
557
|
});
|
|
548
|
-
},
|
|
558
|
+
}, le = (t) => {
|
|
549
559
|
var a;
|
|
550
560
|
V.value = !0, T.value = (a = e.value) == null ? void 0 : a.findIndex((s) => s.url === t.url);
|
|
551
|
-
}, le = (t) => {
|
|
552
|
-
ye.downloadByOnlineUrl(t.__url || t.url, t.name);
|
|
553
561
|
}, ae = (t) => {
|
|
562
|
+
ke.downloadByOnlineUrl(t.__url || t.url, t.name);
|
|
563
|
+
}, se = (t) => {
|
|
554
564
|
var a;
|
|
555
565
|
(a = g.value) == null || a.abort(t);
|
|
556
|
-
},
|
|
566
|
+
}, oe = (t) => {
|
|
557
567
|
var a;
|
|
558
|
-
t.status !== "success" &&
|
|
559
|
-
},
|
|
568
|
+
t.status !== "success" && se(t), e.value = (a = m.value) == null ? void 0 : a.filter((s) => s.uid !== t.uid), h("delete", t);
|
|
569
|
+
}, ne = (t, a) => {
|
|
560
570
|
I.value.splice(a, 1);
|
|
561
|
-
},
|
|
571
|
+
}, ie = y(() => m.value.length + I.value.length < i.limit), j = y(
|
|
572
|
+
() => e.value.length >= i.limit || i.disabled
|
|
573
|
+
);
|
|
562
574
|
return (t, a) => (u(), r(
|
|
563
|
-
|
|
575
|
+
N,
|
|
564
576
|
null,
|
|
565
577
|
[
|
|
566
|
-
_(
|
|
567
|
-
class:
|
|
578
|
+
_(p(ge), ce({
|
|
579
|
+
class: ["ik-image-upload", { preview: l.preview, "hide-upload": !ie.value, disabled: j.value }],
|
|
568
580
|
ref_key: "refUpload",
|
|
569
581
|
ref: g,
|
|
570
582
|
"list-type": "picture-card",
|
|
571
583
|
accept: l.accept,
|
|
572
|
-
action:
|
|
584
|
+
action: p(w),
|
|
573
585
|
headers: l.headers,
|
|
574
586
|
data: l.data,
|
|
575
|
-
"file-list":
|
|
576
|
-
"onUpdate:fileList": a[0] || (a[0] = (s) =>
|
|
587
|
+
"file-list": m.value,
|
|
588
|
+
"onUpdate:fileList": a[0] || (a[0] = (s) => m.value = s),
|
|
577
589
|
multiple: l.multiple,
|
|
578
590
|
limit: l.limit,
|
|
579
|
-
"on-change":
|
|
580
|
-
"before-upload":
|
|
581
|
-
"before-remove":
|
|
582
|
-
"on-exceed":
|
|
583
|
-
"on-success":
|
|
584
|
-
"on-error":
|
|
591
|
+
"on-change": Y,
|
|
592
|
+
"before-upload": Z,
|
|
593
|
+
"before-remove": q,
|
|
594
|
+
"on-exceed": Q,
|
|
595
|
+
"on-success": ee,
|
|
596
|
+
"on-error": te,
|
|
585
597
|
drag: ""
|
|
586
|
-
},
|
|
587
|
-
trigger:
|
|
588
|
-
t.$slots.trigger ?
|
|
589
|
-
_(
|
|
590
|
-
default:
|
|
591
|
-
_(
|
|
598
|
+
}, t.$attrs, { disabled: j.value }), de({
|
|
599
|
+
trigger: f(() => [
|
|
600
|
+
t.$slots.trigger ? ve(t.$slots, "trigger", { key: 0 }, void 0, !0) : (u(), r("div", at, [
|
|
601
|
+
_(p(x), { size: 20 }, {
|
|
602
|
+
default: f(() => [
|
|
603
|
+
_(p(lt), {
|
|
604
|
+
name: "iksvg_guanbibeifen",
|
|
605
|
+
disabled: j.value
|
|
606
|
+
}, null, 8, ["disabled"])
|
|
592
607
|
]),
|
|
593
608
|
_: 1
|
|
594
609
|
/* STABLE */
|
|
@@ -602,7 +617,7 @@ const Qe = /* @__PURE__ */ E(Ke, [["__scopeId", "data-v-7729b79a"]]), et = R(Qe)
|
|
|
602
617
|
)
|
|
603
618
|
]))
|
|
604
619
|
]),
|
|
605
|
-
file:
|
|
620
|
+
file: f(({ file: s }) => [
|
|
606
621
|
o(
|
|
607
622
|
"div",
|
|
608
623
|
{
|
|
@@ -610,12 +625,12 @@ const Qe = /* @__PURE__ */ E(Ke, [["__scopeId", "data-v-7729b79a"]]), et = R(Qe)
|
|
|
610
625
|
"element-loading-background": "var(--ik-upload-bg)"
|
|
611
626
|
},
|
|
612
627
|
[
|
|
613
|
-
|
|
628
|
+
P(o(
|
|
614
629
|
"div",
|
|
615
|
-
|
|
630
|
+
ot,
|
|
616
631
|
[
|
|
617
|
-
_(
|
|
618
|
-
|
|
632
|
+
_(Fe),
|
|
633
|
+
R(
|
|
619
634
|
" 上传" + U(s.percentage) + "% ",
|
|
620
635
|
1
|
|
621
636
|
/* TEXT */
|
|
@@ -627,43 +642,43 @@ const Qe = /* @__PURE__ */ E(Ke, [["__scopeId", "data-v-7729b79a"]]), et = R(Qe)
|
|
|
627
642
|
[W, s.status === "uploading"]
|
|
628
643
|
]),
|
|
629
644
|
M(` <img :src="file.url" alt="" :style="{ 'object-fit': fit }" /> `),
|
|
630
|
-
_(
|
|
645
|
+
_(p(me), {
|
|
631
646
|
style: { width: "100%", height: "100%" },
|
|
632
647
|
src: s.__url || s.url,
|
|
633
648
|
"zoom-rate": 1.2,
|
|
634
649
|
"initial-index": 0,
|
|
635
650
|
fit: "contain"
|
|
636
651
|
}, null, 8, ["src"]),
|
|
637
|
-
o("span",
|
|
652
|
+
o("span", nt, [
|
|
638
653
|
o("span", null, [
|
|
639
|
-
_(
|
|
640
|
-
onClick: (
|
|
654
|
+
_(p(x), {
|
|
655
|
+
onClick: (v) => le(s)
|
|
641
656
|
}, {
|
|
642
|
-
default:
|
|
643
|
-
_(
|
|
657
|
+
default: f(() => [
|
|
658
|
+
_(p(Me))
|
|
644
659
|
]),
|
|
645
660
|
_: 2
|
|
646
661
|
/* DYNAMIC */
|
|
647
662
|
}, 1032, ["onClick"])
|
|
648
663
|
]),
|
|
649
664
|
o("span", null, [
|
|
650
|
-
_(
|
|
651
|
-
onClick: (
|
|
665
|
+
_(p(x), {
|
|
666
|
+
onClick: (v) => ae(s)
|
|
652
667
|
}, {
|
|
653
|
-
default:
|
|
654
|
-
_(
|
|
668
|
+
default: f(() => [
|
|
669
|
+
_(p(Be))
|
|
655
670
|
]),
|
|
656
671
|
_: 2
|
|
657
672
|
/* DYNAMIC */
|
|
658
673
|
}, 1032, ["onClick"])
|
|
659
674
|
]),
|
|
660
|
-
l.preview ? M("v-if", !0) : (u(), r("span",
|
|
661
|
-
_(
|
|
675
|
+
l.preview ? M("v-if", !0) : (u(), r("span", it, [
|
|
676
|
+
_(p(x), {
|
|
662
677
|
type: "warning",
|
|
663
|
-
onClick: (
|
|
678
|
+
onClick: (v) => oe(s)
|
|
664
679
|
}, {
|
|
665
|
-
default:
|
|
666
|
-
_(
|
|
680
|
+
default: f(() => [
|
|
681
|
+
_(p(xe))
|
|
667
682
|
]),
|
|
668
683
|
_: 2
|
|
669
684
|
/* DYNAMIC */
|
|
@@ -675,21 +690,21 @@ const Qe = /* @__PURE__ */ E(Ke, [["__scopeId", "data-v-7729b79a"]]), et = R(Qe)
|
|
|
675
690
|
/* CLASS */
|
|
676
691
|
)
|
|
677
692
|
]),
|
|
678
|
-
default:
|
|
679
|
-
o("ul",
|
|
693
|
+
default: f(() => [
|
|
694
|
+
o("ul", ut, [
|
|
680
695
|
(u(!0), r(
|
|
681
|
-
|
|
696
|
+
N,
|
|
682
697
|
null,
|
|
683
|
-
|
|
698
|
+
pe(I.value, (s, v) => (u(), r("li", {
|
|
684
699
|
class: "el-upload-list__item",
|
|
685
700
|
key: s.uid
|
|
686
701
|
}, [
|
|
687
702
|
o("span", null, [
|
|
688
|
-
_(
|
|
689
|
-
onClick: (k) =>
|
|
703
|
+
_(p(x), {
|
|
704
|
+
onClick: (k) => ne(s, v)
|
|
690
705
|
}, {
|
|
691
|
-
default:
|
|
692
|
-
_(
|
|
706
|
+
default: f(() => [
|
|
707
|
+
_(p(ze))
|
|
693
708
|
]),
|
|
694
709
|
_: 2
|
|
695
710
|
/* DYNAMIC */
|
|
@@ -705,27 +720,27 @@ const Qe = /* @__PURE__ */ E(Ke, [["__scopeId", "data-v-7729b79a"]]), et = R(Qe)
|
|
|
705
720
|
"element-loading-background": "var(--ik-upload-bg)"
|
|
706
721
|
},
|
|
707
722
|
[
|
|
708
|
-
|
|
723
|
+
P(o("div", {
|
|
709
724
|
class: "loading-statu",
|
|
710
|
-
onClick: (k) =>
|
|
725
|
+
onClick: (k) => K(s, v)
|
|
711
726
|
}, [
|
|
712
|
-
_(
|
|
713
|
-
default:
|
|
714
|
-
_(
|
|
727
|
+
_(p(x), { size: 24 }, {
|
|
728
|
+
default: f(() => [
|
|
729
|
+
_(p(Le))
|
|
715
730
|
]),
|
|
716
731
|
_: 1
|
|
717
732
|
/* STABLE */
|
|
718
733
|
}),
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
], 8,
|
|
734
|
+
ct,
|
|
735
|
+
dt
|
|
736
|
+
], 8, rt), [
|
|
722
737
|
[W, s.status === "fail"]
|
|
723
738
|
]),
|
|
724
739
|
o("img", {
|
|
725
740
|
src: s.__url,
|
|
726
741
|
alt: "",
|
|
727
742
|
style: z({ "object-fit": l.fit })
|
|
728
|
-
}, null, 12,
|
|
743
|
+
}, null, 12, vt)
|
|
729
744
|
],
|
|
730
745
|
2
|
|
731
746
|
/* CLASS */
|
|
@@ -741,28 +756,28 @@ const Qe = /* @__PURE__ */ E(Ke, [["__scopeId", "data-v-7729b79a"]]), et = R(Qe)
|
|
|
741
756
|
}, [
|
|
742
757
|
l.tip ? {
|
|
743
758
|
name: "tip",
|
|
744
|
-
fn:
|
|
759
|
+
fn: f(() => [
|
|
745
760
|
o(
|
|
746
761
|
"span",
|
|
747
|
-
|
|
748
|
-
U(
|
|
762
|
+
st,
|
|
763
|
+
U(X.value),
|
|
749
764
|
1
|
|
750
765
|
/* TEXT */
|
|
751
766
|
)
|
|
752
767
|
]),
|
|
753
768
|
key: "0"
|
|
754
769
|
} : void 0
|
|
755
|
-
]),
|
|
770
|
+
]), 1040, ["class", "accept", "action", "headers", "data", "file-list", "multiple", "limit", "disabled"]),
|
|
756
771
|
M(" 文件预览 "),
|
|
757
|
-
o("div",
|
|
758
|
-
V.value ? (u(),
|
|
772
|
+
o("div", pt, [
|
|
773
|
+
V.value ? (u(), E(p(fe), {
|
|
759
774
|
key: 0,
|
|
760
775
|
"lock-scroll": "",
|
|
761
776
|
"hide-on-click-modal": "",
|
|
762
777
|
onClose: a[1] || (a[1] = () => {
|
|
763
778
|
V.value = !1;
|
|
764
779
|
}),
|
|
765
|
-
"url-list":
|
|
780
|
+
"url-list": d(m.value).map((s) => s.__url),
|
|
766
781
|
"initial-index": T.value
|
|
767
782
|
}, null, 8, ["url-list", "initial-index"])) : M("v-if", !0)
|
|
768
783
|
])
|
|
@@ -772,8 +787,8 @@ const Qe = /* @__PURE__ */ E(Ke, [["__scopeId", "data-v-7729b79a"]]), et = R(Qe)
|
|
|
772
787
|
));
|
|
773
788
|
}
|
|
774
789
|
});
|
|
775
|
-
const
|
|
790
|
+
const ht = /* @__PURE__ */ D(_t, [["__scopeId", "data-v-127175a6"]]), yt = G(ht);
|
|
776
791
|
export {
|
|
777
|
-
|
|
778
|
-
|
|
792
|
+
yt as IkUploadImage,
|
|
793
|
+
yt as default
|
|
779
794
|
};
|