bitz-react-admin-ui 2.6.1 → 2.6.2

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.
Files changed (27) hide show
  1. package/dist/components/BitzConfigProvider/context.d.ts +7 -1
  2. package/dist/components/BitzTable/ActionCol/index.mjs +73 -73
  3. package/dist/components/BitzTable/Store/index.d.ts +30 -0
  4. package/dist/components/BitzTable/Store/index.mjs +246 -217
  5. package/dist/components/BitzTable/Store/utils/index.d.ts +1 -1
  6. package/dist/components/BitzTable/Store/utils/index.mjs +12 -12
  7. package/dist/components/BitzTable/Table/index.d.ts +9 -1
  8. package/dist/components/BitzTable/Table/index.mjs +429 -398
  9. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnConfigModal.mjs +103 -95
  10. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/index.d.ts +2 -1
  11. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/index.mjs +243 -197
  12. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/index.mjs +141 -105
  13. package/dist/components/BitzTable/ToolBar/ColConfigIcon/StylesConfig/ScopeSwitch.d.ts +8 -0
  14. package/dist/components/BitzTable/ToolBar/ColConfigIcon/StylesConfig/ScopeSwitch.mjs +23 -0
  15. package/dist/components/BitzTable/ToolBar/ColConfigIcon/StylesConfig/index.mjs +127 -74
  16. package/dist/components/BitzTable/ToolBar/ColConfigIcon/index.mjs +76 -25
  17. package/dist/components/BitzTable/ToolBar/ColConfigIcon/style.mjs +151 -96
  18. package/dist/components/BitzTable/ToolBar/ExportIcon/ExportModal.mjs +29 -27
  19. package/dist/components/BitzTable/ToolBar/Modal/index.mjs +19 -9
  20. package/dist/components/BitzTable/ToolBar/Modal/style.d.ts +4 -0
  21. package/dist/components/BitzTable/ToolBar/Modal/style.mjs +42 -14
  22. package/dist/components/BitzTable/index.d.ts +2 -0
  23. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/debounce.mjs +34 -37
  24. package/dist/style.css +1 -1
  25. package/package.json +1 -1
  26. package/dist/node_modules/.store/ahooks@3.8.0/node_modules/ahooks/es/useDebounceFn/index.mjs +0 -29
  27. package/dist/node_modules/.store/ahooks@3.8.0/node_modules/ahooks/es/utils/lodash-polyfill.mjs +0 -7
