iking-web-ui-pro 0.1.2 → 0.1.4
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/IkUploadImage/index.es.js +159 -145
- package/dist/IkUploadImage/index.umd.js +1 -1
- package/dist/IkUploadImage/style.css +1 -1
- package/dist/index.es.js +20 -6
- package/dist/index.umd.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +3 -3
|
@@ -1,105 +1,105 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ElUpload as ne, ElIcon as w, ElImage as
|
|
1
|
+
import { defineComponent as m, openBlock as u, createElementBlock as c, createElementVNode as s, watch as K, computed as C, ref as y, Fragment as M, createVNode as o, unref as r, normalizeClass as b, createSlots as Q, withCtx as v, renderSlot as X, toDisplayString as $, withDirectives as B, createTextVNode as Y, vShow as I, createCommentVNode as z, renderList as ee, normalizeStyle as te, createBlock as le, pushScopeId as ae, popScopeId as se } from "vue";
|
|
2
|
+
import { ElUpload as ne, ElIcon as w, ElImage as oe, ElImageViewer as re } from "element-plus";
|
|
3
3
|
import { _ as ie, ikFile as ue } from "iking-utils-pro";
|
|
4
|
-
const ce = (
|
|
5
|
-
if (
|
|
6
|
-
for (const
|
|
7
|
-
n.component(
|
|
4
|
+
const ce = (l, i) => {
|
|
5
|
+
if (l.install = (n) => {
|
|
6
|
+
for (const d of [l, ...Object.values(i ?? {})])
|
|
7
|
+
n.component(d.name, d);
|
|
8
8
|
}, i)
|
|
9
|
-
for (const [n,
|
|
10
|
-
|
|
11
|
-
return
|
|
9
|
+
for (const [n, d] of Object.entries(i))
|
|
10
|
+
l[n] = d;
|
|
11
|
+
return l;
|
|
12
12
|
};
|
|
13
13
|
/*! Element Plus Icons Vue v2.3.1 */
|
|
14
|
-
var de = /* @__PURE__ */
|
|
14
|
+
var de = /* @__PURE__ */ m({
|
|
15
15
|
name: "Close",
|
|
16
16
|
__name: "close",
|
|
17
|
-
setup(
|
|
18
|
-
return (i, n) => (u(),
|
|
17
|
+
setup(l) {
|
|
18
|
+
return (i, n) => (u(), c("svg", {
|
|
19
19
|
xmlns: "http://www.w3.org/2000/svg",
|
|
20
20
|
viewBox: "0 0 1024 1024"
|
|
21
21
|
}, [
|
|
22
|
-
|
|
22
|
+
s("path", {
|
|
23
23
|
fill: "currentColor",
|
|
24
24
|
d: "M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"
|
|
25
25
|
})
|
|
26
26
|
]));
|
|
27
27
|
}
|
|
28
|
-
}), _e = de, pe = /* @__PURE__ */
|
|
28
|
+
}), _e = de, pe = /* @__PURE__ */ m({
|
|
29
29
|
name: "Delete",
|
|
30
30
|
__name: "delete",
|
|
31
|
-
setup(
|
|
32
|
-
return (i, n) => (u(),
|
|
31
|
+
setup(l) {
|
|
32
|
+
return (i, n) => (u(), c("svg", {
|
|
33
33
|
xmlns: "http://www.w3.org/2000/svg",
|
|
34
34
|
viewBox: "0 0 1024 1024"
|
|
35
35
|
}, [
|
|
36
|
-
|
|
36
|
+
s("path", {
|
|
37
37
|
fill: "currentColor",
|
|
38
38
|
d: "M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32zm448-64v-64H416v64zM224 896h576V256H224zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32m192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32"
|
|
39
39
|
})
|
|
40
40
|
]));
|
|
41
41
|
}
|
|
42
|
-
}), ve = pe, he = /* @__PURE__ */
|
|
42
|
+
}), ve = pe, he = /* @__PURE__ */ m({
|
|
43
43
|
name: "Download",
|
|
44
44
|
__name: "download",
|
|
45
|
-
setup(
|
|
46
|
-
return (i, n) => (u(),
|
|
45
|
+
setup(l) {
|
|
46
|
+
return (i, n) => (u(), c("svg", {
|
|
47
47
|
xmlns: "http://www.w3.org/2000/svg",
|
|
48
48
|
viewBox: "0 0 1024 1024"
|
|
49
49
|
}, [
|
|
50
|
-
|
|
50
|
+
s("path", {
|
|
51
51
|
fill: "currentColor",
|
|
52
52
|
d: "M160 832h704a32 32 0 1 1 0 64H160a32 32 0 1 1 0-64m384-253.696 236.288-236.352 45.248 45.248L508.8 704 192 387.2l45.248-45.248L480 584.704V128h64z"
|
|
53
53
|
})
|
|
54
54
|
]));
|
|
55
55
|
}
|
|
56
|
-
}), me = he, fe = /* @__PURE__ */
|
|
56
|
+
}), me = he, fe = /* @__PURE__ */ m({
|
|
57
57
|
name: "Plus",
|
|
58
58
|
__name: "plus",
|
|
59
|
-
setup(
|
|
60
|
-
return (i, n) => (u(),
|
|
59
|
+
setup(l) {
|
|
60
|
+
return (i, n) => (u(), c("svg", {
|
|
61
61
|
xmlns: "http://www.w3.org/2000/svg",
|
|
62
62
|
viewBox: "0 0 1024 1024"
|
|
63
63
|
}, [
|
|
64
|
-
|
|
64
|
+
s("path", {
|
|
65
65
|
fill: "currentColor",
|
|
66
66
|
d: "M480 480V128a32 32 0 0 1 64 0v352h352a32 32 0 1 1 0 64H544v352a32 32 0 1 1-64 0V544H128a32 32 0 0 1 0-64z"
|
|
67
67
|
})
|
|
68
68
|
]));
|
|
69
69
|
}
|
|
70
|
-
}), ge = fe, we = /* @__PURE__ */
|
|
70
|
+
}), ge = fe, we = /* @__PURE__ */ m({
|
|
71
71
|
name: "Refresh",
|
|
72
72
|
__name: "refresh",
|
|
73
|
-
setup(
|
|
74
|
-
return (i, n) => (u(),
|
|
73
|
+
setup(l) {
|
|
74
|
+
return (i, n) => (u(), c("svg", {
|
|
75
75
|
xmlns: "http://www.w3.org/2000/svg",
|
|
76
76
|
viewBox: "0 0 1024 1024"
|
|
77
77
|
}, [
|
|
78
|
-
|
|
78
|
+
s("path", {
|
|
79
79
|
fill: "currentColor",
|
|
80
80
|
d: "M771.776 794.88A384 384 0 0 1 128 512h64a320 320 0 0 0 555.712 216.448H654.72a32 32 0 1 1 0-64h149.056a32 32 0 0 1 32 32v148.928a32 32 0 1 1-64 0v-50.56zM276.288 295.616h92.992a32 32 0 0 1 0 64H220.16a32 32 0 0 1-32-32V178.56a32 32 0 0 1 64 0v50.56A384 384 0 0 1 896.128 512h-64a320 320 0 0 0-555.776-216.384z"
|
|
81
81
|
})
|
|
82
82
|
]));
|
|
83
83
|
}
|
|
84
|
-
}), ye = we, xe = /* @__PURE__ */
|
|
84
|
+
}), ye = we, xe = /* @__PURE__ */ m({
|
|
85
85
|
name: "ZoomIn",
|
|
86
86
|
__name: "zoom-in",
|
|
87
|
-
setup(
|
|
88
|
-
return (i, n) => (u(),
|
|
87
|
+
setup(l) {
|
|
88
|
+
return (i, n) => (u(), c("svg", {
|
|
89
89
|
xmlns: "http://www.w3.org/2000/svg",
|
|
90
90
|
viewBox: "0 0 1024 1024"
|
|
91
91
|
}, [
|
|
92
|
-
|
|
92
|
+
s("path", {
|
|
93
93
|
fill: "currentColor",
|
|
94
94
|
d: "m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704m-32-384v-96a32 32 0 0 1 64 0v96h96a32 32 0 0 1 0 64h-96v96a32 32 0 0 1-64 0v-96h-96a32 32 0 0 1 0-64z"
|
|
95
95
|
})
|
|
96
96
|
]));
|
|
97
97
|
}
|
|
98
98
|
}), ze = xe;
|
|
99
|
-
const U = (
|
|
100
|
-
const n =
|
|
101
|
-
for (const [
|
|
102
|
-
n[
|
|
99
|
+
const U = (l, i) => {
|
|
100
|
+
const n = l.__vccOpts || l;
|
|
101
|
+
for (const [d, x] of i)
|
|
102
|
+
n[d] = x;
|
|
103
103
|
return n;
|
|
104
104
|
}, ke = {}, Ce = {
|
|
105
105
|
t: "1686214149488",
|
|
@@ -110,7 +110,7 @@ const U = (a, i) => {
|
|
|
110
110
|
"p-id": "8490",
|
|
111
111
|
width: "200",
|
|
112
112
|
height: "200"
|
|
113
|
-
},
|
|
113
|
+
}, be = /* @__PURE__ */ s(
|
|
114
114
|
"path",
|
|
115
115
|
{
|
|
116
116
|
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",
|
|
@@ -119,7 +119,7 @@ const U = (a, i) => {
|
|
|
119
119
|
null,
|
|
120
120
|
-1
|
|
121
121
|
/* HOISTED */
|
|
122
|
-
),
|
|
122
|
+
), $e = /* @__PURE__ */ s(
|
|
123
123
|
"path",
|
|
124
124
|
{
|
|
125
125
|
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",
|
|
@@ -128,7 +128,7 @@ const U = (a, i) => {
|
|
|
128
128
|
null,
|
|
129
129
|
-1
|
|
130
130
|
/* HOISTED */
|
|
131
|
-
),
|
|
131
|
+
), Le = /* @__PURE__ */ s(
|
|
132
132
|
"path",
|
|
133
133
|
{
|
|
134
134
|
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",
|
|
@@ -137,7 +137,7 @@ const U = (a, i) => {
|
|
|
137
137
|
null,
|
|
138
138
|
-1
|
|
139
139
|
/* HOISTED */
|
|
140
|
-
),
|
|
140
|
+
), Ve = /* @__PURE__ */ s(
|
|
141
141
|
"path",
|
|
142
142
|
{
|
|
143
143
|
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",
|
|
@@ -146,7 +146,7 @@ const U = (a, i) => {
|
|
|
146
146
|
null,
|
|
147
147
|
-1
|
|
148
148
|
/* HOISTED */
|
|
149
|
-
),
|
|
149
|
+
), Se = /* @__PURE__ */ s(
|
|
150
150
|
"path",
|
|
151
151
|
{
|
|
152
152
|
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",
|
|
@@ -155,7 +155,7 @@ const U = (a, i) => {
|
|
|
155
155
|
null,
|
|
156
156
|
-1
|
|
157
157
|
/* HOISTED */
|
|
158
|
-
), Me = /* @__PURE__ */
|
|
158
|
+
), Me = /* @__PURE__ */ s(
|
|
159
159
|
"path",
|
|
160
160
|
{
|
|
161
161
|
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",
|
|
@@ -164,7 +164,7 @@ const U = (a, i) => {
|
|
|
164
164
|
null,
|
|
165
165
|
-1
|
|
166
166
|
/* HOISTED */
|
|
167
|
-
), Be = /* @__PURE__ */
|
|
167
|
+
), Be = /* @__PURE__ */ s(
|
|
168
168
|
"path",
|
|
169
169
|
{
|
|
170
170
|
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",
|
|
@@ -173,7 +173,7 @@ const U = (a, i) => {
|
|
|
173
173
|
null,
|
|
174
174
|
-1
|
|
175
175
|
/* HOISTED */
|
|
176
|
-
), Ie = /* @__PURE__ */
|
|
176
|
+
), Ie = /* @__PURE__ */ s(
|
|
177
177
|
"path",
|
|
178
178
|
{
|
|
179
179
|
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",
|
|
@@ -183,37 +183,37 @@ const U = (a, i) => {
|
|
|
183
183
|
-1
|
|
184
184
|
/* HOISTED */
|
|
185
185
|
), Ue = [
|
|
186
|
+
be,
|
|
186
187
|
$e,
|
|
187
188
|
Le,
|
|
188
|
-
be,
|
|
189
|
-
Se,
|
|
190
189
|
Ve,
|
|
190
|
+
Se,
|
|
191
191
|
Me,
|
|
192
192
|
Be,
|
|
193
193
|
Ie
|
|
194
194
|
];
|
|
195
|
-
function Ee(
|
|
196
|
-
return u(),
|
|
195
|
+
function Ee(l, i) {
|
|
196
|
+
return u(), c("svg", Ce, Ue);
|
|
197
197
|
}
|
|
198
|
-
const He = /* @__PURE__ */ U(ke, [["render", Ee]]), E = (
|
|
198
|
+
const He = /* @__PURE__ */ U(ke, [["render", Ee]]), E = (l) => (ae("data-v-0b59ad5e"), l = l(), se(), l), je = {
|
|
199
199
|
key: 1,
|
|
200
200
|
class: "upload-btn"
|
|
201
|
-
},
|
|
201
|
+
}, Ae = { class: "tip" }, De = { class: "loading-statu" }, Ne = { class: "operate-btn" }, Oe = { key: 0 }, Re = {
|
|
202
202
|
class: "el-upload-list el-upload-list--picture-card",
|
|
203
203
|
style: { float: "left" }
|
|
204
|
-
},
|
|
204
|
+
}, Fe = ["onClick"], Pe = /* @__PURE__ */ E(() => /* @__PURE__ */ s(
|
|
205
205
|
"span",
|
|
206
206
|
{ class: "error" },
|
|
207
207
|
"上传错误",
|
|
208
208
|
-1
|
|
209
209
|
/* HOISTED */
|
|
210
|
-
)), Te = /* @__PURE__ */ E(() => /* @__PURE__ */
|
|
210
|
+
)), Te = /* @__PURE__ */ E(() => /* @__PURE__ */ s(
|
|
211
211
|
"p",
|
|
212
212
|
null,
|
|
213
213
|
"点击重新上传",
|
|
214
214
|
-1
|
|
215
215
|
/* HOISTED */
|
|
216
|
-
)), Ge = ["src"], Je = { class: "demo-image__preview" }, We = /* @__PURE__ */
|
|
216
|
+
)), Ge = ["src"], Je = { class: "demo-image__preview" }, We = /* @__PURE__ */ m({
|
|
217
217
|
__name: "index",
|
|
218
218
|
props: {
|
|
219
219
|
// 显示的文字
|
|
@@ -231,6 +231,18 @@ const He = /* @__PURE__ */ U(ke, [["render", Ee]]), E = (a) => (ae("data-v-7f114
|
|
|
231
231
|
type: String,
|
|
232
232
|
default: ""
|
|
233
233
|
},
|
|
234
|
+
// 设置上传的请求头部
|
|
235
|
+
headers: {
|
|
236
|
+
type: Object,
|
|
237
|
+
default: () => {
|
|
238
|
+
}
|
|
239
|
+
},
|
|
240
|
+
// 上传时附带的额外参数
|
|
241
|
+
data: {
|
|
242
|
+
type: Object,
|
|
243
|
+
default: () => {
|
|
244
|
+
}
|
|
245
|
+
},
|
|
234
246
|
// 最多上传图片数量
|
|
235
247
|
limit: {
|
|
236
248
|
type: Number,
|
|
@@ -278,111 +290,113 @@ const He = /* @__PURE__ */ U(ke, [["render", Ee]]), E = (a) => (ae("data-v-7f114
|
|
|
278
290
|
default: () => []
|
|
279
291
|
}
|
|
280
292
|
},
|
|
281
|
-
emits: ["delete", "success"],
|
|
282
|
-
setup(
|
|
283
|
-
const n =
|
|
293
|
+
emits: ["delete", "success", "update:modelValue"],
|
|
294
|
+
setup(l, { emit: i }) {
|
|
295
|
+
const n = l, d = (e) => Array.isArray(e) ? e.map((a) => {
|
|
284
296
|
var t;
|
|
285
297
|
return {
|
|
286
|
-
...
|
|
287
|
-
__url: (t =
|
|
298
|
+
...a,
|
|
299
|
+
__url: (t = a.url) != null && t.startsWith("http") ? a.url : `${n.loadUrl}${a.url}`
|
|
288
300
|
};
|
|
289
|
-
}) : [{ url: e, __url: e != null && e.startsWith("http") ? e : `${n.loadUrl}${e}` }];
|
|
301
|
+
}) : e ? [{ url: e, __url: e != null && e.startsWith("http") ? e : `${n.loadUrl}${e}` }] : [];
|
|
290
302
|
K(
|
|
291
303
|
() => n.modelValue,
|
|
292
304
|
(e) => {
|
|
293
|
-
|
|
305
|
+
_.value = d(e);
|
|
294
306
|
},
|
|
295
307
|
{ deep: !0 }
|
|
296
308
|
);
|
|
297
|
-
const x = i, H = C(() => n.size), h = y(null),
|
|
309
|
+
const x = i, H = C(() => n.size), h = y(null), _ = y(d(n.modelValue)), f = y([]), k = y(!1), L = y(0), j = C(
|
|
298
310
|
() => n.tipText || `最多可上传${n.limit}张图片, 每张图片不能超过${n.size}MB`
|
|
299
|
-
),
|
|
300
|
-
|
|
301
|
-
},
|
|
311
|
+
), A = (e, a) => {
|
|
312
|
+
_.value = ie.cloneDeep(d(a));
|
|
313
|
+
}, D = (e) => !(!(e.type === "image/jpeg" || e.type === "image/png") || !(e.size / 1024 / 1024 < H.value)), N = () => !1, O = (e, a) => {
|
|
302
314
|
var t, p;
|
|
303
|
-
e.status = "ready",
|
|
304
|
-
},
|
|
305
|
-
var
|
|
306
|
-
const t =
|
|
315
|
+
e.status = "ready", a !== void 0 && f.value.splice(a, 1), (t = h.value) == null || t.handleStart(e.raw), (p = h.value) == null || p.submit();
|
|
316
|
+
}, R = (e, a) => {
|
|
317
|
+
var V, S;
|
|
318
|
+
const t = _.value.length, p = n.limit - t;
|
|
307
319
|
let g = 0;
|
|
308
320
|
for (; g < p && g < e.length; )
|
|
309
|
-
(
|
|
310
|
-
},
|
|
311
|
-
x("success", e,
|
|
312
|
-
}, P = (e,
|
|
313
|
-
|
|
314
|
-
...
|
|
315
|
-
__url:
|
|
321
|
+
(V = h.value) == null || V.handleStart(e[g]), (S = h.value) == null || S.submit(), g++;
|
|
322
|
+
}, F = (e, a, t) => {
|
|
323
|
+
x("success", e, a, t);
|
|
324
|
+
}, P = (e, a, t) => {
|
|
325
|
+
f.value.push({
|
|
326
|
+
...a,
|
|
327
|
+
__url: a.url
|
|
316
328
|
});
|
|
317
329
|
}, T = (e) => {
|
|
318
|
-
k.value = !0,
|
|
330
|
+
k.value = !0, L.value = _.value.findIndex((a) => a.url === e.url);
|
|
319
331
|
}, G = (e) => {
|
|
320
332
|
ue.downloadByOnlineUrl(e.__url || e.url, e.name);
|
|
321
333
|
}, J = (e) => {
|
|
322
|
-
var
|
|
323
|
-
(
|
|
334
|
+
var a;
|
|
335
|
+
(a = h.value) == null || a.abort(e);
|
|
324
336
|
}, W = (e) => {
|
|
325
|
-
var
|
|
326
|
-
e.status !== "success" && J(e), (
|
|
327
|
-
}, Z = (e,
|
|
328
|
-
|
|
329
|
-
}, q = C(() =>
|
|
330
|
-
return (e,
|
|
337
|
+
var a;
|
|
338
|
+
e.status !== "success" && J(e), (a = h.value) == null || a.handleRemove(e), _.value = _.value.filter((t) => t.uid !== e.uid), x("delete", e);
|
|
339
|
+
}, Z = (e, a) => {
|
|
340
|
+
f.value.splice(a, 1);
|
|
341
|
+
}, q = C(() => n.multiple ? _.value.length + f.value.length < n.limit : _.value.length + f.value.length === 0);
|
|
342
|
+
return (e, a) => (u(), c(
|
|
331
343
|
M,
|
|
332
344
|
null,
|
|
333
345
|
[
|
|
334
|
-
|
|
335
|
-
class:
|
|
346
|
+
o(r(ne), {
|
|
347
|
+
class: b(["ik-image-upload", { preview: l.preview, "hide-upload": !q.value }]),
|
|
336
348
|
ref_key: "refUpload",
|
|
337
349
|
ref: h,
|
|
338
350
|
"list-type": "picture-card",
|
|
339
|
-
accept:
|
|
340
|
-
action:
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
"
|
|
348
|
-
"
|
|
349
|
-
"
|
|
351
|
+
accept: l.accept,
|
|
352
|
+
action: l.action,
|
|
353
|
+
headers: l.headers,
|
|
354
|
+
data: l.data,
|
|
355
|
+
"file-list": _.value,
|
|
356
|
+
"onUpdate:fileList": a[0] || (a[0] = (t) => _.value = t),
|
|
357
|
+
multiple: l.multiple,
|
|
358
|
+
limit: l.limit,
|
|
359
|
+
"on-change": A,
|
|
360
|
+
"before-upload": D,
|
|
361
|
+
"before-remove": N,
|
|
362
|
+
"on-exceed": R,
|
|
363
|
+
"on-success": F,
|
|
350
364
|
"on-error": P,
|
|
351
365
|
drag: ""
|
|
352
366
|
}, Q({
|
|
353
367
|
trigger: v(() => [
|
|
354
|
-
e.$slots.trigger ? X(e.$slots, "trigger", { key: 0 }, void 0, !0) : (u(),
|
|
355
|
-
|
|
368
|
+
e.$slots.trigger ? X(e.$slots, "trigger", { key: 0 }, void 0, !0) : (u(), c("div", je, [
|
|
369
|
+
o(r(w), null, {
|
|
356
370
|
default: v(() => [
|
|
357
|
-
|
|
371
|
+
o(r(ge))
|
|
358
372
|
]),
|
|
359
373
|
_: 1
|
|
360
374
|
/* STABLE */
|
|
361
375
|
}),
|
|
362
|
-
|
|
376
|
+
s(
|
|
363
377
|
"span",
|
|
364
378
|
null,
|
|
365
|
-
|
|
379
|
+
$(l.title),
|
|
366
380
|
1
|
|
367
381
|
/* TEXT */
|
|
368
382
|
)
|
|
369
383
|
]))
|
|
370
384
|
]),
|
|
371
385
|
file: v(({ file: t }) => [
|
|
372
|
-
|
|
386
|
+
s(
|
|
373
387
|
"div",
|
|
374
388
|
{
|
|
375
|
-
class:
|
|
389
|
+
class: b(["load-list", { loading: t.status === "uploading" }]),
|
|
376
390
|
"element-loading-background": "var(--ik-upload-bg)"
|
|
377
391
|
},
|
|
378
392
|
[
|
|
379
|
-
B(
|
|
393
|
+
B(s(
|
|
380
394
|
"div",
|
|
381
|
-
|
|
395
|
+
De,
|
|
382
396
|
[
|
|
383
|
-
|
|
397
|
+
o(He),
|
|
384
398
|
Y(
|
|
385
|
-
" 上传" +
|
|
399
|
+
" 上传" + $(t.percentage) + "% ",
|
|
386
400
|
1
|
|
387
401
|
/* TEXT */
|
|
388
402
|
)
|
|
@@ -393,43 +407,43 @@ const He = /* @__PURE__ */ U(ke, [["render", Ee]]), E = (a) => (ae("data-v-7f114
|
|
|
393
407
|
[I, t.status === "uploading"]
|
|
394
408
|
]),
|
|
395
409
|
z(` <img :src="file.url" alt="" :style="{ 'object-fit': fit }" /> `),
|
|
396
|
-
|
|
410
|
+
o(r(oe), {
|
|
397
411
|
style: { width: "100%", height: "100%" },
|
|
398
412
|
src: t.__url || t.url,
|
|
399
413
|
"zoom-rate": 1.2,
|
|
400
414
|
"initial-index": 0,
|
|
401
415
|
fit: "contain"
|
|
402
416
|
}, null, 8, ["src"]),
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
417
|
+
s("span", Ne, [
|
|
418
|
+
s("span", null, [
|
|
419
|
+
o(r(w), {
|
|
406
420
|
onClick: (p) => T(t)
|
|
407
421
|
}, {
|
|
408
422
|
default: v(() => [
|
|
409
|
-
|
|
423
|
+
o(r(ze))
|
|
410
424
|
]),
|
|
411
425
|
_: 2
|
|
412
426
|
/* DYNAMIC */
|
|
413
427
|
}, 1032, ["onClick"])
|
|
414
428
|
]),
|
|
415
|
-
|
|
416
|
-
|
|
429
|
+
s("span", null, [
|
|
430
|
+
o(r(w), {
|
|
417
431
|
onClick: (p) => G(t)
|
|
418
432
|
}, {
|
|
419
433
|
default: v(() => [
|
|
420
|
-
|
|
434
|
+
o(r(me))
|
|
421
435
|
]),
|
|
422
436
|
_: 2
|
|
423
437
|
/* DYNAMIC */
|
|
424
438
|
}, 1032, ["onClick"])
|
|
425
439
|
]),
|
|
426
|
-
|
|
427
|
-
|
|
440
|
+
l.preview ? z("v-if", !0) : (u(), c("span", Oe, [
|
|
441
|
+
o(r(w), {
|
|
428
442
|
type: "warning",
|
|
429
443
|
onClick: (p) => W(t)
|
|
430
444
|
}, {
|
|
431
445
|
default: v(() => [
|
|
432
|
-
|
|
446
|
+
o(r(ve))
|
|
433
447
|
]),
|
|
434
448
|
_: 2
|
|
435
449
|
/* DYNAMIC */
|
|
@@ -442,55 +456,55 @@ const He = /* @__PURE__ */ U(ke, [["render", Ee]]), E = (a) => (ae("data-v-7f114
|
|
|
442
456
|
)
|
|
443
457
|
]),
|
|
444
458
|
default: v(() => [
|
|
445
|
-
|
|
446
|
-
(u(!0),
|
|
459
|
+
s("ul", Re, [
|
|
460
|
+
(u(!0), c(
|
|
447
461
|
M,
|
|
448
462
|
null,
|
|
449
|
-
ee(
|
|
463
|
+
ee(f.value, (t, p) => (u(), c("li", {
|
|
450
464
|
class: "el-upload-list__item",
|
|
451
465
|
key: t.uid
|
|
452
466
|
}, [
|
|
453
|
-
|
|
454
|
-
|
|
467
|
+
s("span", null, [
|
|
468
|
+
o(r(w), {
|
|
455
469
|
onClick: (g) => Z(t, p)
|
|
456
470
|
}, {
|
|
457
471
|
default: v(() => [
|
|
458
|
-
|
|
472
|
+
o(r(_e))
|
|
459
473
|
]),
|
|
460
474
|
_: 2
|
|
461
475
|
/* DYNAMIC */
|
|
462
476
|
}, 1032, ["onClick"])
|
|
463
477
|
]),
|
|
464
|
-
|
|
478
|
+
s(
|
|
465
479
|
"div",
|
|
466
480
|
{
|
|
467
|
-
class:
|
|
481
|
+
class: b(["load-list", {
|
|
468
482
|
loading: t.status === "uploading",
|
|
469
483
|
fail: t.status === "fail"
|
|
470
484
|
}]),
|
|
471
485
|
"element-loading-background": "var(--ik-upload-bg)"
|
|
472
486
|
},
|
|
473
487
|
[
|
|
474
|
-
B(
|
|
488
|
+
B(s("div", {
|
|
475
489
|
class: "loading-statu",
|
|
476
|
-
onClick: (g) =>
|
|
490
|
+
onClick: (g) => O(t, p)
|
|
477
491
|
}, [
|
|
478
|
-
|
|
492
|
+
o(r(w), { size: 24 }, {
|
|
479
493
|
default: v(() => [
|
|
480
|
-
|
|
494
|
+
o(r(ye))
|
|
481
495
|
]),
|
|
482
496
|
_: 1
|
|
483
497
|
/* STABLE */
|
|
484
498
|
}),
|
|
485
499
|
Pe,
|
|
486
500
|
Te
|
|
487
|
-
], 8,
|
|
501
|
+
], 8, Fe), [
|
|
488
502
|
[I, t.status === "fail"]
|
|
489
503
|
]),
|
|
490
|
-
|
|
504
|
+
s("img", {
|
|
491
505
|
src: t.__url,
|
|
492
506
|
alt: "",
|
|
493
|
-
style: te({ "object-fit":
|
|
507
|
+
style: te({ "object-fit": l.fit })
|
|
494
508
|
}, null, 12, Ge)
|
|
495
509
|
],
|
|
496
510
|
2
|
|
@@ -505,31 +519,31 @@ const He = /* @__PURE__ */ U(ke, [["render", Ee]]), E = (a) => (ae("data-v-7f114
|
|
|
505
519
|
_: 2
|
|
506
520
|
/* DYNAMIC */
|
|
507
521
|
}, [
|
|
508
|
-
|
|
522
|
+
l.tip ? {
|
|
509
523
|
name: "tip",
|
|
510
524
|
fn: v(() => [
|
|
511
|
-
|
|
525
|
+
s(
|
|
512
526
|
"span",
|
|
513
|
-
|
|
514
|
-
|
|
527
|
+
Ae,
|
|
528
|
+
$(j.value),
|
|
515
529
|
1
|
|
516
530
|
/* TEXT */
|
|
517
531
|
)
|
|
518
532
|
]),
|
|
519
533
|
key: "0"
|
|
520
534
|
} : void 0
|
|
521
|
-
]), 1032, ["class", "accept", "action", "file-list", "multiple", "limit"]),
|
|
535
|
+
]), 1032, ["class", "accept", "action", "headers", "data", "file-list", "multiple", "limit"]),
|
|
522
536
|
z(" 文件预览 "),
|
|
523
|
-
|
|
537
|
+
s("div", Je, [
|
|
524
538
|
k.value ? (u(), le(r(re), {
|
|
525
539
|
key: 0,
|
|
526
540
|
"lock-scroll": "",
|
|
527
541
|
"hide-on-click-modal": "",
|
|
528
|
-
onClose:
|
|
542
|
+
onClose: a[1] || (a[1] = () => {
|
|
529
543
|
k.value = !1;
|
|
530
544
|
}),
|
|
531
|
-
"url-list": _
|
|
532
|
-
"initial-index":
|
|
545
|
+
"url-list": d(_.value).map((t) => t.__url),
|
|
546
|
+
"initial-index": L.value
|
|
533
547
|
}, null, 8, ["url-list", "initial-index"])) : z("v-if", !0)
|
|
534
548
|
])
|
|
535
549
|
],
|
|
@@ -538,7 +552,7 @@ const He = /* @__PURE__ */ U(ke, [["render", Ee]]), E = (a) => (ae("data-v-7f114
|
|
|
538
552
|
));
|
|
539
553
|
}
|
|
540
554
|
});
|
|
541
|
-
const Ze = /* @__PURE__ */ U(We, [["__scopeId", "data-v-
|
|
555
|
+
const Ze = /* @__PURE__ */ U(We, [["__scopeId", "data-v-0b59ad5e"]]), Xe = ce(Ze);
|
|
542
556
|
export {
|
|
543
557
|
Xe as IkUploadImage,
|
|
544
558
|
Xe as default
|