bitz-react-admin-ui 2.3.3 → 2.3.5
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/components/BitzTable/ActionCol/index.mjs +1 -1
- package/dist/components/BitzTable/ActionCol/style.mjs +8 -7
- package/dist/components/BitzTable/SelectionBar/SelectionBar.mjs +16 -24
- package/dist/components/BitzTable/Table/index.mjs +193 -184
- package/dist/components/BitzTable/ToolBar/Modal/style.mjs +43 -45
- package/dist/components/BitzTableSelect/SelectPopup/index.mjs +49 -49
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { j as o } from "../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
|
|
2
|
-
import { useContext as
|
|
3
|
-
import { isMobile as
|
|
2
|
+
import { useContext as ke, useRef as K, useState as M, useEffect as se, useMemo as c, useCallback as O } from "react";
|
|
3
|
+
import { isMobile as D } from "../../../node_modules/.store/react-device-detect@2.2.3/node_modules/react-device-detect/dist/lib.mjs";
|
|
4
4
|
import { Skeleton as gt, Typography as Se, Table as wt } from "antd";
|
|
5
|
-
import
|
|
5
|
+
import ne from "../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
|
|
6
6
|
import Bt from "../../BitzDrawer/index.mjs";
|
|
7
7
|
import jt from "../../BitzPagination/index.mjs";
|
|
8
|
-
import
|
|
8
|
+
import Wt from "../../BitzNoData/index.mjs";
|
|
9
9
|
import "../../BitzList/index.less.mjs";
|
|
10
10
|
import pt from "../../BitzList/List.mjs";
|
|
11
11
|
import "../../BitzPullRefresh/style/index.less.mjs";
|
|
12
|
-
import
|
|
12
|
+
import zt from "../../BitzPullRefresh/PullRefresh.mjs";
|
|
13
13
|
import Tt, { BitzTableContext as Nt, toolCols as kt } from "../Store/index.mjs";
|
|
14
14
|
import { loopFilter as St, columnSort as Mt } from "../Store/utils/index.mjs";
|
|
15
|
-
import
|
|
15
|
+
import le from "../../../node_modules/.store/ahooks@3.7.11/node_modules/ahooks/es/useSize/index.mjs";
|
|
16
16
|
import Lt from "../../BitzTheme/index.mjs";
|
|
17
17
|
import { tablePaddingInline as Pt } from "../../BitzConfigProvider/context.mjs";
|
|
18
18
|
import Me from "../../BitzHighlight/index.mjs";
|
|
@@ -30,181 +30,186 @@ function Dt({
|
|
|
30
30
|
showPagination: R = !0,
|
|
31
31
|
height: H,
|
|
32
32
|
dataSource: b,
|
|
33
|
-
total:
|
|
34
|
-
columns:
|
|
33
|
+
total: T = 0,
|
|
34
|
+
columns: _,
|
|
35
35
|
loading: l,
|
|
36
|
-
skeletonNum:
|
|
36
|
+
skeletonNum: G = {
|
|
37
37
|
pc: 10,
|
|
38
38
|
mobile: 10
|
|
39
39
|
},
|
|
40
|
-
skeletonRender:
|
|
40
|
+
skeletonRender: ie,
|
|
41
41
|
skeletonRowNum: Le = 4,
|
|
42
42
|
skeletonRowsWidth: Pe = ["35%", "100%", "100%", "60%"],
|
|
43
43
|
// mobileLoadEmit,
|
|
44
|
-
mobileRefreshEmit:
|
|
45
|
-
operationFilter:
|
|
44
|
+
mobileRefreshEmit: ae,
|
|
45
|
+
operationFilter: I,
|
|
46
46
|
enableControlPage: ve,
|
|
47
47
|
pagination: x,
|
|
48
48
|
paginationEmit: F = () => {
|
|
49
49
|
},
|
|
50
|
-
enabledRowDragSort:
|
|
51
|
-
onRowDragEnd:
|
|
50
|
+
enabledRowDragSort: L,
|
|
51
|
+
onRowDragEnd: J,
|
|
52
52
|
mobilePageHeight: _t = 500,
|
|
53
53
|
mobileCancelText: Re = "取消",
|
|
54
54
|
noDataTitle: He,
|
|
55
55
|
noDataImg: $e,
|
|
56
56
|
color: Gt,
|
|
57
|
-
size:
|
|
57
|
+
size: ce,
|
|
58
58
|
showTableTool: Fe = !0,
|
|
59
59
|
tableAction: Ve,
|
|
60
60
|
tableToolbar: qe,
|
|
61
61
|
selectionBar: Ke,
|
|
62
62
|
scroll: i,
|
|
63
|
-
components:
|
|
63
|
+
components: N,
|
|
64
64
|
expandable: g,
|
|
65
|
-
rowSelection:
|
|
66
|
-
selectionAlert:
|
|
65
|
+
rowSelection: k,
|
|
66
|
+
selectionAlert: h,
|
|
67
67
|
resetPage: Oe,
|
|
68
|
-
...
|
|
68
|
+
...m
|
|
69
69
|
}) {
|
|
70
|
-
var
|
|
71
|
-
const { token: w } = Lt.useToken(), { Table:
|
|
72
|
-
tableSpaceBetweenPage:
|
|
70
|
+
var Ne;
|
|
71
|
+
const { token: w } = Lt.useToken(), { Table: u } = w, {
|
|
72
|
+
tableSpaceBetweenPage: he = 10,
|
|
73
73
|
cellPaddingInline: De = Pt
|
|
74
|
-
} =
|
|
75
|
-
|
|
74
|
+
} = u, { showColumnBorder: _e, hideRowBorder: de, rowHoverable: Ge, ...f } = ke(Nt), C = K(void 0), [Q, Ie] = M(0), [U, Je] = M(0), [X, Qe] = M(0), [Ue, Y] = M(!1), [y, Xe] = M([]);
|
|
75
|
+
se(() => {
|
|
76
76
|
let e = [...b ?? []];
|
|
77
77
|
(x == null ? void 0 : x.page) !== 1 && (e = [...y, ...e]), Xe(e);
|
|
78
78
|
}, [b]);
|
|
79
|
-
const Ye = c(() => !!(y != null && y.length) && (y == null ? void 0 : y.length) >=
|
|
80
|
-
var
|
|
81
|
-
const r = (
|
|
82
|
-
(
|
|
79
|
+
const Ye = c(() => !!(y != null && y.length) && (y == null ? void 0 : y.length) >= T, [y, T]), [Ze, Ee] = M([]), Ae = (e, t) => {
|
|
80
|
+
var n;
|
|
81
|
+
const r = (n = I == null ? void 0 : I(e, t)) == null ? void 0 : n.filter(
|
|
82
|
+
(s) => s.type !== "divider"
|
|
83
83
|
);
|
|
84
|
-
r != null && r.length && (Ee(r),
|
|
85
|
-
},
|
|
86
|
-
|
|
84
|
+
r != null && r.length && (Ee(r), Y(!0));
|
|
85
|
+
}, ue = () => {
|
|
86
|
+
Y(!1);
|
|
87
87
|
}, et = (e) => {
|
|
88
88
|
var t;
|
|
89
|
-
|
|
90
|
-
}, B =
|
|
89
|
+
Y(!1), (t = e.onClick) == null || t.call(e);
|
|
90
|
+
}, B = K(null), Z = le(B), fe = K(null), E = le(fe), A = K(null), P = le(A), tt = () => {
|
|
91
91
|
var r;
|
|
92
92
|
const e = (r = B.current) == null ? void 0 : r.querySelectorAll(
|
|
93
93
|
"& > .bitzTableContainerBody > .ant-table-wrapper.bitzTable > .ant-spin-nested-loading > .ant-spin-container > .ant-table > .ant-table-container > .ant-table-body > table > .ant-table-tbody > tr:not(.ant-table-measure-row, .ant-table-expanded-row)"
|
|
94
94
|
), t = [];
|
|
95
|
-
if (e == null || e.forEach((
|
|
96
|
-
var
|
|
95
|
+
if (e == null || e.forEach((n) => {
|
|
96
|
+
var s;
|
|
97
97
|
t.push(
|
|
98
|
-
((
|
|
98
|
+
((s = n.querySelector("& > .operationCol .actionGroup")) == null ? void 0 : s.clientWidth) || 0
|
|
99
99
|
);
|
|
100
100
|
}), t.length)
|
|
101
101
|
return Math.ceil(Math.max(...t)) + De * 2;
|
|
102
|
-
},
|
|
103
|
-
var
|
|
104
|
-
let e = (
|
|
102
|
+
}, me = () => {
|
|
103
|
+
var d, a, j, z;
|
|
104
|
+
let e = (d = B.current) == null ? void 0 : d.querySelector(
|
|
105
105
|
".ant-table-content"
|
|
106
106
|
);
|
|
107
|
-
e || (e = (
|
|
107
|
+
e || (e = (a = B.current) == null ? void 0 : a.querySelector(
|
|
108
108
|
".ant-table-body"
|
|
109
109
|
));
|
|
110
|
-
const t = e == null ? void 0 : e.clientWidth,
|
|
110
|
+
const t = e == null ? void 0 : e.clientWidth, n = ((e == null ? void 0 : e.offsetWidth) || 0) - t > 0, s = (z = (j = B.current) == null ? void 0 : j.querySelector(
|
|
111
111
|
".ant-table-cell-scrollbar"
|
|
112
|
-
)) == null ? void 0 :
|
|
113
|
-
return { tbodyWidth: t, hasScrollBar:
|
|
114
|
-
}, { y:
|
|
115
|
-
const { tbodyWidth: e, hasScrollBar: t, scrollbarSize: r } =
|
|
112
|
+
)) == null ? void 0 : z.offsetWidth;
|
|
113
|
+
return { tbodyWidth: t, hasScrollBar: n, scrollbarSize: s };
|
|
114
|
+
}, { y: ee, tbodyWidth: v, hasScrollBar: V, scrollbarSize: $ } = c(() => {
|
|
115
|
+
const { tbodyWidth: e, hasScrollBar: t, scrollbarSize: r } = me();
|
|
116
116
|
if (typeof H > "u")
|
|
117
117
|
return {
|
|
118
118
|
tbodyWidth: e,
|
|
119
119
|
hasScrollBar: t,
|
|
120
120
|
scrollbarSize: r
|
|
121
121
|
};
|
|
122
|
-
let
|
|
122
|
+
let n = 40, s = 40;
|
|
123
123
|
if (B.current) {
|
|
124
124
|
const W = window.getComputedStyle(B.current);
|
|
125
|
-
|
|
125
|
+
n = parseInt(W.getPropertyValue("--cell-height")), s = parseInt(W.getPropertyValue("--toolbar-height"));
|
|
126
126
|
}
|
|
127
|
-
const
|
|
128
|
-
return { y: (
|
|
127
|
+
const d = (P == null ? void 0 : P.height) || 0, a = d ? he : 0;
|
|
128
|
+
return { y: (f.fullscreen ? window.innerHeight : H) - d - a - s - n, tbodyWidth: e, hasScrollBar: t, scrollbarSize: r };
|
|
129
129
|
}, [
|
|
130
|
-
|
|
130
|
+
f.fullscreen,
|
|
131
131
|
H,
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
]),
|
|
132
|
+
P == null ? void 0 : P.height,
|
|
133
|
+
Z == null ? void 0 : Z.height,
|
|
134
|
+
E == null ? void 0 : E.height
|
|
135
|
+
]), te = c(() => {
|
|
136
136
|
let e = (i == null ? void 0 : i.x) ?? 1e3;
|
|
137
|
-
return
|
|
138
|
-
}, [i,
|
|
137
|
+
return Q && (e -= Q), U && C.current && (e -= U * C.current), v && (i != null && i.x && e < v && (i == null ? void 0 : i.x) > v && Qe(v - e), e = Math.max(e, v)), i != null && i.x ? { x: e, y: i.y || ee } : i != null && i.y ? { x: e, y: i.y } : { x: e, y: ee };
|
|
138
|
+
}, [i, ee, v, Q, U]), rt = () => {
|
|
139
139
|
let e = 0;
|
|
140
140
|
if (B.current) {
|
|
141
|
-
const r = window.getComputedStyle(B.current),
|
|
141
|
+
const r = window.getComputedStyle(B.current), n = parseInt(
|
|
142
142
|
r.getPropertyValue("--toolCell-paddingInline")
|
|
143
143
|
);
|
|
144
|
-
e = parseInt(r.getPropertyValue("--fontSize")) + 4 + 2 *
|
|
144
|
+
e = parseInt(r.getPropertyValue("--fontSize")) + 4 + 2 * n;
|
|
145
145
|
}
|
|
146
146
|
let t = 0;
|
|
147
|
-
return
|
|
147
|
+
return k && (t += e), g && (t += e), L && (t += e), t;
|
|
148
148
|
}, ot = (e, t) => {
|
|
149
|
-
const r = e.length,
|
|
150
|
-
return
|
|
151
|
-
}, { sortColumns: p, toolColWidth:
|
|
152
|
-
const t = (
|
|
149
|
+
const r = e.length, n = e.filter((W) => W.width), d = n.map((W) => W.width).reduce((W, xt) => W + xt, 0), { tbodyWidth: a } = me(), z = Math.max((i == null ? void 0 : i.x) ?? 0, a ?? 0) - d - t, q = r - n.length;
|
|
150
|
+
return z >= 0 ? Math.floor(z / q) : 0;
|
|
151
|
+
}, { sortColumns: p, toolColWidth: be } = c(() => {
|
|
152
|
+
const t = (_ ?? []).filter((j) => !kt.includes(j)), { filterColumns: r, hiddenTotalWidth: n, autoWidthColLength: s } = St(
|
|
153
153
|
t,
|
|
154
|
-
|
|
155
|
-
),
|
|
156
|
-
let
|
|
157
|
-
return
|
|
158
|
-
}, [
|
|
159
|
-
|
|
154
|
+
f.columnsMap
|
|
155
|
+
), d = r.sort(Mt(f.columnsMap));
|
|
156
|
+
let a = 0;
|
|
157
|
+
return D || (a = rt(), C.current = ot(t, a), Ie(n), Je(s)), { sortColumns: d, toolColWidth: a };
|
|
158
|
+
}, [f.columnsMap, _]), [re, st] = M([]);
|
|
159
|
+
se(() => {
|
|
160
160
|
if (C.current) {
|
|
161
161
|
let e = 0;
|
|
162
|
-
if (
|
|
163
|
-
const
|
|
164
|
-
(
|
|
162
|
+
if (X) {
|
|
163
|
+
const s = p == null ? void 0 : p.filter(
|
|
164
|
+
(d) => !d.width && !(d != null && d.isOperationCol)
|
|
165
165
|
).length;
|
|
166
|
-
e = Math.floor(
|
|
166
|
+
e = Math.floor(X / s);
|
|
167
167
|
}
|
|
168
|
-
let t = 0, r = -1
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
return n != null && n.isOperationCol && (r = a, n != null && n.useMaxWidth && (d = tt() ?? n.width)), !d && (C != null && C.current) && (d = C.current + e), t += d ?? 0, d;
|
|
168
|
+
let t = 0, r = -1, n = p.map((s, d) => {
|
|
169
|
+
let a = s.width;
|
|
170
|
+
return s != null && s.isOperationCol && (r = d, s != null && s.useMaxWidth && (a = tt() ?? s.width)), !a && (C != null && C.current) && (a = C.current + e), t += a ?? 0, a;
|
|
172
171
|
});
|
|
173
|
-
if (t <
|
|
174
|
-
const
|
|
175
|
-
let a =
|
|
176
|
-
|
|
172
|
+
if (t < te.x - be) {
|
|
173
|
+
const s = te.x - be - t;
|
|
174
|
+
let d = s, a = p.length;
|
|
175
|
+
if (s >= a) {
|
|
176
|
+
r >= 0 && a--;
|
|
177
|
+
let z = Math.floor(s / a);
|
|
178
|
+
n = n.map((q, W) => q + (r === W ? 0 : z)), d = s - z * a;
|
|
179
|
+
}
|
|
180
|
+
let j = 0;
|
|
181
|
+
r === 0 && n.length > 1 && j++, n[j] = (n[j] ?? 0) + d;
|
|
177
182
|
}
|
|
178
|
-
|
|
183
|
+
st(n);
|
|
179
184
|
}
|
|
180
|
-
}, [p,
|
|
181
|
-
const
|
|
182
|
-
if (
|
|
185
|
+
}, [p, X]);
|
|
186
|
+
const S = c(() => {
|
|
187
|
+
if (D)
|
|
183
188
|
return p;
|
|
184
189
|
const e = p.map((t, r) => ({
|
|
185
190
|
...t,
|
|
186
|
-
// ...(sortColumns[i + 1]?.isOperationCol && {
|
|
191
|
+
// ...(last === i || sortColumns[i + 1]?.isOperationCol) && {
|
|
187
192
|
// className: classNames(v.className, 'disabledResize'),
|
|
188
|
-
// }
|
|
189
|
-
width:
|
|
193
|
+
// },
|
|
194
|
+
width: re.length ? re[r] : C == null ? void 0 : C.current
|
|
190
195
|
// onHeaderCell: (column: BitzTableColumnsType<T>[number]) => ({
|
|
191
196
|
// width: column.width,
|
|
192
197
|
// onResize: handleResize(i) as React.ReactEventHandler<any>,
|
|
193
198
|
// }),
|
|
194
199
|
}));
|
|
195
200
|
return Ht(
|
|
196
|
-
|
|
201
|
+
_,
|
|
197
202
|
e,
|
|
198
|
-
|
|
199
|
-
!!
|
|
203
|
+
L,
|
|
204
|
+
!!k,
|
|
200
205
|
!!g
|
|
201
206
|
);
|
|
202
|
-
}, [p,
|
|
203
|
-
const e = (b ?? []).length, t = e > (
|
|
204
|
-
return Array.from({ length: t }).map((
|
|
205
|
-
key: `${Date.now()}${
|
|
207
|
+
}, [p, re]), Ce = c(() => $t(S), [S]), nt = c(() => l ? Ce : S, [l, S, Ce]), ye = c(() => {
|
|
208
|
+
const e = (b ?? []).length, t = e > (G.pc ?? 10) ? e >= 20 ? 20 : e : G.pc ?? 10;
|
|
209
|
+
return Array.from({ length: t }).map((n, s) => ({
|
|
210
|
+
key: `${Date.now()}${s}`
|
|
206
211
|
}));
|
|
207
|
-
}, [b]),
|
|
212
|
+
}, [b]), xe = c(() => l ? ye : b ?? [], [l, b, ye]), { table: oe, locale: lt = Rt } = ke(Kt), it = { ...lt.Table }, at = ((Ne = oe == null ? void 0 : oe.expandable) == null ? void 0 : Ne.expandIcon) || (g == null ? void 0 : g.expandIcon) || vt(it), ge = c(() => {
|
|
208
213
|
if (g)
|
|
209
214
|
return {
|
|
210
215
|
...g,
|
|
@@ -224,68 +229,68 @@ function Dt({
|
|
|
224
229
|
};
|
|
225
230
|
}
|
|
226
231
|
};
|
|
227
|
-
}, [g]), ct = c(() => l ?
|
|
228
|
-
if (
|
|
232
|
+
}, [g]), ct = c(() => l ? ge : g, [l, g, ge]), we = c(() => {
|
|
233
|
+
if (k)
|
|
229
234
|
return {
|
|
230
|
-
...
|
|
235
|
+
...k,
|
|
231
236
|
selectedRowKeys: [],
|
|
232
237
|
getCheckboxProps: () => ({ disabled: !0 })
|
|
233
238
|
};
|
|
234
|
-
}, [
|
|
239
|
+
}, [k]), ht = c(() => l ? we : k, [l, k, we]), Be = c(() => l ? "key" : m.rowKey, [l, m.rowKey]), je = c(() => `${ce ?? f.stylesConfig.size}BitzTable`, [ce, f.stylesConfig.size]), dt = O(
|
|
235
240
|
(e, t) => {
|
|
236
|
-
var
|
|
237
|
-
if (!
|
|
241
|
+
var n;
|
|
242
|
+
if (!m.onRow || l)
|
|
238
243
|
return {};
|
|
239
|
-
const r = (
|
|
244
|
+
const r = (n = m.onRow) == null ? void 0 : n.call(m, e, t);
|
|
240
245
|
return r.onClick && (r.className = "rowPointerCursor"), r;
|
|
241
246
|
},
|
|
242
|
-
[
|
|
243
|
-
), ut = c(() =>
|
|
247
|
+
[m.onRow, l]
|
|
248
|
+
), ut = c(() => ne(
|
|
244
249
|
"bitzTableContainer",
|
|
245
|
-
{ hideBorder:
|
|
250
|
+
{ hideBorder: de },
|
|
246
251
|
{ hasScrollBar: V },
|
|
247
|
-
|
|
248
|
-
|
|
252
|
+
je,
|
|
253
|
+
m.className
|
|
249
254
|
), [
|
|
250
|
-
|
|
251
|
-
|
|
255
|
+
m.className,
|
|
256
|
+
je,
|
|
252
257
|
V,
|
|
253
|
-
|
|
254
|
-
|
|
258
|
+
f.fullscreen,
|
|
259
|
+
de
|
|
255
260
|
]), ft = c(() => ({
|
|
256
261
|
"--container-bgColor": w.colorBgContainer
|
|
257
262
|
}), [w.colorBgContainer]), mt = c(() => {
|
|
258
|
-
const e =
|
|
263
|
+
const e = f.fullscreen ? "100%" : H;
|
|
259
264
|
let t;
|
|
260
265
|
return ($ ?? 0) > 0 && (t = $), Ft({
|
|
261
266
|
height: e,
|
|
262
267
|
fontFamily: w.fontFamily,
|
|
263
|
-
evenRowBgColor:
|
|
268
|
+
evenRowBgColor: f.zebra ? u == null ? void 0 : u.evenRowBgColor : w.colorBgContainer,
|
|
264
269
|
colorBgContainer: w.colorBgContainer,
|
|
265
|
-
table:
|
|
266
|
-
gap:
|
|
267
|
-
borderColor: (
|
|
270
|
+
table: u,
|
|
271
|
+
gap: he,
|
|
272
|
+
borderColor: (u == null ? void 0 : u.borderColor) || w.colorBorderSecondary,
|
|
268
273
|
scrollbarWidth: t,
|
|
269
|
-
other:
|
|
274
|
+
other: m.style
|
|
270
275
|
});
|
|
271
276
|
}, [
|
|
272
|
-
|
|
273
|
-
|
|
277
|
+
m.style,
|
|
278
|
+
f.fullscreen,
|
|
274
279
|
H,
|
|
275
|
-
|
|
276
|
-
|
|
280
|
+
u,
|
|
281
|
+
f == null ? void 0 : f.zebra,
|
|
277
282
|
$
|
|
278
|
-
]), bt =
|
|
283
|
+
]), bt = O(
|
|
279
284
|
(e, t, r) => {
|
|
280
|
-
const
|
|
281
|
-
if (
|
|
282
|
-
const
|
|
283
|
-
return
|
|
285
|
+
const n = t % 2 === 0 ? "oddRow" : "evenRow";
|
|
286
|
+
if (m.rowClassName) {
|
|
287
|
+
const s = m.rowClassName(e, t, r);
|
|
288
|
+
return ne(n, s);
|
|
284
289
|
}
|
|
285
|
-
return
|
|
290
|
+
return n;
|
|
286
291
|
},
|
|
287
|
-
[
|
|
288
|
-
),
|
|
292
|
+
[m.rowClassName]
|
|
293
|
+
), We = /* @__PURE__ */ o.jsx(
|
|
289
294
|
pt,
|
|
290
295
|
{
|
|
291
296
|
finished: Ye,
|
|
@@ -300,16 +305,16 @@ function Dt({
|
|
|
300
305
|
"div",
|
|
301
306
|
{
|
|
302
307
|
className: "mobileList",
|
|
303
|
-
style: { backgroundColor:
|
|
308
|
+
style: { backgroundColor: u == null ? void 0 : u.mobileListBgColor },
|
|
304
309
|
children: [
|
|
305
310
|
y == null ? void 0 : y.map((e, t) => /* @__PURE__ */ o.jsx(
|
|
306
311
|
"div",
|
|
307
312
|
{
|
|
308
313
|
className: "listItem",
|
|
309
|
-
style: { backgroundColor:
|
|
314
|
+
style: { backgroundColor: u == null ? void 0 : u.listItemBgColor },
|
|
310
315
|
onClick: () => Ae(e, t),
|
|
311
|
-
children:
|
|
312
|
-
var
|
|
316
|
+
children: S == null ? void 0 : S.map((r, n) => {
|
|
317
|
+
var s;
|
|
313
318
|
return !(r != null && r.mobileHide) && /* @__PURE__ */ o.jsxs(
|
|
314
319
|
"div",
|
|
315
320
|
{
|
|
@@ -320,7 +325,7 @@ function Dt({
|
|
|
320
325
|
`${r.title}`,
|
|
321
326
|
":"
|
|
322
327
|
] }),
|
|
323
|
-
/* @__PURE__ */ o.jsx("div", { className: "value", children: ((
|
|
328
|
+
/* @__PURE__ */ o.jsx("div", { className: "value", children: ((s = r == null ? void 0 : r.render) == null ? void 0 : s.call(
|
|
324
329
|
r,
|
|
325
330
|
Ot(e, (r == null ? void 0 : r.dataIndex) || ""),
|
|
326
331
|
e,
|
|
@@ -328,21 +333,21 @@ function Dt({
|
|
|
328
333
|
)) || (e == null ? void 0 : e[r.dataIndex]) })
|
|
329
334
|
]
|
|
330
335
|
},
|
|
331
|
-
|
|
336
|
+
n
|
|
332
337
|
);
|
|
333
338
|
})
|
|
334
339
|
},
|
|
335
340
|
t
|
|
336
341
|
)),
|
|
337
|
-
Array.from({ length:
|
|
342
|
+
Array.from({ length: G.mobile ?? 2 }).map((e, t) => /* @__PURE__ */ o.jsx(
|
|
338
343
|
"div",
|
|
339
344
|
{
|
|
340
345
|
className: "listItem",
|
|
341
346
|
style: {
|
|
342
347
|
display: l ? "block" : "none",
|
|
343
|
-
backgroundColor:
|
|
348
|
+
backgroundColor: u == null ? void 0 : u.listItemBgColor
|
|
344
349
|
},
|
|
345
|
-
children: /* @__PURE__ */ o.jsx("div", { className: "row", children:
|
|
350
|
+
children: /* @__PURE__ */ o.jsx("div", { className: "row", children: ie ? ie() : /* @__PURE__ */ o.jsx(
|
|
346
351
|
gt,
|
|
347
352
|
{
|
|
348
353
|
title: !1,
|
|
@@ -360,69 +365,73 @@ function Dt({
|
|
|
360
365
|
}
|
|
361
366
|
)
|
|
362
367
|
}
|
|
363
|
-
)
|
|
368
|
+
);
|
|
369
|
+
se(() => {
|
|
370
|
+
f.setSelected(!!(h != null && h.num));
|
|
371
|
+
}, [h]);
|
|
372
|
+
const pe = c(() => /* @__PURE__ */ o.jsxs("div", { className: "alert", children: [
|
|
364
373
|
/* @__PURE__ */ o.jsx(
|
|
365
374
|
Me,
|
|
366
375
|
{
|
|
367
376
|
highlightTag: "strong",
|
|
368
|
-
keywords: `${
|
|
369
|
-
sourceString: `共 ${
|
|
377
|
+
keywords: `${T}`,
|
|
378
|
+
sourceString: `共 ${T} 条`,
|
|
370
379
|
tagClass: "totalText"
|
|
371
380
|
}
|
|
372
381
|
),
|
|
373
|
-
!!
|
|
382
|
+
!!h && /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
|
|
374
383
|
/* @__PURE__ */ o.jsx(Se.Text, { className: "splitBorder", children: "/" }),
|
|
375
384
|
/* @__PURE__ */ o.jsx(
|
|
376
385
|
Me,
|
|
377
386
|
{
|
|
378
387
|
highlightTag: "strong",
|
|
379
|
-
keywords: `${(
|
|
380
|
-
sourceString: `已选中 ${(
|
|
388
|
+
keywords: `${(h == null ? void 0 : h.num) ?? 0}`,
|
|
389
|
+
sourceString: `已选中 ${(h == null ? void 0 : h.num) ?? 0} 条`
|
|
381
390
|
}
|
|
382
391
|
),
|
|
383
|
-
!!(
|
|
392
|
+
!!(h != null && h.num) && /* @__PURE__ */ o.jsx(
|
|
384
393
|
Se.Link,
|
|
385
394
|
{
|
|
386
395
|
className: "cleanSelected",
|
|
387
|
-
onClick:
|
|
396
|
+
onClick: h == null ? void 0 : h.onClear,
|
|
388
397
|
children: "取消选中"
|
|
389
398
|
}
|
|
390
399
|
)
|
|
391
400
|
] })
|
|
392
|
-
] }), [
|
|
393
|
-
l ||
|
|
394
|
-
}, ze =
|
|
401
|
+
] }), [T, h]), Ct = (e) => {
|
|
402
|
+
l || J == null || J(e);
|
|
403
|
+
}, ze = O(() => L ? {
|
|
395
404
|
row: (e) => Vt({ ...e, loading: l == null ? void 0 : l.toString() })
|
|
396
|
-
} : {}, [
|
|
405
|
+
} : {}, [L, L ? l : !1]), Te = O(
|
|
397
406
|
(e) => {
|
|
398
|
-
var
|
|
407
|
+
var n, s;
|
|
399
408
|
const t = { ...e };
|
|
400
|
-
return ((
|
|
409
|
+
return ((n = t.className) == null ? void 0 : n.includes(
|
|
401
410
|
"ant-table-cell-fix-right"
|
|
402
|
-
)) && !V && ((
|
|
411
|
+
)) && !V && ((s = t.style) != null && s.right) && (t.style = { ...t.style ?? {} }, t.style.right = Number(t.style.right ?? 0) - ($ || 0)), /* @__PURE__ */ o.jsx("th", { ...t });
|
|
403
412
|
},
|
|
404
413
|
[V, $]
|
|
405
414
|
), yt = c(() => ({
|
|
406
|
-
...
|
|
415
|
+
...N,
|
|
407
416
|
header: {
|
|
408
|
-
...
|
|
409
|
-
cell:
|
|
417
|
+
...N == null ? void 0 : N.header,
|
|
418
|
+
cell: Te
|
|
410
419
|
},
|
|
411
420
|
body: {
|
|
412
|
-
...
|
|
421
|
+
...N == null ? void 0 : N.body,
|
|
413
422
|
...ze()
|
|
414
423
|
}
|
|
415
|
-
}), [
|
|
424
|
+
}), [N, Te, ze]);
|
|
416
425
|
return /* @__PURE__ */ o.jsxs(
|
|
417
426
|
"div",
|
|
418
427
|
{
|
|
419
|
-
className:
|
|
420
|
-
fullscreen:
|
|
428
|
+
className: ne("bitzTableBlock", {
|
|
429
|
+
fullscreen: f.fullscreen
|
|
421
430
|
}),
|
|
422
431
|
style: ft,
|
|
423
432
|
children: [
|
|
424
|
-
!
|
|
425
|
-
/* @__PURE__ */ o.jsxs("div", { className: "bitzTableContainerBody", ref:
|
|
433
|
+
!D && /* @__PURE__ */ o.jsxs("div", { ref: B, className: ut, style: mt, children: [
|
|
434
|
+
/* @__PURE__ */ o.jsxs("div", { className: "bitzTableContainerBody", ref: fe, children: [
|
|
426
435
|
Fe && /* @__PURE__ */ o.jsxs("div", { className: "bitzTableToolbarBlock", children: [
|
|
427
436
|
Ve || /* @__PURE__ */ o.jsx("div", {}),
|
|
428
437
|
qe,
|
|
@@ -431,20 +440,20 @@ function Dt({
|
|
|
431
440
|
/* @__PURE__ */ o.jsx(
|
|
432
441
|
qt,
|
|
433
442
|
{
|
|
434
|
-
enabledRowDragSort:
|
|
435
|
-
dataSource:
|
|
436
|
-
mergeRowKey:
|
|
443
|
+
enabledRowDragSort: L,
|
|
444
|
+
dataSource: xe,
|
|
445
|
+
mergeRowKey: Be,
|
|
437
446
|
onDragEnd: Ct,
|
|
438
447
|
children: /* @__PURE__ */ o.jsx(
|
|
439
448
|
wt,
|
|
440
449
|
{
|
|
441
|
-
...
|
|
450
|
+
...m,
|
|
442
451
|
bordered: _e,
|
|
443
|
-
columns:
|
|
444
|
-
dataSource:
|
|
452
|
+
columns: nt,
|
|
453
|
+
dataSource: xe,
|
|
445
454
|
loading: !1,
|
|
446
455
|
pagination: !1,
|
|
447
|
-
scroll:
|
|
456
|
+
scroll: te,
|
|
448
457
|
expandable: ct,
|
|
449
458
|
rowSelection: ht,
|
|
450
459
|
onRow: dt,
|
|
@@ -452,21 +461,21 @@ function Dt({
|
|
|
452
461
|
rowClassName: bt,
|
|
453
462
|
className: "bitzTable",
|
|
454
463
|
components: yt,
|
|
455
|
-
rowKey:
|
|
464
|
+
rowKey: Be
|
|
456
465
|
}
|
|
457
466
|
)
|
|
458
467
|
}
|
|
459
468
|
)
|
|
460
469
|
] }),
|
|
461
|
-
R && !!
|
|
462
|
-
|
|
470
|
+
R && !!T && /* @__PURE__ */ o.jsxs("div", { className: "bitzTablePagination", ref: A, children: [
|
|
471
|
+
pe,
|
|
463
472
|
/* @__PURE__ */ o.jsx(
|
|
464
473
|
jt,
|
|
465
474
|
{
|
|
466
475
|
size: "small",
|
|
467
476
|
enableControl: ve,
|
|
468
477
|
pagination: x,
|
|
469
|
-
total:
|
|
478
|
+
total: T,
|
|
470
479
|
dataSource: b,
|
|
471
480
|
resetPage: Oe,
|
|
472
481
|
hideTotalText: !0,
|
|
@@ -474,20 +483,20 @@ function Dt({
|
|
|
474
483
|
}
|
|
475
484
|
)
|
|
476
485
|
] }),
|
|
477
|
-
!R && !!
|
|
486
|
+
!R && !!h && !!T && /* @__PURE__ */ o.jsx("div", { className: "bitzTablePagination", ref: A, children: pe })
|
|
478
487
|
] }),
|
|
479
|
-
|
|
480
|
-
(l || !!(b != null && b.length)) && /* @__PURE__ */ o.jsx(o.Fragment, { children:
|
|
488
|
+
D && /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
|
|
489
|
+
(l || !!(b != null && b.length)) && /* @__PURE__ */ o.jsx(o.Fragment, { children: ae ? (
|
|
481
490
|
// @ts-ignore
|
|
482
491
|
/* @__PURE__ */ o.jsx(
|
|
483
|
-
|
|
492
|
+
zt,
|
|
484
493
|
{
|
|
485
|
-
onRefresh: async () => !l &&
|
|
486
|
-
children:
|
|
494
|
+
onRefresh: async () => !l && ae(),
|
|
495
|
+
children: We
|
|
487
496
|
}
|
|
488
497
|
)
|
|
489
|
-
) :
|
|
490
|
-
!l && /* @__PURE__ */ o.jsx(
|
|
498
|
+
) : We }),
|
|
499
|
+
!l && /* @__PURE__ */ o.jsx(Wt, { data: b, title: He, img: $e }),
|
|
491
500
|
/* @__PURE__ */ o.jsx(
|
|
492
501
|
Bt,
|
|
493
502
|
{
|
|
@@ -496,7 +505,7 @@ function Dt({
|
|
|
496
505
|
placement: "bottom",
|
|
497
506
|
height: "auto",
|
|
498
507
|
closable: !1,
|
|
499
|
-
onClose:
|
|
508
|
+
onClose: ue,
|
|
500
509
|
children: /* @__PURE__ */ o.jsxs("div", { className: "drawerBox", children: [
|
|
501
510
|
/* @__PURE__ */ o.jsx("div", { className: "boxBody", children: Ze.map((e, t) => /* @__PURE__ */ o.jsx(
|
|
502
511
|
"div",
|
|
@@ -511,7 +520,7 @@ function Dt({
|
|
|
511
520
|
t
|
|
512
521
|
)) }),
|
|
513
522
|
/* @__PURE__ */ o.jsx("div", { className: "boxLine" }),
|
|
514
|
-
/* @__PURE__ */ o.jsx("div", { className: "boxFooter", onClick:
|
|
523
|
+
/* @__PURE__ */ o.jsx("div", { className: "boxFooter", onClick: ue, children: Re })
|
|
515
524
|
] })
|
|
516
525
|
}
|
|
517
526
|
)
|