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