@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.
@@ -1,8 +1,8 @@
1
- import { ElUpload as oe, ElButton as te, ElLink as se, ElTooltip as le, ElDivider as ae } from "element-plus/es";
2
- import { defineComponent as ne, mergeDefaults as ie, useSlots as re, ref as E, watch as de, createElementBlock as l, openBlock as s, createBlock as k, createCommentVNode as n, mergeProps as ue, unref as f, createSlots as me, withCtx as r, renderSlot as U, Fragment as g, createElementVNode as a, toDisplayString as y, renderList as z, normalizeProps as pe, guardReactiveProps as ce, normalizeClass as C, createTextVNode as v, createVNode as h, normalizeStyle as P, nextTick as fe } from "vue";
3
- import R from "./icons/icon-upload-btn.svg.js";
4
- import F from "./icons/icon-upload-btn-hover.svg.js";
5
- import L from "./icons/icon-upload-btn-disabled.svg.js";
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 _e } from "./utils/file-icon-maps.js";
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 Se } from "./computed/index.js";
16
+ import { useCiUploadComputed as Te } from "./computed/index.js";
17
17
  import { defaultProps as Ne } from "./props/index.js";
18
- import { useFileSize as Ee } from "./hooks/useFileSize.js";
19
- import { handleUploadValidateFail as De } from "./hooks/useUploadValidateFail.js";
20
- import { createUploadRules as $e } from "./hooks/rules/createUploadRules.js";
21
- import { confirmBeforeUpload as ze } from "./hooks/useConfirmBeforeUpload.js";
22
- import { abortUploadFlow as Pe } from "./hooks/useAbortUploadFlow.js";
23
- const Re = { class: "CiUpload" }, Fe = {
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
- }, Le = {
26
+ }, Re = {
27
27
  key: 1,
28
28
  class: "default-tip-slot-textInfo"
29
- }, Te = { class: "upload-btn-text" }, Ie = {
29
+ }, Fe = { class: "upload-btn-text" }, Le = {
30
30
  key: 0,
31
31
  class: "tip-slot-textInfo"
32
- }, Ke = {
32
+ }, Ie = {
33
33
  key: 1,
34
34
  class: "default-tip-slot-textInfo"
35
- }, Ve = { class: "file-item-top" }, Me = { class: "file-name-file-icon" }, qe = ["src"], He = { class: "top-right" }, Ae = {
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
- }, Oe = {
38
+ }, Ae = {
39
39
  key: 1,
40
40
  class: "file-operate-btn"
41
- }, We = { class: "file-status-icon-wrapper" }, je = { class: "uploading-percentage" }, Ge = ["onClick"], Je = {
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
- }, Qe = {
44
+ }, Je = {
45
45
  key: 0,
46
46
  class: "file-item-bottom file-progress-bar download-progress-bar"
47
- }, Xe = {
47
+ }, Qe = {
48
48
  name: "CiUpload"
49
- }, ho = /* @__PURE__ */ ne({
50
- ...Xe,
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(T, { expose: I, emit: K }) {
84
- const { formatFileSize: V } = Ee(), M = re(), D = E(), _ = E(!1), w = E([]), { checkUploadStatus: q } = Ue(w), i = T, { customHttpRequest: H } = be(i.axiosInstance), d = K;
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(w, d, i);
90
+ const { retryUpload: A } = Be(k, d, i);
89
91
  de(
90
92
  () => i.fileList,
91
93
  (e) => {
92
- w.value = e.map((o) => ({ ...o }));
94
+ k.value = e.map((o) => ({ ...o }));
93
95
  },
94
96
  { immediate: !0 }
95
97
  );
96
- const S = (e) => {
98
+ const T = (e) => {
97
99
  var o;
98
- _.value = !1, (o = D.value) == null || o.handleRemove(e);
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 ze(i.confirmBeforeUploadText);
123
+ await $e(i.confirmBeforeUploadText);
122
124
  } catch {
123
- return Pe(_);
125
+ return ze(S);
124
126
  }
125
- const o = $e(i);
127
+ const o = De(i);
126
128
  for (const u of o) {
127
- const m = u(e);
128
- if (m !== !0)
129
- return De(m, {
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) => _.value ? !0 : ve.confirm(
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 p, b, B;
159
+ var m, B, C;
158
160
  if (!e) return;
159
- const m = u.find((t) => t.uid === o.uid);
160
- m && (m.fileName = ((p = e == null ? void 0 : e.data) == null ? void 0 : p.fileName) || o.name, m.fileKey = ((b = e == null ? void 0 : e.data) == null ? void 0 : b.fileKey) || "当前接口没有返回fileKey字段", m.fileSize = ((B = e == null ? void 0 : e.data) == null ? void 0 : B.fileSize) || o.size), d("update:fileList", u), d("onSuccess", o, u);
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: $, otherSlots: x } = Se(i, M, O);
167
+ }, { hasRealDefaultSlot: Y, finalBeforeUpload: Z, defaultTipSlotTextInfo: D, otherSlots: x } = Te(i, M, O);
166
168
  return (e, o) => {
167
- const u = te, m = oe, p = se, b = le, B = ae;
168
- return s(), l("div", Re, [
169
- e.readonly ? n("", !0) : (s(), k(m, ue({
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", { "is-disabled": e.disabled }],
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: D,
182
+ ref: E,
174
183
  action: e.action,
175
184
  data: e.data,
176
185
  headers: e.headers,
177
- "file-list": w.value,
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), me({
201
+ }, e.$attrs), pe({
193
202
  default: r(() => [
194
- f(Y) ? U(e.$slots, "default", { key: 0 }, void 0, !0) : (s(), l(g, { key: 1 }, [
195
- e.drag ? (s(), l(g, { key: 0 }, [
196
- o[0] || (o[0] = a("img", {
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: R,
207
+ src: P,
199
208
  alt: ""
200
209
  }, null, -1)),
201
- o[1] || (o[1] = a("img", {
210
+ o[1] || (o[1] = l("img", {
202
211
  class: "upload-btn-icon-hover",
203
- src: F,
212
+ src: R,
204
213
  alt: ""
205
214
  }, null, -1)),
206
- o[2] || (o[2] = a("img", {
215
+ o[2] || (o[2] = l("img", {
207
216
  class: "upload-btn-icon-disabled",
208
- src: L,
217
+ src: F,
209
218
  alt: ""
210
219
  }, null, -1)),
211
- o[3] || (o[3] = a("div", { class: "drag-text-info" }, [
212
- a("span", { class: "drag-text-info-click" }, "点击上传"),
213
- a("span", { class: "drag-text-info-black" }, "或将文件拖拽到这里上传")
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(), l("div", Fe, [
224
+ e.$slots.tip ? (s(), a("div", Pe, [
216
225
  U(e.$slots, "tip", {}, void 0, !0)
217
- ])) : (s(), l("div", Le, y(f($)), 1))
218
- ], 64)) : (s(), k(u, {
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] = a("img", {
234
+ o[4] || (o[4] = l("img", {
225
235
  class: "upload-btn-icon",
226
- src: R,
236
+ src: P,
227
237
  alt: ""
228
238
  }, null, -1)),
229
- o[5] || (o[5] = a("img", {
239
+ o[5] || (o[5] = l("img", {
230
240
  class: "upload-btn-icon-hover",
231
- src: F,
241
+ src: R,
232
242
  alt: ""
233
243
  }, null, -1)),
234
- o[6] || (o[6] = a("img", {
244
+ o[6] || (o[6] = l("img", {
235
245
  class: "upload-btn-icon-disabled",
236
- src: L,
246
+ src: F,
237
247
  alt: ""
238
248
  }, null, -1)),
239
- a("span", Te, y(e.uploadBtnText), 1)
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(), l("div", Ie, [
261
+ e.$slots.tip ? (s(), a("div", Le, [
252
262
  U(e.$slots, "tip", {}, void 0, !0)
253
- ])) : (s(), l("div", Ke, y(f($)), 1))
263
+ ])) : (s(), a("div", Ie, y(f(D)), 1))
254
264
  ]),
255
265
  key: "0"
256
266
  },
257
- z(f(x), (t, c) => ({
267
+ $(f(x), (t, c) => ({
258
268
  name: c,
259
269
  fn: r((ee) => [
260
- U(e.$slots, c, pe(ce(ee || {})), void 0, !0)
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
- w.value.length ? (s(), l("div", {
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: C(["custom-file-list-default", { "is-readonly": e.readonly }])
276
+ class: w(["custom-file-list-default", { "is-readonly": e.readonly }])
267
277
  }, [
268
- (s(!0), l(g, null, z(w.value, (t) => (s(), l("div", {
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
- a("div", Ve, [
273
- a("div", Me, [
274
- e.showFileExtIcon ? (s(), l("img", {
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(_e)(t.fileName || t.name)
278
- }, null, 8, qe)) : n("", !0),
279
- e.showFileNameEllipsisTooltip ? (s(), k(b, {
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
- h(p, {
287
- class: C(["top-left file-name", { "is-show-file-name-ellipsis-tooltip": e.showFileNameEllipsisTooltip }]),
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
- v(y(t.fileName || t.name), 1)
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(), k(p, {
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
- v(y(t.fileName || t.name), 1)
315
+ h(y(t.fileName || t.name), 1)
306
316
  ]),
307
317
  _: 2
308
318
  }, 1032, ["disabled", "onClick"]))
309
319
  ]),
310
- a("div", He, [
311
- e.showFileSize ? (s(), l("span", Ae, y(f(V)(t.fileSize || t.size)), 1)) : n("", !0),
312
- t.status !== "fail" ? (s(), l("div", Oe, [
313
- t.status !== "uploading" ? (s(), l(g, { key: 0 }, [
314
- e.showPreviewBtn ? (s(), l(g, { key: 0 }, [
315
- h(p, {
316
- onClick: (c) => S(t)
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
- v(" 在线预览 ")
329
+ h(" 在线预览 ")
320
330
  ])),
321
331
  _: 2,
322
332
  __: [7]
323
333
  }, 1032, ["onClick"]),
324
- h(B, { direction: "vertical" })
334
+ b(C, { direction: "vertical" })
325
335
  ], 64)) : n("", !0),
326
- e.showDownloadBtn ? (s(), l(g, { key: 1 }, [
327
- h(p, {
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
- v(y(t.status === "downloading" && e.showDownloadProgress && !e.customDownload ? `下载中...${t.downloadPercentage || 0}%` : "下载"), 1)
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(), k(B, {
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(), k(p, {
351
+ e.showDeleteBtn && !e.readonly ? (s(), v(m, {
342
352
  key: 2,
343
- onClick: (c) => S(t)
353
+ onClick: (c) => T(t)
344
354
  }, {
345
355
  default: r(() => o[8] || (o[8] = [
346
- v("删除")
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
- a("div", We, [
354
- t.status === "uploading" ? (s(), l("div", {
363
+ l("div", Oe, [
364
+ t.status === "uploading" ? (s(), a("div", {
355
365
  key: 0,
356
- class: C(t.status)
366
+ class: w(t.status)
357
367
  }, [
358
- o[9] || (o[9] = a("img", {
368
+ o[9] || (o[9] = l("img", {
359
369
  class: "uploading-icon",
360
370
  src: ge
361
371
  }, null, -1)),
362
- a("span", je, y(t.percentage) + "%", 1)
372
+ l("span", We, y(t.percentage) + "%", 1)
363
373
  ], 2)) : n("", !0),
364
- e.readonly ? n("", !0) : (s(), l(g, { key: 1 }, [
365
- t.status === "success" || t.status === "downloading" ? (s(), l("span", {
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: C(t.status)
377
+ class: w(t.status)
368
378
  }, o[10] || (o[10] = [
369
- a("img", {
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(), l("div", {
385
+ t.status === "fail" ? (s(), a("div", {
376
386
  key: 2,
377
- class: C(["fail-icon-wrapper", t.status])
387
+ class: w(["fail-icon-wrapper", t.status])
378
388
  }, [
379
- h(p, {
380
- onClick: (c) => S(t)
389
+ b(m, {
390
+ onClick: (c) => T(t)
381
391
  }, {
382
392
  default: r(() => o[11] || (o[11] = [
383
- v(" 删除 ")
393
+ h(" 删除 ")
384
394
  ])),
385
395
  _: 2,
386
396
  __: [11]
387
397
  }, 1032, ["onClick"]),
388
- h(b, {
398
+ b(B, {
389
399
  effect: "dark",
390
400
  content: "点击重新上传",
391
401
  placement: "bottom"
392
402
  }, {
393
403
  default: r(() => [
394
- a("img", {
404
+ l("img", {
395
405
  class: "retry-icon",
396
406
  src: we,
397
407
  onClick: (c) => f(A)(t)
398
- }, null, 8, Ge)
408
+ }, null, 8, je)
399
409
  ]),
400
410
  _: 2
401
411
  }, 1024),
402
- o[12] || (o[12] = a("img", {
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(), l(g, { key: 0 }, [
411
- t.status === "uploading" ? (s(), l("div", Je, [
412
- a("div", {
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: P({ width: (t.percentage || 0) + "%" })
424
+ style: z({ width: (t.percentage || 0) + "%" })
415
425
  }, null, 4)
416
426
  ])) : n("", !0)
417
427
  ], 64)) : n("", !0),
418
- e.showDownloadProgress ? (s(), l(g, { key: 1 }, [
419
- t.status === "downloading" ? (s(), l("div", Qe, [
420
- a("div", {
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: P({ width: (t.downloadPercentage || 0) + "%" })
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
- ho as default
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>> & {
@@ -41,4 +41,6 @@ export declare const defaultProps: {
41
41
  * confirmBeforeUpload = true 时生效
42
42
  */
43
43
  confirmBeforeUploadText: string;
44
+ showUploadSecretTip: boolean;
45
+ uploadSecretTipText: string;
44
46
  };
@@ -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 {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lemon30_npm/csit-vue3",
3
- "version": "1.0.71",
3
+ "version": "1.0.73",
4
4
  "type": "module",
5
5
  "author": "cuiwq",
6
6
  "license": "MIT",