@lemon30_npm/csit-vue3 1.0.71 → 1.0.73
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/csit-vue3.js +412 -398
- package/dist/index.css +1 -1
- package/dist/lib/ci-upload/index.css +1 -1
- package/dist/lib/ci-upload/index.vue.js +2 -2
- package/dist/lib/ci-upload/index.vue2.js +144 -134
- package/dist/lib/ci-upload/props/index.js +5 -1
- package/dist/types/src/components/components-project/ci-upload/index.vue.d.ts +2 -0
- package/dist/types/src/components/components-project/ci-upload/props/index.d.ts +2 -0
- package/dist/types/src/components/components-project/ci-upload/type.d.ts +2 -0
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ElUpload as oe, ElButton as te, ElLink as se, ElTooltip as
|
|
2
|
-
import { defineComponent as ne, mergeDefaults as ie, useSlots as re, ref as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
1
|
+
import { ElUpload as oe, ElButton as te, ElLink as se, ElTooltip as ae, ElDivider as le } from "element-plus/es";
|
|
2
|
+
import { defineComponent as ne, mergeDefaults as ie, useSlots as re, ref as _, watch as de, createElementBlock as a, openBlock as s, normalizeClass as w, createBlock as v, createCommentVNode as n, mergeProps as ue, unref as f, createSlots as pe, withCtx as r, renderSlot as U, Fragment as g, createElementVNode as l, toDisplayString as y, renderList as $, normalizeProps as me, guardReactiveProps as ce, createTextVNode as h, createVNode as b, normalizeStyle as z, nextTick as fe } from "vue";
|
|
3
|
+
import P from "./icons/icon-upload-btn.svg.js";
|
|
4
|
+
import R from "./icons/icon-upload-btn-hover.svg.js";
|
|
5
|
+
import F from "./icons/icon-upload-btn-disabled.svg.js";
|
|
6
6
|
import ge from "./icons/icon-loading-blue.svg.js";
|
|
7
7
|
import ye from "./icons/icon-upload-success.svg.js";
|
|
8
8
|
import we from "./icons/icon-upload-retry.svg.js";
|
|
@@ -11,43 +11,43 @@ import { ElMessageBox as ve, ElMessage as he } from "element-plus";
|
|
|
11
11
|
import { useUpload as be } from "./hooks/useUpload.js";
|
|
12
12
|
import { useUploadRetry as Be } from "./hooks/useUploadRetry.js";
|
|
13
13
|
import { downloadFileWithAxios as Ce } from "./utils/file.js";
|
|
14
|
-
import { getFileIconByName as
|
|
14
|
+
import { getFileIconByName as Se } from "./utils/file-icon-maps.js";
|
|
15
15
|
import { useExposeMethods as Ue } from "./expose/index.js";
|
|
16
|
-
import { useCiUploadComputed as
|
|
16
|
+
import { useCiUploadComputed as Te } from "./computed/index.js";
|
|
17
17
|
import { defaultProps as Ne } from "./props/index.js";
|
|
18
|
-
import { useFileSize as
|
|
19
|
-
import { handleUploadValidateFail as
|
|
20
|
-
import { createUploadRules as
|
|
21
|
-
import { confirmBeforeUpload as
|
|
22
|
-
import { abortUploadFlow as
|
|
23
|
-
const
|
|
18
|
+
import { useFileSize as _e } from "./hooks/useFileSize.js";
|
|
19
|
+
import { handleUploadValidateFail as Ee } from "./hooks/useUploadValidateFail.js";
|
|
20
|
+
import { createUploadRules as De } from "./hooks/rules/createUploadRules.js";
|
|
21
|
+
import { confirmBeforeUpload as $e } from "./hooks/useConfirmBeforeUpload.js";
|
|
22
|
+
import { abortUploadFlow as ze } from "./hooks/useAbortUploadFlow.js";
|
|
23
|
+
const Pe = {
|
|
24
24
|
key: 0,
|
|
25
25
|
class: "tip-slot-textInfo"
|
|
26
|
-
},
|
|
26
|
+
}, Re = {
|
|
27
27
|
key: 1,
|
|
28
28
|
class: "default-tip-slot-textInfo"
|
|
29
|
-
},
|
|
29
|
+
}, Fe = { class: "upload-btn-text" }, Le = {
|
|
30
30
|
key: 0,
|
|
31
31
|
class: "tip-slot-textInfo"
|
|
32
|
-
},
|
|
32
|
+
}, Ie = {
|
|
33
33
|
key: 1,
|
|
34
34
|
class: "default-tip-slot-textInfo"
|
|
35
|
-
},
|
|
35
|
+
}, Ke = { class: "file-item-top" }, Ve = { class: "file-name-file-icon" }, Me = ["src"], qe = { class: "top-right" }, He = {
|
|
36
36
|
key: 0,
|
|
37
37
|
class: "file-size"
|
|
38
|
-
},
|
|
38
|
+
}, Ae = {
|
|
39
39
|
key: 1,
|
|
40
40
|
class: "file-operate-btn"
|
|
41
|
-
},
|
|
41
|
+
}, Oe = { class: "file-status-icon-wrapper" }, We = { class: "uploading-percentage" }, je = ["onClick"], Ge = {
|
|
42
42
|
key: 0,
|
|
43
43
|
class: "file-item-bottom file-progress-bar"
|
|
44
|
-
},
|
|
44
|
+
}, Je = {
|
|
45
45
|
key: 0,
|
|
46
46
|
class: "file-item-bottom file-progress-bar download-progress-bar"
|
|
47
|
-
},
|
|
47
|
+
}, Qe = {
|
|
48
48
|
name: "CiUpload"
|
|
49
|
-
},
|
|
50
|
-
...
|
|
49
|
+
}, vo = /* @__PURE__ */ ne({
|
|
50
|
+
...Qe,
|
|
51
51
|
props: /* @__PURE__ */ ie({
|
|
52
52
|
action: {},
|
|
53
53
|
downloadUrl: {},
|
|
@@ -77,25 +77,27 @@ const Re = { class: "CiUpload" }, Fe = {
|
|
|
77
77
|
maxFileNameLength: {},
|
|
78
78
|
minFileNameLength: {},
|
|
79
79
|
confirmBeforeUpload: { type: Boolean },
|
|
80
|
-
confirmBeforeUploadText: {}
|
|
80
|
+
confirmBeforeUploadText: {},
|
|
81
|
+
showUploadSecretTip: { type: Boolean },
|
|
82
|
+
uploadSecretTipText: {}
|
|
81
83
|
}, Ne),
|
|
82
84
|
emits: ["update:fileList", "onSuccess", "onRemove", "onChange", "onError", "onCustomDownload"],
|
|
83
|
-
setup(
|
|
84
|
-
const { formatFileSize: V } =
|
|
85
|
+
setup(L, { expose: I, emit: K }) {
|
|
86
|
+
const { formatFileSize: V } = _e(), M = re(), E = _(), S = _(!1), k = _([]), { checkUploadStatus: q } = Ue(k), i = L, { customHttpRequest: H } = be(i.axiosInstance), d = K;
|
|
85
87
|
I({
|
|
86
88
|
checkUploadStatus: q
|
|
87
89
|
});
|
|
88
|
-
const { retryUpload: A } = Be(
|
|
90
|
+
const { retryUpload: A } = Be(k, d, i);
|
|
89
91
|
de(
|
|
90
92
|
() => i.fileList,
|
|
91
93
|
(e) => {
|
|
92
|
-
|
|
94
|
+
k.value = e.map((o) => ({ ...o }));
|
|
93
95
|
},
|
|
94
96
|
{ immediate: !0 }
|
|
95
97
|
);
|
|
96
|
-
const
|
|
98
|
+
const T = (e) => {
|
|
97
99
|
var o;
|
|
98
|
-
|
|
100
|
+
S.value = !1, (o = E.value) == null || o.handleRemove(e);
|
|
99
101
|
}, N = (e) => {
|
|
100
102
|
if (i.customDownload) {
|
|
101
103
|
d("onCustomDownload", e);
|
|
@@ -118,23 +120,23 @@ const Re = { class: "CiUpload" }, Fe = {
|
|
|
118
120
|
}, O = async (e) => {
|
|
119
121
|
if (i.confirmBeforeUpload)
|
|
120
122
|
try {
|
|
121
|
-
await
|
|
123
|
+
await $e(i.confirmBeforeUploadText);
|
|
122
124
|
} catch {
|
|
123
|
-
return
|
|
125
|
+
return ze(S);
|
|
124
126
|
}
|
|
125
|
-
const o =
|
|
127
|
+
const o = De(i);
|
|
126
128
|
for (const u of o) {
|
|
127
|
-
const
|
|
128
|
-
if (
|
|
129
|
-
return
|
|
129
|
+
const p = u(e);
|
|
130
|
+
if (p !== !0)
|
|
131
|
+
return Ee(p, {
|
|
130
132
|
rawFile: e,
|
|
131
133
|
fileList: i.fileList,
|
|
132
134
|
emit: d,
|
|
133
|
-
internalRemoveFlag:
|
|
135
|
+
internalRemoveFlag: S
|
|
134
136
|
});
|
|
135
137
|
}
|
|
136
138
|
return !0;
|
|
137
|
-
}, W = (e, o) =>
|
|
139
|
+
}, W = (e, o) => S.value ? !0 : ve.confirm(
|
|
138
140
|
`确定删除 ${e.fileName || e.name} 文件?`,
|
|
139
141
|
"温馨提示",
|
|
140
142
|
{
|
|
@@ -154,27 +156,34 @@ const Re = { class: "CiUpload" }, Fe = {
|
|
|
154
156
|
d("update:fileList", [...u, o]), d("onError", o, u);
|
|
155
157
|
});
|
|
156
158
|
}, J = (e, o, u) => {
|
|
157
|
-
var
|
|
159
|
+
var m, B, C;
|
|
158
160
|
if (!e) return;
|
|
159
|
-
const
|
|
160
|
-
|
|
161
|
+
const p = u.find((t) => t.uid === o.uid);
|
|
162
|
+
p && (p.fileName = ((m = e == null ? void 0 : e.data) == null ? void 0 : m.fileName) || o.name, p.fileKey = ((B = e == null ? void 0 : e.data) == null ? void 0 : B.fileKey) || "当前接口没有返回fileKey字段", p.fileSize = ((C = e == null ? void 0 : e.data) == null ? void 0 : C.fileSize) || o.size), d("update:fileList", u), d("onSuccess", o, u);
|
|
161
163
|
}, Q = (e, o) => {
|
|
162
164
|
e.status === "success" && !e.response || (d("update:fileList", o), d("onChange", e, o));
|
|
163
165
|
}, X = (e, o) => {
|
|
164
166
|
d("update:fileList", o), d("onRemove", e, o);
|
|
165
|
-
}, { hasRealDefaultSlot: Y, finalBeforeUpload: Z, defaultTipSlotTextInfo:
|
|
167
|
+
}, { hasRealDefaultSlot: Y, finalBeforeUpload: Z, defaultTipSlotTextInfo: D, otherSlots: x } = Te(i, M, O);
|
|
166
168
|
return (e, o) => {
|
|
167
|
-
const u = te,
|
|
168
|
-
return s(),
|
|
169
|
-
|
|
169
|
+
const u = te, p = oe, m = se, B = ae, C = le;
|
|
170
|
+
return s(), a("div", {
|
|
171
|
+
class: w(["CiUpload", {}])
|
|
172
|
+
}, [
|
|
173
|
+
e.readonly ? n("", !0) : (s(), v(p, ue({
|
|
170
174
|
key: 0,
|
|
171
|
-
class: ["ci-el-upload-component", {
|
|
175
|
+
class: ["ci-el-upload-component", {
|
|
176
|
+
"is-disabled": e.disabled,
|
|
177
|
+
"is-drag": e.drag,
|
|
178
|
+
"is-disabled-upload-secret": e.showUploadSecretTip && e.drag
|
|
179
|
+
}],
|
|
180
|
+
"data-secret-tip": e.uploadSecretTipText,
|
|
172
181
|
ref_key: "uploadRef",
|
|
173
|
-
ref:
|
|
182
|
+
ref: E,
|
|
174
183
|
action: e.action,
|
|
175
184
|
data: e.data,
|
|
176
185
|
headers: e.headers,
|
|
177
|
-
"file-list":
|
|
186
|
+
"file-list": k.value,
|
|
178
187
|
accept: e.accept,
|
|
179
188
|
limit: e.limit,
|
|
180
189
|
multiple: e.multiple,
|
|
@@ -189,58 +198,59 @@ const Re = { class: "CiUpload" }, Fe = {
|
|
|
189
198
|
"on-error": G,
|
|
190
199
|
"http-request": f(H),
|
|
191
200
|
"show-file-list": !1
|
|
192
|
-
}, e.$attrs),
|
|
201
|
+
}, e.$attrs), pe({
|
|
193
202
|
default: r(() => [
|
|
194
|
-
f(Y) ? U(e.$slots, "default", { key: 0 }, void 0, !0) : (s(),
|
|
195
|
-
e.drag ? (s(),
|
|
196
|
-
o[0] || (o[0] =
|
|
203
|
+
f(Y) ? U(e.$slots, "default", { key: 0 }, void 0, !0) : (s(), a(g, { key: 1 }, [
|
|
204
|
+
e.drag ? (s(), a(g, { key: 0 }, [
|
|
205
|
+
o[0] || (o[0] = l("img", {
|
|
197
206
|
class: "upload-btn-icon",
|
|
198
|
-
src:
|
|
207
|
+
src: P,
|
|
199
208
|
alt: ""
|
|
200
209
|
}, null, -1)),
|
|
201
|
-
o[1] || (o[1] =
|
|
210
|
+
o[1] || (o[1] = l("img", {
|
|
202
211
|
class: "upload-btn-icon-hover",
|
|
203
|
-
src:
|
|
212
|
+
src: R,
|
|
204
213
|
alt: ""
|
|
205
214
|
}, null, -1)),
|
|
206
|
-
o[2] || (o[2] =
|
|
215
|
+
o[2] || (o[2] = l("img", {
|
|
207
216
|
class: "upload-btn-icon-disabled",
|
|
208
|
-
src:
|
|
217
|
+
src: F,
|
|
209
218
|
alt: ""
|
|
210
219
|
}, null, -1)),
|
|
211
|
-
o[3] || (o[3] =
|
|
212
|
-
|
|
213
|
-
|
|
220
|
+
o[3] || (o[3] = l("div", { class: "drag-text-info" }, [
|
|
221
|
+
l("span", { class: "drag-text-info-click" }, "点击上传"),
|
|
222
|
+
l("span", { class: "drag-text-info-black" }, "或将文件拖拽到这里上传")
|
|
214
223
|
], -1)),
|
|
215
|
-
e.$slots.tip ? (s(),
|
|
224
|
+
e.$slots.tip ? (s(), a("div", Pe, [
|
|
216
225
|
U(e.$slots, "tip", {}, void 0, !0)
|
|
217
|
-
])) : (s(),
|
|
218
|
-
], 64)) : (s(),
|
|
226
|
+
])) : (s(), a("div", Re, y(f(D)), 1))
|
|
227
|
+
], 64)) : (s(), v(u, {
|
|
219
228
|
key: 1,
|
|
220
|
-
class: "upload-btn",
|
|
229
|
+
class: w(["upload-btn", { "is-disabled-upload-secret": e.showUploadSecretTip }]),
|
|
230
|
+
"data-secret-tip": e.uploadSecretTipText,
|
|
221
231
|
disabled: e.disabled
|
|
222
232
|
}, {
|
|
223
233
|
default: r(() => [
|
|
224
|
-
o[4] || (o[4] =
|
|
234
|
+
o[4] || (o[4] = l("img", {
|
|
225
235
|
class: "upload-btn-icon",
|
|
226
|
-
src:
|
|
236
|
+
src: P,
|
|
227
237
|
alt: ""
|
|
228
238
|
}, null, -1)),
|
|
229
|
-
o[5] || (o[5] =
|
|
239
|
+
o[5] || (o[5] = l("img", {
|
|
230
240
|
class: "upload-btn-icon-hover",
|
|
231
|
-
src:
|
|
241
|
+
src: R,
|
|
232
242
|
alt: ""
|
|
233
243
|
}, null, -1)),
|
|
234
|
-
o[6] || (o[6] =
|
|
244
|
+
o[6] || (o[6] = l("img", {
|
|
235
245
|
class: "upload-btn-icon-disabled",
|
|
236
|
-
src:
|
|
246
|
+
src: F,
|
|
237
247
|
alt: ""
|
|
238
248
|
}, null, -1)),
|
|
239
|
-
|
|
249
|
+
l("span", Fe, y(e.uploadBtnText), 1)
|
|
240
250
|
]),
|
|
241
251
|
_: 1,
|
|
242
252
|
__: [4, 5, 6]
|
|
243
|
-
}, 8, ["disabled"]))
|
|
253
|
+
}, 8, ["class", "data-secret-tip", "disabled"]))
|
|
244
254
|
], 64))
|
|
245
255
|
]),
|
|
246
256
|
_: 2
|
|
@@ -248,158 +258,158 @@ const Re = { class: "CiUpload" }, Fe = {
|
|
|
248
258
|
e.drag ? void 0 : {
|
|
249
259
|
name: "tip",
|
|
250
260
|
fn: r(() => [
|
|
251
|
-
e.$slots.tip ? (s(),
|
|
261
|
+
e.$slots.tip ? (s(), a("div", Le, [
|
|
252
262
|
U(e.$slots, "tip", {}, void 0, !0)
|
|
253
|
-
])) : (s(),
|
|
263
|
+
])) : (s(), a("div", Ie, y(f(D)), 1))
|
|
254
264
|
]),
|
|
255
265
|
key: "0"
|
|
256
266
|
},
|
|
257
|
-
|
|
267
|
+
$(f(x), (t, c) => ({
|
|
258
268
|
name: c,
|
|
259
269
|
fn: r((ee) => [
|
|
260
|
-
U(e.$slots, c,
|
|
270
|
+
U(e.$slots, c, me(ce(ee || {})), void 0, !0)
|
|
261
271
|
])
|
|
262
272
|
}))
|
|
263
|
-
]), 1040, ["class", "action", "data", "headers", "file-list", "accept", "limit", "multiple", "drag", "disabled", "before-upload", "http-request"])),
|
|
264
|
-
|
|
273
|
+
]), 1040, ["class", "data-secret-tip", "action", "data", "headers", "file-list", "accept", "limit", "multiple", "drag", "disabled", "before-upload", "http-request"])),
|
|
274
|
+
k.value.length ? (s(), a("div", {
|
|
265
275
|
key: 1,
|
|
266
|
-
class:
|
|
276
|
+
class: w(["custom-file-list-default", { "is-readonly": e.readonly }])
|
|
267
277
|
}, [
|
|
268
|
-
(s(!0),
|
|
278
|
+
(s(!0), a(g, null, $(k.value, (t) => (s(), a("div", {
|
|
269
279
|
class: "file-item-wrapper",
|
|
270
280
|
key: t.uid
|
|
271
281
|
}, [
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
e.showFileExtIcon ? (s(),
|
|
282
|
+
l("div", Ke, [
|
|
283
|
+
l("div", Ve, [
|
|
284
|
+
e.showFileExtIcon ? (s(), a("img", {
|
|
275
285
|
key: 0,
|
|
276
286
|
class: "file-icon",
|
|
277
|
-
src: f(
|
|
278
|
-
}, null, 8,
|
|
279
|
-
e.showFileNameEllipsisTooltip ? (s(),
|
|
287
|
+
src: f(Se)(t.fileName || t.name)
|
|
288
|
+
}, null, 8, Me)) : n("", !0),
|
|
289
|
+
e.showFileNameEllipsisTooltip ? (s(), v(B, {
|
|
280
290
|
key: 2,
|
|
281
291
|
effect: "dark",
|
|
282
292
|
content: t.fileName || t.name,
|
|
283
293
|
placement: "right"
|
|
284
294
|
}, {
|
|
285
295
|
default: r(() => [
|
|
286
|
-
|
|
287
|
-
class:
|
|
296
|
+
b(m, {
|
|
297
|
+
class: w(["top-left file-name", { "is-show-file-name-ellipsis-tooltip": e.showFileNameEllipsisTooltip }]),
|
|
288
298
|
disabled: t.status === "downloading" || t.status === "uploading" || t.status === "fail",
|
|
289
299
|
onClick: (c) => N(t)
|
|
290
300
|
}, {
|
|
291
301
|
default: r(() => [
|
|
292
|
-
|
|
302
|
+
h(y(t.fileName || t.name), 1)
|
|
293
303
|
]),
|
|
294
304
|
_: 2
|
|
295
305
|
}, 1032, ["class", "disabled", "onClick"])
|
|
296
306
|
]),
|
|
297
307
|
_: 2
|
|
298
|
-
}, 1032, ["content"])) : (s(),
|
|
308
|
+
}, 1032, ["content"])) : (s(), v(m, {
|
|
299
309
|
key: 1,
|
|
300
310
|
class: "top-left file-name",
|
|
301
311
|
disabled: t.status === "downloading" || t.status === "uploading" || t.status === "fail",
|
|
302
312
|
onClick: (c) => N(t)
|
|
303
313
|
}, {
|
|
304
314
|
default: r(() => [
|
|
305
|
-
|
|
315
|
+
h(y(t.fileName || t.name), 1)
|
|
306
316
|
]),
|
|
307
317
|
_: 2
|
|
308
318
|
}, 1032, ["disabled", "onClick"]))
|
|
309
319
|
]),
|
|
310
|
-
|
|
311
|
-
e.showFileSize ? (s(),
|
|
312
|
-
t.status !== "fail" ? (s(),
|
|
313
|
-
t.status !== "uploading" ? (s(),
|
|
314
|
-
e.showPreviewBtn ? (s(),
|
|
315
|
-
|
|
316
|
-
onClick: (c) =>
|
|
320
|
+
l("div", qe, [
|
|
321
|
+
e.showFileSize ? (s(), a("span", He, y(f(V)(t.fileSize || t.size)), 1)) : n("", !0),
|
|
322
|
+
t.status !== "fail" ? (s(), a("div", Ae, [
|
|
323
|
+
t.status !== "uploading" ? (s(), a(g, { key: 0 }, [
|
|
324
|
+
e.showPreviewBtn ? (s(), a(g, { key: 0 }, [
|
|
325
|
+
b(m, {
|
|
326
|
+
onClick: (c) => T(t)
|
|
317
327
|
}, {
|
|
318
328
|
default: r(() => o[7] || (o[7] = [
|
|
319
|
-
|
|
329
|
+
h(" 在线预览 ")
|
|
320
330
|
])),
|
|
321
331
|
_: 2,
|
|
322
332
|
__: [7]
|
|
323
333
|
}, 1032, ["onClick"]),
|
|
324
|
-
|
|
334
|
+
b(C, { direction: "vertical" })
|
|
325
335
|
], 64)) : n("", !0),
|
|
326
|
-
e.showDownloadBtn ? (s(),
|
|
327
|
-
|
|
336
|
+
e.showDownloadBtn ? (s(), a(g, { key: 1 }, [
|
|
337
|
+
b(m, {
|
|
328
338
|
disabled: t.status === "downloading",
|
|
329
339
|
onClick: (c) => N(t)
|
|
330
340
|
}, {
|
|
331
341
|
default: r(() => [
|
|
332
|
-
|
|
342
|
+
h(y(t.status === "downloading" && e.showDownloadProgress && !e.customDownload ? `下载中...${t.downloadPercentage || 0}%` : "下载"), 1)
|
|
333
343
|
]),
|
|
334
344
|
_: 2
|
|
335
345
|
}, 1032, ["disabled", "onClick"]),
|
|
336
|
-
e.showDeleteBtn && !e.readonly ? (s(),
|
|
346
|
+
e.showDeleteBtn && !e.readonly ? (s(), v(C, {
|
|
337
347
|
key: 0,
|
|
338
348
|
direction: "vertical"
|
|
339
349
|
})) : n("", !0)
|
|
340
350
|
], 64)) : n("", !0),
|
|
341
|
-
e.showDeleteBtn && !e.readonly ? (s(),
|
|
351
|
+
e.showDeleteBtn && !e.readonly ? (s(), v(m, {
|
|
342
352
|
key: 2,
|
|
343
|
-
onClick: (c) =>
|
|
353
|
+
onClick: (c) => T(t)
|
|
344
354
|
}, {
|
|
345
355
|
default: r(() => o[8] || (o[8] = [
|
|
346
|
-
|
|
356
|
+
h("删除")
|
|
347
357
|
])),
|
|
348
358
|
_: 2,
|
|
349
359
|
__: [8]
|
|
350
360
|
}, 1032, ["onClick"])) : n("", !0)
|
|
351
361
|
], 64)) : n("", !0)
|
|
352
362
|
])) : n("", !0),
|
|
353
|
-
|
|
354
|
-
t.status === "uploading" ? (s(),
|
|
363
|
+
l("div", Oe, [
|
|
364
|
+
t.status === "uploading" ? (s(), a("div", {
|
|
355
365
|
key: 0,
|
|
356
|
-
class:
|
|
366
|
+
class: w(t.status)
|
|
357
367
|
}, [
|
|
358
|
-
o[9] || (o[9] =
|
|
368
|
+
o[9] || (o[9] = l("img", {
|
|
359
369
|
class: "uploading-icon",
|
|
360
370
|
src: ge
|
|
361
371
|
}, null, -1)),
|
|
362
|
-
|
|
372
|
+
l("span", We, y(t.percentage) + "%", 1)
|
|
363
373
|
], 2)) : n("", !0),
|
|
364
|
-
e.readonly ? n("", !0) : (s(),
|
|
365
|
-
t.status === "success" || t.status === "downloading" ? (s(),
|
|
374
|
+
e.readonly ? n("", !0) : (s(), a(g, { key: 1 }, [
|
|
375
|
+
t.status === "success" || t.status === "downloading" ? (s(), a("span", {
|
|
366
376
|
key: 0,
|
|
367
|
-
class:
|
|
377
|
+
class: w(t.status)
|
|
368
378
|
}, o[10] || (o[10] = [
|
|
369
|
-
|
|
379
|
+
l("img", {
|
|
370
380
|
class: "success-icon",
|
|
371
381
|
src: ye
|
|
372
382
|
}, null, -1)
|
|
373
383
|
]), 2)) : n("", !0)
|
|
374
384
|
], 64)),
|
|
375
|
-
t.status === "fail" ? (s(),
|
|
385
|
+
t.status === "fail" ? (s(), a("div", {
|
|
376
386
|
key: 2,
|
|
377
|
-
class:
|
|
387
|
+
class: w(["fail-icon-wrapper", t.status])
|
|
378
388
|
}, [
|
|
379
|
-
|
|
380
|
-
onClick: (c) =>
|
|
389
|
+
b(m, {
|
|
390
|
+
onClick: (c) => T(t)
|
|
381
391
|
}, {
|
|
382
392
|
default: r(() => o[11] || (o[11] = [
|
|
383
|
-
|
|
393
|
+
h(" 删除 ")
|
|
384
394
|
])),
|
|
385
395
|
_: 2,
|
|
386
396
|
__: [11]
|
|
387
397
|
}, 1032, ["onClick"]),
|
|
388
|
-
|
|
398
|
+
b(B, {
|
|
389
399
|
effect: "dark",
|
|
390
400
|
content: "点击重新上传",
|
|
391
401
|
placement: "bottom"
|
|
392
402
|
}, {
|
|
393
403
|
default: r(() => [
|
|
394
|
-
|
|
404
|
+
l("img", {
|
|
395
405
|
class: "retry-icon",
|
|
396
406
|
src: we,
|
|
397
407
|
onClick: (c) => f(A)(t)
|
|
398
|
-
}, null, 8,
|
|
408
|
+
}, null, 8, je)
|
|
399
409
|
]),
|
|
400
410
|
_: 2
|
|
401
411
|
}, 1024),
|
|
402
|
-
o[12] || (o[12] =
|
|
412
|
+
o[12] || (o[12] = l("img", {
|
|
403
413
|
class: "fail-icon",
|
|
404
414
|
src: ke
|
|
405
415
|
}, null, -1))
|
|
@@ -407,19 +417,19 @@ const Re = { class: "CiUpload" }, Fe = {
|
|
|
407
417
|
])
|
|
408
418
|
])
|
|
409
419
|
]),
|
|
410
|
-
e.showUploadProgress ? (s(),
|
|
411
|
-
t.status === "uploading" ? (s(),
|
|
412
|
-
|
|
420
|
+
e.showUploadProgress ? (s(), a(g, { key: 0 }, [
|
|
421
|
+
t.status === "uploading" ? (s(), a("div", Ge, [
|
|
422
|
+
l("div", {
|
|
413
423
|
class: "file-progress-inner",
|
|
414
|
-
style:
|
|
424
|
+
style: z({ width: (t.percentage || 0) + "%" })
|
|
415
425
|
}, null, 4)
|
|
416
426
|
])) : n("", !0)
|
|
417
427
|
], 64)) : n("", !0),
|
|
418
|
-
e.showDownloadProgress ? (s(),
|
|
419
|
-
t.status === "downloading" ? (s(),
|
|
420
|
-
|
|
428
|
+
e.showDownloadProgress ? (s(), a(g, { key: 1 }, [
|
|
429
|
+
t.status === "downloading" ? (s(), a("div", Je, [
|
|
430
|
+
l("div", {
|
|
421
431
|
class: "file-progress-inner",
|
|
422
|
-
style:
|
|
432
|
+
style: z({ width: (t.downloadPercentage || 0) + "%" })
|
|
423
433
|
}, null, 4)
|
|
424
434
|
])) : n("", !0)
|
|
425
435
|
], 64)) : n("", !0)
|
|
@@ -430,5 +440,5 @@ const Re = { class: "CiUpload" }, Fe = {
|
|
|
430
440
|
}
|
|
431
441
|
});
|
|
432
442
|
export {
|
|
433
|
-
|
|
443
|
+
vo as default
|
|
434
444
|
};
|
|
@@ -66,7 +66,11 @@ const e = {
|
|
|
66
66
|
* 二次确认提示文案
|
|
67
67
|
* confirmBeforeUpload = true 时生效
|
|
68
68
|
*/
|
|
69
|
-
confirmBeforeUploadText: "确定要上传该文件吗?"
|
|
69
|
+
confirmBeforeUploadText: "确定要上传该文件吗?",
|
|
70
|
+
// 是否展示 '禁止上传国家秘密' 提示文案 - 默认值: false
|
|
71
|
+
showUploadSecretTip: !1,
|
|
72
|
+
// 自定义展示的保密提示文案 - 默认值: '禁止上传国家秘密和工作秘密文件'
|
|
73
|
+
uploadSecretTipText: "禁止上传国家秘密和工作秘密文件"
|
|
70
74
|
};
|
|
71
75
|
export {
|
|
72
76
|
e as defaultProps
|
|
@@ -52,6 +52,8 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<Ci
|
|
|
52
52
|
minFileNameLength: number;
|
|
53
53
|
confirmBeforeUpload: boolean;
|
|
54
54
|
confirmBeforeUploadText: string;
|
|
55
|
+
showUploadSecretTip: boolean;
|
|
56
|
+
uploadSecretTipText: string;
|
|
55
57
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
|
56
58
|
uploadRef: unknown;
|
|
57
59
|
}, HTMLDivElement>, Partial<Record<number, (_: any) => any>> & {
|
|
@@ -42,6 +42,8 @@ export interface CiUploadProps {
|
|
|
42
42
|
* confirmBeforeUpload = true 时生效
|
|
43
43
|
*/
|
|
44
44
|
confirmBeforeUploadText?: string;
|
|
45
|
+
showUploadSecretTip?: boolean;
|
|
46
|
+
uploadSecretTipText?: string;
|
|
45
47
|
}
|
|
46
48
|
export type CiUploadFiles = CiUploadFile[];
|
|
47
49
|
export interface CiUploadUserFile extends UploadUserFile {
|