szld-libs 0.2.46 → 0.2.48

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.
@@ -13,3 +13,9 @@
13
13
  font-weight: 400;
14
14
  font-size: 14px;
15
15
  }
16
+ .backheader-module_main_cac53 .backheader-module_btn_ee841 {
17
+ cursor: pointer;
18
+ }
19
+ .backheader-module_main_cac53 .backheader-module_btn_ee841:hover {
20
+ opacity: 0.6;
21
+ }
@@ -1,15 +1,17 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
- import { Space, Button, Typography } from "antd";
2
+ import { Space, Typography } from "antd";
3
3
  import { ArrowLeftOutlined } from "@ant-design/icons";
4
4
  import { useNavigate } from "react-router-dom";
5
5
  import classNames from "classnames";
6
6
  const main = "backheader-module_main_cac53";
7
7
  const title = "backheader-module_title_33439";
8
8
  const sub = "backheader-module_sub_1d015";
9
+ const btn = "backheader-module_btn_ee841";
9
10
  const styles = {
10
11
  main,
11
12
  title,
12
- sub
13
+ sub,
14
+ btn
13
15
  };
14
16
  const { Title, Text } = Typography;
15
17
  const BackHeader = (props) => {
@@ -26,7 +28,7 @@ const BackHeader = (props) => {
26
28
  };
27
29
  return /* @__PURE__ */ jsxs("div", { className: classNames(styles.main, className), style, children: [
28
30
  /* @__PURE__ */ jsxs(Space, { children: [
29
- isBack && /* @__PURE__ */ jsx(Button, { type: "text", icon: icon || /* @__PURE__ */ jsx(ArrowLeftOutlined, { style: { fontSize: 24 } }), onClick: goBack }),
31
+ isBack && /* @__PURE__ */ jsx("div", { onClick: goBack, className: styles.btn, children: icon || /* @__PURE__ */ jsx(ArrowLeftOutlined, { style: { fontSize: 24 } }) }),
30
32
  /* @__PURE__ */ jsxs(Title, { level, className: styles.title, style: titleStyle, children: [
31
33
  title2,
32
34
  renderSubtitle()
@@ -1,4 +1,4 @@
1
- import { FormProps, FormItemProps, ColProps, RowProps, InputProps, SelectProps, InputNumberProps, RadioGroupProps, SwitchProps, TimePickerProps, ButtonProps, CascaderProps, RateProps } from "antd";
1
+ import { FormProps, FormItemProps, ColProps, RowProps, InputProps, SelectProps, InputNumberProps, RadioGroupProps, SwitchProps, TimePickerProps, ButtonProps, CascaderAutoProps, RateProps } from "antd";
2
2
  import { DefaultOptionType } from "antd/es/cascader";
3
3
  import { CheckboxGroupProps } from "antd/es/checkbox";
4
4
  import { DatePickerProps, RangePickerProps } from "antd/es/date-picker";
@@ -23,7 +23,7 @@ interface ValueModalProps {
23
23
  interface customValueProps {
24
24
  children: ReactElement;
25
25
  }
26
- export type ValueProps<T> = T extends "checkbox" ? CheckboxGroupProps : T extends "select" ? SelectProps : T extends "inputNumber" ? InputNumberProps : T extends "textarea" ? TextAreaProps : T extends "radio" ? RadioGroupProps : T extends "switch" ? SwitchProps : T extends "rangePicker" ? RangePickerProps : T extends "datePicker" ? DatePickerProps : T extends "timePicker" ? TimePickerProps : T extends "input" ? InputProps : T extends "cascader" ? CascaderProps<DefaultOptionType> : T extends "upload" ? UploadFileProps : T extends "modal" ? ValueModalProps : T extends "btns" ? ValueBtnProps[] : T extends "password" ? PasswordProps : T extends "rate" ? RateProps : T extends "custom" ? customValueProps : InputProps;
26
+ export type ValueProps<T> = T extends "checkbox" ? CheckboxGroupProps : T extends "select" ? SelectProps : T extends "inputNumber" ? InputNumberProps : T extends "textarea" ? TextAreaProps : T extends "radio" ? RadioGroupProps : T extends "switch" ? SwitchProps : T extends "rangePicker" ? RangePickerProps : T extends "datePicker" ? DatePickerProps : T extends "timePicker" ? TimePickerProps : T extends "input" ? InputProps : T extends "cascader" ? CascaderAutoProps<DefaultOptionType> : T extends "upload" ? UploadFileProps : T extends "modal" ? ValueModalProps : T extends "btns" ? ValueBtnProps[] : T extends "password" ? PasswordProps : T extends "rate" ? RateProps : T extends "custom" ? customValueProps : InputProps;
27
27
  export interface CreateFormItemProps<T> {
28
28
  formItemProps?: FormItemProps;
29
29
  valueType?: T;
@@ -0,0 +1,9 @@
1
+ .custom-pagination-module_customPagination_bb6f7 {
2
+ display: flex;
3
+ justify-content: flex-end;
4
+ align-items: center;
5
+ margin: 16px 0;
6
+ }
7
+ .custom-pagination-module_customPagination_bb6f7 .custom-pagination-module_jumpBtns_a6c0b {
8
+ margin-left: 8px;
9
+ }
@@ -0,0 +1,15 @@
1
+ import { PaginationProps } from 'antd';
2
+ export interface CustomPaginationProps {
3
+ /** 总数文本 */
4
+ totalText?: string;
5
+ /** 单位文本 */
6
+ unitText?: string;
7
+ /** 跳转文本 */
8
+ jumpText?: string;
9
+ /** 页文本 */
10
+ pageText?: string;
11
+ /** pagination属性配置 */
12
+ paginationProps?: PaginationProps;
13
+ }
14
+ declare function CustomPagination(props: CustomPaginationProps): import("react/jsx-runtime").JSX.Element;
15
+ export default CustomPagination;
@@ -0,0 +1,69 @@
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { Pagination, Input } from "antd";
3
+ import { useState } from "react";
4
+ const customPagination = "custom-pagination-module_customPagination_bb6f7";
5
+ const jumpBtns = "custom-pagination-module_jumpBtns_a6c0b";
6
+ const styles = {
7
+ customPagination,
8
+ jumpBtns
9
+ };
10
+ function CustomPagination(props) {
11
+ const { totalText = "共", unitText = "条", jumpText = "跳至", pageText = "页", paginationProps } = props;
12
+ const [inputValue, setInputValue] = useState("");
13
+ const pageSize = (paginationProps == null ? void 0 : paginationProps.pageSize) || 10;
14
+ const handleChange = (e) => {
15
+ setInputValue(e.target.value);
16
+ };
17
+ const handleBlur = (e) => {
18
+ var _a;
19
+ setInputValue("");
20
+ if (Number.isNaN(Number(e.target.value))) {
21
+ return;
22
+ }
23
+ (_a = paginationProps == null ? void 0 : paginationProps.onChange) == null ? void 0 : _a.call(paginationProps, Number(e.target.value), pageSize);
24
+ };
25
+ const handleKeyDown = (e) => {
26
+ var _a;
27
+ if (e.key === "Enter") {
28
+ setInputValue("");
29
+ if (Number.isNaN(Number(inputValue))) {
30
+ return;
31
+ }
32
+ (_a = paginationProps == null ? void 0 : paginationProps.onChange) == null ? void 0 : _a.call(paginationProps, Number(inputValue), pageSize);
33
+ }
34
+ };
35
+ return /* @__PURE__ */ jsxs("div", { className: styles.customPagination, children: [
36
+ /* @__PURE__ */ jsx(
37
+ Pagination,
38
+ {
39
+ showTotal: (total) => `${totalText} ${total} ${unitText}`,
40
+ showSizeChanger: {
41
+ options: [
42
+ { label: `10 ${unitText}/${pageText}`, value: 10 },
43
+ { label: `20 ${unitText}/${pageText}`, value: 20 },
44
+ { label: `50 ${unitText}/${pageText}`, value: 50 },
45
+ { label: `100 ${unitText}/${pageText}`, value: 100 }
46
+ ]
47
+ },
48
+ ...paginationProps
49
+ }
50
+ ),
51
+ /* @__PURE__ */ jsxs("div", { className: styles.jumpBtns, children: [
52
+ jumpText,
53
+ /* @__PURE__ */ jsx(
54
+ Input,
55
+ {
56
+ style: { width: "50px", margin: "0 8px" },
57
+ value: inputValue,
58
+ onChange: handleChange,
59
+ onBlur: (e) => handleBlur(e),
60
+ onKeyDown: (e) => handleKeyDown(e)
61
+ }
62
+ ),
63
+ pageText
64
+ ] })
65
+ ] });
66
+ }
67
+ export {
68
+ CustomPagination as default
69
+ };
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
@@ -2,16 +2,25 @@ import { TableProps } from 'antd';
2
2
  import { ColumnType } from 'antd/es/table';
3
3
  import { CreateFormProps } from '../CreateForm';
4
4
  export interface TableColumnProps<T> extends ColumnType<T> {
5
+ /** 是否隐藏 */
5
6
  hidden?: boolean;
7
+ /** 宽度 */
6
8
  width?: number | string;
7
- minWidth?: number | string;
9
+ /** 最小宽度 */
10
+ minWidth?: number;
8
11
  }
9
12
  export interface MTableProps<T> extends Omit<TableProps<T>, 'columns'> {
10
13
  columns?: TableColumnProps<T>[];
14
+ /** 单元格最小width,默认200 */
11
15
  minColumnWidth?: number;
16
+ /** 是否可调整列宽度 */
12
17
  resizeable?: boolean;
18
+ /** 表格id,用于调整列宽时存储 */
13
19
  tableId?: string;
20
+ /** 存储key,默认szld_table_cell_width */
14
21
  storageKey?: string;
22
+ /** 表格无数据文案 */
23
+ emptyText?: string;
15
24
  }
16
25
  export interface SearchTableProps<RecordType> {
17
26
  searchProps?: CreateFormProps;
@@ -1,5 +1,5 @@
1
1
  import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
- import { Table } from "antd";
2
+ import { Table, Empty } from "antd";
3
3
  import classNames from "classnames";
4
4
  import { useState, useEffect, useMemo } from "react";
5
5
  import { Resizable } from "react-resizable";
@@ -25,6 +25,7 @@ function SearchTable(props) {
25
25
  resizeable = false,
26
26
  tableId,
27
27
  storageKey = "szld_table_cell_width",
28
+ emptyText,
28
29
  ...rest
29
30
  } = tableProps;
30
31
  const [columns, setColumns] = useState(tableProps.columns || []);
@@ -43,6 +44,7 @@ function SearchTable(props) {
43
44
  useEffect(() => {
44
45
  const list = tableProps.columns || [];
45
46
  if (list.length === 0 || !resizeable) {
47
+ setColumns(list);
46
48
  return;
47
49
  }
48
50
  const result = list == null ? void 0 : list.filter((v) => !v.hidden).map((v) => {
@@ -119,6 +121,7 @@ function SearchTable(props) {
119
121
  components,
120
122
  columns,
121
123
  className: classNames(classes.table, tableProps == null ? void 0 : tableProps.className),
124
+ locale: { emptyText: /* @__PURE__ */ jsx(Empty, { image: Empty.PRESENTED_IMAGE_SIMPLE, description: emptyText }) },
122
125
  pagination: typeof (tableProps == null ? void 0 : tableProps.pagination) === "boolean" ? tableProps.pagination : {
123
126
  showPrevNextJumpers: true,
124
127
  showQuickJumper: true,
@@ -68,7 +68,7 @@ function VirtualTable(props) {
68
68
  columnCount: mergedColumns.length,
69
69
  columnWidth: (index) => {
70
70
  const { width } = mergedColumns[index];
71
- return totalHeight > scroll.y && index === mergedColumns.length - 1 ? width - scrollbarSize - 1 : width;
71
+ return `${totalHeight}` > scroll.y && index === mergedColumns.length - 1 ? width - scrollbarSize - 1 : width;
72
72
  },
73
73
  height: scroll.y,
74
74
  rowCount: rawData.length,
@@ -38,6 +38,13 @@ function useChangePwd(props) {
38
38
  }
39
39
  ];
40
40
  const handleChangePwd = useLockFn(async (func, title) => {
41
+ const modalProps = props == null ? void 0 : props.modalProps;
42
+ let width = void 0;
43
+ if (modalProps == null ? void 0 : modalProps.width) {
44
+ if (typeof modalProps.width === "string" || typeof modalProps.width === "number") {
45
+ width = modalProps.width;
46
+ }
47
+ }
41
48
  await modal.confirm({
42
49
  title: title || "修改密码",
43
50
  icon: null,
@@ -56,7 +63,8 @@ function useChangePwd(props) {
56
63
  });
57
64
  });
58
65
  },
59
- ...props == null ? void 0 : props.modalProps
66
+ ...modalProps,
67
+ width
60
68
  });
61
69
  });
62
70
  return { handleChangePwd };
package/es/index.js CHANGED
@@ -2,12 +2,13 @@ import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { useEffect, useState } from "react";
3
3
  import ReactDOM from "react-dom/client";
4
4
  import { BrowserRouter } from "react-router-dom";
5
- import { Table, Button } from "antd";
5
+ import { App, Form, Table, Flex, Button } from "antd";
6
6
  import useConfig from "./hooks/useConfig";
7
- import { useRowSelection, BackHeader, SearchTable } from "./main";
7
+ import { useRowSelection, useChangePwd, BackHeader, SearchTable, CreateForm, CustomPagination } from "./main";
8
8
  let key = "U2FsdGVkX1/dG1NSXNR9hnp3Ech/v6Gh8CDDJxgBm1EPFQel12ySIf84ARXCPwTae7TzwgPvjOyE3S5rAEzl/wAZmId6pbezpFeFcJqxdmIl3FeluYHFxJzQHDETTvrr3G/REvv00kHptOVwg6ecjPH6yk7PNit0sWTBLorROxLxMD8lVDmOA66p7Zp4QnYzqScYJGFbutmfHYXfBRBe1Q2UKummJ798svNY5SIwEwl4spzgyWmhARtuyq4zhysFrj/xODuNDjtwitA6XfX566WcZkj3F+2P+mkYzDYOhXXaomnlybjrZ2hEHfcczQhUfJd89O8PNIuEWo24wjYRgMdKlw5CWSeocFCqV7ZJ/CV/7vNRcaO4awKlFNobLikkwDznxpcX+4UEej+ED+pgfmPQLsKedcfEscStkSAZXaD5pBRTiFU9xGLfDt6seUrEnMBeXkpMIY9j1SZDDK18/G7lSHjDQMZYZP6sfLdBdwY=";
9
9
  const Demo = () => {
10
10
  useConfig(key);
11
+ const [form] = Form.useForm();
11
12
  useEffect(() => {
12
13
  }, []);
13
14
  const columns = [
@@ -40,53 +41,188 @@ const Demo = () => {
40
41
  useEffect(() => {
41
42
  setSelectedKeys([1, 12, 21]);
42
43
  }, []);
43
- return /* @__PURE__ */ jsxs("div", { style: { height: "100vh" }, children: [
44
- /* @__PURE__ */ jsx(BackHeader, { title: "新增系统", isBack: true }),
45
- /* @__PURE__ */ jsx(Button, { onClick: () => setList(columns), children: "test" }),
46
- /* @__PURE__ */ jsx(
47
- "div",
48
- {
49
- style: {
50
- height: "400px",
51
- border: "1px solid #333",
52
- margin: "20px"
44
+ const { handleChangePwd } = useChangePwd();
45
+ const typeList = [
46
+ {
47
+ flinfo: "数据",
48
+ children: [
49
+ {
50
+ flinfo: "数据1"
51
+ },
52
+ {
53
+ flinfo: "数据2"
54
+ }
55
+ ]
56
+ },
57
+ {
58
+ flinfo: "表",
59
+ children: [
60
+ {
61
+ flinfo: "表1"
62
+ },
63
+ {
64
+ flinfo: "表2"
65
+ }
66
+ ]
67
+ }
68
+ ];
69
+ const formItems = [
70
+ {
71
+ dataIndex: "asctypeid",
72
+ title: "编号",
73
+ valueType: "inputNumber",
74
+ valueProps: {
75
+ placeholder: "请输入编号",
76
+ controls: false,
77
+ min: 0
78
+ },
79
+ formItemProps: {
80
+ rules: [
81
+ {
82
+ required: true,
83
+ message: "请输入编号"
84
+ }
85
+ ]
86
+ },
87
+ colProps: { span: 11 }
88
+ },
89
+ {
90
+ dataIndex: "asctype",
91
+ title: "归类名",
92
+ valueProps: {
93
+ placeholder: "请输入归类名",
94
+ maxLength: 100,
95
+ allowClear: true
96
+ },
97
+ colProps: { span: 11, offset: 2 },
98
+ formItemProps: {
99
+ rules: [
100
+ {
101
+ required: true,
102
+ message: "请输入归类名"
103
+ },
104
+ { whitespace: true, message: "输入内容不能只有空格" }
105
+ ]
106
+ }
107
+ },
108
+ {
109
+ dataIndex: "tabsortList",
110
+ title: "分类",
111
+ valueType: "cascader",
112
+ valueProps: {
113
+ placeholder: "请选择分类",
114
+ options: typeList,
115
+ changeOnSelect: true,
116
+ fieldNames: {
117
+ label: "flinfo",
118
+ value: "flinfo",
119
+ children: "children"
53
120
  }
121
+ },
122
+ colProps: {
123
+ span: 11
54
124
  }
55
- ),
56
- /* @__PURE__ */ jsx(
57
- SearchTable,
58
- {
59
- tableProps: {
60
- columns: [
61
- {
62
- dataIndex: "id",
63
- title: "ID"
64
- },
65
- {
66
- dataIndex: "a",
67
- title: "a",
68
- width: 200
69
- },
70
- {
71
- dataIndex: "a2",
72
- title: "a",
73
- width: 200
74
- },
75
- {
76
- dataIndex: "a3",
77
- title: "a",
78
- width: 200
79
- },
80
- {
81
- dataIndex: "a4",
82
- title: "a",
83
- width: 400
125
+ }
126
+ ];
127
+ const totalText = "共@";
128
+ const unitText = "条@";
129
+ const jumpText = "跳至@";
130
+ const pageText = "页@";
131
+ return /* @__PURE__ */ jsxs("div", { style: { height: "100vh", display: "flex", flexDirection: "column", gap: 20 }, children: [
132
+ /* @__PURE__ */ jsx(BackHeader, { title: "页头组件", isBack: true }),
133
+ /* @__PURE__ */ jsxs(Flex, { gap: 20, align: "center", children: [
134
+ "1. 测试修改密码hooks",
135
+ /* @__PURE__ */ jsx(
136
+ Button,
137
+ {
138
+ onClick: () => handleChangePwd((params) => {
139
+ }),
140
+ children: "修改密码"
141
+ }
142
+ )
143
+ ] }),
144
+ /* @__PURE__ */ jsxs("div", { children: [
145
+ "2. 测试循环滚动组件",
146
+ /* @__PURE__ */ jsx(
147
+ "div",
148
+ {
149
+ style: {
150
+ height: "400px",
151
+ border: "1px solid #333",
152
+ margin: "20px"
153
+ }
154
+ }
155
+ )
156
+ ] }),
157
+ /* @__PURE__ */ jsxs("div", { children: [
158
+ /* @__PURE__ */ jsxs(Flex, { gap: 20, align: "center", style: { marginBottom: 10 }, children: [
159
+ "3. 测试表格组件",
160
+ /* @__PURE__ */ jsx(Button, { onClick: () => setList(columns), children: "test" })
161
+ ] }),
162
+ /* @__PURE__ */ jsx(
163
+ SearchTable,
164
+ {
165
+ tableProps: {
166
+ columns: [
167
+ {
168
+ dataIndex: "id",
169
+ title: "ID"
170
+ },
171
+ {
172
+ dataIndex: "a",
173
+ title: "a",
174
+ width: 200
175
+ },
176
+ {
177
+ dataIndex: "a2",
178
+ title: "a",
179
+ width: 200
180
+ },
181
+ {
182
+ dataIndex: "a3",
183
+ title: "a",
184
+ width: 200
185
+ },
186
+ {
187
+ dataIndex: "a4",
188
+ title: "a",
189
+ width: 400
190
+ }
191
+ ],
192
+ dataSource: list,
193
+ resizeable: true,
194
+ rowKey: "id",
195
+ pagination: {
196
+ total: 25,
197
+ current,
198
+ pageSize: 10,
199
+ onChange(page, pageSize) {
200
+ const index = (page - 1) * 10;
201
+ const arr = Array(10).fill(0).map((v, i) => ({ id: i + index }));
202
+ setList(arr);
203
+ setCurrent(page);
204
+ }
84
205
  }
85
- ],
86
- dataSource: list,
87
- resizeable: true,
88
- rowKey: "id",
89
- pagination: {
206
+ }
207
+ }
208
+ )
209
+ ] }),
210
+ /* @__PURE__ */ jsxs("div", { children: [
211
+ "4. 测试创建表单组件",
212
+ /* @__PURE__ */ jsx(
213
+ CreateForm,
214
+ {
215
+ items: formItems,
216
+ formProps: { form, wrapperCol: { span: 24 }, style: { width: "60%", marginTop: 10 } }
217
+ }
218
+ )
219
+ ] }),
220
+ /* @__PURE__ */ jsxs("div", { children: [
221
+ "5. 测试自定义分页组件",
222
+ /* @__PURE__ */ jsx(
223
+ CustomPagination,
224
+ {
225
+ paginationProps: {
90
226
  total: 25,
91
227
  current,
92
228
  pageSize: 10,
@@ -96,12 +232,16 @@ const Demo = () => {
96
232
  setList(arr);
97
233
  setCurrent(page);
98
234
  }
99
- }
235
+ },
236
+ totalText,
237
+ unitText,
238
+ jumpText,
239
+ pageText
100
240
  }
101
- }
102
- )
241
+ )
242
+ ] })
103
243
  ] });
104
244
  };
105
245
  ReactDOM.createRoot(document.getElementById("root")).render(
106
- /* @__PURE__ */ jsx(BrowserRouter, { children: /* @__PURE__ */ jsx(Demo, {}) })
246
+ /* @__PURE__ */ jsx(BrowserRouter, { children: /* @__PURE__ */ jsx(App, { children: /* @__PURE__ */ jsx(Demo, {}) }) })
107
247
  );
package/es/main.d.ts CHANGED
@@ -7,6 +7,7 @@ import AuthButton from './components/AuthButton';
7
7
  import CoralButton from './components/CoralButton';
8
8
  import LoopSlide from './components/LoopSlide';
9
9
  import showWorkFlow, { WorkFlowNode } from './components/WorkFlowNode';
10
+ import CustomPagination from './components/CustomPagination';
10
11
  import * as download from './utils/download';
11
12
  import * as fileType from './utils/filetype';
12
13
  import * as FormRules from './utils/formRules';
@@ -20,4 +21,4 @@ import useRemember from './hooks/useRemember';
20
21
  import useRowSelection from './hooks/useRowSelection';
21
22
  import AES from './utils/aes';
22
23
  import HmacSHA512 from './utils/hmacSHA512';
23
- export { AES, AuthButton, BackHeader, compressionImage, CoralButton, CreateForm, download, EditTable, fileType, FormRules, HmacSHA512, LoopSlide, SearchTable, showWorkFlow, UploadFile, useCaptcha, useChangePwd, useConfig, useRemember, useRowSelection, utils, verfyCode, WorkFlowNode, };
24
+ export { AES, AuthButton, BackHeader, compressionImage, CoralButton, CreateForm, download, EditTable, fileType, FormRules, HmacSHA512, LoopSlide, SearchTable, showWorkFlow, UploadFile, useCaptcha, useChangePwd, useConfig, useRemember, useRowSelection, utils, verfyCode, WorkFlowNode, CustomPagination, };
package/es/main.js CHANGED
@@ -7,41 +7,43 @@ import { default as default7 } from "./components/AuthButton";
7
7
  import { default as default8 } from "./components/CoralButton";
8
8
  import { default as default9 } from "./components/LoopSlide";
9
9
  import { WorkFlowNode, default as default10 } from "./components/WorkFlowNode";
10
+ import { default as default11 } from "./components/CustomPagination";
10
11
  import * as download from "./utils/download";
11
12
  import * as filetype from "./utils/filetype";
12
13
  import * as formRules from "./utils/formRules";
13
- import { default as default11 } from "./utils/image-compression";
14
+ import { default as default12 } from "./utils/image-compression";
14
15
  import * as index from "./utils/index";
15
16
  import * as verifyCode from "./utils/verify-code";
16
- import { default as default12 } from "./hooks/useCaptcha";
17
- import { default as default13 } from "./hooks/useChangePwd";
18
- import { default as default14 } from "./hooks/useConfig";
19
- import { default as default15 } from "./hooks/useRemember";
20
- import { default as default16 } from "./hooks/useRowSelection";
21
- import { default as default17 } from "./utils/aes";
22
- import { default as default18 } from "./utils/hmacSHA512";
17
+ import { default as default13 } from "./hooks/useCaptcha";
18
+ import { default as default14 } from "./hooks/useChangePwd";
19
+ import { default as default15 } from "./hooks/useConfig";
20
+ import { default as default16 } from "./hooks/useRemember";
21
+ import { default as default17 } from "./hooks/useRowSelection";
22
+ import { default as default18 } from "./utils/aes";
23
+ import { default as default19 } from "./utils/hmacSHA512";
23
24
  export {
24
- default17 as AES,
25
+ default18 as AES,
25
26
  default7 as AuthButton,
26
27
  default2 as BackHeader,
27
28
  default8 as CoralButton,
28
29
  default3 as CreateForm,
30
+ default11 as CustomPagination,
29
31
  default6 as EditTable,
30
32
  formRules as FormRules,
31
- default18 as HmacSHA512,
33
+ default19 as HmacSHA512,
32
34
  default9 as LoopSlide,
33
35
  default4 as SearchTable,
34
36
  default5 as UploadFile,
35
37
  WorkFlowNode,
36
- default11 as compressionImage,
38
+ default12 as compressionImage,
37
39
  download,
38
40
  filetype as fileType,
39
41
  default10 as showWorkFlow,
40
- default12 as useCaptcha,
41
- default13 as useChangePwd,
42
- default14 as useConfig,
43
- default15 as useRemember,
44
- default16 as useRowSelection,
42
+ default13 as useCaptcha,
43
+ default14 as useChangePwd,
44
+ default15 as useConfig,
45
+ default16 as useRemember,
46
+ default17 as useRowSelection,
45
47
  index as utils,
46
48
  verifyCode as verfyCode
47
49
  };
@@ -13,3 +13,9 @@
13
13
  font-weight: 400;
14
14
  font-size: 14px;
15
15
  }
16
+ .backheader-module_main_cac53 .backheader-module_btn_ee841 {
17
+ cursor: pointer;
18
+ }
19
+ .backheader-module_main_cac53 .backheader-module_btn_ee841:hover {
20
+ opacity: 0.6;
21
+ }
@@ -7,10 +7,12 @@ const classNames = require("classnames");
7
7
  const main = "backheader-module_main_cac53";
8
8
  const title = "backheader-module_title_33439";
9
9
  const sub = "backheader-module_sub_1d015";
10
+ const btn = "backheader-module_btn_ee841";
10
11
  const styles = {
11
12
  main,
12
13
  title,
13
- sub
14
+ sub,
15
+ btn
14
16
  };
15
17
  const { Title, Text } = antd.Typography;
16
18
  const BackHeader = (props) => {
@@ -27,7 +29,7 @@ const BackHeader = (props) => {
27
29
  };
28
30
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: classNames(styles.main, className), style, children: [
29
31
  /* @__PURE__ */ jsxRuntime.jsxs(antd.Space, { children: [
30
- isBack && /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { type: "text", icon: icon || /* @__PURE__ */ jsxRuntime.jsx(icons.ArrowLeftOutlined, { style: { fontSize: 24 } }), onClick: goBack }),
32
+ isBack && /* @__PURE__ */ jsxRuntime.jsx("div", { onClick: goBack, className: styles.btn, children: icon || /* @__PURE__ */ jsxRuntime.jsx(icons.ArrowLeftOutlined, { style: { fontSize: 24 } }) }),
31
33
  /* @__PURE__ */ jsxRuntime.jsxs(Title, { level, className: styles.title, style: titleStyle, children: [
32
34
  title2,
33
35
  renderSubtitle()
@@ -1,4 +1,4 @@
1
- import { FormProps, FormItemProps, ColProps, RowProps, InputProps, SelectProps, InputNumberProps, RadioGroupProps, SwitchProps, TimePickerProps, ButtonProps, CascaderProps, RateProps } from "antd";
1
+ import { FormProps, FormItemProps, ColProps, RowProps, InputProps, SelectProps, InputNumberProps, RadioGroupProps, SwitchProps, TimePickerProps, ButtonProps, CascaderAutoProps, RateProps } from "antd";
2
2
  import { DefaultOptionType } from "antd/es/cascader";
3
3
  import { CheckboxGroupProps } from "antd/es/checkbox";
4
4
  import { DatePickerProps, RangePickerProps } from "antd/es/date-picker";
@@ -23,7 +23,7 @@ interface ValueModalProps {
23
23
  interface customValueProps {
24
24
  children: ReactElement;
25
25
  }
26
- export type ValueProps<T> = T extends "checkbox" ? CheckboxGroupProps : T extends "select" ? SelectProps : T extends "inputNumber" ? InputNumberProps : T extends "textarea" ? TextAreaProps : T extends "radio" ? RadioGroupProps : T extends "switch" ? SwitchProps : T extends "rangePicker" ? RangePickerProps : T extends "datePicker" ? DatePickerProps : T extends "timePicker" ? TimePickerProps : T extends "input" ? InputProps : T extends "cascader" ? CascaderProps<DefaultOptionType> : T extends "upload" ? UploadFileProps : T extends "modal" ? ValueModalProps : T extends "btns" ? ValueBtnProps[] : T extends "password" ? PasswordProps : T extends "rate" ? RateProps : T extends "custom" ? customValueProps : InputProps;
26
+ export type ValueProps<T> = T extends "checkbox" ? CheckboxGroupProps : T extends "select" ? SelectProps : T extends "inputNumber" ? InputNumberProps : T extends "textarea" ? TextAreaProps : T extends "radio" ? RadioGroupProps : T extends "switch" ? SwitchProps : T extends "rangePicker" ? RangePickerProps : T extends "datePicker" ? DatePickerProps : T extends "timePicker" ? TimePickerProps : T extends "input" ? InputProps : T extends "cascader" ? CascaderAutoProps<DefaultOptionType> : T extends "upload" ? UploadFileProps : T extends "modal" ? ValueModalProps : T extends "btns" ? ValueBtnProps[] : T extends "password" ? PasswordProps : T extends "rate" ? RateProps : T extends "custom" ? customValueProps : InputProps;
27
27
  export interface CreateFormItemProps<T> {
28
28
  formItemProps?: FormItemProps;
29
29
  valueType?: T;
@@ -0,0 +1,9 @@
1
+ .custom-pagination-module_customPagination_bb6f7 {
2
+ display: flex;
3
+ justify-content: flex-end;
4
+ align-items: center;
5
+ margin: 16px 0;
6
+ }
7
+ .custom-pagination-module_customPagination_bb6f7 .custom-pagination-module_jumpBtns_a6c0b {
8
+ margin-left: 8px;
9
+ }