@regenbio/regenbio-components-react 1.4.41 → 1.4.42
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,14 +1,6 @@
|
|
|
1
|
-
import { ActionType
|
|
2
|
-
import
|
|
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 { ExpandableConfig, TableSticky } from "rc-table/lib/interface";
|
|
1
|
+
import { ActionType } from "@ant-design/pro-components";
|
|
2
|
+
import { Ref } from "react";
|
|
10
3
|
import { ProTableProps } from "@ant-design/pro-table";
|
|
11
|
-
import type { ListToolBarProps } from "@ant-design/pro-table/es/components/ListToolBar";
|
|
12
4
|
/**
|
|
13
5
|
* 扩展操作类型
|
|
14
6
|
*/
|
|
@@ -25,114 +17,27 @@ export type RbActionType = {
|
|
|
25
17
|
/**
|
|
26
18
|
* 数据表格属性
|
|
27
19
|
*/
|
|
28
|
-
export type RbDataTableProps<DataSource, U, ValueType = 'text'> = {
|
|
20
|
+
export type RbDataTableProps<DataSource, U, ValueType = 'text'> = ProTableProps<DataSource, U, ValueType> & {
|
|
29
21
|
/**
|
|
30
|
-
*
|
|
31
|
-
*/
|
|
32
|
-
responsive?: boolean;
|
|
33
|
-
/**
|
|
34
|
-
* 行主键,默认:guid
|
|
35
|
-
*/
|
|
36
|
-
rowKey?: string;
|
|
37
|
-
/**
|
|
38
|
-
* 字段配置
|
|
39
|
-
*/
|
|
40
|
-
columns?: ProColumns<DataSource, ValueType>[];
|
|
41
|
-
/**
|
|
42
|
-
* 查询参数配置
|
|
22
|
+
* 样式
|
|
43
23
|
*/
|
|
44
|
-
|
|
24
|
+
className?: string;
|
|
45
25
|
/**
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
* @param params 参数
|
|
49
|
-
* @param sort 排序
|
|
50
|
-
* @param filter 过滤
|
|
26
|
+
* 响应式状态
|
|
51
27
|
*/
|
|
52
|
-
|
|
53
|
-
pageSize?: number;
|
|
54
|
-
current?: number;
|
|
55
|
-
keyword?: string;
|
|
56
|
-
}, sort: Record<string, SortOrder>, filter: Record<string, (string | number)[] | null>) => Promise<Partial<RequestData<DataSource>>>;
|
|
28
|
+
responsive?: boolean;
|
|
57
29
|
/**
|
|
58
30
|
* Table action 的引用,便于自定义触发
|
|
59
31
|
*/
|
|
60
32
|
actionRef?: Ref<RbActionType | undefined>;
|
|
61
|
-
/**
|
|
62
|
-
* 工具栏渲染
|
|
63
|
-
*/
|
|
64
|
-
toolBarRender?: ToolBarProps<DataSource>['toolBarRender'] | false;
|
|
65
|
-
/**
|
|
66
|
-
* 行选中
|
|
67
|
-
*/
|
|
68
|
-
rowSelection?: (TableProps<DataSource>['rowSelection'] & {
|
|
69
|
-
alwaysShowAlert?: boolean;
|
|
70
|
-
}) | false;
|
|
71
|
-
/**
|
|
72
|
-
* 表格警告栏
|
|
73
|
-
*/
|
|
74
|
-
tableAlertOptionRender?: AlertRenderType<DataSource>;
|
|
75
33
|
/**
|
|
76
34
|
* 缓存 Key 后缀,控制同一个 URL 下的两张表不起冲突
|
|
77
35
|
*/
|
|
78
36
|
cacheSuffix?: string;
|
|
79
|
-
/**
|
|
80
|
-
* 滚动条
|
|
81
|
-
*/
|
|
82
|
-
scroll?: RcTableProps<ValueType>['scroll'] & {
|
|
83
|
-
scrollToFirstRowOnChange?: boolean;
|
|
84
|
-
};
|
|
85
|
-
/**
|
|
86
|
-
* 搜索
|
|
87
|
-
*/
|
|
88
|
-
search?: false | SearchConfig;
|
|
89
|
-
/**
|
|
90
|
-
* 边框
|
|
91
|
-
*/
|
|
92
|
-
bordered?: boolean;
|
|
93
|
-
/**
|
|
94
|
-
* 分页
|
|
95
|
-
*/
|
|
96
|
-
pagination?: false;
|
|
97
|
-
/**
|
|
98
|
-
* 工具栏渲染
|
|
99
|
-
*/
|
|
100
|
-
toolbar?: ListToolBarProps;
|
|
101
|
-
/**
|
|
102
|
-
* 表头
|
|
103
|
-
*/
|
|
104
|
-
headerTitle?: ReactNode;
|
|
105
|
-
/**
|
|
106
|
-
* 数据源
|
|
107
|
-
*/
|
|
108
|
-
dataSource?: RcTableProps<DataSource>['data'];
|
|
109
|
-
/**
|
|
110
|
-
* 粘性布局
|
|
111
|
-
*/
|
|
112
|
-
sticky?: boolean | TableSticky;
|
|
113
37
|
/**
|
|
114
38
|
* 等待状态改变监听
|
|
115
39
|
*
|
|
116
40
|
* @param loading 等待状态
|
|
117
41
|
*/
|
|
118
42
|
loadChange?: (loading: boolean) => void;
|
|
119
|
-
/**
|
|
120
|
-
* 幽灵模式
|
|
121
|
-
*/
|
|
122
|
-
ghost?: boolean;
|
|
123
|
-
/**
|
|
124
|
-
* 表格内容渲染
|
|
125
|
-
*
|
|
126
|
-
* @param props
|
|
127
|
-
* @param defaultDom
|
|
128
|
-
*/
|
|
129
|
-
tableRender?: (props: ProTableProps<DataSource, U, ValueType>, defaultDom: React.ReactNode, domList: {
|
|
130
|
-
toolbar: React.ReactNode | undefined;
|
|
131
|
-
alert: React.ReactNode | undefined;
|
|
132
|
-
table: React.ReactNode | undefined;
|
|
133
|
-
}) => React.ReactNode;
|
|
134
|
-
/**
|
|
135
|
-
* 配置展开属性
|
|
136
|
-
*/
|
|
137
|
-
expandable?: ExpandableConfig<DataSource>;
|
|
138
43
|
};
|