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.
@@ -1,4 +1,4 @@
1
- var s = { exports: {} };
1
+ var p = { exports: {} };
2
2
  export {
3
- s as __module
3
+ p as __module
4
4
  };
@@ -1,4 +1,4 @@
1
- var p = { exports: {} };
1
+ var s = { exports: {} };
2
2
  export {
3
- p as __module
3
+ s as __module
4
4
  };
@@ -45,6 +45,10 @@ interface BitzPaginationProps extends PaginationProps {
45
45
  * 共的名字
46
46
  */
47
47
  totalItemText?: string;
48
+ /**
49
+ *
50
+ */
51
+ hideTotalText?: boolean;
48
52
  /**
49
53
  * 获取分页组件元素
50
54
  */
@@ -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 v from "../BitzHighlight/index.mjs";
5
+ import H from "../BitzHighlight/index.mjs";
6
6
  import "./index.less.mjs";
7
7
  let g = !0;
8
- const N = ({
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: C = "条",
22
+ totalItemText: d = "条",
23
+ hideTotalText: C,
23
24
  elRefInstance: P,
24
- refInstance: d,
25
- ...S
25
+ refInstance: S,
26
+ ...T
26
27
  }) => {
27
- const [h, n] = l(1), [p, T] = l(10), t = c(() => u ? a : { page: h, size: p }, [u, a, h, p]), o = c(() => m, [m]);
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
- o != 0 && n(o);
30
- }, [o]);
31
- const $ = (e, i) => {
32
- n(e), g && f(e, i);
33
- }, k = (e, i) => {
34
- g = !1, T(i), setTimeout(() => {
35
- n(1), f(1, i), setTimeout(() => {
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
- d,
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
- v,
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} ${C}`
68
+ sourceString: `${w} ${e} ${d}`
68
69
  }
69
70
  ),
70
- onChange: $,
71
- onShowSizeChange: k,
72
- ...S
71
+ onChange: k,
72
+ onShowSizeChange: v,
73
+ ...T
73
74
  }
74
75
  )
75
76
  }
76
77
  ) });
77
78
  };
78
79
  export {
79
- N as default
80
+ Q as default
80
81
  };
@@ -1,49 +1,27 @@
1
- import { j as e } from "../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
- import j from "../../BitzButton/index.mjs";
3
- import { Space as t, Flex as l } from "antd";
4
- import f from "../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
5
- import { useContext as C, useMemo as h, useEffect as u } from "react";
6
- import { BitzTableContext as N } from "../Store/index.mjs";
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: s,
10
- num: a,
11
- onClear: r,
12
- children: n
8
+ show: e,
9
+ num: x,
10
+ onClear: N,
11
+ children: s
13
12
  }) => {
14
13
  const {
15
- blockClassName: i,
14
+ blockClassName: a,
16
15
  showCls: o,
17
- btnClassName: c,
18
- batchOperationClassName: m,
19
- alertContentClassName: p
20
- } = g(), { setSelected: x } = C(N), d = h(() => f(i, {
21
- [`${o}`]: s
22
- }), [s]);
23
- return u(() => {
24
- x(s ?? !1);
25
- }, [s]), /* @__PURE__ */ e.jsxs("div", { className: d, children: [
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 BitzTableProps<RecordType = any> extends Omit<TableProps<RecordType>, 'size' | 'pagination' | 'bordered'> {
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;