bi-components-library 1.0.2 → 1.0.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/bi-components-library.css +1 -1
- package/dist/index.es.js +375 -361
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +6 -6
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import me, { useState as
|
|
1
|
+
import me, { useState as j, useRef as z, useMemo as pe, useCallback as v, useEffect as U } from "react";
|
|
2
2
|
import { Button as X, Card as te, Modal as ye, Table as le, Flex as ae, Spin as ge, Empty as he, Select as ce, Form as re, Input as ue, Space as be, theme as we } from "antd";
|
|
3
3
|
import { createFromIconfontCN as ve, LeftOutlined as xe, SearchOutlined as Re, ReloadOutlined as Te, SendOutlined as Se, PauseCircleOutlined as qe, PlayCircleOutlined as Ce } from "@ant-design/icons";
|
|
4
4
|
var ne = { exports: {} }, Z = {};
|
|
@@ -16,22 +16,22 @@ function je() {
|
|
|
16
16
|
if (oe) return Z;
|
|
17
17
|
oe = 1;
|
|
18
18
|
var n = Symbol.for("react.transitional.element"), s = Symbol.for("react.fragment");
|
|
19
|
-
function
|
|
20
|
-
var
|
|
21
|
-
if (d !== void 0 && (
|
|
19
|
+
function i(l, o, d) {
|
|
20
|
+
var E = null;
|
|
21
|
+
if (d !== void 0 && (E = "" + d), o.key !== void 0 && (E = "" + o.key), "key" in o) {
|
|
22
22
|
d = {};
|
|
23
|
-
for (var m in
|
|
24
|
-
m !== "key" && (d[m] =
|
|
25
|
-
} else d =
|
|
26
|
-
return
|
|
23
|
+
for (var m in o)
|
|
24
|
+
m !== "key" && (d[m] = o[m]);
|
|
25
|
+
} else d = o;
|
|
26
|
+
return o = d.ref, {
|
|
27
27
|
$$typeof: n,
|
|
28
28
|
type: l,
|
|
29
|
-
key:
|
|
30
|
-
ref:
|
|
29
|
+
key: E,
|
|
30
|
+
ref: o !== void 0 ? o : null,
|
|
31
31
|
props: d
|
|
32
32
|
};
|
|
33
33
|
}
|
|
34
|
-
return Z.Fragment = s, Z.jsx =
|
|
34
|
+
return Z.Fragment = s, Z.jsx = i, Z.jsxs = i, Z;
|
|
35
35
|
}
|
|
36
36
|
var ee = {};
|
|
37
37
|
/**
|
|
@@ -49,38 +49,38 @@ function Ee() {
|
|
|
49
49
|
function n(e) {
|
|
50
50
|
if (e == null) return null;
|
|
51
51
|
if (typeof e == "function")
|
|
52
|
-
return e.$$typeof ===
|
|
52
|
+
return e.$$typeof === L ? null : e.displayName || e.name || null;
|
|
53
53
|
if (typeof e == "string") return e;
|
|
54
54
|
switch (e) {
|
|
55
|
-
case
|
|
55
|
+
case V:
|
|
56
56
|
return "Fragment";
|
|
57
|
-
case
|
|
57
|
+
case p:
|
|
58
58
|
return "Profiler";
|
|
59
|
-
case
|
|
59
|
+
case a:
|
|
60
60
|
return "StrictMode";
|
|
61
61
|
case $:
|
|
62
62
|
return "Suspense";
|
|
63
63
|
case D:
|
|
64
64
|
return "SuspenseList";
|
|
65
|
-
case
|
|
65
|
+
case x:
|
|
66
66
|
return "Activity";
|
|
67
67
|
}
|
|
68
68
|
if (typeof e == "object")
|
|
69
69
|
switch (typeof e.tag == "number" && console.error(
|
|
70
70
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
71
71
|
), e.$$typeof) {
|
|
72
|
-
case
|
|
72
|
+
case P:
|
|
73
73
|
return "Portal";
|
|
74
|
-
case
|
|
74
|
+
case T:
|
|
75
75
|
return (e.displayName || "Context") + ".Provider";
|
|
76
76
|
case b:
|
|
77
77
|
return (e._context.displayName || "Context") + ".Consumer";
|
|
78
|
-
case
|
|
78
|
+
case g:
|
|
79
79
|
var u = e.render;
|
|
80
80
|
return e = e.displayName, e || (e = u.displayName || u.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
|
|
81
|
-
case
|
|
81
|
+
case A:
|
|
82
82
|
return u = e.displayName || null, u !== null ? u : n(e.type) || "Memo";
|
|
83
|
-
case
|
|
83
|
+
case F:
|
|
84
84
|
u = e._payload, e = e._init;
|
|
85
85
|
try {
|
|
86
86
|
return n(e(u));
|
|
@@ -92,7 +92,7 @@ function Ee() {
|
|
|
92
92
|
function s(e) {
|
|
93
93
|
return "" + e;
|
|
94
94
|
}
|
|
95
|
-
function
|
|
95
|
+
function i(e) {
|
|
96
96
|
try {
|
|
97
97
|
s(e);
|
|
98
98
|
var u = !1;
|
|
@@ -101,17 +101,17 @@ function Ee() {
|
|
|
101
101
|
}
|
|
102
102
|
if (u) {
|
|
103
103
|
u = console;
|
|
104
|
-
var
|
|
105
|
-
return
|
|
104
|
+
var w = u.error, O = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
105
|
+
return w.call(
|
|
106
106
|
u,
|
|
107
107
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
108
|
-
|
|
108
|
+
O
|
|
109
109
|
), s(e);
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
112
|
function l(e) {
|
|
113
|
-
if (e ===
|
|
114
|
-
if (typeof e == "object" && e !== null && e.$$typeof ===
|
|
113
|
+
if (e === V) return "<>";
|
|
114
|
+
if (typeof e == "object" && e !== null && e.$$typeof === F)
|
|
115
115
|
return "<...>";
|
|
116
116
|
try {
|
|
117
117
|
var u = n(e);
|
|
@@ -120,48 +120,48 @@ function Ee() {
|
|
|
120
120
|
return "<...>";
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
|
-
function
|
|
124
|
-
var e =
|
|
123
|
+
function o() {
|
|
124
|
+
var e = q.A;
|
|
125
125
|
return e === null ? null : e.getOwner();
|
|
126
126
|
}
|
|
127
127
|
function d() {
|
|
128
128
|
return Error("react-stack-top-frame");
|
|
129
129
|
}
|
|
130
|
-
function
|
|
131
|
-
if (
|
|
130
|
+
function E(e) {
|
|
131
|
+
if (B.call(e, "key")) {
|
|
132
132
|
var u = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
133
133
|
if (u && u.isReactWarning) return !1;
|
|
134
134
|
}
|
|
135
135
|
return e.key !== void 0;
|
|
136
136
|
}
|
|
137
137
|
function m(e, u) {
|
|
138
|
-
function
|
|
138
|
+
function w() {
|
|
139
139
|
c || (c = !0, console.error(
|
|
140
140
|
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
141
141
|
u
|
|
142
142
|
));
|
|
143
143
|
}
|
|
144
|
-
|
|
145
|
-
get:
|
|
144
|
+
w.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
145
|
+
get: w,
|
|
146
146
|
configurable: !0
|
|
147
147
|
});
|
|
148
148
|
}
|
|
149
|
-
function
|
|
149
|
+
function S() {
|
|
150
150
|
var e = n(this.type);
|
|
151
|
-
return
|
|
151
|
+
return R[e] || (R[e] = !0, console.error(
|
|
152
152
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
153
153
|
)), e = this.props.ref, e !== void 0 ? e : null;
|
|
154
154
|
}
|
|
155
|
-
function
|
|
156
|
-
return
|
|
155
|
+
function _(e, u, w, O, Y, M, Q, f) {
|
|
156
|
+
return w = M.ref, e = {
|
|
157
157
|
$$typeof: h,
|
|
158
158
|
type: e,
|
|
159
159
|
key: u,
|
|
160
|
-
props:
|
|
160
|
+
props: M,
|
|
161
161
|
_owner: Y
|
|
162
|
-
}, (
|
|
162
|
+
}, (w !== void 0 ? w : null) !== null ? Object.defineProperty(e, "ref", {
|
|
163
163
|
enumerable: !1,
|
|
164
|
-
get:
|
|
164
|
+
get: S
|
|
165
165
|
}) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
|
|
166
166
|
configurable: !1,
|
|
167
167
|
enumerable: !1,
|
|
@@ -184,94 +184,94 @@ function Ee() {
|
|
|
184
184
|
value: f
|
|
185
185
|
}), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
|
|
186
186
|
}
|
|
187
|
-
function
|
|
188
|
-
var
|
|
189
|
-
if (
|
|
190
|
-
if (
|
|
191
|
-
if (H(
|
|
192
|
-
for (
|
|
193
|
-
|
|
194
|
-
Object.freeze && Object.freeze(
|
|
187
|
+
function k(e, u, w, O, Y, M, Q, f) {
|
|
188
|
+
var y = u.children;
|
|
189
|
+
if (y !== void 0)
|
|
190
|
+
if (O)
|
|
191
|
+
if (H(y)) {
|
|
192
|
+
for (O = 0; O < y.length; O++)
|
|
193
|
+
N(y[O]);
|
|
194
|
+
Object.freeze && Object.freeze(y);
|
|
195
195
|
} else
|
|
196
196
|
console.error(
|
|
197
197
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
198
198
|
);
|
|
199
|
-
else
|
|
200
|
-
if (
|
|
201
|
-
|
|
199
|
+
else N(y);
|
|
200
|
+
if (B.call(u, "key")) {
|
|
201
|
+
y = n(e);
|
|
202
202
|
var W = Object.keys(u).filter(function(fe) {
|
|
203
203
|
return fe !== "key";
|
|
204
204
|
});
|
|
205
|
-
|
|
205
|
+
O = 0 < W.length ? "{key: someKey, " + W.join(": ..., ") + ": ...}" : "{key: someKey}", J[y + O] || (W = 0 < W.length ? "{" + W.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
206
206
|
`A props object containing a "key" prop is being spread into JSX:
|
|
207
207
|
let props = %s;
|
|
208
208
|
<%s {...props} />
|
|
209
209
|
React keys must be passed directly to JSX without using spread:
|
|
210
210
|
let props = %s;
|
|
211
211
|
<%s key={someKey} {...props} />`,
|
|
212
|
-
|
|
213
|
-
|
|
212
|
+
O,
|
|
213
|
+
y,
|
|
214
214
|
W,
|
|
215
|
-
|
|
216
|
-
), J[
|
|
215
|
+
y
|
|
216
|
+
), J[y + O] = !0);
|
|
217
217
|
}
|
|
218
|
-
if (
|
|
219
|
-
|
|
218
|
+
if (y = null, w !== void 0 && (i(w), y = "" + w), E(u) && (i(u.key), y = "" + u.key), "key" in u) {
|
|
219
|
+
w = {};
|
|
220
220
|
for (var K in u)
|
|
221
|
-
K !== "key" && (
|
|
222
|
-
} else
|
|
223
|
-
return
|
|
224
|
-
|
|
221
|
+
K !== "key" && (w[K] = u[K]);
|
|
222
|
+
} else w = u;
|
|
223
|
+
return y && m(
|
|
224
|
+
w,
|
|
225
225
|
typeof e == "function" ? e.displayName || e.name || "Unknown" : e
|
|
226
|
-
),
|
|
226
|
+
), _(
|
|
227
227
|
e,
|
|
228
|
-
|
|
229
|
-
|
|
228
|
+
y,
|
|
229
|
+
M,
|
|
230
230
|
Y,
|
|
231
|
-
|
|
232
|
-
|
|
231
|
+
o(),
|
|
232
|
+
w,
|
|
233
233
|
Q,
|
|
234
234
|
f
|
|
235
235
|
);
|
|
236
236
|
}
|
|
237
|
-
function
|
|
237
|
+
function N(e) {
|
|
238
238
|
typeof e == "object" && e !== null && e.$$typeof === h && e._store && (e._store.validated = 1);
|
|
239
239
|
}
|
|
240
|
-
var
|
|
240
|
+
var I = me, h = Symbol.for("react.transitional.element"), P = Symbol.for("react.portal"), V = Symbol.for("react.fragment"), a = Symbol.for("react.strict_mode"), p = Symbol.for("react.profiler"), b = Symbol.for("react.consumer"), T = Symbol.for("react.context"), g = Symbol.for("react.forward_ref"), $ = Symbol.for("react.suspense"), D = Symbol.for("react.suspense_list"), A = Symbol.for("react.memo"), F = Symbol.for("react.lazy"), x = Symbol.for("react.activity"), L = Symbol.for("react.client.reference"), q = I.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, B = Object.prototype.hasOwnProperty, H = Array.isArray, t = console.createTask ? console.createTask : function() {
|
|
241
241
|
return null;
|
|
242
242
|
};
|
|
243
|
-
|
|
243
|
+
I = {
|
|
244
244
|
react_stack_bottom_frame: function(e) {
|
|
245
245
|
return e();
|
|
246
246
|
}
|
|
247
247
|
};
|
|
248
|
-
var c,
|
|
249
|
-
|
|
248
|
+
var c, R = {}, C = I.react_stack_bottom_frame.bind(
|
|
249
|
+
I,
|
|
250
250
|
d
|
|
251
251
|
)(), G = t(l(d)), J = {};
|
|
252
|
-
ee.Fragment =
|
|
253
|
-
var
|
|
254
|
-
return
|
|
252
|
+
ee.Fragment = V, ee.jsx = function(e, u, w, O, Y) {
|
|
253
|
+
var M = 1e4 > q.recentlyCreatedOwnerStacks++;
|
|
254
|
+
return k(
|
|
255
255
|
e,
|
|
256
256
|
u,
|
|
257
|
-
|
|
257
|
+
w,
|
|
258
258
|
!1,
|
|
259
|
-
|
|
259
|
+
O,
|
|
260
260
|
Y,
|
|
261
|
-
|
|
262
|
-
|
|
261
|
+
M ? Error("react-stack-top-frame") : C,
|
|
262
|
+
M ? t(l(e)) : G
|
|
263
263
|
);
|
|
264
|
-
}, ee.jsxs = function(e, u,
|
|
265
|
-
var
|
|
266
|
-
return
|
|
264
|
+
}, ee.jsxs = function(e, u, w, O, Y) {
|
|
265
|
+
var M = 1e4 > q.recentlyCreatedOwnerStacks++;
|
|
266
|
+
return k(
|
|
267
267
|
e,
|
|
268
268
|
u,
|
|
269
|
-
|
|
269
|
+
w,
|
|
270
270
|
!0,
|
|
271
|
-
|
|
271
|
+
O,
|
|
272
272
|
Y,
|
|
273
|
-
|
|
274
|
-
|
|
273
|
+
M ? Error("react-stack-top-frame") : C,
|
|
274
|
+
M ? t(l(e)) : G
|
|
275
275
|
);
|
|
276
276
|
};
|
|
277
277
|
}()), ee;
|
|
@@ -284,10 +284,10 @@ var r = _e();
|
|
|
284
284
|
const ke = ({
|
|
285
285
|
variant: n = "primary",
|
|
286
286
|
loading: s = !1,
|
|
287
|
-
children:
|
|
287
|
+
children: i,
|
|
288
288
|
...l
|
|
289
289
|
}) => {
|
|
290
|
-
const
|
|
290
|
+
const o = (d) => {
|
|
291
291
|
switch (d) {
|
|
292
292
|
case "primary":
|
|
293
293
|
return "primary";
|
|
@@ -307,10 +307,10 @@ const ke = ({
|
|
|
307
307
|
X,
|
|
308
308
|
{
|
|
309
309
|
...l,
|
|
310
|
-
type:
|
|
310
|
+
type: o(n),
|
|
311
311
|
loading: s,
|
|
312
312
|
ghost: n === "ghost",
|
|
313
|
-
children:
|
|
313
|
+
children: i
|
|
314
314
|
}
|
|
315
315
|
);
|
|
316
316
|
};
|
|
@@ -361,18 +361,18 @@ ke.__docgenInfo = {
|
|
|
361
361
|
const Ne = ({
|
|
362
362
|
title: n,
|
|
363
363
|
children: s,
|
|
364
|
-
bordered:
|
|
364
|
+
bordered: i = !0,
|
|
365
365
|
hoverable: l = !1,
|
|
366
|
-
size:
|
|
366
|
+
size: o = "default",
|
|
367
367
|
...d
|
|
368
368
|
}) => /* @__PURE__ */ r.jsx(
|
|
369
369
|
te,
|
|
370
370
|
{
|
|
371
371
|
...d,
|
|
372
372
|
title: n,
|
|
373
|
-
bordered:
|
|
373
|
+
bordered: i,
|
|
374
374
|
hoverable: l,
|
|
375
|
-
size:
|
|
375
|
+
size: o,
|
|
376
376
|
children: s
|
|
377
377
|
}
|
|
378
378
|
);
|
|
@@ -431,15 +431,15 @@ const Ie = ({
|
|
|
431
431
|
showDefaultFooter: n = !0,
|
|
432
432
|
...s
|
|
433
433
|
}) => {
|
|
434
|
-
const
|
|
435
|
-
/* @__PURE__ */ r.jsx(
|
|
434
|
+
const i = s.footer !== void 0 ? s.footer : n ? (l, { OkBtn: o, CancelBtn: d }) => /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
435
|
+
/* @__PURE__ */ r.jsx(o, {}),
|
|
436
436
|
/* @__PURE__ */ r.jsx(d, {})
|
|
437
437
|
] }) : null;
|
|
438
438
|
return /* @__PURE__ */ r.jsx(
|
|
439
439
|
ye,
|
|
440
440
|
{
|
|
441
441
|
...s,
|
|
442
|
-
footer:
|
|
442
|
+
footer: i
|
|
443
443
|
}
|
|
444
444
|
);
|
|
445
445
|
};
|
|
@@ -507,7 +507,7 @@ Ie.__docgenInfo = {
|
|
|
507
507
|
const Pe = ({
|
|
508
508
|
scrollX: n,
|
|
509
509
|
showPagination: s = !0,
|
|
510
|
-
defaultPageSize:
|
|
510
|
+
defaultPageSize: i = 10,
|
|
511
511
|
...l
|
|
512
512
|
}) => /* @__PURE__ */ r.jsx(
|
|
513
513
|
le,
|
|
@@ -521,7 +521,7 @@ const Pe = ({
|
|
|
521
521
|
hideOnSinglePage: !0,
|
|
522
522
|
showSizeChanger: !0,
|
|
523
523
|
showQuickJumper: !0,
|
|
524
|
-
defaultPageSize:
|
|
524
|
+
defaultPageSize: i,
|
|
525
525
|
...l.pagination
|
|
526
526
|
} : !1
|
|
527
527
|
}
|
|
@@ -581,19 +581,19 @@ const Ve = ve({
|
|
|
581
581
|
}), Ae = ({
|
|
582
582
|
name: n,
|
|
583
583
|
size: s,
|
|
584
|
-
color:
|
|
584
|
+
color: i,
|
|
585
585
|
style: l,
|
|
586
|
-
...
|
|
586
|
+
...o
|
|
587
587
|
}) => {
|
|
588
588
|
const d = {
|
|
589
589
|
fontSize: s,
|
|
590
|
-
color:
|
|
590
|
+
color: i,
|
|
591
591
|
...l
|
|
592
592
|
};
|
|
593
593
|
return /* @__PURE__ */ r.jsx(
|
|
594
594
|
Ve,
|
|
595
595
|
{
|
|
596
|
-
...
|
|
596
|
+
...o,
|
|
597
597
|
type: n,
|
|
598
598
|
style: d
|
|
599
599
|
}
|
|
@@ -638,26 +638,26 @@ Ae.__docgenInfo = {
|
|
|
638
638
|
const Oe = ({
|
|
639
639
|
loading: n,
|
|
640
640
|
description: s = "暂无数据",
|
|
641
|
-
className:
|
|
641
|
+
className: i,
|
|
642
642
|
emptyChildren: l,
|
|
643
|
-
loadingText:
|
|
643
|
+
loadingText: o,
|
|
644
644
|
emptyImage: d
|
|
645
645
|
}) => n ? /* @__PURE__ */ r.jsxs(
|
|
646
646
|
ae,
|
|
647
647
|
{
|
|
648
|
-
className: `pt-10 w-full ${
|
|
648
|
+
className: `pt-10 w-full ${i || ""}`,
|
|
649
649
|
align: "center",
|
|
650
650
|
justify: "center",
|
|
651
651
|
vertical: !0,
|
|
652
652
|
children: [
|
|
653
653
|
/* @__PURE__ */ r.jsx(ge, { size: "large" }),
|
|
654
|
-
|
|
654
|
+
o && /* @__PURE__ */ r.jsx("div", { className: "mt-4 text-gray-500", children: o })
|
|
655
655
|
]
|
|
656
656
|
}
|
|
657
657
|
) : /* @__PURE__ */ r.jsx(
|
|
658
658
|
ae,
|
|
659
659
|
{
|
|
660
|
-
className: `pt-10 w-full ${
|
|
660
|
+
className: `pt-10 w-full ${i || ""}`,
|
|
661
661
|
align: "center",
|
|
662
662
|
justify: "center",
|
|
663
663
|
children: /* @__PURE__ */ r.jsx(
|
|
@@ -717,16 +717,16 @@ Oe.__docgenInfo = {
|
|
|
717
717
|
const ze = ({
|
|
718
718
|
onClick: n,
|
|
719
719
|
showText: s = !1,
|
|
720
|
-
className:
|
|
720
|
+
className: i,
|
|
721
721
|
size: l = "small",
|
|
722
|
-
type:
|
|
722
|
+
type: o = "default"
|
|
723
723
|
}) => /* @__PURE__ */ r.jsx(
|
|
724
724
|
X,
|
|
725
725
|
{
|
|
726
726
|
size: l,
|
|
727
|
-
type:
|
|
727
|
+
type: o,
|
|
728
728
|
icon: /* @__PURE__ */ r.jsx(xe, {}),
|
|
729
|
-
className: `cursor-pointer ${
|
|
729
|
+
className: `cursor-pointer ${i || ""}`,
|
|
730
730
|
onClick: n,
|
|
731
731
|
children: s && "返回"
|
|
732
732
|
}
|
|
@@ -773,16 +773,16 @@ ze.__docgenInfo = {
|
|
|
773
773
|
const Fe = ({
|
|
774
774
|
removePadding: n = !0,
|
|
775
775
|
className: s,
|
|
776
|
-
...
|
|
776
|
+
...i
|
|
777
777
|
}) => {
|
|
778
778
|
const l = n ? `px-0 h-auto ${s || ""}` : s;
|
|
779
779
|
return /* @__PURE__ */ r.jsx(
|
|
780
780
|
X,
|
|
781
781
|
{
|
|
782
782
|
type: "link",
|
|
783
|
-
...
|
|
783
|
+
...i,
|
|
784
784
|
className: l,
|
|
785
|
-
children:
|
|
785
|
+
children: i.children
|
|
786
786
|
}
|
|
787
787
|
);
|
|
788
788
|
};
|
|
@@ -826,31 +826,31 @@ Fe.__docgenInfo = {
|
|
|
826
826
|
const { Option: Le } = ce, Be = ({
|
|
827
827
|
columns: n,
|
|
828
828
|
request: s,
|
|
829
|
-
searchFields:
|
|
829
|
+
searchFields: i = [],
|
|
830
830
|
showSearch: l = !0,
|
|
831
|
-
showRefresh:
|
|
831
|
+
showRefresh: o = !0,
|
|
832
832
|
defaultPageSize: d = 10,
|
|
833
|
-
pageSizeOptions:
|
|
833
|
+
pageSizeOptions: E = ["10", "20", "50", "100"],
|
|
834
834
|
autoLoad: m = !0,
|
|
835
|
-
externalParams:
|
|
836
|
-
...
|
|
835
|
+
externalParams: S = {},
|
|
836
|
+
..._
|
|
837
837
|
}) => {
|
|
838
|
-
const [
|
|
838
|
+
const [k, N] = j([]), [I, h] = j(!1), [P, V] = j({
|
|
839
839
|
current: 1,
|
|
840
840
|
pageSize: d,
|
|
841
841
|
total: 0
|
|
842
|
-
}), [
|
|
843
|
-
$.current =
|
|
844
|
-
const D =
|
|
845
|
-
D.current =
|
|
846
|
-
const
|
|
847
|
-
const { sortable: c, render:
|
|
842
|
+
}), [a, p] = j({}), [b, T] = j({}), [g] = re.useForm(), $ = z(P);
|
|
843
|
+
$.current = P;
|
|
844
|
+
const D = z(S);
|
|
845
|
+
D.current = S;
|
|
846
|
+
const A = z(!1), F = pe(() => n.map((t) => {
|
|
847
|
+
const { sortable: c, render: R, ...C } = t;
|
|
848
848
|
return {
|
|
849
|
-
...
|
|
849
|
+
...C,
|
|
850
850
|
sorter: c ? !0 : void 0,
|
|
851
|
-
render:
|
|
851
|
+
render: R || ((G) => G)
|
|
852
852
|
};
|
|
853
|
-
}), [n]),
|
|
853
|
+
}), [n]), x = v(async (t = {}) => {
|
|
854
854
|
if (s) {
|
|
855
855
|
h(!0);
|
|
856
856
|
try {
|
|
@@ -859,13 +859,13 @@ const { Option: Le } = ce, Be = ({
|
|
|
859
859
|
pageSize: $.current.pageSize,
|
|
860
860
|
sortField: b.field,
|
|
861
861
|
sortOrder: b.order,
|
|
862
|
-
searchParams: { ...
|
|
862
|
+
searchParams: { ...a, ...D.current },
|
|
863
863
|
...t
|
|
864
|
-
},
|
|
865
|
-
|
|
866
|
-
...
|
|
867
|
-
total:
|
|
868
|
-
current: c.page ||
|
|
864
|
+
}, R = await s(c);
|
|
865
|
+
R.success && (N(R.data), V((C) => ({
|
|
866
|
+
...C,
|
|
867
|
+
total: R.total,
|
|
868
|
+
current: c.page || C.current
|
|
869
869
|
})));
|
|
870
870
|
} catch (c) {
|
|
871
871
|
console.error("加载数据失败:", c);
|
|
@@ -873,36 +873,36 @@ const { Option: Le } = ce, Be = ({
|
|
|
873
873
|
h(!1);
|
|
874
874
|
}
|
|
875
875
|
}
|
|
876
|
-
}, [s, b,
|
|
877
|
-
|
|
878
|
-
}, []),
|
|
879
|
-
|
|
880
|
-
}, [
|
|
881
|
-
|
|
882
|
-
}, [
|
|
883
|
-
const
|
|
876
|
+
}, [s, b, a]), L = v((t) => {
|
|
877
|
+
p(t), V((c) => ({ ...c, current: 1 }));
|
|
878
|
+
}, []), q = v(() => {
|
|
879
|
+
g.resetFields(), p({}), V((t) => ({ ...t, current: 1 }));
|
|
880
|
+
}, [g]), B = v(() => {
|
|
881
|
+
x();
|
|
882
|
+
}, [x]), H = v((t, c, R) => {
|
|
883
|
+
const C = {
|
|
884
884
|
current: t.current || 1,
|
|
885
885
|
pageSize: t.pageSize || d,
|
|
886
886
|
total: t.total || 0
|
|
887
887
|
}, G = {
|
|
888
|
-
field:
|
|
889
|
-
order:
|
|
888
|
+
field: R?.field,
|
|
889
|
+
order: R?.order
|
|
890
890
|
};
|
|
891
|
-
|
|
891
|
+
V(C), T(G);
|
|
892
892
|
}, [d]);
|
|
893
893
|
return U(() => {
|
|
894
|
-
const t = Object.keys(
|
|
895
|
-
(m && !
|
|
896
|
-
}, [m,
|
|
897
|
-
l &&
|
|
894
|
+
const t = Object.keys(S).length > 0;
|
|
895
|
+
(m && !A.current || t) && (x(), A.current = !0);
|
|
896
|
+
}, [m, S, x]), /* @__PURE__ */ r.jsxs("div", { children: [
|
|
897
|
+
l && i.length > 0 && /* @__PURE__ */ r.jsx(te, { size: "small", style: { marginBottom: 16 }, children: /* @__PURE__ */ r.jsxs(
|
|
898
898
|
re,
|
|
899
899
|
{
|
|
900
|
-
form:
|
|
900
|
+
form: g,
|
|
901
901
|
layout: "inline",
|
|
902
|
-
onFinish:
|
|
903
|
-
initialValues:
|
|
902
|
+
onFinish: L,
|
|
903
|
+
initialValues: i.reduce((t, c) => (c.defaultValue !== void 0 && (t[c.key] = c.defaultValue), t), {}),
|
|
904
904
|
children: [
|
|
905
|
-
|
|
905
|
+
i.map((t) => /* @__PURE__ */ r.jsx(re.Item, { name: t.key, label: t.label, children: t.type === "input" ? /* @__PURE__ */ r.jsx(
|
|
906
906
|
ue,
|
|
907
907
|
{
|
|
908
908
|
placeholder: t.placeholder || `请输入${t.label}`,
|
|
@@ -919,8 +919,8 @@ const { Option: Le } = ce, Be = ({
|
|
|
919
919
|
) }, t.key)),
|
|
920
920
|
/* @__PURE__ */ r.jsx(re.Item, { children: /* @__PURE__ */ r.jsxs(be, { children: [
|
|
921
921
|
/* @__PURE__ */ r.jsx(X, { type: "primary", htmlType: "submit", icon: /* @__PURE__ */ r.jsx(Re, {}), children: "查询" }),
|
|
922
|
-
/* @__PURE__ */ r.jsx(X, { onClick:
|
|
923
|
-
|
|
922
|
+
/* @__PURE__ */ r.jsx(X, { onClick: q, children: "重置" }),
|
|
923
|
+
o && /* @__PURE__ */ r.jsx(X, { icon: /* @__PURE__ */ r.jsx(Te, {}), onClick: B, children: "刷新" })
|
|
924
924
|
] }) })
|
|
925
925
|
]
|
|
926
926
|
}
|
|
@@ -928,16 +928,16 @@ const { Option: Le } = ce, Be = ({
|
|
|
928
928
|
/* @__PURE__ */ r.jsx(
|
|
929
929
|
le,
|
|
930
930
|
{
|
|
931
|
-
...
|
|
932
|
-
columns:
|
|
933
|
-
dataSource:
|
|
934
|
-
loading:
|
|
931
|
+
..._,
|
|
932
|
+
columns: F,
|
|
933
|
+
dataSource: k,
|
|
934
|
+
loading: I,
|
|
935
935
|
pagination: {
|
|
936
|
-
...
|
|
936
|
+
...P,
|
|
937
937
|
showSizeChanger: !0,
|
|
938
938
|
showQuickJumper: !0,
|
|
939
939
|
showTotal: (t, c) => `第 ${c[0]}-${c[1]} 条/共 ${t} 条`,
|
|
940
|
-
pageSizeOptions:
|
|
940
|
+
pageSizeOptions: E
|
|
941
941
|
},
|
|
942
942
|
onChange: H,
|
|
943
943
|
scroll: { x: "max-content", y: "50vh" }
|
|
@@ -1015,76 +1015,76 @@ Be.__docgenInfo = {
|
|
|
1015
1015
|
const Me = ({
|
|
1016
1016
|
texts: n = [],
|
|
1017
1017
|
placeholder: s = "请输入内容",
|
|
1018
|
-
animationSpeed:
|
|
1018
|
+
animationSpeed: i = 100,
|
|
1019
1019
|
autoPlay: l = !0,
|
|
1020
|
-
value:
|
|
1020
|
+
value: o,
|
|
1021
1021
|
onChange: d,
|
|
1022
|
-
...
|
|
1022
|
+
...E
|
|
1023
1023
|
}) => {
|
|
1024
|
-
const [m,
|
|
1024
|
+
const [m, S] = j(""), [_, k] = j(0), [N, I] = j(!1), [h, P] = j(!1), [V, a] = j(!1), p = z(void 0), b = z(void 0), T = z(n), g = z(_), $ = z(h), D = z(m);
|
|
1025
1025
|
U(() => {
|
|
1026
|
-
|
|
1026
|
+
T.current = n, g.current = _, $.current = h, D.current = m;
|
|
1027
1027
|
});
|
|
1028
|
-
const
|
|
1029
|
-
let
|
|
1030
|
-
|
|
1031
|
-
const
|
|
1032
|
-
|
|
1028
|
+
const A = v((t, c) => {
|
|
1029
|
+
let R = 0;
|
|
1030
|
+
a(!0);
|
|
1031
|
+
const C = () => {
|
|
1032
|
+
R < t.length ? (S(t.slice(0, R + 1)), R++, b.current = window.setTimeout(C, i)) : (a(!1), c?.());
|
|
1033
1033
|
};
|
|
1034
|
-
|
|
1035
|
-
}, [
|
|
1034
|
+
C();
|
|
1035
|
+
}, [i]), F = v((t) => {
|
|
1036
1036
|
let c = D.current.length;
|
|
1037
|
-
const
|
|
1038
|
-
c > 0 ? (
|
|
1037
|
+
const R = () => {
|
|
1038
|
+
c > 0 ? (S(D.current.slice(0, c - 1)), c--, b.current = window.setTimeout(R, i / 2)) : t?.();
|
|
1039
1039
|
};
|
|
1040
|
-
|
|
1041
|
-
}, [
|
|
1042
|
-
if (
|
|
1043
|
-
|
|
1044
|
-
const t =
|
|
1045
|
-
D.current ?
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1040
|
+
R();
|
|
1041
|
+
}, [i]), x = v(() => {
|
|
1042
|
+
if (T.current.length === 0 || $.current) return;
|
|
1043
|
+
I(!0);
|
|
1044
|
+
const t = T.current[g.current];
|
|
1045
|
+
D.current ? F(() => {
|
|
1046
|
+
A(t, () => {
|
|
1047
|
+
p.current = window.setTimeout(() => {
|
|
1048
|
+
k((c) => (c + 1) % T.current.length), I(!1);
|
|
1049
1049
|
}, 2e3);
|
|
1050
1050
|
});
|
|
1051
|
-
}) :
|
|
1052
|
-
|
|
1053
|
-
|
|
1051
|
+
}) : A(t, () => {
|
|
1052
|
+
p.current = window.setTimeout(() => {
|
|
1053
|
+
k((c) => (c + 1) % T.current.length), I(!1);
|
|
1054
1054
|
}, 2e3);
|
|
1055
1055
|
});
|
|
1056
|
-
}, [
|
|
1057
|
-
U(() => (l && n.length > 0 && !h &&
|
|
1058
|
-
|
|
1059
|
-
}), [
|
|
1060
|
-
!
|
|
1061
|
-
}, [
|
|
1062
|
-
const
|
|
1063
|
-
|
|
1064
|
-
},
|
|
1065
|
-
|
|
1066
|
-
},
|
|
1067
|
-
d?.(t.target.value),
|
|
1068
|
-
}, H = () => h ||
|
|
1056
|
+
}, [F, A]);
|
|
1057
|
+
U(() => (l && n.length > 0 && !h && x(), () => {
|
|
1058
|
+
p.current && window.clearTimeout(p.current), b.current && window.clearTimeout(b.current);
|
|
1059
|
+
}), [_, h, l, n.length, x]), U(() => {
|
|
1060
|
+
!N && l && n.length > 0 && !h && x();
|
|
1061
|
+
}, [_, N, l, n.length, h, x]);
|
|
1062
|
+
const L = (t) => {
|
|
1063
|
+
P(!0), p.current && window.clearTimeout(p.current), b.current && window.clearTimeout(b.current), I(!1), a(!1), E.onFocus?.(t);
|
|
1064
|
+
}, q = (t) => {
|
|
1065
|
+
P(!1), !o && n.length > 0 && (S(""), k(0)), E.onBlur?.(t);
|
|
1066
|
+
}, B = (t) => {
|
|
1067
|
+
d?.(t.target.value), E.onChange?.(t);
|
|
1068
|
+
}, H = () => h || o ? s : m || s;
|
|
1069
1069
|
return /* @__PURE__ */ r.jsxs("div", { style: { position: "relative" }, children: [
|
|
1070
1070
|
/* @__PURE__ */ r.jsx(
|
|
1071
1071
|
ue,
|
|
1072
1072
|
{
|
|
1073
|
-
...
|
|
1074
|
-
value:
|
|
1075
|
-
onChange:
|
|
1076
|
-
onFocus:
|
|
1077
|
-
onBlur:
|
|
1073
|
+
...E,
|
|
1074
|
+
value: o,
|
|
1075
|
+
onChange: B,
|
|
1076
|
+
onFocus: L,
|
|
1077
|
+
onBlur: q,
|
|
1078
1078
|
placeholder: H(),
|
|
1079
1079
|
style: {
|
|
1080
1080
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1081
|
-
...
|
|
1081
|
+
...E.style,
|
|
1082
1082
|
position: "relative",
|
|
1083
1083
|
zIndex: 1
|
|
1084
1084
|
}
|
|
1085
1085
|
}
|
|
1086
1086
|
),
|
|
1087
|
-
!h && !
|
|
1087
|
+
!h && !o && m && /* @__PURE__ */ r.jsxs(
|
|
1088
1088
|
"div",
|
|
1089
1089
|
{
|
|
1090
1090
|
style: {
|
|
@@ -1105,7 +1105,7 @@ const Me = ({
|
|
|
1105
1105
|
},
|
|
1106
1106
|
children: [
|
|
1107
1107
|
/* @__PURE__ */ r.jsx("span", { children: m }),
|
|
1108
|
-
|
|
1108
|
+
V && /* @__PURE__ */ r.jsx(
|
|
1109
1109
|
"span",
|
|
1110
1110
|
{
|
|
1111
1111
|
style: {
|
|
@@ -1179,90 +1179,90 @@ const $e = ({
|
|
|
1179
1179
|
// 动态文案数组,默认为空数组
|
|
1180
1180
|
placeholder: s = "请输入内容",
|
|
1181
1181
|
// 占位符文本
|
|
1182
|
-
animationSpeed:
|
|
1182
|
+
animationSpeed: i = 100,
|
|
1183
1183
|
// 打字机动画速度,毫秒
|
|
1184
1184
|
autoPlay: l = !0,
|
|
1185
1185
|
// 是否自动播放动画
|
|
1186
|
-
value:
|
|
1186
|
+
value: o = "",
|
|
1187
1187
|
// 受控模式的值
|
|
1188
1188
|
onChange: d,
|
|
1189
1189
|
// 受控模式的变化回调
|
|
1190
|
-
onSubmit:
|
|
1190
|
+
onSubmit: E,
|
|
1191
1191
|
// 提交回调
|
|
1192
1192
|
maxLength: m = 500,
|
|
1193
1193
|
// 最大字符数限制
|
|
1194
|
-
showCount:
|
|
1194
|
+
showCount: S = !0,
|
|
1195
1195
|
// 是否显示字数统计
|
|
1196
|
-
submitText:
|
|
1196
|
+
submitText: _ = "发送",
|
|
1197
1197
|
// 提交按钮文本
|
|
1198
|
-
disabled:
|
|
1198
|
+
disabled: k = !1,
|
|
1199
1199
|
// 是否禁用组件
|
|
1200
|
-
rows:
|
|
1200
|
+
rows: N = 4,
|
|
1201
1201
|
// 文本域行数
|
|
1202
|
-
style:
|
|
1202
|
+
style: I,
|
|
1203
1203
|
// 自定义样式
|
|
1204
1204
|
...h
|
|
1205
1205
|
// 其他原生属性
|
|
1206
1206
|
}) => {
|
|
1207
|
-
const [
|
|
1207
|
+
const [P, V] = j(""), [a, p] = j(0), [b, T] = j(!1), [g, $] = j(!1), [D, A] = j(!1), [F, x] = j(o || ""), L = z(void 0), q = z(void 0), B = z(n), H = z(a), t = z(g), c = z(P), R = z(null);
|
|
1208
1208
|
U(() => {
|
|
1209
|
-
|
|
1209
|
+
B.current = n, H.current = a, t.current = g, c.current = P;
|
|
1210
1210
|
});
|
|
1211
|
-
const
|
|
1211
|
+
const C = v((f, y) => {
|
|
1212
1212
|
let W = 0;
|
|
1213
|
-
|
|
1213
|
+
A(!0);
|
|
1214
1214
|
const K = () => {
|
|
1215
|
-
W < f.length ? (
|
|
1215
|
+
W < f.length ? (V(f.slice(0, W + 1)), W++, q.current = window.setTimeout(K, i)) : (A(!1), y?.());
|
|
1216
1216
|
};
|
|
1217
1217
|
K();
|
|
1218
|
-
}, [
|
|
1219
|
-
let
|
|
1218
|
+
}, [i]), G = v((f) => {
|
|
1219
|
+
let y = c.current.length;
|
|
1220
1220
|
const W = () => {
|
|
1221
|
-
|
|
1221
|
+
y > 0 ? (V(c.current.slice(0, y - 1)), y--, q.current = window.setTimeout(W, i / 2)) : f?.();
|
|
1222
1222
|
};
|
|
1223
1223
|
W();
|
|
1224
|
-
}, [
|
|
1225
|
-
if (
|
|
1226
|
-
|
|
1227
|
-
const f =
|
|
1224
|
+
}, [i]), J = v(() => {
|
|
1225
|
+
if (B.current.length === 0 || t.current) return;
|
|
1226
|
+
T(!0);
|
|
1227
|
+
const f = B.current[H.current];
|
|
1228
1228
|
c.current ? G(() => {
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1229
|
+
C(f, () => {
|
|
1230
|
+
L.current = window.setTimeout(() => {
|
|
1231
|
+
p((y) => (y + 1) % B.current.length), T(!1);
|
|
1232
1232
|
}, 2e3);
|
|
1233
1233
|
});
|
|
1234
|
-
}) :
|
|
1235
|
-
|
|
1236
|
-
|
|
1234
|
+
}) : C(f, () => {
|
|
1235
|
+
L.current = window.setTimeout(() => {
|
|
1236
|
+
p((y) => (y + 1) % B.current.length), T(!1);
|
|
1237
1237
|
}, 2e3);
|
|
1238
1238
|
});
|
|
1239
|
-
}, [G,
|
|
1240
|
-
U(() => (l && n.length > 0 && !
|
|
1241
|
-
|
|
1242
|
-
}), [
|
|
1243
|
-
!b && l && n.length > 0 && !
|
|
1244
|
-
}, [
|
|
1239
|
+
}, [G, C]);
|
|
1240
|
+
U(() => (l && n.length > 0 && !g && J(), () => {
|
|
1241
|
+
L.current && window.clearTimeout(L.current), q.current && window.clearTimeout(q.current);
|
|
1242
|
+
}), [a, g, l, n.length, J]), U(() => {
|
|
1243
|
+
!b && l && n.length > 0 && !g && J();
|
|
1244
|
+
}, [a, b, l, n.length, g, J]);
|
|
1245
1245
|
const e = (f) => {
|
|
1246
|
-
$(!0),
|
|
1246
|
+
$(!0), L.current && window.clearTimeout(L.current), q.current && window.clearTimeout(q.current), T(!1), A(!1), h.onFocus?.(f);
|
|
1247
1247
|
}, u = (f) => {
|
|
1248
|
-
$(!1), !
|
|
1249
|
-
},
|
|
1250
|
-
const
|
|
1251
|
-
m &&
|
|
1252
|
-
},
|
|
1253
|
-
const f = d ?
|
|
1254
|
-
f.trim() && !
|
|
1248
|
+
$(!1), !o && n.length > 0 && (V(""), p(0)), h.onBlur?.(f);
|
|
1249
|
+
}, w = (f) => {
|
|
1250
|
+
const y = f.target.value;
|
|
1251
|
+
m && y.length > m || (d ? d(y) : x(y), h.onChange?.(f));
|
|
1252
|
+
}, O = () => {
|
|
1253
|
+
const f = d ? o : F;
|
|
1254
|
+
f.trim() && !k && (E?.(f), d || x(""));
|
|
1255
1255
|
}, Y = (f) => {
|
|
1256
|
-
(f.ctrlKey || f.metaKey) && f.key === "Enter" && (f.preventDefault(),
|
|
1257
|
-
},
|
|
1258
|
-
return /* @__PURE__ */ r.jsxs("div", { style: { position: "relative", ...
|
|
1256
|
+
(f.ctrlKey || f.metaKey) && f.key === "Enter" && (f.preventDefault(), O()), h.onKeyDown?.(f);
|
|
1257
|
+
}, M = d ? o : F, Q = k || !M.trim() || (m ? M.length > m : !1);
|
|
1258
|
+
return /* @__PURE__ */ r.jsxs("div", { style: { position: "relative", ...I }, children: [
|
|
1259
1259
|
/* @__PURE__ */ r.jsxs("div", { style: { position: "relative" }, children: [
|
|
1260
1260
|
/* @__PURE__ */ r.jsx(
|
|
1261
1261
|
"textarea",
|
|
1262
1262
|
{
|
|
1263
|
-
ref:
|
|
1264
|
-
value: d ?
|
|
1265
|
-
onChange:
|
|
1263
|
+
ref: R,
|
|
1264
|
+
value: d ? o : F,
|
|
1265
|
+
onChange: w,
|
|
1266
1266
|
onFocus: (f) => {
|
|
1267
1267
|
f.target.style.borderColor = "#1890ff", f.target.style.boxShadow = "0 0 0 2px rgba(24, 144, 255, 0.2)", e(f);
|
|
1268
1268
|
},
|
|
@@ -1270,13 +1270,13 @@ const $e = ({
|
|
|
1270
1270
|
f.target.style.borderColor = "#d9d9d9", f.target.style.boxShadow = "none", u(f);
|
|
1271
1271
|
},
|
|
1272
1272
|
onKeyDown: Y,
|
|
1273
|
-
placeholder:
|
|
1273
|
+
placeholder: g || M ? s : "",
|
|
1274
1274
|
maxLength: m,
|
|
1275
|
-
rows:
|
|
1276
|
-
disabled:
|
|
1275
|
+
rows: N,
|
|
1276
|
+
disabled: k,
|
|
1277
1277
|
style: {
|
|
1278
1278
|
width: "100%",
|
|
1279
|
-
minHeight: `${
|
|
1279
|
+
minHeight: `${N * 24 + 16}px`,
|
|
1280
1280
|
padding: "8px 60px 8px 12px",
|
|
1281
1281
|
// 右侧留出按钮空间
|
|
1282
1282
|
border: "1px solid #d9d9d9",
|
|
@@ -1294,7 +1294,7 @@ const $e = ({
|
|
|
1294
1294
|
...h
|
|
1295
1295
|
}
|
|
1296
1296
|
),
|
|
1297
|
-
!
|
|
1297
|
+
!g && !M && P && /* @__PURE__ */ r.jsxs(
|
|
1298
1298
|
"div",
|
|
1299
1299
|
{
|
|
1300
1300
|
style: {
|
|
@@ -1316,7 +1316,7 @@ const $e = ({
|
|
|
1316
1316
|
lineHeight: "1.5"
|
|
1317
1317
|
},
|
|
1318
1318
|
children: [
|
|
1319
|
-
/* @__PURE__ */ r.jsx("span", { children:
|
|
1319
|
+
/* @__PURE__ */ r.jsx("span", { children: P }),
|
|
1320
1320
|
D && /* @__PURE__ */ r.jsx(
|
|
1321
1321
|
"span",
|
|
1322
1322
|
{
|
|
@@ -1348,7 +1348,7 @@ const $e = ({
|
|
|
1348
1348
|
type: "primary",
|
|
1349
1349
|
size: "small",
|
|
1350
1350
|
icon: /* @__PURE__ */ r.jsx(Se, {}),
|
|
1351
|
-
onClick:
|
|
1351
|
+
onClick: O,
|
|
1352
1352
|
disabled: Q,
|
|
1353
1353
|
style: {
|
|
1354
1354
|
borderRadius: 6,
|
|
@@ -1358,13 +1358,13 @@ const $e = ({
|
|
|
1358
1358
|
alignItems: "center",
|
|
1359
1359
|
justifyContent: "center"
|
|
1360
1360
|
},
|
|
1361
|
-
children:
|
|
1361
|
+
children: _
|
|
1362
1362
|
}
|
|
1363
1363
|
)
|
|
1364
1364
|
}
|
|
1365
1365
|
)
|
|
1366
1366
|
] }),
|
|
1367
|
-
|
|
1367
|
+
S && /* @__PURE__ */ r.jsxs(
|
|
1368
1368
|
"div",
|
|
1369
1369
|
{
|
|
1370
1370
|
style: {
|
|
@@ -1374,7 +1374,7 @@ const $e = ({
|
|
|
1374
1374
|
color: "#999"
|
|
1375
1375
|
},
|
|
1376
1376
|
children: [
|
|
1377
|
-
|
|
1377
|
+
M.length,
|
|
1378
1378
|
"/",
|
|
1379
1379
|
m
|
|
1380
1380
|
]
|
|
@@ -1477,72 +1477,72 @@ $e.__docgenInfo = {
|
|
|
1477
1477
|
const de = ({
|
|
1478
1478
|
src: n,
|
|
1479
1479
|
poster: s,
|
|
1480
|
-
width:
|
|
1480
|
+
width: i = 300,
|
|
1481
1481
|
height: l,
|
|
1482
|
-
videoWidth:
|
|
1482
|
+
videoWidth: o,
|
|
1483
1483
|
// 参数保留但不使用,由CSS控制
|
|
1484
1484
|
videoHeight: d,
|
|
1485
1485
|
// 参数保留但不使用,由CSS控制
|
|
1486
|
-
showPlayButton:
|
|
1486
|
+
showPlayButton: E = !0,
|
|
1487
1487
|
autoPlayOnHover: m = !0,
|
|
1488
|
-
onClick:
|
|
1489
|
-
onVideoLoaded:
|
|
1490
|
-
onVideoPlay:
|
|
1491
|
-
onVideoPause:
|
|
1492
|
-
onVideoEnded:
|
|
1488
|
+
onClick: S,
|
|
1489
|
+
onVideoLoaded: _,
|
|
1490
|
+
onVideoPlay: k,
|
|
1491
|
+
onVideoPause: N,
|
|
1492
|
+
onVideoEnded: I,
|
|
1493
1493
|
className: h,
|
|
1494
|
-
style:
|
|
1495
|
-
...
|
|
1494
|
+
style: P,
|
|
1495
|
+
...V
|
|
1496
1496
|
}) => {
|
|
1497
|
-
const
|
|
1498
|
-
|
|
1499
|
-
}, [
|
|
1500
|
-
|
|
1501
|
-
}, [
|
|
1502
|
-
|
|
1503
|
-
}, [
|
|
1504
|
-
|
|
1505
|
-
}, [m,
|
|
1506
|
-
|
|
1507
|
-
}, [m,
|
|
1508
|
-
D(!0),
|
|
1509
|
-
}, [
|
|
1510
|
-
b(!0),
|
|
1511
|
-
}, [
|
|
1512
|
-
b(!1),
|
|
1513
|
-
}, [
|
|
1514
|
-
b(!1),
|
|
1515
|
-
}, [
|
|
1516
|
-
|
|
1517
|
-
}, [
|
|
1497
|
+
const a = z(null), [p, b] = j(!1), [T, g] = j(!1), [$, D] = j(!1), A = v(() => {
|
|
1498
|
+
a.current && (a.current.play(), b(!0), k?.());
|
|
1499
|
+
}, [k]), F = v(() => {
|
|
1500
|
+
a.current && (a.current.pause(), b(!1), N?.());
|
|
1501
|
+
}, [N]), x = v((C) => {
|
|
1502
|
+
C.stopPropagation(), p ? F() : A();
|
|
1503
|
+
}, [p, A, F]), L = v(() => {
|
|
1504
|
+
g(!0), m && !p && A();
|
|
1505
|
+
}, [m, p, A]), q = v(() => {
|
|
1506
|
+
g(!1), m && p && F();
|
|
1507
|
+
}, [m, p, F]), B = v(() => {
|
|
1508
|
+
D(!0), _?.();
|
|
1509
|
+
}, [_]), H = v(() => {
|
|
1510
|
+
b(!0), k?.();
|
|
1511
|
+
}, [k]), t = v(() => {
|
|
1512
|
+
b(!1), N?.();
|
|
1513
|
+
}, [N]), c = v(() => {
|
|
1514
|
+
b(!1), I?.();
|
|
1515
|
+
}, [I]), R = v((C) => {
|
|
1516
|
+
S?.(C);
|
|
1517
|
+
}, [S]);
|
|
1518
1518
|
return /* @__PURE__ */ r.jsx(
|
|
1519
1519
|
te,
|
|
1520
1520
|
{
|
|
1521
|
-
...
|
|
1521
|
+
...V,
|
|
1522
1522
|
className: `video-card ${h || ""}`,
|
|
1523
1523
|
style: {
|
|
1524
|
-
width:
|
|
1524
|
+
width: i,
|
|
1525
1525
|
height: l,
|
|
1526
1526
|
padding: 0,
|
|
1527
1527
|
overflow: "hidden",
|
|
1528
|
-
cursor:
|
|
1528
|
+
cursor: S ? "pointer" : "default",
|
|
1529
1529
|
border: "none",
|
|
1530
1530
|
borderRadius: 0,
|
|
1531
|
-
...
|
|
1531
|
+
...P
|
|
1532
1532
|
},
|
|
1533
1533
|
bordered: !1,
|
|
1534
|
-
onMouseEnter:
|
|
1535
|
-
onMouseLeave:
|
|
1536
|
-
onClick:
|
|
1534
|
+
onMouseEnter: L,
|
|
1535
|
+
onMouseLeave: q,
|
|
1536
|
+
onClick: R,
|
|
1537
1537
|
children: /* @__PURE__ */ r.jsxs("div", { className: "video-card-container", children: [
|
|
1538
1538
|
/* @__PURE__ */ r.jsx(
|
|
1539
1539
|
"video",
|
|
1540
1540
|
{
|
|
1541
|
-
ref:
|
|
1541
|
+
ref: a,
|
|
1542
1542
|
src: n,
|
|
1543
1543
|
poster: s,
|
|
1544
1544
|
preload: "metadata",
|
|
1545
|
-
onLoadedData:
|
|
1545
|
+
onLoadedData: B,
|
|
1546
1546
|
onPlay: H,
|
|
1547
1547
|
onPause: t,
|
|
1548
1548
|
onEnded: c,
|
|
@@ -1550,12 +1550,12 @@ const de = ({
|
|
|
1550
1550
|
loop: !0
|
|
1551
1551
|
}
|
|
1552
1552
|
),
|
|
1553
|
-
|
|
1553
|
+
E && /* @__PURE__ */ r.jsx(
|
|
1554
1554
|
"div",
|
|
1555
1555
|
{
|
|
1556
|
-
className: `video-play-button ${
|
|
1557
|
-
onClick:
|
|
1558
|
-
children:
|
|
1556
|
+
className: `video-play-button ${T ? "hovered" : ""}`,
|
|
1557
|
+
onClick: x,
|
|
1558
|
+
children: p ? /* @__PURE__ */ r.jsx(qe, { className: "play-icon" }) : /* @__PURE__ */ r.jsx(Ce, { className: "play-icon" })
|
|
1559
1559
|
}
|
|
1560
1560
|
),
|
|
1561
1561
|
!$ && /* @__PURE__ */ r.jsx("div", { className: "video-loading-mask", children: /* @__PURE__ */ r.jsx("div", { className: "loading-spinner" }) })
|
|
@@ -1664,12 +1664,12 @@ de.__docgenInfo = {
|
|
|
1664
1664
|
}
|
|
1665
1665
|
}
|
|
1666
1666
|
};
|
|
1667
|
-
const De = (n) => [".mp4", ".webm", ".ogg", ".mov", ".avi", ".wmv", ".flv", ".mkv"].some((
|
|
1667
|
+
const De = (n) => [".mp4", ".webm", ".ogg", ".mov", ".avi", ".wmv", ".flv", ".mkv"].some((i) => n.toLowerCase().includes(i)), We = (n) => n.type ? n.type : De(n.url) ? "video" : "image", He = ({
|
|
1668
1668
|
items: n,
|
|
1669
1669
|
columns: s,
|
|
1670
|
-
gap:
|
|
1670
|
+
gap: i = 0,
|
|
1671
1671
|
responsive: l = !0,
|
|
1672
|
-
breakpoints:
|
|
1672
|
+
breakpoints: o = {
|
|
1673
1673
|
xs: 1,
|
|
1674
1674
|
sm: 2,
|
|
1675
1675
|
md: 3,
|
|
@@ -1678,71 +1678,77 @@ const De = (n) => [".mp4", ".webm", ".ogg", ".mov", ".avi", ".wmv", ".flv", ".mk
|
|
|
1678
1678
|
xxl: 6
|
|
1679
1679
|
},
|
|
1680
1680
|
className: d,
|
|
1681
|
-
style:
|
|
1681
|
+
style: E,
|
|
1682
|
+
onClick: m
|
|
1682
1683
|
}) => {
|
|
1683
|
-
const
|
|
1684
|
+
const S = z(null), [_, k] = j(s || o.md || 3), N = z(/* @__PURE__ */ new Map()), I = v(() => {
|
|
1684
1685
|
if (!l || s)
|
|
1685
|
-
return s ||
|
|
1686
|
-
const
|
|
1687
|
-
return
|
|
1688
|
-
}, [l, s,
|
|
1689
|
-
if (!
|
|
1690
|
-
const
|
|
1691
|
-
n.forEach((
|
|
1692
|
-
const
|
|
1693
|
-
if (!
|
|
1694
|
-
const
|
|
1695
|
-
|
|
1686
|
+
return s || o.md || 3;
|
|
1687
|
+
const a = window.innerWidth;
|
|
1688
|
+
return a < 576 ? o.xs || 1 : a < 768 ? o.sm || 2 : a < 992 ? o.md || 3 : a < 1200 ? o.lg || 4 : a < 1600 ? o.xl || 5 : o.xxl || 6;
|
|
1689
|
+
}, [l, s, o]), h = v(() => {
|
|
1690
|
+
if (!S.current) return;
|
|
1691
|
+
const a = _, p = S.current, T = (p.offsetWidth - i * (a - 1)) / a, g = new Array(a).fill(0);
|
|
1692
|
+
n.forEach((D, A) => {
|
|
1693
|
+
const F = D.id || A, x = N.current.get(F);
|
|
1694
|
+
if (!x) return;
|
|
1695
|
+
const L = Math.min(...g), q = g.indexOf(L), B = q * (T + i), H = g[q];
|
|
1696
|
+
x.style.position = "absolute", x.style.left = `${B}px`, x.style.top = `${H}px`, x.style.width = `${T}px`, g[q] += x.offsetHeight + i;
|
|
1696
1697
|
});
|
|
1697
|
-
const
|
|
1698
|
-
|
|
1699
|
-
}, [n,
|
|
1698
|
+
const $ = Math.max(...g);
|
|
1699
|
+
p.style.height = `${$}px`;
|
|
1700
|
+
}, [n, _, i]);
|
|
1700
1701
|
U(() => {
|
|
1701
|
-
const
|
|
1702
|
-
const
|
|
1703
|
-
|
|
1702
|
+
const a = () => {
|
|
1703
|
+
const p = I();
|
|
1704
|
+
p !== _ && k(p);
|
|
1704
1705
|
};
|
|
1705
1706
|
if (l)
|
|
1706
|
-
return window.addEventListener("resize",
|
|
1707
|
-
}, [l,
|
|
1708
|
-
const
|
|
1709
|
-
|
|
1707
|
+
return window.addEventListener("resize", a), a(), () => window.removeEventListener("resize", a);
|
|
1708
|
+
}, [l, I, _]), U(() => {
|
|
1709
|
+
const a = setTimeout(() => {
|
|
1710
|
+
h();
|
|
1710
1711
|
}, 100);
|
|
1711
|
-
return () => clearTimeout(
|
|
1712
|
-
}, [n,
|
|
1713
|
-
const
|
|
1714
|
-
|
|
1715
|
-
}, [
|
|
1716
|
-
|
|
1717
|
-
}, []);
|
|
1712
|
+
return () => clearTimeout(a);
|
|
1713
|
+
}, [n, _, h]);
|
|
1714
|
+
const P = v(() => {
|
|
1715
|
+
h();
|
|
1716
|
+
}, [h]), V = v((a) => {
|
|
1717
|
+
m && m(a), a.onClick?.(a);
|
|
1718
|
+
}, [m]);
|
|
1718
1719
|
return /* @__PURE__ */ r.jsx(
|
|
1719
1720
|
"div",
|
|
1720
1721
|
{
|
|
1721
|
-
ref:
|
|
1722
|
+
ref: S,
|
|
1722
1723
|
className: `waterfall-container ${d || ""}`,
|
|
1723
1724
|
style: {
|
|
1724
1725
|
position: "relative",
|
|
1725
1726
|
width: "100%",
|
|
1726
|
-
...
|
|
1727
|
+
...E
|
|
1727
1728
|
},
|
|
1728
|
-
children: n.map((
|
|
1729
|
-
const
|
|
1729
|
+
children: n.map((a, p) => {
|
|
1730
|
+
const b = a.id || p, T = We(a);
|
|
1730
1731
|
return /* @__PURE__ */ r.jsx(
|
|
1731
1732
|
"div",
|
|
1732
1733
|
{
|
|
1733
|
-
ref: (
|
|
1734
|
-
|
|
1734
|
+
ref: (g) => {
|
|
1735
|
+
g ? N.current.set(b, g) : N.current.delete(b);
|
|
1735
1736
|
},
|
|
1736
1737
|
className: "waterfall-item",
|
|
1737
|
-
children:
|
|
1738
|
+
children: T === "video" ? /* @__PURE__ */ r.jsx("div", { style: {
|
|
1739
|
+
width: "100%",
|
|
1740
|
+
position: "relative",
|
|
1741
|
+
paddingBottom: "56.25%",
|
|
1742
|
+
cursor: m || a.onClick ? "pointer" : "default"
|
|
1743
|
+
}, children: /* @__PURE__ */ r.jsx("div", { style: { position: "absolute", top: 0, left: 0, width: "100%", height: "100%" }, children: /* @__PURE__ */ r.jsx(
|
|
1738
1744
|
de,
|
|
1739
1745
|
{
|
|
1740
|
-
src:
|
|
1741
|
-
poster:
|
|
1746
|
+
src: a.url,
|
|
1747
|
+
poster: a.poster,
|
|
1742
1748
|
width: "100%",
|
|
1743
1749
|
height: "100%",
|
|
1744
|
-
onClick: () =>
|
|
1745
|
-
onVideoLoaded:
|
|
1750
|
+
onClick: () => V(a),
|
|
1751
|
+
onVideoLoaded: P,
|
|
1746
1752
|
autoPlayOnHover: !0,
|
|
1747
1753
|
showPlayButton: !1
|
|
1748
1754
|
}
|
|
@@ -1750,21 +1756,23 @@ const De = (n) => [".mp4", ".webm", ".ogg", ".mov", ".avi", ".wmv", ".flv", ".mk
|
|
|
1750
1756
|
"div",
|
|
1751
1757
|
{
|
|
1752
1758
|
className: "waterfall-image-wrapper",
|
|
1753
|
-
onClick: () =>
|
|
1759
|
+
onClick: () => V(a),
|
|
1760
|
+
style: { cursor: m || a.onClick ? "pointer" : "default" },
|
|
1754
1761
|
children: /* @__PURE__ */ r.jsx(
|
|
1755
1762
|
"img",
|
|
1756
1763
|
{
|
|
1757
|
-
src:
|
|
1758
|
-
alt: `瀑布流图片 ${
|
|
1764
|
+
src: a.url,
|
|
1765
|
+
alt: `瀑布流图片 ${p + 1}`,
|
|
1759
1766
|
className: "waterfall-image",
|
|
1760
|
-
onLoad:
|
|
1761
|
-
onError:
|
|
1767
|
+
onLoad: P,
|
|
1768
|
+
onError: P,
|
|
1769
|
+
style: { display: "block", width: "100%", height: "auto" }
|
|
1762
1770
|
}
|
|
1763
1771
|
)
|
|
1764
1772
|
}
|
|
1765
1773
|
)
|
|
1766
1774
|
},
|
|
1767
|
-
|
|
1775
|
+
b
|
|
1768
1776
|
);
|
|
1769
1777
|
})
|
|
1770
1778
|
}
|
|
@@ -1817,6 +1825,12 @@ He.__docgenInfo = {
|
|
|
1817
1825
|
required: !1,
|
|
1818
1826
|
description: "自定义样式",
|
|
1819
1827
|
type: { name: "CSSProperties", raw: "React.CSSProperties" }
|
|
1828
|
+
},
|
|
1829
|
+
onClick: {
|
|
1830
|
+
name: "onClick",
|
|
1831
|
+
required: !1,
|
|
1832
|
+
description: "点击回调",
|
|
1833
|
+
type: { name: "function", raw: "(item: any) => void" }
|
|
1820
1834
|
}
|
|
1821
1835
|
}
|
|
1822
1836
|
};
|