@@ -1,54 +1,59 @@
1
- import { j as t } from "../../../../../node_modules/.store/react@18.3.1/node_modules/react/jsx-runtime.mjs";
2
- import { BitzTableContext as O } from "../../../Store/index.mjs";
3
- import P from "../../../../BitzTheme/index.mjs";
4
- import { findParentFirstNodeByClass as G } from "../../../../../utils/findNode.mjs";
5
- import { Form as b, Flex as k, Checkbox as $, Radio as u, InputNumber as q, Select as J } from "antd";
6
- import { memo as Q, useRef as F, useEffect as I, useMemo as d, useContext as U, useState as p, useImperativeHandle as W } from "react";
7
- import X from "./DndList.mjs";
8
- function Y({
9
- display: r,
10
- postHeight: C,
11
- showSelectRadio: j = !1,
12
- refInstance: B
1
+ import { j as n } from "../../../../../node_modules/.store/react@18.3.1/node_modules/react/jsx-runtime.mjs";
2
+ import { BitzTableContext as G } from "../../../Store/index.mjs";
3
+ import q from "../../../../BitzTheme/index.mjs";
4
+ import { findParentFirstNodeByClass as J } from "../../../../../utils/findNode.mjs";
5
+ import { css as Q } from "../../../../../node_modules/.store/@emotion_css@11.11.2/node_modules/@emotion/css/dist/emotion-css.esm.mjs";
6
+ import { Form as E, Flex as C, Checkbox as U, Button as W, Radio as h, InputNumber as X, Select as Y } from "antd";
7
+ import { memo as Z, useRef as B, useEffect as F, useMemo as m, useContext as _, useState as x, useImperativeHandle as H } from "react";
8
+ import ee from "./DndList.mjs";
9
+ import ne from "../../../../../node_modules/.store/@ant-design_icons@5.3.7/node_modules/@ant-design/icons/es/icons/RedoOutlined.mjs";
10
+ function te({
11
+ display: s,
12
+ postHeight: r,
13
+ showSelectRadio: y = !1,
14
+ refInstance: I
13
15
  }) {
14
- P.useToken(), F(null);
15
- const h = F(null);
16
- I(() => {
17
- h.current && (C == null || C(h.current.clientHeight));
18
- }, [h.current]);
19
- const R = d(() => ({
16
+ const { token: S } = q.useToken();
17
+ B(null);
18
+ const g = B(null);
19
+ F(() => {
20
+ g.current && (r == null || r(g.current.clientHeight));
21
+ }, [g.current]);
22
+ const V = m(() => ({
20
23
  // display: display ? 'flex' : 'none'
21
- width: r ? "100%" : 0,
22
- pointerEvents: r ? "auto" : "none",
23
- opacity: r ? 1 : 0,
24
- overflow: "hidden",
25
- ...r ? {} : {
24
+ width: s ? "100%" : 0,
25
+ pointerEvents: s ? "auto" : "none",
26
+ opacity: s ? 1 : 0,
27
+ overflow: s ? "inherit" : "hidden",
28
+ ...s ? {} : {
26
29
  position: "absolute",
27
30
  left: 0,
28
31
  right: 0
29
32
  }
30
- }), [r]), x = U(O), s = x.exportConfig, v = x.selected, n = x.pagination, a = x.total, [i, E] = p([]), [c, m] = p([]), [w, N] = p("current"), [g, T] = p("page"), [y, z] = p(1);
31
- I(() => {
32
- var e, l, f, A;
33
- m(s.fields), E(s.fields.map((L) => L.field)), N(
34
- j && v ? "selectedRows" : s.config.key
35
- ), T(((l = (e = s.config) == null ? void 0 : e.info) == null ? void 0 : l.type) ?? "page"), z(((A = (f = s.config) == null ? void 0 : f.info) == null ? void 0 : A.value) ?? 1);
36
- }, [s, j, v]);
37
- const o = d(() => c.filter((e) => e.show).map((e) => e.field), [c]), S = d(() => i.length === o.length, [i, o]), V = d(() => o.length > 0 && o.length < i.length, [o, i]), K = ({ target: e }) => {
38
- m(c.map((l) => ({ ...l, show: e.checked })));
39
- }, M = (e, l) => {
40
- m(e), E(l);
41
- }, D = d(() => {
42
- if (g === "page") {
43
- if (a && (n != null && n.size)) {
44
- let e = Math.floor(a / (n == null ? void 0 : n.size));
45
- return a % (n == null ? void 0 : n.size) && e++, e;
33
+ }), [s]), i = _(G), T = i.defaultTableExportConfig, a = i.exportConfig, v = i.selected, t = i.pagination, c = i.total, [f, N] = x([]), [d, u] = x([]), [w, k] = x("current"), [j, A] = x("page"), [b, R] = x(1);
34
+ F(() => {
35
+ var e, o, p, z;
36
+ u(a.fields), N(a.fields.map(($) => $.field)), k(
37
+ y && v ? "selectedRows" : a.config.key
38
+ ), A(((o = (e = a.config) == null ? void 0 : e.info) == null ? void 0 : o.type) ?? "page"), R(((z = (p = a.config) == null ? void 0 : p.info) == null ? void 0 : z.value) ?? 1);
39
+ }, [a, y, v]);
40
+ const l = m(() => d.filter((e) => e.show).map((e) => e.field), [d]), K = m(() => f.length === l.length, [f, l]), M = m(() => l.length > 0 && l.length < f.length, [l, f]), O = ({ target: e }) => {
41
+ u(d.map((o) => ({ ...o, show: e.checked })));
42
+ }, P = (e, o) => {
43
+ u(e), N(o);
44
+ }, D = m(() => {
45
+ if (j === "page") {
46
+ if (c && (t != null && t.size)) {
47
+ let e = Math.floor(c / (t == null ? void 0 : t.size));
48
+ return c % (t == null ? void 0 : t.size) && e++, e;
46
49
  }
47
50
  return 1;
48
51
  }
49
- return a;
50
- }, [g, n, a]);
51
- return W(B, () => ({
52
+ return c;
53
+ }, [j, t, c]), L = () => {
54
+ u(T.fields), k(T.config.key);
55
+ };
56
+ return H(I, () => ({
52
57
  getExportConfig: () => {
53
58
  const e = {
54
59
  fields: [],
@@ -57,90 +62,121 @@ function Y({
57
62
  info: void 0
58
63
  }
59
64
  };
60
- return c.forEach((l) => {
61
- let f = !1;
62
- o.includes(l.field) && (f = !0), e.fields.push({ ...l, show: f });
65
+ return d.forEach((o) => {
66
+ let p = !1;
67
+ l.includes(o.field) && (p = !0), e.fields.push({ ...o, show: p });
63
68
  }), w === "any" && (e.config.info = {
64
- type: g,
65
- value: (y || 0) < 1 ? 1 : y || 1
69
+ type: j,
70
+ value: (b || 0) < 1 ? 1 : b || 1
66
71
  }), e;
67
72
  },
68
- hasOne: () => o.length > 0
69
- })), /* @__PURE__ */ t.jsx("div", { ref: h, style: R, children: /* @__PURE__ */ t.jsxs(
70
- b,
73
+ hasOne: () => l.length > 0
74
+ })), /* @__PURE__ */ n.jsx("div", { ref: g, style: V, children: /* @__PURE__ */ n.jsxs(
75
+ E,
71
76
  {
72
77
  style: { width: "100%" },
73
78
  labelCol: { span: 3 },
74
79
  labelAlign: "left",
75
80
  colon: !1,
76
81
  className: "exportConfigFormContent",
82
+ ...r && {
83
+ style: { paddingTop: 16 }
84
+ },
77
85
  children: [
78
- /* @__PURE__ */ t.jsx(b.Item, { label: "导出字段", className: "exportFields", children: /* @__PURE__ */ t.jsxs(k, { gap: 8, vertical: !0, children: [
79
- /* @__PURE__ */ t.jsx(
80
- $,
86
+ /* @__PURE__ */ n.jsx(E.Item, { label: "导出字段", className: "exportFields", children: /* @__PURE__ */ n.jsxs(C, { gap: 8, vertical: !0, children: [
87
+ /* @__PURE__ */ n.jsxs(C, { gap: 20, className: "checkAllAndReset", children: [
88
+ /* @__PURE__ */ n.jsx(
89
+ U,
90
+ {
91
+ checked: K,
92
+ indeterminate: M,
93
+ onChange: O,
94
+ style: { alignSelf: "flex-start" },
95
+ children: /* @__PURE__ */ n.jsx("span", { style: { whiteSpace: "nowrap" }, children: "全选" })
96
+ }
97
+ ),
98
+ r && /* @__PURE__ */ n.jsx(
99
+ W,
100
+ {
101
+ type: "link",
102
+ icon: /* @__PURE__ */ n.jsx(ne, {}),
103
+ size: "small",
104
+ onClick: L,
105
+ className: Q`
106
+ &:hover {
107
+ color: ${S.colorPrimary} !important;
108
+ }
109
+ `,
110
+ children: /* @__PURE__ */ n.jsx("span", { style: { whiteSpace: "nowrap" }, children: "重置" })
111
+ }
112
+ )
113
+ ] }),
114
+ /* @__PURE__ */ n.jsx(
115
+ ee,
81
116
  {
82
- checked: S,
83
- indeterminate: V,
84
- onChange: K,
85
- style: { alignSelf: "flex-start" },
86
- children: /* @__PURE__ */ t.jsx("span", { style: { whiteSpace: "nowrap" }, children: "全选" })
87
- }
88
- ),
89
- /* @__PURE__ */ t.jsx(
90
- X,
91
- {
92
- dataList: c,
93
- keys: i,
94
- onChange: m,
95
- onMoveEnd: M
117
+ dataList: d,
118
+ keys: f,
119
+ onChange: u,
120
+ onMoveEnd: P
96
121
  }
97
122
  )
98
123
  ] }) }),
99
- /* @__PURE__ */ t.jsx(b.Item, { label: "导出设置", className: "exportTotal", children: /* @__PURE__ */ t.jsx(
100
- u.Group,
124
+ /* @__PURE__ */ n.jsx(
125
+ E.Item,
101
126
  {
102
- value: w,
103
- onChange: ({ target: e }) => N(e.value),
104
- children: /* @__PURE__ */ t.jsxs(k, { vertical: !0, gap: 8, align: "flex-start", children: [
105
- j && v && /* @__PURE__ */ t.jsx(u, { value: "selectedRows", children: "导出选中数据" }),
106
- /* @__PURE__ */ t.jsx(u, { value: "current", children: "仅导出当前页" }),
107
- /* @__PURE__ */ t.jsx(u, { value: "any", children: /* @__PURE__ */ t.jsxs(k, { align: "center", gap: 8, children: [
108
- /* @__PURE__ */ t.jsx("span", { style: { whiteSpace: "nowrap" }, children: "导出" }),
109
- /* @__PURE__ */ t.jsx(
110
- q,
111
- {
112
- controls: !1,
113
- min: 1,
114
- max: D,
115
- value: y,
116
- onChange: (e) => z(e),
117
- style: { width: 120 },
118
- addonAfter: /* @__PURE__ */ t.jsx(
119
- J,
127
+ label: "导出设置",
128
+ className: "exportTotal",
129
+ ...r && {
130
+ style: { paddingBottom: 8 }
131
+ },
132
+ children: /* @__PURE__ */ n.jsx(
133
+ h.Group,
134
+ {
135
+ value: w,
136
+ onChange: ({ target: e }) => k(e.value),
137
+ children: /* @__PURE__ */ n.jsxs(C, { vertical: !0, gap: 8, align: "flex-start", children: [
138
+ y && v && /* @__PURE__ */ n.jsx(h, { value: "selectedRows", children: "导出选中数据" }),
139
+ /* @__PURE__ */ n.jsx(h, { value: "current", children: "仅导出当前页" }),
140
+ /* @__PURE__ */ n.jsx(h, { value: "any", children: /* @__PURE__ */ n.jsxs(C, { align: "center", gap: 8, children: [
141
+ /* @__PURE__ */ n.jsx("span", { style: { whiteSpace: "nowrap" }, children: "导出" }),
142
+ /* @__PURE__ */ n.jsx(
143
+ X,
120
144
  {
121
- value: g,
122
- onChange: T,
123
- options: [
124
- { label: "页", value: "page" },
125
- { label: "条", value: "pieces" }
126
- ],
127
- onClick: (e) => e.preventDefault(),
128
- getPopupContainer: (e) => G(e, "containerBody")
145
+ controls: !1,
146
+ precision: 0,
147
+ min: 1,
148
+ max: D,
149
+ value: b,
150
+ onChange: (e) => R(e),
151
+ style: { width: 120 },
152
+ addonAfter: /* @__PURE__ */ n.jsx(
153
+ Y,
154
+ {
155
+ value: j,
156
+ onChange: A,
157
+ options: [
158
+ { label: "页", value: "page" },
159
+ { label: "条", value: "pieces" }
160
+ ],
161
+ onClick: (e) => e.preventDefault(),
162
+ getPopupContainer: (e) => J(e, "containerBody")
163
+ }
164
+ )
129
165
  }
130
- )
131
- }
132
- ),
133
- /* @__PURE__ */ t.jsx("span", { style: { whiteSpace: "nowrap" }, children: "数据" })
134
- ] }) }),
135
- /* @__PURE__ */ t.jsx(u, { value: "all", children: "导出全部数据" })
136
- ] })
166
+ ),
167
+ /* @__PURE__ */ n.jsx("span", { style: { whiteSpace: "nowrap" }, children: "数据" })
168
+ ] }) }),
169
+ /* @__PURE__ */ n.jsx(h, { value: "all", children: "导出全部数据" })
170
+ ] })
171
+ }
172
+ )
137
173
  }
138
- ) })
174
+ )
139
175
  ]
140
176
  }
141
177
  ) });
142
178
  }
143
- const oe = Q(Y);
179
+ const ue = Z(te);
144
180
  export {
145
- oe as default
181
+ ue as default
146
182
  };
@@ -0,0 +1,8 @@
1
+ import { FC } from 'react';
2
+ interface ScopeSwitchProps {
3
+ value?: boolean;
4
+ disabled?: boolean;
5
+ onChange?: (val: boolean) => void;
6
+ }
7
+ declare const ScopeSwitch: FC<ScopeSwitchProps>;
8
+ export default ScopeSwitch;
@@ -0,0 +1,23 @@
1
+ import { j as e } from "../../../../../node_modules/.store/react@18.3.1/node_modules/react/jsx-runtime.mjs";
2
+ import { Flex as l, Switch as i } from "antd";
3
+ import { useId as d } from "react";
4
+ const r = "stylesScope", m = ({ value: o, disabled: t, onChange: c }) => {
5
+ const s = d();
6
+ return /* @__PURE__ */ e.jsxs(l, { gap: 10, children: [
7
+ /* @__PURE__ */ e.jsx("label", { htmlFor: `${r}${s}`, className: "stylesScopeLabel", children: "应用到全局表格" }),
8
+ /* @__PURE__ */ e.jsx(
9
+ i,
10
+ {
11
+ id: `${r}${s}`,
12
+ value: o,
13
+ onChange: c,
14
+ disabled: t,
15
+ checkedChildren: "是",
16
+ unCheckedChildren: "否"
17
+ }
18
+ )
19
+ ] });
20
+ };
21
+ export {
22
+ m as default
23
+ };
@@ -1,112 +1,124 @@
1
1
  import { j as e } from "../../../../../node_modules/.store/react@18.3.1/node_modules/react/jsx-runtime.mjs";
2
- import S from "../../../../../assets/iconfont/IconKuansongde.mjs";
3
- import k from "../../../../../assets/iconfont/IconTekuansong.mjs";
4
- import R from "../../../../../assets/iconfont/IconJincoude.mjs";
5
- import T from "../../../../../assets/iconfont/IconZhongdengde.mjs";
6
- import B from "../../../../../assets/iconfont/IconTejincou.mjs";
7
- import G from "../../../../../assets/iconfont/IconWufengexian.mjs";
8
- import F from "../../../../../assets/iconfont/IconHangliefengexian.mjs";
9
- import N from "../../../../../assets/iconfont/IconHangfengexian.mjs";
10
- import E from "../../../../../assets/iconfont/IconLiefengexian.mjs";
11
- import W from "../../../../../assets/iconfont/IconYoubanmawentianchong.mjs";
12
- import $ from "../../../../../assets/iconfont/IconWubanmawentianchong.mjs";
13
- import { BitzConfigContext as A } from "../../../../BitzConfigProvider/context.mjs";
14
- import { BitzTableContext as D } from "../../../Store/index.mjs";
15
- import J from "../../../../BitzTheme/index.mjs";
16
- import { Form as t, Radio as p, Checkbox as K } from "antd";
17
- import L from "../../../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
18
- import { forwardRef as M, useRef as V, useEffect as z, useMemo as Y, useContext as f, useImperativeHandle as Z, memo as q } from "react";
19
- import { BitzToolBarContext as O } from "../../Wrapper/context.mjs";
20
- import s from "./RadioCard.mjs";
21
- const Q = ({ defaultSize: i, items: m }) => m.map((n) => n.key === i ? {
22
- ...n,
23
- label: `${n.label}(默认)`
24
- } : n), U = M(({ display: i, postHeight: m }, n) => {
25
- var b, y, h;
26
- const { token: o } = J.useToken(), x = V(null);
27
- z(() => {
28
- var l;
29
- m((l = x.current) == null ? void 0 : l.clientHeight);
2
+ import F from "../../../../../assets/iconfont/IconKuansongde.mjs";
3
+ import G from "../../../../../assets/iconfont/IconTekuansong.mjs";
4
+ import W from "../../../../../assets/iconfont/IconJincoude.mjs";
5
+ import E from "../../../../../assets/iconfont/IconZhongdengde.mjs";
6
+ import A from "../../../../../assets/iconfont/IconTejincou.mjs";
7
+ import V from "../../../../../assets/iconfont/IconWufengexian.mjs";
8
+ import $ from "../../../../../assets/iconfont/IconHangliefengexian.mjs";
9
+ import D from "../../../../../assets/iconfont/IconHangfengexian.mjs";
10
+ import J from "../../../../../assets/iconfont/IconLiefengexian.mjs";
11
+ import K from "../../../../../assets/iconfont/IconYoubanmawentianchong.mjs";
12
+ import L from "../../../../../assets/iconfont/IconWubanmawentianchong.mjs";
13
+ import { BitzConfigContext as M } from "../../../../BitzConfigProvider/context.mjs";
14
+ import { BitzTableContext as O } from "../../../Store/index.mjs";
15
+ import Y from "../../../../BitzTheme/index.mjs";
16
+ import { Form as s, Radio as f, InputNumber as Z, Segmented as q, Row as Q, Col as v, Button as U } from "antd";
17
+ import X from "../../../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
18
+ import { forwardRef as _, useRef as S, useEffect as x, useMemo as ee, useContext as b, useImperativeHandle as oe, useState as re, memo as le } from "react";
19
+ import { BitzToolBarContext as se } from "../../Wrapper/context.mjs";
20
+ import i from "./RadioCard.mjs";
21
+ import ie from "./ScopeSwitch.mjs";
22
+ import te from "../../../../../node_modules/.store/@ant-design_icons@5.3.7/node_modules/@ant-design/icons/es/icons/RedoOutlined.mjs";
23
+ const ne = ({ defaultSize: l, items: d }) => d.map((t) => t.key === l ? {
24
+ ...t,
25
+ label: `${t.label}(默认)`
26
+ } : t), ae = _(({ display: l, postHeight: d }, t) => {
27
+ var j, g;
28
+ const { token: o } = Y.useToken(), h = S(null);
29
+ x(() => {
30
+ var r;
31
+ d((r = h.current) == null ? void 0 : r.clientHeight);
30
32
  }, []);
31
- const P = Y(() => ({
33
+ const C = ee(() => ({
32
34
  display: "flex",
33
- width: i ? "100%" : 0,
34
- pointerEvents: i ? "auto" : "none",
35
- opacity: i ? 1 : 0,
36
- overflow: "hidden",
37
- ...i ? {} : {
35
+ width: l ? "100%" : 0,
36
+ pointerEvents: l ? "auto" : "none",
37
+ opacity: l ? 1 : 0,
38
+ overflow: l ? "inherit" : "hidden",
39
+ ...l ? {} : {
38
40
  position: "absolute",
39
41
  left: 0,
40
42
  right: 0
41
43
  }
42
- }), [i]), v = {
44
+ }), [l]), P = {
43
45
  size: 26,
44
46
  color: o.colorPrimary
45
- }, [d] = t.useForm(), I = (b = f(A).Table) == null ? void 0 : b.stylesScope, { defaultTableSize: H, stylesConfig: w } = f(D), r = (y = f(O).config) == null ? void 0 : y.stylesConfig, u = (l, a) => {
46
- var j, g;
47
- let c = a;
48
- return (j = r == null ? void 0 : r[l]) != null && j.disabled && (c = L(a, "disabledControl")), {
49
- disabled: (g = r == null ? void 0 : r[l]) == null ? void 0 : g.disabled,
50
- className: c
47
+ }, [a] = s.useForm(), w = (j = b(M).Table) == null ? void 0 : j.stylesScope, { defaultTableSize: H, stylesConfig: R, defaultTableStylesConfig: y } = b(O), n = (g = b(se).config) == null ? void 0 : g.stylesConfig, u = (r, c) => {
48
+ var z, I;
49
+ let m = c;
50
+ return (z = n == null ? void 0 : n[r]) != null && z.disabled && (m = X(c, "disabledControl")), {
51
+ disabled: (I = n == null ? void 0 : n[r]) == null ? void 0 : I.disabled,
52
+ className: m
51
53
  };
52
54
  };
53
- z(() => {
54
- d.setFieldsValue({
55
- ...w,
56
- stylesScope: I === "global"
55
+ x(() => {
56
+ a.setFieldsValue({
57
+ ...y,
58
+ ...R,
59
+ stylesScope: w === "global"
57
60
  });
58
61
  }, []);
59
- const C = Q({
62
+ const k = () => {
63
+ a.setFieldsValue({
64
+ ...y,
65
+ stylesScope: !1
66
+ });
67
+ }, B = ne({
60
68
  defaultSize: H,
61
69
  items: [
62
70
  {
63
71
  key: "xs",
64
72
  label: "特紧凑",
65
- icon: B
73
+ icon: A
66
74
  },
67
75
  {
68
76
  key: "sm",
69
77
  label: "紧凑",
70
- icon: R
78
+ icon: W
71
79
  },
72
80
  {
73
81
  key: "md",
74
82
  label: "中等",
75
- icon: T
83
+ icon: E
76
84
  },
77
85
  {
78
86
  key: "lg",
79
87
  label: "宽松",
80
- icon: S
88
+ icon: F
81
89
  },
82
90
  {
83
91
  key: "xl",
84
92
  label: "特宽松",
85
- icon: k
93
+ icon: G
86
94
  }
87
95
  ]
88
96
  });
89
- return Z(n, () => ({
90
- getFormInstance: () => d
91
- })), /* @__PURE__ */ e.jsx("div", { style: P, ref: x, children: /* @__PURE__ */ e.jsxs(
92
- t,
97
+ oe(t, () => ({
98
+ getFormInstance: () => a
99
+ }));
100
+ const p = S(null), [T, N] = re("auto");
101
+ return x(() => {
102
+ p && N(p.current.clientWidth + 10);
103
+ }, []), /* @__PURE__ */ e.jsx("div", { style: C, ref: h, children: /* @__PURE__ */ e.jsxs(
104
+ s,
93
105
  {
94
- form: d,
106
+ form: a,
95
107
  style: { width: "100%" },
96
108
  labelCol: { span: 3 },
97
109
  labelAlign: "left",
98
110
  colon: !1,
99
111
  className: "stylesConfigFormContent",
100
112
  children: [
101
- /* @__PURE__ */ e.jsx(t.Item, { label: "行高", name: "size", children: /* @__PURE__ */ e.jsx(p.Group, { ...u("size", "sizeRadioGroup"), children: C.map(({ key: l, label: a, icon: c }) => /* @__PURE__ */ e.jsx(s, { label: a, value: l, children: /* @__PURE__ */ e.jsx(c, { ...v }) }, l)) }) }),
102
- /* @__PURE__ */ e.jsx(t.Item, { label: "分割线", name: "bordered", children: /* @__PURE__ */ e.jsxs(
103
- p.Group,
113
+ /* @__PURE__ */ e.jsx(s.Item, { label: "行高", name: "size", children: /* @__PURE__ */ e.jsx(f.Group, { ...u("size", "sizeRadioGroup"), children: B.map(({ key: r, label: c, icon: m }) => /* @__PURE__ */ e.jsx(i, { label: c, value: r, children: /* @__PURE__ */ e.jsx(m, { ...P }) }, r)) }) }),
114
+ /* @__PURE__ */ e.jsx(s.Item, { label: "分割线", name: "bordered", children: /* @__PURE__ */ e.jsxs(
115
+ f.Group,
104
116
  {
105
117
  ...u("bordered", "splitBorderRadioGroup"),
106
118
  children: [
107
- /* @__PURE__ */ e.jsx(s, { label: "无分割线", value: "hide", children: /* @__PURE__ */ e.jsx(G, { size: 26, color: o.colorPrimaryHover }) }),
108
- /* @__PURE__ */ e.jsx(s, { label: "行分割线", value: "row", children: /* @__PURE__ */ e.jsx(
109
- N,
119
+ /* @__PURE__ */ e.jsx(i, { label: "无分割线", value: "hide", children: /* @__PURE__ */ e.jsx(V, { size: 26, color: o.colorPrimaryHover }) }),
120
+ /* @__PURE__ */ e.jsx(i, { label: "行分割线", value: "row", children: /* @__PURE__ */ e.jsx(
121
+ D,
110
122
  {
111
123
  size: 26,
112
124
  color: [
@@ -117,8 +129,8 @@ const Q = ({ defaultSize: i, items: m }) => m.map((n) => n.key === i ? {
117
129
  ]
118
130
  }
119
131
  ) }),
120
- /* @__PURE__ */ e.jsx(s, { label: "列分割线", value: "column", children: /* @__PURE__ */ e.jsx(
121
- E,
132
+ /* @__PURE__ */ e.jsx(i, { label: "列分割线", value: "column", children: /* @__PURE__ */ e.jsx(
133
+ J,
122
134
  {
123
135
  size: 26,
124
136
  color: [
@@ -129,8 +141,8 @@ const Q = ({ defaultSize: i, items: m }) => m.map((n) => n.key === i ? {
129
141
  ]
130
142
  }
131
143
  ) }),
132
- /* @__PURE__ */ e.jsx(s, { label: "行列分割线", value: "row-column", children: /* @__PURE__ */ e.jsx(
133
- F,
144
+ /* @__PURE__ */ e.jsx(i, { label: "行列分割线", value: "row-column", children: /* @__PURE__ */ e.jsx(
145
+ $,
134
146
  {
135
147
  size: 26,
136
148
  color: [
@@ -144,27 +156,68 @@ const Q = ({ defaultSize: i, items: m }) => m.map((n) => n.key === i ? {
144
156
  ]
145
157
  }
146
158
  ) }),
147
- /* @__PURE__ */ e.jsx(t.Item, { label: "斑马纹", name: "zebra", children: /* @__PURE__ */ e.jsxs(p.Group, { ...u("zebra", "zebraRadioGroup"), children: [
148
- /* @__PURE__ */ e.jsx(s, { label: "有斑马纹", value: !0, children: /* @__PURE__ */ e.jsx(
149
- W,
159
+ /* @__PURE__ */ e.jsx(s.Item, { label: "斑马纹", name: "zebra", children: /* @__PURE__ */ e.jsxs(f.Group, { ...u("zebra", "zebraRadioGroup"), children: [
160
+ /* @__PURE__ */ e.jsx(i, { label: "有斑马纹", value: !0, children: /* @__PURE__ */ e.jsx(
161
+ K,
150
162
  {
151
163
  size: 26,
152
164
  color: [o.colorPrimaryHover, o.colorPrimary]
153
165
  }
154
166
  ) }),
155
- /* @__PURE__ */ e.jsx(s, { label: "无斑马纹", value: !1, children: /* @__PURE__ */ e.jsx(
156
- $,
167
+ /* @__PURE__ */ e.jsx(i, { label: "无斑马纹", value: !1, children: /* @__PURE__ */ e.jsx(
168
+ L,
157
169
  {
158
170
  size: 26,
159
171
  color: o.colorPrimaryHover
160
172
  }
161
173
  ) })
162
174
  ] }) }),
163
- /* @__PURE__ */ e.jsx(t.Item, { name: "stylesScope", valuePropName: "checked", className: "scope", children: /* @__PURE__ */ e.jsx(K, { disabled: (h = r == null ? void 0 : r.stylesScope) == null ? void 0 : h.disabled, children: "应用到全局表格" }) })
175
+ /* @__PURE__ */ e.jsx(
176
+ s.Item,
177
+ {
178
+ label: "每页展示数据条数",
179
+ labelCol: { span: 6 },
180
+ name: "pageSize",
181
+ tooltip: "默认展示10条,可设置的展示条数范围:5-100条",
182
+ className: "pageSize",
183
+ children: /* @__PURE__ */ e.jsx(Z, { min: 5, max: 100, style: { width: 202 }, precision: 0 })
184
+ }
185
+ ),
186
+ /* @__PURE__ */ e.jsx(
187
+ s.Item,
188
+ {
189
+ label: "数据排序方式",
190
+ labelCol: { span: 6 },
191
+ name: "orderBy",
192
+ className: "orderBy",
193
+ children: /* @__PURE__ */ e.jsx(
194
+ q,
195
+ {
196
+ options: [
197
+ { label: "时间升序", value: "asc" },
198
+ { label: "时间倒序", value: "desc" }
199
+ ]
200
+ }
201
+ )
202
+ }
203
+ ),
204
+ /* @__PURE__ */ e.jsxs(Q, { gutter: 16, className: "scopeAndReset", children: [
205
+ /* @__PURE__ */ e.jsx(v, { ref: p, style: { width: T }, className: "scope", children: /* @__PURE__ */ e.jsx(s.Item, { name: "stylesScope", children: /* @__PURE__ */ e.jsx(ie, {}) }) }),
206
+ /* @__PURE__ */ e.jsx(v, { style: { alignSelf: "flex-end" }, className: "reset", children: /* @__PURE__ */ e.jsx(
207
+ U,
208
+ {
209
+ type: "link",
210
+ icon: /* @__PURE__ */ e.jsx(te, {}),
211
+ size: "small",
212
+ onClick: k,
213
+ children: "重置"
214
+ }
215
+ ) })
216
+ ] })
164
217
  ]
165
218
  }
166
219
  ) });
167
- }), he = q(U);
220
+ }), Be = le(ae);
168
221
  export {
169
- he as default
222
+ Be as default
170
223
  };