@regenbio/regenbio-components-react 1.0.4 → 1.0.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/build/Test.d.ts +2 -0
- package/build/components/data-table/constant.d.ts +4 -0
- package/build/components/data-table/index.d.ts +8 -0
- package/build/components/data-table/type.d.ts +103 -0
- package/build/index.d.ts +8 -0
- package/build/index.js +17 -0
- package/build/index.js.LICENSE.txt +179 -0
- package/build/services/utils/DbUtil.d.ts +5 -0
- package/build/services/utils/ObjectUtil.d.ts +5 -0
- package/package-lock.json +5789 -0
- package/package.json +2 -2
- package/tsconfig.json +4 -1
package/build/Test.d.ts
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { ActionType, ProColumns, RequestData } from "@ant-design/pro-components";
|
|
2
|
+
import { ReactNode, Ref } from "react";
|
|
3
|
+
import { TableProps } from "antd";
|
|
4
|
+
import type { SortOrder } from "antd/lib/table/interface";
|
|
5
|
+
import type { ToolBarProps } from "@ant-design/pro-table/es/components/ToolBar";
|
|
6
|
+
import type { AlertRenderType } from "@ant-design/pro-table/es/components/Alert";
|
|
7
|
+
import type { TableProps as RcTableProps } from "rc-table/lib/Table";
|
|
8
|
+
import type { SearchConfig } from "@ant-design/pro-table/es/components/Form/FormRender";
|
|
9
|
+
import type { TableSticky } from "rc-table/lib/interface";
|
|
10
|
+
/**
|
|
11
|
+
* 扩展操作类型
|
|
12
|
+
*/
|
|
13
|
+
export type RbActionType = {
|
|
14
|
+
/**
|
|
15
|
+
* 主动开启表格等待
|
|
16
|
+
*/
|
|
17
|
+
startLoading: () => void;
|
|
18
|
+
/**
|
|
19
|
+
* 主动关闭表格等待
|
|
20
|
+
*/
|
|
21
|
+
finishLoading: () => void;
|
|
22
|
+
} & ActionType;
|
|
23
|
+
/**
|
|
24
|
+
* 数据表格属性
|
|
25
|
+
*/
|
|
26
|
+
export type RbDataTableProps<DataSource, U, ValueType = 'text'> = {
|
|
27
|
+
/**
|
|
28
|
+
* 行主键,默认:guid
|
|
29
|
+
*/
|
|
30
|
+
rowKey?: string;
|
|
31
|
+
/**
|
|
32
|
+
* 字段配置
|
|
33
|
+
*/
|
|
34
|
+
columns?: ProColumns<DataSource, ValueType>[];
|
|
35
|
+
/**
|
|
36
|
+
* 查询参数配置
|
|
37
|
+
*/
|
|
38
|
+
params: U;
|
|
39
|
+
/**
|
|
40
|
+
* 远程数据请求
|
|
41
|
+
*
|
|
42
|
+
* @param params 参数
|
|
43
|
+
* @param sort 排序
|
|
44
|
+
* @param filter 过滤
|
|
45
|
+
*/
|
|
46
|
+
request: (params: U & {
|
|
47
|
+
pageSize?: number;
|
|
48
|
+
current?: number;
|
|
49
|
+
keyword?: string;
|
|
50
|
+
}, sort: Record<string, SortOrder>, filter: Record<string, (string | number)[] | null>) => Promise<Partial<RequestData<DataSource>>>;
|
|
51
|
+
/**
|
|
52
|
+
* Table action 的引用,便于自定义触发
|
|
53
|
+
*/
|
|
54
|
+
actionRef: Ref<RbActionType | undefined>;
|
|
55
|
+
/**
|
|
56
|
+
* 工具栏渲染
|
|
57
|
+
*/
|
|
58
|
+
toolBarRender?: ToolBarProps<DataSource>['toolBarRender'] | false;
|
|
59
|
+
/**
|
|
60
|
+
* 行选中
|
|
61
|
+
*/
|
|
62
|
+
rowSelection?: (TableProps<DataSource>['rowSelection'] & {
|
|
63
|
+
alwaysShowAlert?: boolean;
|
|
64
|
+
}) | false;
|
|
65
|
+
/**
|
|
66
|
+
* 表格警告栏
|
|
67
|
+
*/
|
|
68
|
+
tableAlertOptionRender?: AlertRenderType<DataSource>;
|
|
69
|
+
/**
|
|
70
|
+
* 缓存Key后缀,控制同一个URL下的两张表不起冲突
|
|
71
|
+
*/
|
|
72
|
+
cacheSuffix?: string;
|
|
73
|
+
/**
|
|
74
|
+
* 滚动条
|
|
75
|
+
*/
|
|
76
|
+
scroll?: RcTableProps<ValueType>['scroll'] & {
|
|
77
|
+
scrollToFirstRowOnChange?: boolean;
|
|
78
|
+
};
|
|
79
|
+
/**
|
|
80
|
+
* 搜索
|
|
81
|
+
*/
|
|
82
|
+
search?: false | SearchConfig;
|
|
83
|
+
/**
|
|
84
|
+
* 边框
|
|
85
|
+
*/
|
|
86
|
+
bordered?: boolean;
|
|
87
|
+
/**
|
|
88
|
+
* 分页
|
|
89
|
+
*/
|
|
90
|
+
pagination?: boolean;
|
|
91
|
+
/**
|
|
92
|
+
* 表头
|
|
93
|
+
*/
|
|
94
|
+
headerTitle?: ReactNode;
|
|
95
|
+
/**
|
|
96
|
+
* 数据源
|
|
97
|
+
*/
|
|
98
|
+
dataSource?: RcTableProps<DataSource>['data'];
|
|
99
|
+
/**
|
|
100
|
+
* 粘性布局
|
|
101
|
+
*/
|
|
102
|
+
sticky?: boolean | TableSticky;
|
|
103
|
+
};
|
package/build/index.d.ts
ADDED