@regenbio/regenbio-components-react 1.4.41 → 1.4.43

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, ProColumns, RequestData } from "@ant-design/pro-components";
2
- import React, { 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 { 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
- params?: any;
24
+ className?: string;
45
25
  /**
46
- * 远程数据请求
47
- *
48
- * @param params 参数
49
- * @param sort 排序
50
- * @param filter 过滤
26
+ * 响应式状态
51
27
  */
52
- request: (params: U & {
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
  };
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ import { RbTableLineTitleProps } from "./type";
3
+ /**
4
+ * RB 表格行标题
5
+ *
6
+ * @param props 参数配置
7
+ * @constructor
8
+ */
9
+ declare const RbTableLineTitle: React.FC<RbTableLineTitleProps>;
10
+ export default RbTableLineTitle;
@@ -0,0 +1,11 @@
1
+ import React from "react";
2
+ import { EllipsisConfig } from "antd/es/typography/Base";
3
+ /**
4
+ * 表格行标题属性
5
+ */
6
+ export type RbTableLineTitleProps = {
7
+ sign?: string;
8
+ children: React.ReactNode;
9
+ ellipsis?: EllipsisConfig;
10
+ onClick?: () => void;
11
+ };
package/build/index.d.ts CHANGED
@@ -36,6 +36,8 @@ import RbAuthFrame from "./components/Other/LoginLoad/AuthFrame";
36
36
  import { RbAuthFrameProps } from "./components/Other/LoginLoad/AuthFrame/type";
37
37
  import RbBindFrame from "./components/Other/LoginLoad/BindFrame";
38
38
  import { RbBindFrameProps } from "./components/Other/LoginLoad/BindFrame/type";
39
+ import RbTableLineTitle from "./components/Other/TableLineTitle/index";
40
+ import { RbTableLineTitleProps } from "./components/Other/TableLineTitle/type";
39
41
  import { RbGlobalContext, useGlobalState } from "./components/Other/GlobalContext";
40
42
  import DbUtil from "./services/utils/dbUtil";
41
43
  import ObjectUtil from "./services/utils/objectUtil";
@@ -102,6 +104,8 @@ export { RbThemeSetter };
102
104
  export { RbAuthFrame, RbBindFrame };
103
105
  export type { RbAuthFrameProps, RbBindFrameProps };
104
106
  export { RbGlobalContext, useGlobalState };
107
+ export { RbTableLineTitle };
108
+ export type { RbTableLineTitleProps };
105
109
  export { DbUtil, ObjectUtil, EventUtil, StorageUtil, StringUtil, NumberUtil, RandomUtil, UnicodeUtil, UploadUtil, RequestUtil };
106
110
  export { EventEnum, StorageEnum };
107
111
  export { CommonConstant, IconConstant, DbConstant };
@@ -133,5 +137,6 @@ declare const _default: {
133
137
  RbBindFrame: React.FC<RbBindFrameProps>;
134
138
  RbGlobalContext: Context<RbGlobalStateType>;
135
139
  RbDraggableUploader: React.FC<RbDraggableUploaderProps>;
140
+ RbTableLineTitle: React.FC<RbTableLineTitleProps>;
136
141
  };
137
142
  export default _default;