bi-components-library 1.0.0 → 1.0.1
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 -0
- package/dist/index.es.js +852 -504
- 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,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Button as X, Card as
|
|
3
|
-
import { createFromIconfontCN as
|
|
1
|
+
import me, { useState as _, useRef as P, useMemo as pe, useCallback as x, useEffect as U } from "react";
|
|
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
|
+
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 = {};
|
|
5
5
|
/**
|
|
6
6
|
* @license React
|
|
@@ -11,27 +11,27 @@ var ne = { exports: {} }, Z = {};
|
|
|
11
11
|
* This source code is licensed under the MIT license found in the
|
|
12
12
|
* LICENSE file in the root directory of this source tree.
|
|
13
13
|
*/
|
|
14
|
-
var
|
|
15
|
-
function
|
|
16
|
-
if (
|
|
17
|
-
|
|
18
|
-
var
|
|
19
|
-
function
|
|
20
|
-
var
|
|
21
|
-
if (
|
|
22
|
-
|
|
23
|
-
for (var
|
|
24
|
-
|
|
25
|
-
} else
|
|
26
|
-
return
|
|
27
|
-
$$typeof:
|
|
28
|
-
type:
|
|
29
|
-
key:
|
|
30
|
-
ref:
|
|
31
|
-
props:
|
|
14
|
+
var oe;
|
|
15
|
+
function je() {
|
|
16
|
+
if (oe) return Z;
|
|
17
|
+
oe = 1;
|
|
18
|
+
var n = Symbol.for("react.transitional.element"), s = Symbol.for("react.fragment");
|
|
19
|
+
function o(l, a, d) {
|
|
20
|
+
var k = null;
|
|
21
|
+
if (d !== void 0 && (k = "" + d), a.key !== void 0 && (k = "" + a.key), "key" in a) {
|
|
22
|
+
d = {};
|
|
23
|
+
for (var m in a)
|
|
24
|
+
m !== "key" && (d[m] = a[m]);
|
|
25
|
+
} else d = a;
|
|
26
|
+
return a = d.ref, {
|
|
27
|
+
$$typeof: n,
|
|
28
|
+
type: l,
|
|
29
|
+
key: k,
|
|
30
|
+
ref: a !== void 0 ? a : null,
|
|
31
|
+
props: d
|
|
32
32
|
};
|
|
33
33
|
}
|
|
34
|
-
return Z.Fragment =
|
|
34
|
+
return Z.Fragment = s, Z.jsx = o, Z.jsxs = o, Z;
|
|
35
35
|
}
|
|
36
36
|
var ee = {};
|
|
37
37
|
/**
|
|
@@ -43,125 +43,125 @@ var ee = {};
|
|
|
43
43
|
* This source code is licensed under the MIT license found in the
|
|
44
44
|
* LICENSE file in the root directory of this source tree.
|
|
45
45
|
*/
|
|
46
|
-
var
|
|
47
|
-
function
|
|
48
|
-
return
|
|
49
|
-
function
|
|
46
|
+
var ie;
|
|
47
|
+
function Ee() {
|
|
48
|
+
return ie || (ie = 1, process.env.NODE_ENV !== "production" && function() {
|
|
49
|
+
function n(e) {
|
|
50
50
|
if (e == null) return null;
|
|
51
51
|
if (typeof e == "function")
|
|
52
52
|
return e.$$typeof === z ? null : e.displayName || e.name || null;
|
|
53
53
|
if (typeof e == "string") return e;
|
|
54
54
|
switch (e) {
|
|
55
|
-
case
|
|
55
|
+
case i:
|
|
56
56
|
return "Fragment";
|
|
57
|
-
case
|
|
57
|
+
case g:
|
|
58
58
|
return "Profiler";
|
|
59
|
-
case
|
|
59
|
+
case y:
|
|
60
60
|
return "StrictMode";
|
|
61
|
-
case
|
|
61
|
+
case $:
|
|
62
62
|
return "Suspense";
|
|
63
63
|
case D:
|
|
64
64
|
return "SuspenseList";
|
|
65
|
-
case
|
|
65
|
+
case O:
|
|
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 A:
|
|
73
73
|
return "Portal";
|
|
74
|
-
case
|
|
74
|
+
case w:
|
|
75
75
|
return (e.displayName || "Context") + ".Provider";
|
|
76
|
-
case _:
|
|
77
|
-
return (e._context.displayName || "Context") + ".Consumer";
|
|
78
76
|
case b:
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
return
|
|
83
|
-
case
|
|
84
|
-
|
|
77
|
+
return (e._context.displayName || "Context") + ".Consumer";
|
|
78
|
+
case S:
|
|
79
|
+
var u = e.render;
|
|
80
|
+
return e = e.displayName, e || (e = u.displayName || u.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
|
|
81
|
+
case N:
|
|
82
|
+
return u = e.displayName || null, u !== null ? u : n(e.type) || "Memo";
|
|
83
|
+
case R:
|
|
84
|
+
u = e._payload, e = e._init;
|
|
85
85
|
try {
|
|
86
|
-
return
|
|
86
|
+
return n(e(u));
|
|
87
87
|
} catch {
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
90
|
return null;
|
|
91
91
|
}
|
|
92
|
-
function
|
|
92
|
+
function s(e) {
|
|
93
93
|
return "" + e;
|
|
94
94
|
}
|
|
95
|
-
function
|
|
95
|
+
function o(e) {
|
|
96
96
|
try {
|
|
97
|
-
|
|
98
|
-
var
|
|
97
|
+
s(e);
|
|
98
|
+
var u = !1;
|
|
99
99
|
} catch {
|
|
100
|
-
|
|
100
|
+
u = !0;
|
|
101
101
|
}
|
|
102
|
-
if (
|
|
103
|
-
|
|
104
|
-
var
|
|
105
|
-
return
|
|
106
|
-
|
|
102
|
+
if (u) {
|
|
103
|
+
u = console;
|
|
104
|
+
var v = u.error, I = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
105
|
+
return v.call(
|
|
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
|
-
|
|
109
|
-
),
|
|
108
|
+
I
|
|
109
|
+
), s(e);
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
|
-
function
|
|
113
|
-
if (e ===
|
|
114
|
-
if (typeof e == "object" && e !== null && e.$$typeof ===
|
|
112
|
+
function l(e) {
|
|
113
|
+
if (e === i) return "<>";
|
|
114
|
+
if (typeof e == "object" && e !== null && e.$$typeof === R)
|
|
115
115
|
return "<...>";
|
|
116
116
|
try {
|
|
117
|
-
var
|
|
118
|
-
return
|
|
117
|
+
var u = n(e);
|
|
118
|
+
return u ? "<" + u + ">" : "<...>";
|
|
119
119
|
} catch {
|
|
120
120
|
return "<...>";
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
|
-
function
|
|
124
|
-
var e =
|
|
123
|
+
function a() {
|
|
124
|
+
var e = F.A;
|
|
125
125
|
return e === null ? null : e.getOwner();
|
|
126
126
|
}
|
|
127
|
-
function
|
|
127
|
+
function d() {
|
|
128
128
|
return Error("react-stack-top-frame");
|
|
129
129
|
}
|
|
130
|
-
function
|
|
131
|
-
if (
|
|
132
|
-
var
|
|
133
|
-
if (
|
|
130
|
+
function k(e) {
|
|
131
|
+
if (L.call(e, "key")) {
|
|
132
|
+
var u = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
133
|
+
if (u && u.isReactWarning) return !1;
|
|
134
134
|
}
|
|
135
135
|
return e.key !== void 0;
|
|
136
136
|
}
|
|
137
|
-
function
|
|
138
|
-
function
|
|
139
|
-
|
|
137
|
+
function m(e, u) {
|
|
138
|
+
function v() {
|
|
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
|
+
v.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
145
|
+
get: v,
|
|
146
146
|
configurable: !0
|
|
147
147
|
});
|
|
148
148
|
}
|
|
149
|
-
function
|
|
150
|
-
var e =
|
|
151
|
-
return
|
|
149
|
+
function T() {
|
|
150
|
+
var e = n(this.type);
|
|
151
|
+
return q[e] || (q[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
|
|
157
|
-
$$typeof:
|
|
155
|
+
function M(e, u, v, I, Y, B, Q, f) {
|
|
156
|
+
return v = B.ref, e = {
|
|
157
|
+
$$typeof: h,
|
|
158
158
|
type: e,
|
|
159
|
-
key:
|
|
160
|
-
props:
|
|
161
|
-
_owner:
|
|
162
|
-
}, (
|
|
159
|
+
key: u,
|
|
160
|
+
props: B,
|
|
161
|
+
_owner: Y
|
|
162
|
+
}, (v !== void 0 ? v : null) !== null ? Object.defineProperty(e, "ref", {
|
|
163
163
|
enumerable: !1,
|
|
164
|
-
get:
|
|
164
|
+
get: T
|
|
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,
|
|
@@ -181,114 +181,114 @@ function _e() {
|
|
|
181
181
|
configurable: !1,
|
|
182
182
|
enumerable: !1,
|
|
183
183
|
writable: !0,
|
|
184
|
-
value:
|
|
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 (
|
|
192
|
-
for (
|
|
193
|
-
|
|
194
|
-
Object.freeze && Object.freeze(
|
|
187
|
+
function C(e, u, v, I, Y, B, Q, f) {
|
|
188
|
+
var p = u.children;
|
|
189
|
+
if (p !== void 0)
|
|
190
|
+
if (I)
|
|
191
|
+
if (H(p)) {
|
|
192
|
+
for (I = 0; I < p.length; I++)
|
|
193
|
+
V(p[I]);
|
|
194
|
+
Object.freeze && Object.freeze(p);
|
|
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
|
-
|
|
202
|
-
var
|
|
203
|
-
return
|
|
199
|
+
else V(p);
|
|
200
|
+
if (L.call(u, "key")) {
|
|
201
|
+
p = n(e);
|
|
202
|
+
var W = Object.keys(u).filter(function(fe) {
|
|
203
|
+
return fe !== "key";
|
|
204
204
|
});
|
|
205
|
-
|
|
205
|
+
I = 0 < W.length ? "{key: someKey, " + W.join(": ..., ") + ": ...}" : "{key: someKey}", J[p + I] || (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
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
),
|
|
212
|
+
I,
|
|
213
|
+
p,
|
|
214
|
+
W,
|
|
215
|
+
p
|
|
216
|
+
), J[p + I] = !0);
|
|
217
217
|
}
|
|
218
|
-
if (
|
|
219
|
-
|
|
220
|
-
for (var K in
|
|
221
|
-
K !== "key" && (
|
|
222
|
-
} else
|
|
223
|
-
return
|
|
224
|
-
|
|
218
|
+
if (p = null, v !== void 0 && (o(v), p = "" + v), k(u) && (o(u.key), p = "" + u.key), "key" in u) {
|
|
219
|
+
v = {};
|
|
220
|
+
for (var K in u)
|
|
221
|
+
K !== "key" && (v[K] = u[K]);
|
|
222
|
+
} else v = u;
|
|
223
|
+
return p && m(
|
|
224
|
+
v,
|
|
225
225
|
typeof e == "function" ? e.displayName || e.name || "Unknown" : e
|
|
226
|
-
),
|
|
226
|
+
), M(
|
|
227
227
|
e,
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
228
|
+
p,
|
|
229
|
+
B,
|
|
230
|
+
Y,
|
|
231
|
+
a(),
|
|
232
|
+
v,
|
|
233
233
|
Q,
|
|
234
|
-
|
|
234
|
+
f
|
|
235
235
|
);
|
|
236
236
|
}
|
|
237
|
-
function
|
|
238
|
-
typeof e == "object" && e !== null && e.$$typeof ===
|
|
237
|
+
function V(e) {
|
|
238
|
+
typeof e == "object" && e !== null && e.$$typeof === h && e._store && (e._store.validated = 1);
|
|
239
239
|
}
|
|
240
|
-
var
|
|
240
|
+
var j = me, h = Symbol.for("react.transitional.element"), A = Symbol.for("react.portal"), i = Symbol.for("react.fragment"), y = Symbol.for("react.strict_mode"), g = Symbol.for("react.profiler"), b = Symbol.for("react.consumer"), w = Symbol.for("react.context"), S = Symbol.for("react.forward_ref"), $ = Symbol.for("react.suspense"), D = Symbol.for("react.suspense_list"), N = Symbol.for("react.memo"), R = Symbol.for("react.lazy"), O = Symbol.for("react.activity"), z = Symbol.for("react.client.reference"), F = j.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, L = Object.prototype.hasOwnProperty, H = Array.isArray, t = console.createTask ? console.createTask : function() {
|
|
241
241
|
return null;
|
|
242
242
|
};
|
|
243
|
-
|
|
243
|
+
j = {
|
|
244
244
|
react_stack_bottom_frame: function(e) {
|
|
245
245
|
return e();
|
|
246
246
|
}
|
|
247
247
|
};
|
|
248
|
-
var
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
)(),
|
|
252
|
-
ee.Fragment =
|
|
253
|
-
var
|
|
254
|
-
return
|
|
248
|
+
var c, q = {}, E = j.react_stack_bottom_frame.bind(
|
|
249
|
+
j,
|
|
250
|
+
d
|
|
251
|
+
)(), G = t(l(d)), J = {};
|
|
252
|
+
ee.Fragment = i, ee.jsx = function(e, u, v, I, Y) {
|
|
253
|
+
var B = 1e4 > F.recentlyCreatedOwnerStacks++;
|
|
254
|
+
return C(
|
|
255
255
|
e,
|
|
256
|
-
|
|
257
|
-
|
|
256
|
+
u,
|
|
257
|
+
v,
|
|
258
258
|
!1,
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
259
|
+
I,
|
|
260
|
+
Y,
|
|
261
|
+
B ? Error("react-stack-top-frame") : E,
|
|
262
|
+
B ? t(l(e)) : G
|
|
263
263
|
);
|
|
264
|
-
}, ee.jsxs = function(e,
|
|
265
|
-
var
|
|
266
|
-
return
|
|
264
|
+
}, ee.jsxs = function(e, u, v, I, Y) {
|
|
265
|
+
var B = 1e4 > F.recentlyCreatedOwnerStacks++;
|
|
266
|
+
return C(
|
|
267
267
|
e,
|
|
268
|
-
|
|
269
|
-
|
|
268
|
+
u,
|
|
269
|
+
v,
|
|
270
270
|
!0,
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
271
|
+
I,
|
|
272
|
+
Y,
|
|
273
|
+
B ? Error("react-stack-top-frame") : E,
|
|
274
|
+
B ? t(l(e)) : G
|
|
275
275
|
);
|
|
276
276
|
};
|
|
277
277
|
}()), ee;
|
|
278
278
|
}
|
|
279
|
-
var
|
|
280
|
-
function
|
|
281
|
-
return
|
|
279
|
+
var se;
|
|
280
|
+
function _e() {
|
|
281
|
+
return se || (se = 1, process.env.NODE_ENV === "production" ? ne.exports = je() : ne.exports = Ee()), ne.exports;
|
|
282
282
|
}
|
|
283
|
-
var
|
|
284
|
-
const
|
|
285
|
-
variant:
|
|
286
|
-
loading:
|
|
287
|
-
children:
|
|
288
|
-
...
|
|
283
|
+
var r = _e();
|
|
284
|
+
const ke = ({
|
|
285
|
+
variant: n = "primary",
|
|
286
|
+
loading: s = !1,
|
|
287
|
+
children: o,
|
|
288
|
+
...l
|
|
289
289
|
}) => {
|
|
290
|
-
const
|
|
291
|
-
switch (
|
|
290
|
+
const a = (d) => {
|
|
291
|
+
switch (d) {
|
|
292
292
|
case "primary":
|
|
293
293
|
return "primary";
|
|
294
294
|
case "ghost":
|
|
@@ -303,18 +303,18 @@ const je = ({
|
|
|
303
303
|
return "primary";
|
|
304
304
|
}
|
|
305
305
|
};
|
|
306
|
-
return /* @__PURE__ */
|
|
306
|
+
return /* @__PURE__ */ r.jsx(
|
|
307
307
|
X,
|
|
308
308
|
{
|
|
309
|
-
...
|
|
310
|
-
type:
|
|
311
|
-
loading:
|
|
312
|
-
ghost:
|
|
313
|
-
children:
|
|
309
|
+
...l,
|
|
310
|
+
type: a(n),
|
|
311
|
+
loading: s,
|
|
312
|
+
ghost: n === "ghost",
|
|
313
|
+
children: o
|
|
314
314
|
}
|
|
315
315
|
);
|
|
316
316
|
};
|
|
317
|
-
|
|
317
|
+
ke.__docgenInfo = {
|
|
318
318
|
displayName: "Button",
|
|
319
319
|
description: "基础按钮,用于触发操作",
|
|
320
320
|
props: {
|
|
@@ -358,25 +358,25 @@ je.__docgenInfo = {
|
|
|
358
358
|
}
|
|
359
359
|
}
|
|
360
360
|
};
|
|
361
|
-
const
|
|
362
|
-
title:
|
|
363
|
-
children:
|
|
364
|
-
bordered:
|
|
365
|
-
hoverable:
|
|
366
|
-
size:
|
|
367
|
-
...
|
|
368
|
-
}) => /* @__PURE__ */
|
|
369
|
-
|
|
361
|
+
const Ne = ({
|
|
362
|
+
title: n,
|
|
363
|
+
children: s,
|
|
364
|
+
bordered: o = !0,
|
|
365
|
+
hoverable: l = !1,
|
|
366
|
+
size: a = "default",
|
|
367
|
+
...d
|
|
368
|
+
}) => /* @__PURE__ */ r.jsx(
|
|
369
|
+
te,
|
|
370
370
|
{
|
|
371
|
-
...
|
|
372
|
-
title:
|
|
373
|
-
bordered:
|
|
374
|
-
hoverable:
|
|
375
|
-
size:
|
|
376
|
-
children:
|
|
371
|
+
...d,
|
|
372
|
+
title: n,
|
|
373
|
+
bordered: o,
|
|
374
|
+
hoverable: l,
|
|
375
|
+
size: a,
|
|
376
|
+
children: s
|
|
377
377
|
}
|
|
378
378
|
);
|
|
379
|
-
|
|
379
|
+
Ne.__docgenInfo = {
|
|
380
380
|
displayName: "Card",
|
|
381
381
|
description: "卡片容器,用于分组内容",
|
|
382
382
|
props: {
|
|
@@ -427,23 +427,23 @@ ke.__docgenInfo = {
|
|
|
427
427
|
}
|
|
428
428
|
}
|
|
429
429
|
};
|
|
430
|
-
const
|
|
431
|
-
showDefaultFooter:
|
|
432
|
-
...
|
|
430
|
+
const Ie = ({
|
|
431
|
+
showDefaultFooter: n = !0,
|
|
432
|
+
...s
|
|
433
433
|
}) => {
|
|
434
|
-
const
|
|
435
|
-
/* @__PURE__ */
|
|
436
|
-
/* @__PURE__ */
|
|
434
|
+
const o = s.footer !== void 0 ? s.footer : n ? (l, { OkBtn: a, CancelBtn: d }) => /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
435
|
+
/* @__PURE__ */ r.jsx(a, {}),
|
|
436
|
+
/* @__PURE__ */ r.jsx(d, {})
|
|
437
437
|
] }) : null;
|
|
438
|
-
return /* @__PURE__ */
|
|
439
|
-
|
|
438
|
+
return /* @__PURE__ */ r.jsx(
|
|
439
|
+
ye,
|
|
440
440
|
{
|
|
441
|
-
...
|
|
442
|
-
footer:
|
|
441
|
+
...s,
|
|
442
|
+
footer: o
|
|
443
443
|
}
|
|
444
444
|
);
|
|
445
445
|
};
|
|
446
|
-
|
|
446
|
+
Ie.__docgenInfo = {
|
|
447
447
|
displayName: "AppModal",
|
|
448
448
|
description: "应用级模态框组件,基于 Ant Design Modal 封装",
|
|
449
449
|
props: {
|
|
@@ -504,29 +504,29 @@ qe.__docgenInfo = {
|
|
|
504
504
|
}
|
|
505
505
|
}
|
|
506
506
|
};
|
|
507
|
-
const
|
|
508
|
-
scrollX:
|
|
509
|
-
showPagination:
|
|
510
|
-
defaultPageSize:
|
|
511
|
-
...
|
|
512
|
-
}) => /* @__PURE__ */
|
|
507
|
+
const Pe = ({
|
|
508
|
+
scrollX: n,
|
|
509
|
+
showPagination: s = !0,
|
|
510
|
+
defaultPageSize: o = 10,
|
|
511
|
+
...l
|
|
512
|
+
}) => /* @__PURE__ */ r.jsx(
|
|
513
513
|
le,
|
|
514
514
|
{
|
|
515
|
-
...
|
|
515
|
+
...l,
|
|
516
516
|
scroll: {
|
|
517
|
-
x:
|
|
517
|
+
x: n || "max-content",
|
|
518
518
|
y: "50vh"
|
|
519
519
|
},
|
|
520
|
-
pagination:
|
|
520
|
+
pagination: s ? {
|
|
521
521
|
hideOnSinglePage: !0,
|
|
522
522
|
showSizeChanger: !0,
|
|
523
523
|
showQuickJumper: !0,
|
|
524
|
-
defaultPageSize:
|
|
525
|
-
...
|
|
524
|
+
defaultPageSize: o,
|
|
525
|
+
...l.pagination
|
|
526
526
|
} : !1
|
|
527
527
|
}
|
|
528
528
|
);
|
|
529
|
-
|
|
529
|
+
Pe.__docgenInfo = {
|
|
530
530
|
displayName: "PageTable",
|
|
531
531
|
description: "页面级表格组件,高度铺满容器,自动滚动",
|
|
532
532
|
props: {
|
|
@@ -576,30 +576,30 @@ Ce.__docgenInfo = {
|
|
|
576
576
|
}
|
|
577
577
|
}
|
|
578
578
|
};
|
|
579
|
-
const
|
|
579
|
+
const Ve = ve({
|
|
580
580
|
scriptUrl: ["https://at.alicdn.com/t/c/font_4968458_eh91gfr4j9e.js"]
|
|
581
|
-
}),
|
|
582
|
-
name:
|
|
583
|
-
size:
|
|
584
|
-
color:
|
|
585
|
-
style:
|
|
586
|
-
...
|
|
581
|
+
}), Ae = ({
|
|
582
|
+
name: n,
|
|
583
|
+
size: s,
|
|
584
|
+
color: o,
|
|
585
|
+
style: l,
|
|
586
|
+
...a
|
|
587
587
|
}) => {
|
|
588
|
-
const
|
|
589
|
-
fontSize:
|
|
590
|
-
color:
|
|
591
|
-
...
|
|
588
|
+
const d = {
|
|
589
|
+
fontSize: s,
|
|
590
|
+
color: o,
|
|
591
|
+
...l
|
|
592
592
|
};
|
|
593
|
-
return /* @__PURE__ */
|
|
594
|
-
|
|
593
|
+
return /* @__PURE__ */ r.jsx(
|
|
594
|
+
Ve,
|
|
595
595
|
{
|
|
596
|
-
...
|
|
597
|
-
type:
|
|
598
|
-
style:
|
|
596
|
+
...a,
|
|
597
|
+
type: n,
|
|
598
|
+
style: d
|
|
599
599
|
}
|
|
600
600
|
);
|
|
601
601
|
};
|
|
602
|
-
|
|
602
|
+
Ae.__docgenInfo = {
|
|
603
603
|
displayName: "XcIcon",
|
|
604
604
|
description: "自定义图标组件,基于 iconfont",
|
|
605
605
|
props: {
|
|
@@ -635,43 +635,43 @@ Ie.__docgenInfo = {
|
|
|
635
635
|
}
|
|
636
636
|
}
|
|
637
637
|
};
|
|
638
|
-
const
|
|
639
|
-
loading:
|
|
640
|
-
description:
|
|
641
|
-
className:
|
|
642
|
-
emptyChildren:
|
|
643
|
-
loadingText:
|
|
644
|
-
emptyImage:
|
|
645
|
-
}) =>
|
|
646
|
-
|
|
638
|
+
const Oe = ({
|
|
639
|
+
loading: n,
|
|
640
|
+
description: s = "暂无数据",
|
|
641
|
+
className: o,
|
|
642
|
+
emptyChildren: l,
|
|
643
|
+
loadingText: a,
|
|
644
|
+
emptyImage: d
|
|
645
|
+
}) => n ? /* @__PURE__ */ r.jsxs(
|
|
646
|
+
ae,
|
|
647
647
|
{
|
|
648
|
-
className: `pt-10 w-full ${
|
|
648
|
+
className: `pt-10 w-full ${o || ""}`,
|
|
649
649
|
align: "center",
|
|
650
650
|
justify: "center",
|
|
651
651
|
vertical: !0,
|
|
652
652
|
children: [
|
|
653
|
-
/* @__PURE__ */
|
|
654
|
-
|
|
653
|
+
/* @__PURE__ */ r.jsx(ge, { size: "large" }),
|
|
654
|
+
a && /* @__PURE__ */ r.jsx("div", { className: "mt-4 text-gray-500", children: a })
|
|
655
655
|
]
|
|
656
656
|
}
|
|
657
|
-
) : /* @__PURE__ */
|
|
658
|
-
|
|
657
|
+
) : /* @__PURE__ */ r.jsx(
|
|
658
|
+
ae,
|
|
659
659
|
{
|
|
660
|
-
className: `pt-10 w-full ${
|
|
660
|
+
className: `pt-10 w-full ${o || ""}`,
|
|
661
661
|
align: "center",
|
|
662
662
|
justify: "center",
|
|
663
|
-
children: /* @__PURE__ */
|
|
664
|
-
|
|
663
|
+
children: /* @__PURE__ */ r.jsx(
|
|
664
|
+
he,
|
|
665
665
|
{
|
|
666
|
-
image:
|
|
667
|
-
description:
|
|
666
|
+
image: d,
|
|
667
|
+
description: s,
|
|
668
668
|
imageStyle: { height: 180 },
|
|
669
|
-
children:
|
|
669
|
+
children: l
|
|
670
670
|
}
|
|
671
671
|
)
|
|
672
672
|
}
|
|
673
673
|
);
|
|
674
|
-
|
|
674
|
+
Oe.__docgenInfo = {
|
|
675
675
|
displayName: "EmptyAndSpin",
|
|
676
676
|
description: "空状态和加载状态组合组件",
|
|
677
677
|
props: {
|
|
@@ -714,24 +714,24 @@ Ae.__docgenInfo = {
|
|
|
714
714
|
}
|
|
715
715
|
}
|
|
716
716
|
};
|
|
717
|
-
const
|
|
718
|
-
onClick:
|
|
719
|
-
showText:
|
|
720
|
-
className:
|
|
721
|
-
size:
|
|
722
|
-
type:
|
|
723
|
-
}) => /* @__PURE__ */
|
|
717
|
+
const ze = ({
|
|
718
|
+
onClick: n,
|
|
719
|
+
showText: s = !1,
|
|
720
|
+
className: o,
|
|
721
|
+
size: l = "small",
|
|
722
|
+
type: a = "default"
|
|
723
|
+
}) => /* @__PURE__ */ r.jsx(
|
|
724
724
|
X,
|
|
725
725
|
{
|
|
726
|
-
size:
|
|
727
|
-
type:
|
|
728
|
-
icon: /* @__PURE__ */
|
|
729
|
-
className: `cursor-pointer ${
|
|
730
|
-
onClick:
|
|
731
|
-
children:
|
|
726
|
+
size: l,
|
|
727
|
+
type: a,
|
|
728
|
+
icon: /* @__PURE__ */ r.jsx(xe, {}),
|
|
729
|
+
className: `cursor-pointer ${o || ""}`,
|
|
730
|
+
onClick: n,
|
|
731
|
+
children: s && "返回"
|
|
732
732
|
}
|
|
733
733
|
);
|
|
734
|
-
|
|
734
|
+
ze.__docgenInfo = {
|
|
735
735
|
displayName: "BackButton",
|
|
736
736
|
description: "返回按钮组件",
|
|
737
737
|
props: {
|
|
@@ -770,23 +770,23 @@ Oe.__docgenInfo = {
|
|
|
770
770
|
}
|
|
771
771
|
}
|
|
772
772
|
};
|
|
773
|
-
const
|
|
774
|
-
removePadding:
|
|
775
|
-
className:
|
|
776
|
-
...
|
|
773
|
+
const Fe = ({
|
|
774
|
+
removePadding: n = !0,
|
|
775
|
+
className: s,
|
|
776
|
+
...o
|
|
777
777
|
}) => {
|
|
778
|
-
const
|
|
779
|
-
return /* @__PURE__ */
|
|
778
|
+
const l = n ? `px-0 h-auto ${s || ""}` : s;
|
|
779
|
+
return /* @__PURE__ */ r.jsx(
|
|
780
780
|
X,
|
|
781
781
|
{
|
|
782
782
|
type: "link",
|
|
783
|
-
...
|
|
784
|
-
className:
|
|
785
|
-
children:
|
|
783
|
+
...o,
|
|
784
|
+
className: l,
|
|
785
|
+
children: o.children
|
|
786
786
|
}
|
|
787
787
|
);
|
|
788
788
|
};
|
|
789
|
-
|
|
789
|
+
Fe.__docgenInfo = {
|
|
790
790
|
displayName: "LinkButton",
|
|
791
791
|
description: "链接样式按钮组件,适用于表格操作列",
|
|
792
792
|
props: {
|
|
@@ -823,129 +823,129 @@ Pe.__docgenInfo = {
|
|
|
823
823
|
}
|
|
824
824
|
}
|
|
825
825
|
};
|
|
826
|
-
const { Option:
|
|
827
|
-
columns:
|
|
828
|
-
request:
|
|
829
|
-
searchFields:
|
|
830
|
-
showSearch:
|
|
831
|
-
showRefresh:
|
|
832
|
-
defaultPageSize:
|
|
833
|
-
pageSizeOptions:
|
|
834
|
-
autoLoad:
|
|
835
|
-
externalParams:
|
|
836
|
-
|
|
826
|
+
const { Option: Le } = ce, Be = ({
|
|
827
|
+
columns: n,
|
|
828
|
+
request: s,
|
|
829
|
+
searchFields: o = [],
|
|
830
|
+
showSearch: l = !0,
|
|
831
|
+
showRefresh: a = !0,
|
|
832
|
+
defaultPageSize: d = 10,
|
|
833
|
+
pageSizeOptions: k = ["10", "20", "50", "100"],
|
|
834
|
+
autoLoad: m = !0,
|
|
835
|
+
externalParams: T = {},
|
|
836
|
+
...M
|
|
837
837
|
}) => {
|
|
838
|
-
const [
|
|
838
|
+
const [C, V] = _([]), [j, h] = _(!1), [A, i] = _({
|
|
839
839
|
current: 1,
|
|
840
|
-
pageSize:
|
|
840
|
+
pageSize: d,
|
|
841
841
|
total: 0
|
|
842
|
-
}), [
|
|
843
|
-
|
|
844
|
-
const D =
|
|
845
|
-
D.current =
|
|
846
|
-
const
|
|
847
|
-
const { sortable:
|
|
842
|
+
}), [y, g] = _({}), [b, w] = _({}), [S] = re.useForm(), $ = P(A);
|
|
843
|
+
$.current = A;
|
|
844
|
+
const D = P(T);
|
|
845
|
+
D.current = T;
|
|
846
|
+
const N = P(!1), R = pe(() => n.map((t) => {
|
|
847
|
+
const { sortable: c, render: q, ...E } = t;
|
|
848
848
|
return {
|
|
849
|
-
...
|
|
850
|
-
sorter:
|
|
851
|
-
render:
|
|
849
|
+
...E,
|
|
850
|
+
sorter: c ? !0 : void 0,
|
|
851
|
+
render: q || ((G) => G)
|
|
852
852
|
};
|
|
853
|
-
}), [
|
|
854
|
-
if (
|
|
855
|
-
|
|
853
|
+
}), [n]), O = x(async (t = {}) => {
|
|
854
|
+
if (s) {
|
|
855
|
+
h(!0);
|
|
856
856
|
try {
|
|
857
|
-
const
|
|
858
|
-
page:
|
|
859
|
-
pageSize:
|
|
860
|
-
sortField:
|
|
861
|
-
sortOrder:
|
|
862
|
-
searchParams: { ...
|
|
863
|
-
...
|
|
864
|
-
},
|
|
865
|
-
|
|
866
|
-
...
|
|
867
|
-
total:
|
|
868
|
-
current:
|
|
857
|
+
const c = {
|
|
858
|
+
page: $.current.current,
|
|
859
|
+
pageSize: $.current.pageSize,
|
|
860
|
+
sortField: b.field,
|
|
861
|
+
sortOrder: b.order,
|
|
862
|
+
searchParams: { ...y, ...D.current },
|
|
863
|
+
...t
|
|
864
|
+
}, q = await s(c);
|
|
865
|
+
q.success && (V(q.data), i((E) => ({
|
|
866
|
+
...E,
|
|
867
|
+
total: q.total,
|
|
868
|
+
current: c.page || E.current
|
|
869
869
|
})));
|
|
870
|
-
} catch (
|
|
871
|
-
console.error("加载数据失败:",
|
|
870
|
+
} catch (c) {
|
|
871
|
+
console.error("加载数据失败:", c);
|
|
872
872
|
} finally {
|
|
873
|
-
|
|
873
|
+
h(!1);
|
|
874
874
|
}
|
|
875
875
|
}
|
|
876
|
-
}, [
|
|
877
|
-
|
|
878
|
-
}, []),
|
|
879
|
-
|
|
880
|
-
}, [
|
|
881
|
-
|
|
882
|
-
}, [
|
|
883
|
-
const
|
|
884
|
-
current:
|
|
885
|
-
pageSize:
|
|
886
|
-
total:
|
|
887
|
-
},
|
|
888
|
-
field:
|
|
889
|
-
order:
|
|
876
|
+
}, [s, b, y]), z = x((t) => {
|
|
877
|
+
g(t), i((c) => ({ ...c, current: 1 }));
|
|
878
|
+
}, []), F = x(() => {
|
|
879
|
+
S.resetFields(), g({}), i((t) => ({ ...t, current: 1 }));
|
|
880
|
+
}, [S]), L = x(() => {
|
|
881
|
+
O();
|
|
882
|
+
}, [O]), H = x((t, c, q) => {
|
|
883
|
+
const E = {
|
|
884
|
+
current: t.current || 1,
|
|
885
|
+
pageSize: t.pageSize || d,
|
|
886
|
+
total: t.total || 0
|
|
887
|
+
}, G = {
|
|
888
|
+
field: q?.field,
|
|
889
|
+
order: q?.order
|
|
890
890
|
};
|
|
891
|
-
E
|
|
892
|
-
}, [
|
|
893
|
-
return
|
|
894
|
-
const
|
|
895
|
-
(
|
|
896
|
-
}, [
|
|
897
|
-
|
|
891
|
+
i(E), w(G);
|
|
892
|
+
}, [d]);
|
|
893
|
+
return U(() => {
|
|
894
|
+
const t = Object.keys(T).length > 0;
|
|
895
|
+
(m && !N.current || t) && (O(), N.current = !0);
|
|
896
|
+
}, [m, T, O]), /* @__PURE__ */ r.jsxs("div", { children: [
|
|
897
|
+
l && o.length > 0 && /* @__PURE__ */ r.jsx(te, { size: "small", style: { marginBottom: 16 }, children: /* @__PURE__ */ r.jsxs(
|
|
898
898
|
re,
|
|
899
899
|
{
|
|
900
|
-
form:
|
|
900
|
+
form: S,
|
|
901
901
|
layout: "inline",
|
|
902
902
|
onFinish: z,
|
|
903
|
-
initialValues:
|
|
903
|
+
initialValues: o.reduce((t, c) => (c.defaultValue !== void 0 && (t[c.key] = c.defaultValue), t), {}),
|
|
904
904
|
children: [
|
|
905
|
-
|
|
905
|
+
o.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
|
-
placeholder:
|
|
908
|
+
placeholder: t.placeholder || `请输入${t.label}`,
|
|
909
909
|
style: { width: 200 }
|
|
910
910
|
}
|
|
911
|
-
) : /* @__PURE__ */
|
|
911
|
+
) : /* @__PURE__ */ r.jsx(
|
|
912
912
|
ce,
|
|
913
913
|
{
|
|
914
|
-
placeholder:
|
|
914
|
+
placeholder: t.placeholder || `请选择${t.label}`,
|
|
915
915
|
style: { width: 200 },
|
|
916
916
|
allowClear: !0,
|
|
917
|
-
children:
|
|
917
|
+
children: t.options?.map((c) => /* @__PURE__ */ r.jsx(Le, { value: c.value, children: c.label }, c.value))
|
|
918
918
|
}
|
|
919
|
-
) },
|
|
920
|
-
/* @__PURE__ */
|
|
921
|
-
/* @__PURE__ */
|
|
922
|
-
/* @__PURE__ */
|
|
923
|
-
|
|
919
|
+
) }, t.key)),
|
|
920
|
+
/* @__PURE__ */ r.jsx(re.Item, { children: /* @__PURE__ */ r.jsxs(be, { children: [
|
|
921
|
+
/* @__PURE__ */ r.jsx(X, { type: "primary", htmlType: "submit", icon: /* @__PURE__ */ r.jsx(Re, {}), children: "查询" }),
|
|
922
|
+
/* @__PURE__ */ r.jsx(X, { onClick: F, children: "重置" }),
|
|
923
|
+
a && /* @__PURE__ */ r.jsx(X, { icon: /* @__PURE__ */ r.jsx(Te, {}), onClick: L, children: "刷新" })
|
|
924
924
|
] }) })
|
|
925
925
|
]
|
|
926
926
|
}
|
|
927
927
|
) }),
|
|
928
|
-
/* @__PURE__ */
|
|
928
|
+
/* @__PURE__ */ r.jsx(
|
|
929
929
|
le,
|
|
930
930
|
{
|
|
931
|
-
|
|
932
|
-
columns:
|
|
933
|
-
dataSource:
|
|
934
|
-
loading:
|
|
931
|
+
...M,
|
|
932
|
+
columns: R,
|
|
933
|
+
dataSource: C,
|
|
934
|
+
loading: j,
|
|
935
935
|
pagination: {
|
|
936
|
-
...
|
|
936
|
+
...A,
|
|
937
937
|
showSizeChanger: !0,
|
|
938
938
|
showQuickJumper: !0,
|
|
939
|
-
showTotal: (
|
|
940
|
-
pageSizeOptions:
|
|
939
|
+
showTotal: (t, c) => `第 ${c[0]}-${c[1]} 条/共 ${t} 条`,
|
|
940
|
+
pageSizeOptions: k
|
|
941
941
|
},
|
|
942
|
-
onChange:
|
|
942
|
+
onChange: H,
|
|
943
943
|
scroll: { x: "max-content", y: "50vh" }
|
|
944
944
|
}
|
|
945
945
|
)
|
|
946
946
|
] });
|
|
947
947
|
};
|
|
948
|
-
|
|
948
|
+
Be.__docgenInfo = {
|
|
949
949
|
displayName: "AdvancedTable",
|
|
950
950
|
description: "高阶表格组件,支持异步请求、搜索、排序等功能",
|
|
951
951
|
props: {
|
|
@@ -1012,79 +1012,79 @@ ze.__docgenInfo = {
|
|
|
1012
1012
|
}
|
|
1013
1013
|
}
|
|
1014
1014
|
};
|
|
1015
|
-
const
|
|
1016
|
-
texts:
|
|
1017
|
-
placeholder:
|
|
1018
|
-
animationSpeed:
|
|
1019
|
-
autoPlay:
|
|
1020
|
-
value:
|
|
1021
|
-
onChange:
|
|
1022
|
-
...
|
|
1015
|
+
const Me = ({
|
|
1016
|
+
texts: n = [],
|
|
1017
|
+
placeholder: s = "请输入内容",
|
|
1018
|
+
animationSpeed: o = 100,
|
|
1019
|
+
autoPlay: l = !0,
|
|
1020
|
+
value: a,
|
|
1021
|
+
onChange: d,
|
|
1022
|
+
...k
|
|
1023
1023
|
}) => {
|
|
1024
|
-
const [
|
|
1025
|
-
|
|
1026
|
-
|
|
1024
|
+
const [m, T] = _(""), [M, C] = _(0), [V, j] = _(!1), [h, A] = _(!1), [i, y] = _(!1), g = P(void 0), b = P(void 0), w = P(n), S = P(M), $ = P(h), D = P(m);
|
|
1025
|
+
U(() => {
|
|
1026
|
+
w.current = n, S.current = M, $.current = h, D.current = m;
|
|
1027
1027
|
});
|
|
1028
|
-
const
|
|
1029
|
-
let
|
|
1030
|
-
|
|
1031
|
-
const
|
|
1032
|
-
|
|
1028
|
+
const N = x((t, c) => {
|
|
1029
|
+
let q = 0;
|
|
1030
|
+
y(!0);
|
|
1031
|
+
const E = () => {
|
|
1032
|
+
q < t.length ? (T(t.slice(0, q + 1)), q++, b.current = window.setTimeout(E, o)) : (y(!1), c?.());
|
|
1033
1033
|
};
|
|
1034
|
-
|
|
1035
|
-
}, [
|
|
1036
|
-
let
|
|
1037
|
-
const
|
|
1038
|
-
|
|
1034
|
+
E();
|
|
1035
|
+
}, [o]), R = x((t) => {
|
|
1036
|
+
let c = D.current.length;
|
|
1037
|
+
const q = () => {
|
|
1038
|
+
c > 0 ? (T(D.current.slice(0, c - 1)), c--, b.current = window.setTimeout(q, o / 2)) : t?.();
|
|
1039
1039
|
};
|
|
1040
|
-
|
|
1041
|
-
}, [
|
|
1042
|
-
if (
|
|
1043
|
-
|
|
1044
|
-
const
|
|
1045
|
-
D.current ?
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1040
|
+
q();
|
|
1041
|
+
}, [o]), O = x(() => {
|
|
1042
|
+
if (w.current.length === 0 || $.current) return;
|
|
1043
|
+
j(!0);
|
|
1044
|
+
const t = w.current[S.current];
|
|
1045
|
+
D.current ? R(() => {
|
|
1046
|
+
N(t, () => {
|
|
1047
|
+
g.current = window.setTimeout(() => {
|
|
1048
|
+
C((c) => (c + 1) % w.current.length), j(!1);
|
|
1049
1049
|
}, 2e3);
|
|
1050
1050
|
});
|
|
1051
|
-
}) :
|
|
1052
|
-
|
|
1053
|
-
|
|
1051
|
+
}) : N(t, () => {
|
|
1052
|
+
g.current = window.setTimeout(() => {
|
|
1053
|
+
C((c) => (c + 1) % w.current.length), j(!1);
|
|
1054
1054
|
}, 2e3);
|
|
1055
1055
|
});
|
|
1056
|
-
}, [
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
}), [
|
|
1060
|
-
!
|
|
1061
|
-
}, [
|
|
1062
|
-
const z = (
|
|
1063
|
-
|
|
1064
|
-
},
|
|
1065
|
-
|
|
1066
|
-
},
|
|
1067
|
-
|
|
1068
|
-
},
|
|
1069
|
-
return /* @__PURE__ */
|
|
1070
|
-
/* @__PURE__ */
|
|
1056
|
+
}, [R, N]);
|
|
1057
|
+
U(() => (l && n.length > 0 && !h && O(), () => {
|
|
1058
|
+
g.current && window.clearTimeout(g.current), b.current && window.clearTimeout(b.current);
|
|
1059
|
+
}), [M, h, l, n.length, O]), U(() => {
|
|
1060
|
+
!V && l && n.length > 0 && !h && O();
|
|
1061
|
+
}, [M, V, l, n.length, h, O]);
|
|
1062
|
+
const z = (t) => {
|
|
1063
|
+
A(!0), g.current && window.clearTimeout(g.current), b.current && window.clearTimeout(b.current), j(!1), y(!1), k.onFocus?.(t);
|
|
1064
|
+
}, F = (t) => {
|
|
1065
|
+
A(!1), !a && n.length > 0 && (T(""), C(0)), k.onBlur?.(t);
|
|
1066
|
+
}, L = (t) => {
|
|
1067
|
+
d?.(t.target.value), k.onChange?.(t);
|
|
1068
|
+
}, H = () => h || a ? s : m || s;
|
|
1069
|
+
return /* @__PURE__ */ r.jsxs("div", { style: { position: "relative" }, children: [
|
|
1070
|
+
/* @__PURE__ */ r.jsx(
|
|
1071
1071
|
ue,
|
|
1072
1072
|
{
|
|
1073
|
-
...
|
|
1074
|
-
value:
|
|
1075
|
-
onChange:
|
|
1073
|
+
...k,
|
|
1074
|
+
value: a,
|
|
1075
|
+
onChange: L,
|
|
1076
1076
|
onFocus: z,
|
|
1077
|
-
onBlur:
|
|
1078
|
-
placeholder:
|
|
1077
|
+
onBlur: F,
|
|
1078
|
+
placeholder: H(),
|
|
1079
1079
|
style: {
|
|
1080
1080
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1081
|
-
...
|
|
1081
|
+
...k.style,
|
|
1082
1082
|
position: "relative",
|
|
1083
1083
|
zIndex: 1
|
|
1084
1084
|
}
|
|
1085
1085
|
}
|
|
1086
1086
|
),
|
|
1087
|
-
!
|
|
1087
|
+
!h && !a && m && /* @__PURE__ */ r.jsxs(
|
|
1088
1088
|
"div",
|
|
1089
1089
|
{
|
|
1090
1090
|
style: {
|
|
@@ -1104,8 +1104,8 @@ const Fe = ({
|
|
|
1104
1104
|
fontFamily: "inherit"
|
|
1105
1105
|
},
|
|
1106
1106
|
children: [
|
|
1107
|
-
/* @__PURE__ */
|
|
1108
|
-
|
|
1107
|
+
/* @__PURE__ */ r.jsx("span", { children: m }),
|
|
1108
|
+
i && /* @__PURE__ */ r.jsx(
|
|
1109
1109
|
"span",
|
|
1110
1110
|
{
|
|
1111
1111
|
style: {
|
|
@@ -1121,7 +1121,7 @@ const Fe = ({
|
|
|
1121
1121
|
]
|
|
1122
1122
|
}
|
|
1123
1123
|
),
|
|
1124
|
-
/* @__PURE__ */
|
|
1124
|
+
/* @__PURE__ */ r.jsx("style", { children: `
|
|
1125
1125
|
@keyframes blink {
|
|
1126
1126
|
0%, 50% { opacity: 1; }
|
|
1127
1127
|
51%, 100% { opacity: 0; }
|
|
@@ -1129,7 +1129,7 @@ const Fe = ({
|
|
|
1129
1129
|
` })
|
|
1130
1130
|
] });
|
|
1131
1131
|
};
|
|
1132
|
-
|
|
1132
|
+
Me.__docgenInfo = {
|
|
1133
1133
|
displayName: "DynamicInput",
|
|
1134
1134
|
description: "动态文案输入框组件,支持流式文字动画效果",
|
|
1135
1135
|
props: {
|
|
@@ -1174,109 +1174,109 @@ Fe.__docgenInfo = {
|
|
|
1174
1174
|
}
|
|
1175
1175
|
}
|
|
1176
1176
|
};
|
|
1177
|
-
const
|
|
1178
|
-
texts:
|
|
1177
|
+
const $e = ({
|
|
1178
|
+
texts: n = [],
|
|
1179
1179
|
// 动态文案数组,默认为空数组
|
|
1180
|
-
placeholder:
|
|
1180
|
+
placeholder: s = "请输入内容",
|
|
1181
1181
|
// 占位符文本
|
|
1182
|
-
animationSpeed:
|
|
1182
|
+
animationSpeed: o = 100,
|
|
1183
1183
|
// 打字机动画速度,毫秒
|
|
1184
|
-
autoPlay:
|
|
1184
|
+
autoPlay: l = !0,
|
|
1185
1185
|
// 是否自动播放动画
|
|
1186
|
-
value:
|
|
1186
|
+
value: a = "",
|
|
1187
1187
|
// 受控模式的值
|
|
1188
|
-
onChange:
|
|
1188
|
+
onChange: d,
|
|
1189
1189
|
// 受控模式的变化回调
|
|
1190
|
-
onSubmit:
|
|
1190
|
+
onSubmit: k,
|
|
1191
1191
|
// 提交回调
|
|
1192
|
-
maxLength:
|
|
1192
|
+
maxLength: m = 500,
|
|
1193
1193
|
// 最大字符数限制
|
|
1194
|
-
showCount:
|
|
1194
|
+
showCount: T = !0,
|
|
1195
1195
|
// 是否显示字数统计
|
|
1196
|
-
submitText:
|
|
1196
|
+
submitText: M = "发送",
|
|
1197
1197
|
// 提交按钮文本
|
|
1198
|
-
disabled:
|
|
1198
|
+
disabled: C = !1,
|
|
1199
1199
|
// 是否禁用组件
|
|
1200
|
-
rows:
|
|
1200
|
+
rows: V = 4,
|
|
1201
1201
|
// 文本域行数
|
|
1202
|
-
style:
|
|
1202
|
+
style: j,
|
|
1203
1203
|
// 自定义样式
|
|
1204
|
-
...
|
|
1204
|
+
...h
|
|
1205
1205
|
// 其他原生属性
|
|
1206
1206
|
}) => {
|
|
1207
|
-
const [
|
|
1208
|
-
|
|
1209
|
-
|
|
1207
|
+
const [A, i] = _(""), [y, g] = _(0), [b, w] = _(!1), [S, $] = _(!1), [D, N] = _(!1), [R, O] = _(a || ""), z = P(void 0), F = P(void 0), L = P(n), H = P(y), t = P(S), c = P(A), q = P(null);
|
|
1208
|
+
U(() => {
|
|
1209
|
+
L.current = n, H.current = y, t.current = S, c.current = A;
|
|
1210
1210
|
});
|
|
1211
|
-
const
|
|
1212
|
-
let
|
|
1213
|
-
|
|
1211
|
+
const E = x((f, p) => {
|
|
1212
|
+
let W = 0;
|
|
1213
|
+
N(!0);
|
|
1214
1214
|
const K = () => {
|
|
1215
|
-
|
|
1215
|
+
W < f.length ? (i(f.slice(0, W + 1)), W++, F.current = window.setTimeout(K, o)) : (N(!1), p?.());
|
|
1216
1216
|
};
|
|
1217
1217
|
K();
|
|
1218
|
-
}, [
|
|
1219
|
-
let
|
|
1220
|
-
const
|
|
1221
|
-
|
|
1218
|
+
}, [o]), G = x((f) => {
|
|
1219
|
+
let p = c.current.length;
|
|
1220
|
+
const W = () => {
|
|
1221
|
+
p > 0 ? (i(c.current.slice(0, p - 1)), p--, F.current = window.setTimeout(W, o / 2)) : f?.();
|
|
1222
1222
|
};
|
|
1223
|
-
|
|
1224
|
-
}, [
|
|
1225
|
-
if (
|
|
1226
|
-
|
|
1227
|
-
const
|
|
1228
|
-
|
|
1229
|
-
|
|
1223
|
+
W();
|
|
1224
|
+
}, [o]), J = x(() => {
|
|
1225
|
+
if (L.current.length === 0 || t.current) return;
|
|
1226
|
+
w(!0);
|
|
1227
|
+
const f = L.current[H.current];
|
|
1228
|
+
c.current ? G(() => {
|
|
1229
|
+
E(f, () => {
|
|
1230
1230
|
z.current = window.setTimeout(() => {
|
|
1231
|
-
|
|
1231
|
+
g((p) => (p + 1) % L.current.length), w(!1);
|
|
1232
1232
|
}, 2e3);
|
|
1233
1233
|
});
|
|
1234
|
-
}) :
|
|
1234
|
+
}) : E(f, () => {
|
|
1235
1235
|
z.current = window.setTimeout(() => {
|
|
1236
|
-
|
|
1236
|
+
g((p) => (p + 1) % L.current.length), w(!1);
|
|
1237
1237
|
}, 2e3);
|
|
1238
1238
|
});
|
|
1239
|
-
}, [
|
|
1240
|
-
|
|
1241
|
-
z.current && window.clearTimeout(z.current),
|
|
1242
|
-
}), [
|
|
1243
|
-
!
|
|
1244
|
-
}, [
|
|
1245
|
-
const e = (
|
|
1246
|
-
|
|
1247
|
-
},
|
|
1248
|
-
|
|
1249
|
-
},
|
|
1250
|
-
const
|
|
1251
|
-
|
|
1252
|
-
},
|
|
1253
|
-
const
|
|
1254
|
-
|
|
1255
|
-
},
|
|
1256
|
-
(
|
|
1257
|
-
},
|
|
1258
|
-
return /* @__PURE__ */
|
|
1259
|
-
/* @__PURE__ */
|
|
1260
|
-
/* @__PURE__ */
|
|
1239
|
+
}, [G, E]);
|
|
1240
|
+
U(() => (l && n.length > 0 && !S && J(), () => {
|
|
1241
|
+
z.current && window.clearTimeout(z.current), F.current && window.clearTimeout(F.current);
|
|
1242
|
+
}), [y, S, l, n.length, J]), U(() => {
|
|
1243
|
+
!b && l && n.length > 0 && !S && J();
|
|
1244
|
+
}, [y, b, l, n.length, S, J]);
|
|
1245
|
+
const e = (f) => {
|
|
1246
|
+
$(!0), z.current && window.clearTimeout(z.current), F.current && window.clearTimeout(F.current), w(!1), N(!1), h.onFocus?.(f);
|
|
1247
|
+
}, u = (f) => {
|
|
1248
|
+
$(!1), !a && n.length > 0 && (i(""), g(0)), h.onBlur?.(f);
|
|
1249
|
+
}, v = (f) => {
|
|
1250
|
+
const p = f.target.value;
|
|
1251
|
+
m && p.length > m || (d ? d(p) : O(p), h.onChange?.(f));
|
|
1252
|
+
}, I = () => {
|
|
1253
|
+
const f = d ? a : R;
|
|
1254
|
+
f.trim() && !C && (k?.(f), d || O(""));
|
|
1255
|
+
}, Y = (f) => {
|
|
1256
|
+
(f.ctrlKey || f.metaKey) && f.key === "Enter" && (f.preventDefault(), I()), h.onKeyDown?.(f);
|
|
1257
|
+
}, B = d ? a : R, Q = C || !B.trim() || (m ? B.length > m : !1);
|
|
1258
|
+
return /* @__PURE__ */ r.jsxs("div", { style: { position: "relative", ...j }, children: [
|
|
1259
|
+
/* @__PURE__ */ r.jsxs("div", { style: { position: "relative" }, children: [
|
|
1260
|
+
/* @__PURE__ */ r.jsx(
|
|
1261
1261
|
"textarea",
|
|
1262
1262
|
{
|
|
1263
|
-
ref:
|
|
1264
|
-
value:
|
|
1265
|
-
onChange:
|
|
1266
|
-
onFocus: (
|
|
1267
|
-
|
|
1263
|
+
ref: q,
|
|
1264
|
+
value: d ? a : R,
|
|
1265
|
+
onChange: v,
|
|
1266
|
+
onFocus: (f) => {
|
|
1267
|
+
f.target.style.borderColor = "#1890ff", f.target.style.boxShadow = "0 0 0 2px rgba(24, 144, 255, 0.2)", e(f);
|
|
1268
1268
|
},
|
|
1269
|
-
onBlur: (
|
|
1270
|
-
|
|
1269
|
+
onBlur: (f) => {
|
|
1270
|
+
f.target.style.borderColor = "#d9d9d9", f.target.style.boxShadow = "none", u(f);
|
|
1271
1271
|
},
|
|
1272
|
-
onKeyDown:
|
|
1273
|
-
placeholder:
|
|
1274
|
-
maxLength:
|
|
1275
|
-
rows:
|
|
1276
|
-
disabled:
|
|
1272
|
+
onKeyDown: Y,
|
|
1273
|
+
placeholder: S || B ? s : "",
|
|
1274
|
+
maxLength: m,
|
|
1275
|
+
rows: V,
|
|
1276
|
+
disabled: C,
|
|
1277
1277
|
style: {
|
|
1278
1278
|
width: "100%",
|
|
1279
|
-
minHeight: `${
|
|
1279
|
+
minHeight: `${V * 24 + 16}px`,
|
|
1280
1280
|
padding: "8px 60px 8px 12px",
|
|
1281
1281
|
// 右侧留出按钮空间
|
|
1282
1282
|
border: "1px solid #d9d9d9",
|
|
@@ -1289,12 +1289,12 @@ const Be = ({
|
|
|
1289
1289
|
transition: "border-color 0.3s, box-shadow 0.3s",
|
|
1290
1290
|
backgroundColor: "#fff",
|
|
1291
1291
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1292
|
-
...
|
|
1292
|
+
...h.style
|
|
1293
1293
|
},
|
|
1294
|
-
...
|
|
1294
|
+
...h
|
|
1295
1295
|
}
|
|
1296
1296
|
),
|
|
1297
|
-
!
|
|
1297
|
+
!S && !B && A && /* @__PURE__ */ r.jsxs(
|
|
1298
1298
|
"div",
|
|
1299
1299
|
{
|
|
1300
1300
|
style: {
|
|
@@ -1316,8 +1316,8 @@ const Be = ({
|
|
|
1316
1316
|
lineHeight: "1.5"
|
|
1317
1317
|
},
|
|
1318
1318
|
children: [
|
|
1319
|
-
/* @__PURE__ */
|
|
1320
|
-
D && /* @__PURE__ */
|
|
1319
|
+
/* @__PURE__ */ r.jsx("span", { children: A }),
|
|
1320
|
+
D && /* @__PURE__ */ r.jsx(
|
|
1321
1321
|
"span",
|
|
1322
1322
|
{
|
|
1323
1323
|
style: {
|
|
@@ -1333,7 +1333,7 @@ const Be = ({
|
|
|
1333
1333
|
]
|
|
1334
1334
|
}
|
|
1335
1335
|
),
|
|
1336
|
-
/* @__PURE__ */
|
|
1336
|
+
/* @__PURE__ */ r.jsx(
|
|
1337
1337
|
"div",
|
|
1338
1338
|
{
|
|
1339
1339
|
style: {
|
|
@@ -1342,13 +1342,13 @@ const Be = ({
|
|
|
1342
1342
|
right: 8,
|
|
1343
1343
|
zIndex: 3
|
|
1344
1344
|
},
|
|
1345
|
-
children: /* @__PURE__ */
|
|
1345
|
+
children: /* @__PURE__ */ r.jsx(
|
|
1346
1346
|
X,
|
|
1347
1347
|
{
|
|
1348
1348
|
type: "primary",
|
|
1349
1349
|
size: "small",
|
|
1350
|
-
icon: /* @__PURE__ */
|
|
1351
|
-
onClick:
|
|
1350
|
+
icon: /* @__PURE__ */ r.jsx(Se, {}),
|
|
1351
|
+
onClick: I,
|
|
1352
1352
|
disabled: Q,
|
|
1353
1353
|
style: {
|
|
1354
1354
|
borderRadius: 6,
|
|
@@ -1358,13 +1358,13 @@ const Be = ({
|
|
|
1358
1358
|
alignItems: "center",
|
|
1359
1359
|
justifyContent: "center"
|
|
1360
1360
|
},
|
|
1361
|
-
children:
|
|
1361
|
+
children: M
|
|
1362
1362
|
}
|
|
1363
1363
|
)
|
|
1364
1364
|
}
|
|
1365
1365
|
)
|
|
1366
1366
|
] }),
|
|
1367
|
-
|
|
1367
|
+
T && /* @__PURE__ */ r.jsxs(
|
|
1368
1368
|
"div",
|
|
1369
1369
|
{
|
|
1370
1370
|
style: {
|
|
@@ -1374,13 +1374,13 @@ const Be = ({
|
|
|
1374
1374
|
color: "#999"
|
|
1375
1375
|
},
|
|
1376
1376
|
children: [
|
|
1377
|
-
|
|
1377
|
+
B.length,
|
|
1378
1378
|
"/",
|
|
1379
|
-
|
|
1379
|
+
m
|
|
1380
1380
|
]
|
|
1381
1381
|
}
|
|
1382
1382
|
),
|
|
1383
|
-
/* @__PURE__ */
|
|
1383
|
+
/* @__PURE__ */ r.jsx("style", { children: `
|
|
1384
1384
|
@keyframes blink {
|
|
1385
1385
|
0%, 50% { opacity: 1; }
|
|
1386
1386
|
51%, 100% { opacity: 0; }
|
|
@@ -1388,7 +1388,7 @@ const Be = ({
|
|
|
1388
1388
|
` })
|
|
1389
1389
|
] });
|
|
1390
1390
|
};
|
|
1391
|
-
|
|
1391
|
+
$e.__docgenInfo = {
|
|
1392
1392
|
displayName: "DynamicTextArea",
|
|
1393
1393
|
description: "动态文案文本域组件,支持流式文字动画效果",
|
|
1394
1394
|
props: {
|
|
@@ -1474,8 +1474,354 @@ Be.__docgenInfo = {
|
|
|
1474
1474
|
}
|
|
1475
1475
|
}
|
|
1476
1476
|
};
|
|
1477
|
-
const
|
|
1478
|
-
|
|
1477
|
+
const de = ({
|
|
1478
|
+
src: n,
|
|
1479
|
+
poster: s,
|
|
1480
|
+
width: o = 300,
|
|
1481
|
+
height: l,
|
|
1482
|
+
videoWidth: a,
|
|
1483
|
+
// 参数保留但不使用,由CSS控制
|
|
1484
|
+
videoHeight: d,
|
|
1485
|
+
// 参数保留但不使用,由CSS控制
|
|
1486
|
+
showPlayButton: k = !0,
|
|
1487
|
+
autoPlayOnHover: m = !0,
|
|
1488
|
+
onClick: T,
|
|
1489
|
+
onVideoLoaded: M,
|
|
1490
|
+
onVideoPlay: C,
|
|
1491
|
+
onVideoPause: V,
|
|
1492
|
+
onVideoEnded: j,
|
|
1493
|
+
className: h,
|
|
1494
|
+
style: A,
|
|
1495
|
+
...i
|
|
1496
|
+
}) => {
|
|
1497
|
+
const y = P(null), [g, b] = _(!1), [w, S] = _(!1), [$, D] = _(!1), N = x(() => {
|
|
1498
|
+
y.current && (y.current.play(), b(!0), C?.());
|
|
1499
|
+
}, [C]), R = x(() => {
|
|
1500
|
+
y.current && (y.current.pause(), b(!1), V?.());
|
|
1501
|
+
}, [V]), O = x((E) => {
|
|
1502
|
+
E.stopPropagation(), g ? R() : N();
|
|
1503
|
+
}, [g, N, R]), z = x(() => {
|
|
1504
|
+
S(!0), m && !g && N();
|
|
1505
|
+
}, [m, g, N]), F = x(() => {
|
|
1506
|
+
S(!1), m && g && R();
|
|
1507
|
+
}, [m, g, R]), L = x(() => {
|
|
1508
|
+
D(!0), M?.();
|
|
1509
|
+
}, [M]), H = x(() => {
|
|
1510
|
+
b(!0), C?.();
|
|
1511
|
+
}, [C]), t = x(() => {
|
|
1512
|
+
b(!1), V?.();
|
|
1513
|
+
}, [V]), c = x(() => {
|
|
1514
|
+
b(!1), j?.();
|
|
1515
|
+
}, [j]), q = x((E) => {
|
|
1516
|
+
T?.(E);
|
|
1517
|
+
}, [T]);
|
|
1518
|
+
return /* @__PURE__ */ r.jsx(
|
|
1519
|
+
te,
|
|
1520
|
+
{
|
|
1521
|
+
...i,
|
|
1522
|
+
className: `video-card ${h || ""}`,
|
|
1523
|
+
style: {
|
|
1524
|
+
width: o,
|
|
1525
|
+
height: l,
|
|
1526
|
+
padding: 0,
|
|
1527
|
+
overflow: "hidden",
|
|
1528
|
+
cursor: T ? "pointer" : "default",
|
|
1529
|
+
border: "none",
|
|
1530
|
+
borderRadius: 0,
|
|
1531
|
+
...A
|
|
1532
|
+
},
|
|
1533
|
+
bordered: !1,
|
|
1534
|
+
onMouseEnter: z,
|
|
1535
|
+
onMouseLeave: F,
|
|
1536
|
+
onClick: q,
|
|
1537
|
+
children: /* @__PURE__ */ r.jsxs("div", { className: "video-card-container", children: [
|
|
1538
|
+
/* @__PURE__ */ r.jsx(
|
|
1539
|
+
"video",
|
|
1540
|
+
{
|
|
1541
|
+
ref: y,
|
|
1542
|
+
src: n,
|
|
1543
|
+
poster: s,
|
|
1544
|
+
preload: "metadata",
|
|
1545
|
+
onLoadedData: L,
|
|
1546
|
+
onPlay: H,
|
|
1547
|
+
onPause: t,
|
|
1548
|
+
onEnded: c,
|
|
1549
|
+
muted: !0,
|
|
1550
|
+
loop: !0
|
|
1551
|
+
}
|
|
1552
|
+
),
|
|
1553
|
+
k && /* @__PURE__ */ r.jsx(
|
|
1554
|
+
"div",
|
|
1555
|
+
{
|
|
1556
|
+
className: `video-play-button ${w ? "hovered" : ""}`,
|
|
1557
|
+
onClick: O,
|
|
1558
|
+
children: g ? /* @__PURE__ */ r.jsx(qe, { className: "play-icon" }) : /* @__PURE__ */ r.jsx(Ce, { className: "play-icon" })
|
|
1559
|
+
}
|
|
1560
|
+
),
|
|
1561
|
+
!$ && /* @__PURE__ */ r.jsx("div", { className: "video-loading-mask", children: /* @__PURE__ */ r.jsx("div", { className: "loading-spinner" }) })
|
|
1562
|
+
] })
|
|
1563
|
+
}
|
|
1564
|
+
);
|
|
1565
|
+
};
|
|
1566
|
+
de.__docgenInfo = {
|
|
1567
|
+
displayName: "VideoCard",
|
|
1568
|
+
description: "视频卡片组件,支持鼠标悬浮播放控制",
|
|
1569
|
+
props: {
|
|
1570
|
+
src: {
|
|
1571
|
+
name: "src",
|
|
1572
|
+
required: !0,
|
|
1573
|
+
description: "视频源地址",
|
|
1574
|
+
type: { name: "string", raw: "string" }
|
|
1575
|
+
},
|
|
1576
|
+
poster: {
|
|
1577
|
+
name: "poster",
|
|
1578
|
+
required: !1,
|
|
1579
|
+
description: "视频海报图片",
|
|
1580
|
+
type: { name: "string", raw: "string" }
|
|
1581
|
+
},
|
|
1582
|
+
width: {
|
|
1583
|
+
name: "width",
|
|
1584
|
+
required: !1,
|
|
1585
|
+
description: "卡片宽度",
|
|
1586
|
+
type: { name: "number | string", raw: "number | string" },
|
|
1587
|
+
defaultValue: { value: "300" }
|
|
1588
|
+
},
|
|
1589
|
+
height: {
|
|
1590
|
+
name: "height",
|
|
1591
|
+
required: !1,
|
|
1592
|
+
description: "卡片高度",
|
|
1593
|
+
type: { name: "number | string", raw: "number | string" }
|
|
1594
|
+
},
|
|
1595
|
+
videoWidth: {
|
|
1596
|
+
name: "videoWidth",
|
|
1597
|
+
required: !1,
|
|
1598
|
+
description: "视频宽度",
|
|
1599
|
+
type: { name: "number | string", raw: "number | string" },
|
|
1600
|
+
defaultValue: { value: '"100%"' }
|
|
1601
|
+
},
|
|
1602
|
+
videoHeight: {
|
|
1603
|
+
name: "videoHeight",
|
|
1604
|
+
required: !1,
|
|
1605
|
+
description: "视频高度",
|
|
1606
|
+
type: { name: "number | string", raw: "number | string" },
|
|
1607
|
+
defaultValue: { value: '"100%"' }
|
|
1608
|
+
},
|
|
1609
|
+
showPlayButton: {
|
|
1610
|
+
name: "showPlayButton",
|
|
1611
|
+
required: !1,
|
|
1612
|
+
description: "是否显示播放按钮",
|
|
1613
|
+
type: { name: "boolean", raw: "boolean" },
|
|
1614
|
+
defaultValue: { value: "true" }
|
|
1615
|
+
},
|
|
1616
|
+
autoPlayOnHover: {
|
|
1617
|
+
name: "autoPlayOnHover",
|
|
1618
|
+
required: !1,
|
|
1619
|
+
description: "是否自动播放(鼠标悬浮时)",
|
|
1620
|
+
type: { name: "boolean", raw: "boolean" },
|
|
1621
|
+
defaultValue: { value: "true" }
|
|
1622
|
+
},
|
|
1623
|
+
onClick: {
|
|
1624
|
+
name: "onClick",
|
|
1625
|
+
required: !1,
|
|
1626
|
+
description: "点击事件",
|
|
1627
|
+
type: { name: "function", raw: "(event: React.MouseEvent<HTMLDivElement>) => void" }
|
|
1628
|
+
},
|
|
1629
|
+
onVideoLoaded: {
|
|
1630
|
+
name: "onVideoLoaded",
|
|
1631
|
+
required: !1,
|
|
1632
|
+
description: "视频加载完成事件",
|
|
1633
|
+
type: { name: "function", raw: "() => void" }
|
|
1634
|
+
},
|
|
1635
|
+
onVideoPlay: {
|
|
1636
|
+
name: "onVideoPlay",
|
|
1637
|
+
required: !1,
|
|
1638
|
+
description: "视频播放事件",
|
|
1639
|
+
type: { name: "function", raw: "() => void" }
|
|
1640
|
+
},
|
|
1641
|
+
onVideoPause: {
|
|
1642
|
+
name: "onVideoPause",
|
|
1643
|
+
required: !1,
|
|
1644
|
+
description: "视频暂停事件",
|
|
1645
|
+
type: { name: "function", raw: "() => void" }
|
|
1646
|
+
},
|
|
1647
|
+
onVideoEnded: {
|
|
1648
|
+
name: "onVideoEnded",
|
|
1649
|
+
required: !1,
|
|
1650
|
+
description: "视频结束事件",
|
|
1651
|
+
type: { name: "function", raw: "() => void" }
|
|
1652
|
+
},
|
|
1653
|
+
className: {
|
|
1654
|
+
name: "className",
|
|
1655
|
+
required: !1,
|
|
1656
|
+
description: "自定义样式类名",
|
|
1657
|
+
type: { name: "string", raw: "string" }
|
|
1658
|
+
},
|
|
1659
|
+
style: {
|
|
1660
|
+
name: "style",
|
|
1661
|
+
required: !1,
|
|
1662
|
+
description: "自定义样式",
|
|
1663
|
+
type: { name: "CSSProperties", raw: "React.CSSProperties" }
|
|
1664
|
+
}
|
|
1665
|
+
}
|
|
1666
|
+
};
|
|
1667
|
+
const De = (n) => [".mp4", ".webm", ".ogg", ".mov", ".avi", ".wmv", ".flv", ".mkv"].some((o) => n.toLowerCase().includes(o)), We = (n) => n.type ? n.type : De(n.url) ? "video" : "image", He = ({
|
|
1668
|
+
items: n,
|
|
1669
|
+
columns: s,
|
|
1670
|
+
gap: o = 0,
|
|
1671
|
+
responsive: l = !0,
|
|
1672
|
+
breakpoints: a = {
|
|
1673
|
+
xs: 1,
|
|
1674
|
+
sm: 2,
|
|
1675
|
+
md: 3,
|
|
1676
|
+
lg: 4,
|
|
1677
|
+
xl: 5,
|
|
1678
|
+
xxl: 6
|
|
1679
|
+
},
|
|
1680
|
+
className: d,
|
|
1681
|
+
style: k
|
|
1682
|
+
}) => {
|
|
1683
|
+
const m = P(null), [T, M] = _(s || a.md || 3), C = P(/* @__PURE__ */ new Map()), V = x(() => {
|
|
1684
|
+
if (!l || s)
|
|
1685
|
+
return s || a.md || 3;
|
|
1686
|
+
const i = window.innerWidth;
|
|
1687
|
+
return i < 576 ? a.xs || 1 : i < 768 ? a.sm || 2 : i < 992 ? a.md || 3 : i < 1200 ? a.lg || 4 : i < 1600 ? a.xl || 5 : a.xxl || 6;
|
|
1688
|
+
}, [l, s, a]), j = x(() => {
|
|
1689
|
+
if (!m.current) return;
|
|
1690
|
+
const i = T, y = m.current, b = (y.offsetWidth - o * (i - 1)) / i, w = new Array(i).fill(0);
|
|
1691
|
+
n.forEach(($, D) => {
|
|
1692
|
+
const N = $.id || D, R = C.current.get(N);
|
|
1693
|
+
if (!R) return;
|
|
1694
|
+
const O = Math.min(...w), z = w.indexOf(O), F = z * (b + o), L = w[z];
|
|
1695
|
+
R.style.position = "absolute", R.style.left = `${F}px`, R.style.top = `${L}px`, R.style.width = `${b}px`, w[z] += R.offsetHeight + o;
|
|
1696
|
+
});
|
|
1697
|
+
const S = Math.max(...w);
|
|
1698
|
+
y.style.height = `${S}px`;
|
|
1699
|
+
}, [n, T, o]);
|
|
1700
|
+
U(() => {
|
|
1701
|
+
const i = () => {
|
|
1702
|
+
const y = V();
|
|
1703
|
+
y !== T && M(y);
|
|
1704
|
+
};
|
|
1705
|
+
if (l)
|
|
1706
|
+
return window.addEventListener("resize", i), i(), () => window.removeEventListener("resize", i);
|
|
1707
|
+
}, [l, V, T]), U(() => {
|
|
1708
|
+
const i = setTimeout(() => {
|
|
1709
|
+
j();
|
|
1710
|
+
}, 100);
|
|
1711
|
+
return () => clearTimeout(i);
|
|
1712
|
+
}, [n, T, j]);
|
|
1713
|
+
const h = x(() => {
|
|
1714
|
+
j();
|
|
1715
|
+
}, [j]), A = x((i) => {
|
|
1716
|
+
i.onClick?.(i);
|
|
1717
|
+
}, []);
|
|
1718
|
+
return /* @__PURE__ */ r.jsx(
|
|
1719
|
+
"div",
|
|
1720
|
+
{
|
|
1721
|
+
ref: m,
|
|
1722
|
+
className: `waterfall-container ${d || ""}`,
|
|
1723
|
+
style: {
|
|
1724
|
+
position: "relative",
|
|
1725
|
+
width: "100%",
|
|
1726
|
+
...k
|
|
1727
|
+
},
|
|
1728
|
+
children: n.map((i, y) => {
|
|
1729
|
+
const g = i.id || y, b = We(i);
|
|
1730
|
+
return /* @__PURE__ */ r.jsx(
|
|
1731
|
+
"div",
|
|
1732
|
+
{
|
|
1733
|
+
ref: (w) => {
|
|
1734
|
+
w ? C.current.set(g, w) : C.current.delete(g);
|
|
1735
|
+
},
|
|
1736
|
+
className: "waterfall-item",
|
|
1737
|
+
children: b === "video" ? /* @__PURE__ */ r.jsx("div", { style: { width: "100%", position: "relative", paddingBottom: "56.25%" }, children: /* @__PURE__ */ r.jsx("div", { style: { position: "absolute", top: 0, left: 0, width: "100%", height: "100%" }, children: /* @__PURE__ */ r.jsx(
|
|
1738
|
+
de,
|
|
1739
|
+
{
|
|
1740
|
+
src: i.url,
|
|
1741
|
+
poster: i.poster,
|
|
1742
|
+
width: "100%",
|
|
1743
|
+
height: "100%",
|
|
1744
|
+
onClick: () => A(i),
|
|
1745
|
+
onVideoLoaded: h,
|
|
1746
|
+
autoPlayOnHover: !0,
|
|
1747
|
+
showPlayButton: !1
|
|
1748
|
+
}
|
|
1749
|
+
) }) }) : /* @__PURE__ */ r.jsx(
|
|
1750
|
+
"div",
|
|
1751
|
+
{
|
|
1752
|
+
className: "waterfall-image-wrapper",
|
|
1753
|
+
onClick: () => A(i),
|
|
1754
|
+
children: /* @__PURE__ */ r.jsx(
|
|
1755
|
+
"img",
|
|
1756
|
+
{
|
|
1757
|
+
src: i.url,
|
|
1758
|
+
alt: `瀑布流图片 ${y + 1}`,
|
|
1759
|
+
className: "waterfall-image",
|
|
1760
|
+
onLoad: h,
|
|
1761
|
+
onError: h
|
|
1762
|
+
}
|
|
1763
|
+
)
|
|
1764
|
+
}
|
|
1765
|
+
)
|
|
1766
|
+
},
|
|
1767
|
+
g
|
|
1768
|
+
);
|
|
1769
|
+
})
|
|
1770
|
+
}
|
|
1771
|
+
);
|
|
1772
|
+
};
|
|
1773
|
+
He.__docgenInfo = {
|
|
1774
|
+
displayName: "Waterfall",
|
|
1775
|
+
description: "瀑布流布局组件,支持图片和视频混合展示",
|
|
1776
|
+
props: {
|
|
1777
|
+
items: {
|
|
1778
|
+
name: "items",
|
|
1779
|
+
required: !0,
|
|
1780
|
+
description: "媒体资源数组",
|
|
1781
|
+
type: { name: "WaterfallItem[]", raw: "WaterfallItem[]" }
|
|
1782
|
+
},
|
|
1783
|
+
columns: {
|
|
1784
|
+
name: "columns",
|
|
1785
|
+
required: !1,
|
|
1786
|
+
description: "列数(默认会根据屏幕宽度自动响应)",
|
|
1787
|
+
type: { name: "number", raw: "number" }
|
|
1788
|
+
},
|
|
1789
|
+
gap: {
|
|
1790
|
+
name: "gap",
|
|
1791
|
+
required: !1,
|
|
1792
|
+
description: "间隔大小",
|
|
1793
|
+
type: { name: "number", raw: "number" },
|
|
1794
|
+
defaultValue: { value: "0" }
|
|
1795
|
+
},
|
|
1796
|
+
responsive: {
|
|
1797
|
+
name: "responsive",
|
|
1798
|
+
required: !1,
|
|
1799
|
+
description: "是否启用响应式布局",
|
|
1800
|
+
type: { name: "boolean", raw: "boolean" },
|
|
1801
|
+
defaultValue: { value: "true" }
|
|
1802
|
+
},
|
|
1803
|
+
breakpoints: {
|
|
1804
|
+
name: "breakpoints",
|
|
1805
|
+
required: !1,
|
|
1806
|
+
description: "响应式断点配置",
|
|
1807
|
+
type: { name: "object", raw: "{ xs?: number; sm?: number; md?: number; lg?: number; xl?: number; xxl?: number; }" }
|
|
1808
|
+
},
|
|
1809
|
+
className: {
|
|
1810
|
+
name: "className",
|
|
1811
|
+
required: !1,
|
|
1812
|
+
description: "自定义类名",
|
|
1813
|
+
type: { name: "string", raw: "string" }
|
|
1814
|
+
},
|
|
1815
|
+
style: {
|
|
1816
|
+
name: "style",
|
|
1817
|
+
required: !1,
|
|
1818
|
+
description: "自定义样式",
|
|
1819
|
+
type: { name: "CSSProperties", raw: "React.CSSProperties" }
|
|
1820
|
+
}
|
|
1821
|
+
}
|
|
1822
|
+
};
|
|
1823
|
+
const Je = {
|
|
1824
|
+
algorithm: we.defaultAlgorithm,
|
|
1479
1825
|
token: {
|
|
1480
1826
|
// 主色
|
|
1481
1827
|
colorPrimary: "#3b82f6",
|
|
@@ -1541,17 +1887,19 @@ const $e = {
|
|
|
1541
1887
|
}
|
|
1542
1888
|
};
|
|
1543
1889
|
export {
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1890
|
+
Be as AdvancedTable,
|
|
1891
|
+
Ie as AppModal,
|
|
1892
|
+
ze as BackButton,
|
|
1893
|
+
ke as Button,
|
|
1894
|
+
Ne as Card,
|
|
1895
|
+
Me as DynamicInput,
|
|
1896
|
+
$e as DynamicTextArea,
|
|
1897
|
+
Oe as EmptyAndSpin,
|
|
1898
|
+
Fe as LinkButton,
|
|
1899
|
+
Pe as PageTable,
|
|
1900
|
+
de as VideoCard,
|
|
1901
|
+
He as Waterfall,
|
|
1902
|
+
Ae as XcIcon,
|
|
1903
|
+
Je as lightTheme
|
|
1556
1904
|
};
|
|
1557
1905
|
//# sourceMappingURL=index.es.js.map
|