@glodon-aiot/agent-cli-ui 3.15.0-alpha.2 → 3.16.0-alpha.35

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,201 +1,213 @@
1
- var L = (M, P, u) => new Promise((a, I) => {
2
- var R = (f) => {
1
+ var I = (L, P, g) => new Promise((c, N) => {
2
+ var R = (h) => {
3
3
  try {
4
- C(u.next(f));
5
- } catch (F) {
6
- I(F);
4
+ C(g.next(h));
5
+ } catch (S) {
6
+ N(S);
7
7
  }
8
- }, w = (f) => {
8
+ }, A = (h) => {
9
9
  try {
10
- C(u.throw(f));
11
- } catch (F) {
12
- I(F);
10
+ C(g.throw(h));
11
+ } catch (S) {
12
+ N(S);
13
13
  }
14
- }, C = (f) => f.done ? a(f.value) : Promise.resolve(f.value).then(R, w);
15
- C((u = u.apply(M, P)).next());
14
+ }, C = (h) => h.done ? c(h.value) : Promise.resolve(h.value).then(R, A);
15
+ C((g = g.apply(L, P)).next());
16
16
  });
17
- import { jsx as r, Fragment as fe, jsxs as g } from "react/jsx-runtime";
18
- import { message as Z, Upload as q, Button as _, Badge as he, Spin as me, Popover as ge, Space as ye } from "antd";
19
- import { forwardRef as xe, useState as A, useRef as J, useContext as Ce, useEffect as N, useImperativeHandle as Se } from "react";
20
- import { LoadingOutlined as Fe, CloseCircleFilled as Ne, CloudUploadOutlined as Ie } from "@ant-design/icons";
21
- /* empty css */import we from "lodash/debounce";
22
- import Ee from "./FileCard/index.mjs";
23
- import { IFileOrigin as be } from "@glodon-aiot/apis";
24
- import ze from "./ClearModal/index.mjs";
25
- import $ from "../../../../components/Iconfont/index.mjs";
26
- import Le from "../../../../context.mjs";
27
- import { FILE_NAME_MAX_LENGTH as Q, fileTypes as Ae, isValidImageUrlWithAnyExtension as Ue } from "../../../../utils/index.mjs";
28
- import { MB as ke } from "../../../../constant.mjs";
29
- const j = 50, U = 10, ve = xe((M, P) => {
17
+ import { jsx as r, Fragment as le, jsxs as b } from "react/jsx-runtime";
18
+ import { Upload as W, Button as M, message as o, Badge as ue, Spin as fe, Popover as ge, Space as me } from "antd";
19
+ import { forwardRef as he, useState as E, useRef as G, useContext as pe, useEffect as z, useImperativeHandle as xe } from "react";
20
+ import { LoadingOutlined as ye, CloseCircleFilled as Ce, CloudUploadOutlined as be } from "@ant-design/icons";
21
+ /* empty css */import Se from "lodash/debounce";
22
+ import Ne from "./FileCard/index.mjs";
23
+ import { IFileOrigin as we } from "@glodon-aiot/apis";
24
+ import Fe from "./ClearModal/index.mjs";
25
+ import j from "../../../../components/Iconfont/index.mjs";
26
+ import ve from "../../../../context.mjs";
27
+ import { isValidImageUrlWithAnyExtension as Ie, FILE_NAME_MAX_LENGTH as X, fileTypes as Ee } from "../../../../utils/index.mjs";
28
+ import { MB as ze } from "../../../../constant.mjs";
29
+ const Ae = he((L, P) => {
30
30
  const {
31
- appId: u,
32
- sid: a,
33
- onStatusChange: I,
31
+ appId: g,
32
+ sid: c,
33
+ onStatusChange: N,
34
34
  createSession: R,
35
- disabled: w = !1,
35
+ disabled: A = !1,
36
36
  afterFileAdd: C,
37
- afterFileDelete: f,
38
- onFileListChange: F,
37
+ afterFileDelete: h,
38
+ onFileListChange: S,
39
39
  shouldContinue: D = !0,
40
40
  afterFilesClear: K,
41
- docViewerUrl: Y,
42
- isFirstSession: ee
43
- } = M, [i, p] = A([]), c = J(i), [ne, k] = A([]), [te, O] = A(!1), [E, v] = A(""), b = J(D), [B, H] = A(!1), {
44
- Dragger: se
45
- } = q, {
46
- service: o,
47
- popupContainer: S
48
- } = Ce(Le);
49
- N(() => {
50
- b.current = D;
51
- }, [D]), Se(P, () => ({
52
- update: V,
53
- clear: X,
54
- appendFiles: (e) => {
55
- if (w)
56
- return;
57
- Array.from(e || []).forEach((n) => {
58
- T(n);
59
- });
60
- }
61
- })), N(() => {
62
- ee || (k([]), p([]), V());
63
- }, [a]);
64
- const V = () => a ? new Promise((e, s) => {
65
- o == null || o.getApplicationIdSessionKnowledgeFiles(u, a, {
41
+ docViewerUrl: q,
42
+ isFirstSession: J
43
+ } = L, [d, m] = E([]), f = G(d), [Q, U] = E([]), [Y, T] = E(!1), [w, k] = E(""), F = G(D), [$, B] = E(!1), {
44
+ Dragger: Z
45
+ } = W, {
46
+ service: a,
47
+ popupContainer: t
48
+ } = pe(ve);
49
+ z(() => {
50
+ F.current = D;
51
+ }, [D]), xe(P, () => ({
52
+ update: H,
53
+ clear: _
54
+ })), z(() => {
55
+ J || (U([]), m([]), H());
56
+ }, [c]);
57
+ const H = () => c ? new Promise((e, i) => {
58
+ a == null || a.getApplicationIdSessionKnowledgeFiles(g, c, {
66
59
  //1是未开启
67
60
  enabled: 1
68
- }).then((n) => {
69
- k(n), p(n), re(n);
61
+ }).then((s) => {
62
+ U(s), m(s), ee(s);
70
63
  }).finally(() => {
71
64
  e();
72
65
  });
73
- }) : Promise.resolve(), re = (e) => L(void 0, null, function* () {
74
- a && (e == null || e.map((s) => L(void 0, null, function* () {
75
- var n;
66
+ }) : Promise.resolve(), ee = (e) => I(void 0, null, function* () {
67
+ c && (e == null || e.map((i) => I(void 0, null, function* () {
68
+ var s;
76
69
  try {
77
- if (yield o == null ? void 0 : o.checkFileReady(u, a, s.id)) {
78
- const l = [...c.current], h = e.findIndex((d) => d.id === s.id);
79
- h !== -1 && (l[h].status = 2), p(l), C && C(s, a);
70
+ if (yield a == null ? void 0 : a.checkFileReady(g, c, i.id)) {
71
+ const l = [...f.current], p = e.findIndex((u) => u.id === i.id);
72
+ p !== -1 && (l[p].status = 2), m(l), C && C(i, c);
80
73
  }
81
- } catch (t) {
82
- if (((n = t.cause) == null ? void 0 : n.code) === -101) {
83
- const l = [...c.current], h = e.findIndex((d) => d.id === s.id);
84
- h !== -1 && (l[h].status = 3), p(l);
74
+ } catch (n) {
75
+ if (((s = n.cause) == null ? void 0 : s.code) === -101) {
76
+ const l = [...f.current], p = e.findIndex((u) => u.id === i.id);
77
+ p !== -1 && (l[p].status = 3), m(l);
85
78
  return;
86
79
  }
87
80
  }
88
81
  })));
89
82
  });
90
- N(() => {
91
- Z.config({
92
- getContainer: () => (S == null ? void 0 : S.current) || document.body,
93
- prefixCls: "gbot-message",
94
- maxCount: 5
95
- });
96
- }, [S]), N(() => {
97
- I && I(E);
98
- }, [E]);
99
- const y = (e, s) => {
100
- Z.open({
101
- type: e,
102
- content: s
103
- });
104
- }, T = (e) => L(void 0, null, function* () {
83
+ z(() => {
84
+ N && N(w);
85
+ }, [w]);
86
+ const O = (e) => I(void 0, null, function* () {
105
87
  if (e.size <= 0)
106
- return y("error", "该文件为空,请重新上传文档"), !1;
107
- if (e.name.length > Q)
108
- return y("error", `文件名称不能超过${Q}字符`), !1;
109
- if (e.size > j * ke)
110
- return y("error", `${e.name}文件大小不能超过 ${j}M`), !1;
111
- if (Ae.some((t) => t === e.type)) {
112
- const t = e;
113
- t.status = 1, p((l) => l.length >= U ? (W(`文件最多上传${U}个`), l) : [...l, t]);
88
+ return o.config({
89
+ getContainer: () => (t == null ? void 0 : t.current) || document.body,
90
+ prefixCls: "gbot-message"
91
+ }), o.error("该文件为空,请重新上传文档"), o.config({
92
+ getContainer: void 0,
93
+ prefixCls: "gbot-message"
94
+ }), !1;
95
+ if (e.name.length > X)
96
+ return o.config({
97
+ getContainer: () => (t == null ? void 0 : t.current) || document.body,
98
+ prefixCls: "gbot-message"
99
+ }), o.error(`文件名称不能超过${X}字符`), o.config({
100
+ getContainer: void 0,
101
+ prefixCls: "gbot-message"
102
+ }), !1;
103
+ if (e.size > 50 * ze)
104
+ return o.config({
105
+ getContainer: () => (t == null ? void 0 : t.current) || document.body,
106
+ prefixCls: "gbot-message"
107
+ }), o.error(`${e.name}文件大小不能超过 50M`), o.config({
108
+ getContainer: void 0,
109
+ prefixCls: "gbot-message"
110
+ }), !1;
111
+ if (Ee.some((n) => n === e.type)) {
112
+ const n = e;
113
+ n.status = 1, m((l) => l.length >= 10 ? l : [...l, n]);
114
114
  } else
115
- W("存在文件格式不正确的文件,已自动去除");
115
+ oe("存在文件格式不正确的文件,已自动去除");
116
116
  return !1;
117
117
  });
118
- N(() => {
119
- if (i.length < U ? O(!1) : O(!0), !i.length) {
120
- v("");
118
+ z(() => {
119
+ if (d.length < 10 ? T(!1) : T(!0), !d.length) {
120
+ k("");
121
121
  return;
122
122
  }
123
- const e = i.find((t) => t.status === 1), s = i.find((t) => t.status === 3);
124
- i.every((t) => t.status === 2) ? v("successed") : e ? v("process") : s && v("failed"), F && F(i);
125
- }, [i]), N(() => {
126
- c.current = i;
127
- const e = i.filter((s) => !ne.includes(s));
128
- ae(e), k(i);
129
- }, [i]);
130
- const oe = (e, s, n) => L(void 0, null, function* () {
131
- var h;
132
- const t = [...c.current], l = c.current.findIndex((d) => d === n);
133
- l !== -1 && (t[l].id = s), p(t);
123
+ const e = d.find((n) => n.status === 1), i = d.find((n) => n.status === 3);
124
+ d.every((n) => n.status === 2) ? k("successed") : e ? k("process") : i && k("failed"), S && S(d);
125
+ }, [d]), z(() => {
126
+ f.current = d;
127
+ const e = d.filter((i) => !Q.includes(i));
128
+ se(e), U(d);
129
+ }, [d]);
130
+ const te = (e, i, s) => I(void 0, null, function* () {
131
+ var p;
132
+ const n = [...f.current], l = f.current.findIndex((u) => u === s);
133
+ l !== -1 && (n[l].id = i), m(n);
134
134
  try {
135
- const d = yield o == null ? void 0 : o.checkFileReady(u, e, s, () => b.current, void 0, (m) => {
136
- const x = [...c.current], z = c.current.findIndex((pe) => pe === n);
137
- x[z].url = m.url, p(x);
135
+ const u = yield a == null ? void 0 : a.checkFileReady(g, e, i, () => F.current, void 0, (x) => {
136
+ const y = [...f.current], v = f.current.findIndex((ce) => ce === s);
137
+ y[v].url = x.url, m(y);
138
138
  });
139
- if (d) {
140
- const m = [...c.current], x = c.current.findIndex((z) => z === n);
141
- x !== -1 && (m[x].status = 2, m[x].url = d.url), p(m), C && C(d, e);
139
+ if (u) {
140
+ const x = [...f.current], y = f.current.findIndex((v) => v === s);
141
+ y !== -1 && (x[y].status = 2, x[y].url = u.url), m(x), C && C(u, e);
142
142
  }
143
- } catch (d) {
144
- if (((h = d.cause) == null ? void 0 : h.code) === -101) {
145
- const m = [...c.current], x = c.current.findIndex((z) => z === n);
146
- x !== -1 && (m[x].status = 3), p(m);
143
+ } catch (u) {
144
+ if (((p = u.cause) == null ? void 0 : p.code) === -101) {
145
+ const x = [...f.current], y = f.current.findIndex((v) => v === s);
146
+ y !== -1 && (x[y].status = 3), m(x);
147
147
  return;
148
148
  }
149
149
  }
150
- }), ie = () => a ? Promise.resolve(a) : R(), ae = (e) => {
151
- e.length && ie().then((s) => {
152
- e == null || e.forEach((n) => {
153
- var t;
154
- b.current = !0, (t = ue(s, n)) == null || t.then((l) => {
155
- var d;
150
+ }), ne = () => c ? Promise.resolve(c) : R(), se = (e) => {
151
+ e.length && ne().then((i) => {
152
+ e == null || e.forEach((s) => {
153
+ var n;
154
+ F.current = !0, (n = de(i, s)) == null || n.then((l) => {
155
+ var u;
156
156
  if (!l)
157
157
  return;
158
- const h = {
158
+ const p = {
159
159
  url: l,
160
- name: n.name,
161
- size: n.size,
160
+ name: s.name,
161
+ size: s.size,
162
162
  type: 1,
163
- origin: be.AECPILOT
163
+ origin: we.AECPILOT
164
164
  };
165
- b.current && ((d = le(s, h)) == null || d.then((m) => oe(s, m, n)));
165
+ F.current && ((u = re(i, p)) == null || u.then((x) => te(i, x, s)));
166
166
  });
167
167
  });
168
168
  });
169
- }, le = (e, s) => o == null ? void 0 : o.postApplicationIdSessionKnowledgeSessionFile(u, e, s), W = we((e) => {
170
- y("error", e);
171
- }, 300), de = (e) => {
172
- a && e != null && e.id && (o == null || o.delApplicationIdSessionKnowledgeFileId(u, a, e.id).then((s) => {
173
- const n = i.filter((t) => t.id !== e.id);
174
- p(n), y("success", "删除成功"), f && f(e.id);
169
+ }, re = (e, i) => a == null ? void 0 : a.postApplicationIdSessionKnowledgeSessionFile(g, e, i), oe = Se((e) => {
170
+ o.config({
171
+ getContainer: () => (t == null ? void 0 : t.current) || document.body,
172
+ prefixCls: "gbot-message"
173
+ }), o.error(e), o.config({
174
+ getContainer: void 0,
175
+ prefixCls: "gbot-message"
176
+ });
177
+ }, 300), ie = (e) => {
178
+ c && e != null && e.id && (a == null || a.delApplicationIdSessionKnowledgeFileId(g, c, e.id).then((i) => {
179
+ const s = d.filter((n) => n.id !== e.id);
180
+ m(s), o.config({
181
+ getContainer: () => (t == null ? void 0 : t.current) || document.body,
182
+ prefixCls: "gbot-message"
183
+ }), o.success("删除成功"), o.config({
184
+ getContainer: void 0,
185
+ prefixCls: "gbot-message"
186
+ }), h && h(e.id);
175
187
  }));
176
- }, ce = /* @__PURE__ */ r(fe, {
177
- children: /* @__PURE__ */ g("div", {
188
+ }, ae = /* @__PURE__ */ r(le, {
189
+ children: /* @__PURE__ */ b("div", {
178
190
  className: "card-title",
179
191
  children: [/* @__PURE__ */ r("span", {
180
192
  className: "name",
181
193
  children: "上传列表"
182
- }), /* @__PURE__ */ g("div", {
194
+ }), /* @__PURE__ */ b("div", {
183
195
  className: "actions",
184
- children: [/* @__PURE__ */ r(q, {
196
+ children: [/* @__PURE__ */ r(W, {
185
197
  accept: ".doc, .docx, .pdf",
186
- beforeUpload: T,
198
+ beforeUpload: O,
187
199
  showUploadList: !1,
188
200
  style: {
189
201
  margin: 0
190
202
  },
191
203
  multiple: !0,
192
- children: /* @__PURE__ */ r(_, {
204
+ children: /* @__PURE__ */ r(M, {
193
205
  className: "action",
194
206
  type: "link",
195
- disabled: te,
196
- children: /* @__PURE__ */ g("div", {
207
+ disabled: Y,
208
+ children: /* @__PURE__ */ b("div", {
197
209
  className: "detail",
198
- children: [/* @__PURE__ */ r($, {
210
+ children: [/* @__PURE__ */ r(j, {
199
211
  type: "icon-tianjia",
200
212
  style: {
201
213
  fontSize: 16
@@ -205,16 +217,16 @@ const j = 50, U = 10, ve = xe((M, P) => {
205
217
  })]
206
218
  })
207
219
  })
208
- }), /* @__PURE__ */ r(_, {
220
+ }), /* @__PURE__ */ r(M, {
209
221
  className: "action",
210
222
  type: "link",
211
- disabled: !i.length,
223
+ disabled: !d.length,
212
224
  onClick: () => {
213
- H(!0);
225
+ B(!0);
214
226
  },
215
- children: /* @__PURE__ */ g("div", {
227
+ children: /* @__PURE__ */ b("div", {
216
228
  className: "detail",
217
- children: [/* @__PURE__ */ r($, {
229
+ children: [/* @__PURE__ */ r(j, {
218
230
  type: "icon-shanchu",
219
231
  style: {
220
232
  fontSize: 16
@@ -226,53 +238,59 @@ const j = 50, U = 10, ve = xe((M, P) => {
226
238
  })]
227
239
  })]
228
240
  })
229
- }), ue = (e, s) => {
241
+ }), de = (e, i) => {
230
242
  if (!e)
231
243
  throw Error("session is not exist.");
232
- return o == null ? void 0 : o.uploadFile(e, s).catch(() => (y("error", "服务异常,请稍后再试"), ""));
233
- }, G = /* @__PURE__ */ r("div", {
234
- className: `upload-enter ${w ? "disabled" : ""}`,
235
- children: /* @__PURE__ */ r(he, {
244
+ return a == null ? void 0 : a.uploadFile(e, i).catch(() => (o.config({
245
+ getContainer: () => (t == null ? void 0 : t.current) || document.body,
246
+ prefixCls: "gbot-message"
247
+ }), o.error("服务异常,请稍后再试"), o.config({
248
+ getContainer: void 0,
249
+ prefixCls: "gbot-message"
250
+ }), ""));
251
+ }, V = /* @__PURE__ */ r("div", {
252
+ className: `upload-enter ${A ? "disabled" : ""}`,
253
+ children: /* @__PURE__ */ r(ue, {
236
254
  size: "small",
237
255
  color: "#9C24F2",
238
- count: E === "successed" ? i.length : E === "process" ? /* @__PURE__ */ r(me, {
256
+ count: w === "successed" ? d.length : w === "process" ? /* @__PURE__ */ r(fe, {
239
257
  className: "file-action file-process",
240
- indicator: /* @__PURE__ */ r(Fe, {
258
+ indicator: /* @__PURE__ */ r(ye, {
241
259
  style: {
242
260
  fontSize: 14
243
261
  },
244
262
  spin: !0
245
263
  })
246
- }) : E === "failed" ? /* @__PURE__ */ r(Ne, {
264
+ }) : w === "failed" ? /* @__PURE__ */ r(Ce, {
247
265
  style: {
248
266
  color: "#dc4446",
249
267
  fontSize: 14
250
268
  }
251
269
  }) : 0,
252
- children: /* @__PURE__ */ r($, {
270
+ children: /* @__PURE__ */ r(j, {
253
271
  type: "icon-shangchuanwenjian",
254
272
  style: {
255
273
  fontSize: 24
256
274
  }
257
275
  })
258
276
  })
259
- }), X = () => new Promise((e) => {
260
- const s = c.current;
261
- if (!a)
277
+ }), _ = () => new Promise((e) => {
278
+ const i = f.current;
279
+ if (!c)
262
280
  return e();
263
- const n = [];
264
- s.filter((t) => t.id).forEach((t) => n.push({
265
- id: t.id,
266
- status: t.status
267
- })), o == null || o.delApplicationIdSessionKnowledgeFile(u, a, {
268
- files: n
281
+ const s = [];
282
+ i.filter((n) => n.id).forEach((n) => s.push({
283
+ id: n.id,
284
+ status: n.status
285
+ })), a == null || a.delApplicationIdSessionKnowledgeFile(g, c, {
286
+ files: s
269
287
  }).then(() => {
270
- k([]), p([]), c.current = [], K && K(), b.current = !1, e();
288
+ U([]), m([]), f.current = [], K && K(), F.current = !1, e();
271
289
  });
272
290
  });
273
- return /* @__PURE__ */ g("div", {
291
+ return /* @__PURE__ */ b("div", {
274
292
  className: "footer-upload",
275
- children: [w ? G : /* @__PURE__ */ r(ge, {
293
+ children: [A ? V : /* @__PURE__ */ r(ge, {
276
294
  overlayClassName: "upload-popover",
277
295
  overlayInnerStyle: {
278
296
  width: 264,
@@ -282,10 +300,10 @@ const j = 50, U = 10, ve = xe((M, P) => {
282
300
  zIndex: 1
283
301
  },
284
302
  placement: "topLeft",
285
- getPopupContainer: () => (S == null ? void 0 : S.current) || document.body,
303
+ getPopupContainer: () => (t == null ? void 0 : t.current) || document.body,
286
304
  content: /* @__PURE__ */ r("div", {
287
305
  className: "file-upload",
288
- children: i.length > 0 ? /* @__PURE__ */ r("div", {
306
+ children: d.length > 0 ? /* @__PURE__ */ r("div", {
289
307
  className: "upload-wrapper",
290
308
  children: /* @__PURE__ */ r("div", {
291
309
  className: "input-files",
@@ -293,85 +311,103 @@ const j = 50, U = 10, ve = xe((M, P) => {
293
311
  display: "flex",
294
312
  flexDirection: "column"
295
313
  },
296
- children: i == null ? void 0 : i.map((e, s) => /* @__PURE__ */ r(Ee, {
314
+ children: d == null ? void 0 : d.map((e, i) => /* @__PURE__ */ r(Ne, {
297
315
  file: e,
298
316
  actions: {
299
317
  preview: () => {
300
318
  if (!(e != null && e.url)) {
301
- y("error", "正在上传中");
319
+ o.config({
320
+ getContainer: () => (t == null ? void 0 : t.current) || document.body,
321
+ prefixCls: "gbot-message"
322
+ }), o.error("正在上传中"), o.config({
323
+ getContainer: void 0,
324
+ prefixCls: "gbot-message"
325
+ });
302
326
  return;
303
327
  }
304
- if (!Ue(e.url)) {
305
- y("error", "链接格式不正确");
328
+ if (!Ie(e.url)) {
329
+ o.config({
330
+ getContainer: () => (t == null ? void 0 : t.current) || document.body,
331
+ prefixCls: "gbot-message"
332
+ }), o.error("链接格式不正确"), o.config({
333
+ getContainer: void 0,
334
+ prefixCls: "gbot-message"
335
+ });
306
336
  return;
307
337
  }
308
- window.open(`${Y}?url=${encodeURIComponent(e == null ? void 0 : e.url)}`);
338
+ window.open(`${q}?url=${encodeURIComponent(e == null ? void 0 : e.url)}`);
309
339
  },
310
340
  remove: () => {
311
- de(e);
341
+ ie(e);
312
342
  },
313
343
  download: () => {
314
- a && (o == null || o.getApplicationIdSessionKnowledgeFileId(u, a, e.id).then((n) => {
315
- if (!(n != null && n.url)) {
316
- y("error", "下载失败");
344
+ c && (a == null || a.getApplicationIdSessionKnowledgeFileId(g, c, e.id).then((s) => {
345
+ if (!(s != null && s.url)) {
346
+ o.config({
347
+ getContainer: () => (t == null ? void 0 : t.current) || document.body,
348
+ prefixCls: "gbot-message"
349
+ }), o.error("下载失败"), o.config({
350
+ getContainer: void 0,
351
+ prefixCls: "gbot-message"
352
+ });
317
353
  return;
318
354
  }
319
- const t = document.createElement("a");
320
- t.href = n.url, t.download = n.name || "", t.click();
355
+ const n = document.createElement("a");
356
+ n.href = s.url, n.download = s.name || "", n.click();
321
357
  }));
322
358
  }
323
359
  }
324
- }, s))
360
+ }, i))
325
361
  })
326
- }) : /* @__PURE__ */ g(se, {
362
+ }) : /* @__PURE__ */ b(Z, {
327
363
  name: "file",
328
364
  showUploadList: !1,
329
365
  multiple: !0,
330
- beforeUpload: T,
366
+ beforeUpload: O,
331
367
  accept: ".pdf, .doc, .docx",
332
- maxCount: U,
368
+ maxCount: 10,
333
369
  listType: "picture",
334
370
  children: [/* @__PURE__ */ r("span", {
335
371
  className: "file-upload-icon",
336
- children: /* @__PURE__ */ r(Ie, {})
337
- }), /* @__PURE__ */ g(ye, {
372
+ children: /* @__PURE__ */ r(be, {})
373
+ }), /* @__PURE__ */ b(me, {
338
374
  className: "file-upload-action",
339
- children: ["拖拽文件至此,或者", /* @__PURE__ */ r(_, {
375
+ children: ["拖拽文件至此,或者", /* @__PURE__ */ r(M, {
340
376
  type: "link",
341
377
  style: {
342
378
  padding: 0
343
379
  },
344
380
  children: "上传文件"
345
381
  })]
346
- }), /* @__PURE__ */ g("div", {
382
+ }), /* @__PURE__ */ b("div", {
347
383
  className: "file-upload-desc",
348
384
  children: [/* @__PURE__ */ r("div", {
349
385
  className: "item-upload-desc",
350
386
  children: /* @__PURE__ */ r("span", {
351
387
  children: "1.支持 doc、pdf、docx 格式;"
352
388
  })
353
- }), /* @__PURE__ */ g("div", {
389
+ }), /* @__PURE__ */ r("div", {
354
390
  className: "item-upload-desc",
355
- children: ["2.单个文件不超过 ", j, " M;"]
356
- }), /* @__PURE__ */ g("div", {
391
+ children: "2.单个文件不超过 50 M;"
392
+ }), /* @__PURE__ */ r("div", {
357
393
  className: "item-upload-desc",
358
- children: ["3.最多上传 ", U, " 个文件。"]
394
+ children: "3.最多上传 10 个文件。"
359
395
  })]
360
396
  })]
361
397
  })
362
398
  }),
363
- title: ce,
399
+ title: ae,
364
400
  trigger: "click",
365
- children: G
366
- }), B && /* @__PURE__ */ r(ze, {
367
- isvisible: B,
401
+ children: V
402
+ }), $ && /* @__PURE__ */ r(Fe, {
403
+ isvisible: $,
368
404
  onClose: (e) => {
369
- e === "clear" && X(), H(!1);
405
+ e === "clear" && _(), B(!1);
370
406
  }
371
407
  })]
372
408
  });
373
409
  });
374
- ve.displayName = "UploadFiles";
410
+ Ae.displayName = "UploadFiles";
375
411
  export {
376
- ve as default
412
+ Ae as default
377
413
  };