bitz-react-admin-ui 2.2.0 → 2.2.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/_virtual/index.mjs +2 -2
- package/dist/_virtual/index2.mjs +2 -2
- package/dist/components/BitzPagination/index.d.ts +4 -0
- package/dist/components/BitzPagination/index.mjs +22 -21
- package/dist/components/BitzTable/SelectionBar/SelectionBar.mjs +20 -42
- package/dist/components/BitzTable/Table/index.d.ts +9 -1
- package/dist/components/BitzTable/Table/index.mjs +293 -268
- package/dist/components/BitzTable/Table/style.d.ts +2 -1
- package/dist/components/BitzTable/Table/style.mjs +17 -15
- package/dist/components/BitzTable/ToolBar/FullscreenIcon/index.mjs +28 -24
- package/dist/components/BitzTable/ToolBar/RefreshIcon/index.mjs +14 -14
- package/dist/components/BitzTable/ToolBar/Wrapper/index.mjs +20 -22
- package/dist/components/BitzTable/ToolBar/style.mjs +41 -46
- package/dist/components/BitzTable/index.d.ts +2 -2
- package/dist/node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs +1 -1
- package/dist/node_modules/.store/prop-types@15.8.1/node_modules/prop-types/index.mjs +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/_virtual/index.mjs
CHANGED
package/dist/_virtual/index2.mjs
CHANGED
|
@@ -2,10 +2,10 @@ import { j as s } from "../../node_modules/.store/react@18.2.0/node_modules/reac
|
|
|
2
2
|
import { useState as l, useMemo as c, useEffect as y, useImperativeHandle as B } from "react";
|
|
3
3
|
import { Pagination as M } from "antd";
|
|
4
4
|
import { isMobile as b } from "../../node_modules/.store/react-device-detect@2.2.3/node_modules/react-device-detect/dist/lib.mjs";
|
|
5
|
-
import
|
|
5
|
+
import H from "../BitzHighlight/index.mjs";
|
|
6
6
|
import "./index.less.mjs";
|
|
7
7
|
let g = !0;
|
|
8
|
-
const
|
|
8
|
+
const Q = ({
|
|
9
9
|
enableControl: u = !1,
|
|
10
10
|
pagination: a = {
|
|
11
11
|
page: 1,
|
|
@@ -19,26 +19,27 @@ const N = ({
|
|
|
19
19
|
},
|
|
20
20
|
direction: x = "end",
|
|
21
21
|
totalText: w = "共",
|
|
22
|
-
totalItemText:
|
|
22
|
+
totalItemText: d = "条",
|
|
23
|
+
hideTotalText: C,
|
|
23
24
|
elRefInstance: P,
|
|
24
|
-
refInstance:
|
|
25
|
-
...
|
|
25
|
+
refInstance: S,
|
|
26
|
+
...T
|
|
26
27
|
}) => {
|
|
27
|
-
const [h,
|
|
28
|
+
const [h, o] = l(1), [p, $] = l(10), t = c(() => u ? a : { page: h, size: p }, [u, a, h, p]), n = c(() => m, [m]);
|
|
28
29
|
y(() => {
|
|
29
|
-
|
|
30
|
-
}, [
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
},
|
|
34
|
-
g = !1,
|
|
35
|
-
|
|
30
|
+
n != 0 && o(n);
|
|
31
|
+
}, [n]);
|
|
32
|
+
const k = (e, i) => {
|
|
33
|
+
o(e), g && f(e, i);
|
|
34
|
+
}, v = (e, i) => {
|
|
35
|
+
g = !1, $(i), setTimeout(() => {
|
|
36
|
+
o(1), f(1, i), setTimeout(() => {
|
|
36
37
|
g = !0;
|
|
37
38
|
}, 10);
|
|
38
39
|
}, 10);
|
|
39
40
|
};
|
|
40
41
|
return B(
|
|
41
|
-
|
|
42
|
+
S,
|
|
42
43
|
() => ({
|
|
43
44
|
getSize: () => t.size
|
|
44
45
|
}),
|
|
@@ -59,22 +60,22 @@ const N = ({
|
|
|
59
60
|
showSizeChanger: !0,
|
|
60
61
|
showQuickJumper: !0,
|
|
61
62
|
pageSizeOptions: z,
|
|
62
|
-
showTotal: (e) => /* @__PURE__ */ s.jsx(
|
|
63
|
-
|
|
63
|
+
showTotal: C ? void 0 : (e) => /* @__PURE__ */ s.jsx(
|
|
64
|
+
H,
|
|
64
65
|
{
|
|
65
66
|
highlightTag: "strong",
|
|
66
67
|
keywords: `${e}`,
|
|
67
|
-
sourceString: `${w} ${e} ${
|
|
68
|
+
sourceString: `${w} ${e} ${d}`
|
|
68
69
|
}
|
|
69
70
|
),
|
|
70
|
-
onChange:
|
|
71
|
-
onShowSizeChange:
|
|
72
|
-
...
|
|
71
|
+
onChange: k,
|
|
72
|
+
onShowSizeChange: v,
|
|
73
|
+
...T
|
|
73
74
|
}
|
|
74
75
|
)
|
|
75
76
|
}
|
|
76
77
|
) });
|
|
77
78
|
};
|
|
78
79
|
export {
|
|
79
|
-
|
|
80
|
+
Q as default
|
|
80
81
|
};
|
|
@@ -1,49 +1,27 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import g from "./style.mjs";
|
|
1
|
+
import { j as t } from "../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
|
|
2
|
+
import { Space as n } from "antd";
|
|
3
|
+
import c from "../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
|
|
4
|
+
import { useContext as i, useMemo as p, useEffect as C } from "react";
|
|
5
|
+
import { BitzTableContext as f } from "../Store/index.mjs";
|
|
6
|
+
import u from "./style.mjs";
|
|
8
7
|
const E = ({
|
|
9
|
-
show:
|
|
10
|
-
num:
|
|
11
|
-
onClear:
|
|
12
|
-
children:
|
|
8
|
+
show: e,
|
|
9
|
+
num: x,
|
|
10
|
+
onClear: N,
|
|
11
|
+
children: s
|
|
13
12
|
}) => {
|
|
14
13
|
const {
|
|
15
|
-
blockClassName:
|
|
14
|
+
blockClassName: a,
|
|
16
15
|
showCls: o,
|
|
17
|
-
btnClassName:
|
|
18
|
-
batchOperationClassName:
|
|
19
|
-
alertContentClassName:
|
|
20
|
-
} =
|
|
21
|
-
[`${o}`]:
|
|
22
|
-
}), [
|
|
23
|
-
return
|
|
24
|
-
|
|
25
|
-
}, [
|
|
26
|
-
/* @__PURE__ */ e.jsx(t.Compact, { className: m, children: n || /* @__PURE__ */ e.jsx("div", {}) }),
|
|
27
|
-
/* @__PURE__ */ e.jsxs(l, { gap: 7, className: p, children: [
|
|
28
|
-
/* @__PURE__ */ e.jsxs(l, { gap: 20, align: "center", children: [
|
|
29
|
-
/* @__PURE__ */ e.jsxs(t, { size: 10, children: [
|
|
30
|
-
/* @__PURE__ */ e.jsx("span", { children: "已选中" }),
|
|
31
|
-
/* @__PURE__ */ e.jsx("strong", { children: a ?? 0 })
|
|
32
|
-
] }),
|
|
33
|
-
/* @__PURE__ */ e.jsx("span", { style: { verticalAlign: "-0.14em" }, children: "/" })
|
|
34
|
-
] }),
|
|
35
|
-
/* @__PURE__ */ e.jsx(
|
|
36
|
-
j,
|
|
37
|
-
{
|
|
38
|
-
type: "text",
|
|
39
|
-
className: c,
|
|
40
|
-
onClick: r,
|
|
41
|
-
style: { lineHeight: "normal" },
|
|
42
|
-
children: "取消选中"
|
|
43
|
-
}
|
|
44
|
-
)
|
|
45
|
-
] })
|
|
46
|
-
] });
|
|
16
|
+
btnClassName: d,
|
|
17
|
+
batchOperationClassName: r,
|
|
18
|
+
alertContentClassName: b
|
|
19
|
+
} = u(), { setSelected: m } = i(f), l = p(() => c(a, {
|
|
20
|
+
[`${o}`]: e
|
|
21
|
+
}), [e]);
|
|
22
|
+
return C(() => {
|
|
23
|
+
m(e ?? !1);
|
|
24
|
+
}, [e]), /* @__PURE__ */ t.jsx("div", { className: l, children: /* @__PURE__ */ t.jsx(n.Compact, { className: r, children: s || /* @__PURE__ */ t.jsx("div", {}) }) });
|
|
47
25
|
};
|
|
48
26
|
export {
|
|
49
27
|
E as default
|
|
@@ -6,9 +6,13 @@ import type { RowClassName } from 'rc-table/es/interface';
|
|
|
6
6
|
import { ColumnStateType, DensitySize, StylesStateType, ExportColumnStateType } from '../Store';
|
|
7
7
|
import { ActionsFunType, BitzTableColumnsType } from '..';
|
|
8
8
|
import { BitzTableBorderedType } from '@/components/BitzConfigProvider/context';
|
|
9
|
+
import { TableRowSelection } from 'antd/es/table/interface';
|
|
9
10
|
import { DragEndEvent } from '@dnd-kit/core';
|
|
10
11
|
import './index.less';
|
|
11
|
-
export interface
|
|
12
|
+
export interface BitzTableRowSelectionProps<RecordType> extends TableRowSelection<RecordType> {
|
|
13
|
+
onClear?: () => void;
|
|
14
|
+
}
|
|
15
|
+
export interface BitzTableProps<RecordType = any> extends Omit<TableProps<RecordType>, 'size' | 'pagination' | 'bordered' | 'rowSelection'> {
|
|
12
16
|
/** 是否开启rowHover样式 */
|
|
13
17
|
rowHoverable?: boolean;
|
|
14
18
|
/** 是否开启斑马纹样式 */
|
|
@@ -17,6 +21,8 @@ export interface BitzTableProps<RecordType = any> extends Omit<TableProps<Record
|
|
|
17
21
|
bordered?: BitzTableBorderedType;
|
|
18
22
|
/** PC端:是否显示分页 */
|
|
19
23
|
showPagination?: boolean;
|
|
24
|
+
/** PC端:是否显示分页选中条数据 */
|
|
25
|
+
showSelected?: boolean;
|
|
20
26
|
/** PC端:BitzTable组件的整体高度,由外部通过视口高度减去其他元素高度和间隙的结果 */
|
|
21
27
|
height?: number;
|
|
22
28
|
/** table可滚动区域的最大宽高的值 */
|
|
@@ -34,6 +40,8 @@ export interface BitzTableProps<RecordType = any> extends Omit<TableProps<Record
|
|
|
34
40
|
operationFilter?: ActionsFunType<RecordType>;
|
|
35
41
|
/** PC&移动端:请求加载状态 */
|
|
36
42
|
loading?: boolean;
|
|
43
|
+
/** 多选/单选 */
|
|
44
|
+
rowSelection?: BitzTableRowSelectionProps<RecordType>;
|
|
37
45
|
/** 骨架屏列表个数 */
|
|
38
46
|
skeletonNum?: {
|
|
39
47
|
pc?: number;
|