@zat-design/sisyphus-react 3.11.14-beta.5 → 3.11.14-beta.7
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/dist/index.esm.css +22 -15
- package/dist/less.esm.css +22 -15
- package/es/ProAction/index.d.ts +2 -2
- package/es/ProAction/propsType.d.ts +16 -10
- package/es/ProConfigProvider/index.d.ts +6 -6
- package/es/ProDownload/index.d.ts +2 -2
- package/es/ProDownload/propsType.d.ts +2 -1
- package/es/ProEditLabel/components/RenderProForm.d.ts +2 -2
- package/es/ProEditLabel/index.d.ts +2 -2
- package/es/ProEditLabel/propsType.d.ts +133 -6
- package/es/ProEditLabel/style/index.less +24 -25
- package/es/ProEnum/components/Group.d.ts +2 -2
- package/es/ProEnum/components/Tag.d.ts +2 -2
- package/es/ProEnum/hooks/useEnumRequest.d.ts +2 -2
- package/es/ProEnum/index.d.ts +2 -2
- package/es/ProEnum/propsType.d.ts +228 -39
- package/es/ProEnum/propsType.js +0 -6
- package/es/ProEnum/utils/index.d.ts +1 -1
- package/es/ProForm/components/combination/ProCascader/index.d.ts +1 -2
- package/es/ProForm/components/combination/ProCascader/propsType.d.ts +2 -1
- package/es/ProForm/components/combination/ProModalSelect/propsType.d.ts +3 -2
- package/es/ProLayout/components/Layout/Header/index.d.ts +2 -2
- package/es/ProLayout/components/Layout/Menu/index.d.ts +2 -2
- package/es/ProLayout/components/Layout/Notice/index.d.ts +2 -2
- package/es/ProLayout/components/ProCollapse/PropTypes.d.ts +4 -2
- package/es/ProLayout/components/ProCollapse/index.d.ts +2 -2
- package/es/ProLayout/components/ProFooter/PropTypes.d.ts +2 -1
- package/es/ProLayout/components/ProFooter/index.d.ts +2 -2
- package/es/ProLayout/components/ProHeader/PropTypes.d.ts +13 -9
- package/es/ProLayout/components/ProHeader/index.d.ts +2 -2
- package/es/ProLayout/index.d.ts +5 -5
- package/es/ProLayout/index.js +6 -2
- package/es/ProLayout/propTypes.d.ts +62 -21
- package/es/ProLayout/utils/index.d.ts +2 -2
- package/es/ProSelect/index.d.ts +3 -3
- package/es/ProSelect/propsType.d.ts +139 -29
- package/es/ProTable/style/index.less +3 -0
- package/es/ProTabs/index.d.ts +2 -2
- package/es/ProTabs/index.js +4 -4
- package/es/ProTabs/propType.d.ts +66 -9
- package/es/ProThemeTools/index.d.ts +2 -2
- package/es/ProThemeTools/propsType.d.ts +136 -14
- package/es/ProUpload/components/ButtonRender.d.ts +2 -2
- package/es/ProUpload/components/DraggableUploadListItem.d.ts +2 -2
- package/es/ProUpload/components/Example.d.ts +2 -2
- package/es/ProUpload/components/ImageRender.d.ts +2 -2
- package/es/ProUpload/index.d.ts +2 -2
- package/es/ProUpload/index.js +0 -7
- package/es/ProUpload/propsType.d.ts +59 -8
- package/es/ProWaterMark/index.d.ts +2 -2
- package/es/ProWaterMark/propsType.d.ts +2 -1
- package/lib/ProAction/index.d.ts +2 -2
- package/lib/ProAction/propsType.d.ts +16 -10
- package/lib/ProConfigProvider/index.d.ts +6 -6
- package/lib/ProDownload/index.d.ts +2 -2
- package/lib/ProDownload/propsType.d.ts +2 -1
- package/lib/ProEditLabel/components/RenderProForm.d.ts +2 -2
- package/lib/ProEditLabel/index.d.ts +2 -2
- package/lib/ProEditLabel/propsType.d.ts +133 -6
- package/lib/ProEditLabel/style/index.less +24 -25
- package/lib/ProEnum/components/Group.d.ts +2 -2
- package/lib/ProEnum/components/Tag.d.ts +2 -2
- package/lib/ProEnum/hooks/useEnumRequest.d.ts +2 -2
- package/lib/ProEnum/index.d.ts +2 -2
- package/lib/ProEnum/propsType.d.ts +228 -39
- package/lib/ProEnum/propsType.js +1 -7
- package/lib/ProEnum/utils/index.d.ts +1 -1
- package/lib/ProForm/components/combination/ProCascader/index.d.ts +1 -2
- package/lib/ProForm/components/combination/ProCascader/propsType.d.ts +2 -1
- package/lib/ProForm/components/combination/ProModalSelect/propsType.d.ts +3 -2
- package/lib/ProLayout/components/Layout/Header/index.d.ts +2 -2
- package/lib/ProLayout/components/Layout/Menu/index.d.ts +2 -2
- package/lib/ProLayout/components/Layout/Notice/index.d.ts +2 -2
- package/lib/ProLayout/components/ProCollapse/PropTypes.d.ts +4 -2
- package/lib/ProLayout/components/ProCollapse/index.d.ts +2 -2
- package/lib/ProLayout/components/ProFooter/PropTypes.d.ts +2 -1
- package/lib/ProLayout/components/ProFooter/index.d.ts +2 -2
- package/lib/ProLayout/components/ProHeader/PropTypes.d.ts +13 -9
- package/lib/ProLayout/components/ProHeader/index.d.ts +2 -2
- package/lib/ProLayout/index.d.ts +5 -5
- package/lib/ProLayout/index.js +6 -2
- package/lib/ProLayout/propTypes.d.ts +62 -21
- package/lib/ProLayout/utils/index.d.ts +2 -2
- package/lib/ProSelect/index.d.ts +3 -3
- package/lib/ProSelect/propsType.d.ts +139 -29
- package/lib/ProTable/style/index.less +3 -0
- package/lib/ProTabs/index.d.ts +2 -2
- package/lib/ProTabs/index.js +4 -4
- package/lib/ProTabs/propType.d.ts +66 -9
- package/lib/ProThemeTools/index.d.ts +2 -2
- package/lib/ProThemeTools/propsType.d.ts +136 -14
- package/lib/ProUpload/components/ButtonRender.d.ts +2 -2
- package/lib/ProUpload/components/DraggableUploadListItem.d.ts +2 -2
- package/lib/ProUpload/components/Example.d.ts +2 -2
- package/lib/ProUpload/components/ImageRender.d.ts +2 -2
- package/lib/ProUpload/index.d.ts +2 -2
- package/lib/ProUpload/index.js +0 -7
- package/lib/ProUpload/propsType.d.ts +59 -8
- package/lib/ProWaterMark/index.d.ts +2 -2
- package/lib/ProWaterMark/propsType.d.ts +2 -1
- package/package.json +1 -1
@@ -1,6 +1,10 @@
|
|
1
1
|
import { CSSProperties, ReactNode } from 'react';
|
2
2
|
import { ProWaterMarkProps } from '../ProWaterMark/propsType';
|
3
|
-
export interface
|
3
|
+
export interface MenusType {
|
4
|
+
/**
|
5
|
+
* @description 菜单ID
|
6
|
+
* @default -
|
7
|
+
*/
|
4
8
|
id?: number;
|
5
9
|
/**
|
6
10
|
* @description 菜单唯一code
|
@@ -44,7 +48,7 @@ export interface MenusProps {
|
|
44
48
|
sort?: number | undefined | null;
|
45
49
|
/**
|
46
50
|
* @description 是否隐藏菜单
|
47
|
-
* @default
|
51
|
+
* @default false
|
48
52
|
*/
|
49
53
|
hideInMenu?: boolean;
|
50
54
|
/**
|
@@ -62,9 +66,12 @@ export interface MenusProps {
|
|
62
66
|
* @default -
|
63
67
|
*/
|
64
68
|
type?: string;
|
69
|
+
/**
|
70
|
+
* @description 允许扩展字段
|
71
|
+
*/
|
65
72
|
[key: string]: any;
|
66
73
|
}
|
67
|
-
export interface
|
74
|
+
export interface DataSourceType {
|
68
75
|
/**
|
69
76
|
* @description 用户信息
|
70
77
|
* @default -
|
@@ -72,15 +79,22 @@ export interface DataSourceProps {
|
|
72
79
|
userInfo?: any;
|
73
80
|
/**
|
74
81
|
* @description 处理后一级菜单详情
|
75
|
-
* @default
|
82
|
+
* @default []
|
76
83
|
*/
|
77
|
-
menus?:
|
84
|
+
menus?: MenusType[];
|
78
85
|
}
|
86
|
+
/**
|
87
|
+
* @description 主题枚举类型
|
88
|
+
*/
|
89
|
+
type themeEnum = 'light' | 'dark';
|
90
|
+
/**
|
91
|
+
* @description 是否带有菜单界面的配置
|
92
|
+
*/
|
79
93
|
type pureKey = boolean | {
|
80
94
|
topMenu?: boolean;
|
81
95
|
leftMenu?: boolean;
|
82
96
|
};
|
83
|
-
export interface
|
97
|
+
export interface ProLayoutType {
|
84
98
|
/**
|
85
99
|
* @description 左侧logo
|
86
100
|
* @default -
|
@@ -88,7 +102,7 @@ export interface ProLayoutProps {
|
|
88
102
|
logo?: ReactNode | string;
|
89
103
|
/**
|
90
104
|
* @description 类名
|
91
|
-
* @default
|
105
|
+
* @default ""
|
92
106
|
*/
|
93
107
|
className?: string;
|
94
108
|
/**
|
@@ -130,56 +144,66 @@ export interface ProLayoutProps {
|
|
130
144
|
* @description 数据源
|
131
145
|
* @default -
|
132
146
|
*/
|
133
|
-
dataSource?:
|
147
|
+
dataSource?: DataSourceType | Partial<MenusType>;
|
134
148
|
/**
|
135
149
|
* @description 是否折叠
|
136
|
-
* @default
|
150
|
+
* @default false
|
137
151
|
*/
|
138
152
|
collapsed?: boolean;
|
139
153
|
/**
|
140
154
|
* @description 菜单拼接路径前缀
|
141
|
-
* @default
|
155
|
+
* @default ""
|
142
156
|
*/
|
143
157
|
pathPrefix?: string;
|
144
158
|
/**
|
145
159
|
* @description 是否带有菜单界面,true不带,只显示content内容
|
146
|
-
* @default
|
160
|
+
* @default false
|
147
161
|
*/
|
148
162
|
pure?: pureKey;
|
149
163
|
/**
|
150
164
|
* @description 头部区域高度
|
151
|
-
* @default
|
165
|
+
* @default 48
|
152
166
|
*/
|
153
167
|
headerHeight?: number;
|
154
168
|
/**
|
155
169
|
* @description 内容区域样式
|
156
|
-
* @default
|
170
|
+
* @default {}
|
157
171
|
*/
|
158
172
|
contentStyle?: CSSProperties;
|
159
173
|
/**
|
160
174
|
* @description 水印配置
|
161
|
-
* @default
|
175
|
+
* @default {}
|
162
176
|
*/
|
163
177
|
waterMarkProps?: ProWaterMarkProps;
|
164
178
|
/**
|
165
179
|
* @description 折叠回调事件
|
166
180
|
* @default -
|
167
181
|
*/
|
168
|
-
onCollapsedChange?: (collapsed:
|
182
|
+
onCollapsedChange?: (collapsed: boolean) => void;
|
169
183
|
/**
|
170
184
|
* @description 规定在何处打开被链接文档
|
171
|
-
*
|
172
|
-
* _parent
|
173
|
-
* _self
|
174
|
-
* _top
|
185
|
+
* @default "_self"
|
175
186
|
*/
|
176
187
|
target?: '_blank' | '_parent' | '_self' | '_top';
|
188
|
+
/**
|
189
|
+
* @description 主题
|
190
|
+
* @default "light"
|
191
|
+
*/
|
192
|
+
theme?: themeEnum;
|
193
|
+
/**
|
194
|
+
* @description 子元素
|
195
|
+
* @default -
|
196
|
+
*/
|
197
|
+
children?: ReactNode;
|
198
|
+
/**
|
199
|
+
* @description 允许扩展字段
|
200
|
+
*/
|
177
201
|
[key: string]: any;
|
178
202
|
}
|
179
|
-
export interface
|
203
|
+
export interface ProLayoutStatesType {
|
180
204
|
/**
|
181
205
|
* @description 是否折叠
|
182
|
-
* @default
|
206
|
+
* @default false
|
183
207
|
*/
|
184
208
|
collapsed?: boolean;
|
185
209
|
/**
|
@@ -187,6 +211,23 @@ export interface ProLayoutStates {
|
|
187
211
|
* @default -
|
188
212
|
*/
|
189
213
|
notice?: ReactNode | string;
|
214
|
+
/**
|
215
|
+
* @description 菜单列表
|
216
|
+
* @default []
|
217
|
+
*/
|
218
|
+
menus?: MenusType[];
|
219
|
+
/**
|
220
|
+
* @description 选中的路径
|
221
|
+
* @default ""
|
222
|
+
*/
|
223
|
+
selectedPath?: string;
|
224
|
+
/**
|
225
|
+
* @description 允许扩展字段
|
226
|
+
*/
|
190
227
|
[key: string]: any;
|
191
228
|
}
|
229
|
+
export type MenusProps = MenusType;
|
230
|
+
export type DataSourceProps = DataSourceType;
|
231
|
+
export type ProLayoutProps = ProLayoutType;
|
232
|
+
export type ProLayoutStates = ProLayoutStatesType;
|
192
233
|
export {};
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import type {
|
1
|
+
import type { MenusType } from '../propTypes';
|
2
2
|
/**
|
3
3
|
* 通过URL获取对应keyIdPath
|
4
4
|
* @param menus 菜单数据
|
@@ -17,7 +17,7 @@ export declare const transformMenu: (menuData: any[], pathPrefix: string) => any
|
|
17
17
|
* @param data 菜单数据源
|
18
18
|
* @returns []
|
19
19
|
*/
|
20
|
-
export declare const transformMenus: (data:
|
20
|
+
export declare const transformMenus: (data: MenusType, pathPrefix: string) => any[] | MenusType;
|
21
21
|
/**
|
22
22
|
* 获取URL中的search参数
|
23
23
|
* @param name 参数key
|
package/es/ProSelect/index.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
import {
|
2
|
+
import type { PropSelectType, ProSelectActionType } from './propsType';
|
3
3
|
import './index.less';
|
4
|
-
export declare const ProSelect: (props:
|
5
|
-
declare const _default: React.ForwardRefExoticComponent<
|
4
|
+
export declare const ProSelect: (props: PropSelectType, ref: React.Ref<ProSelectActionType> | undefined) => import("react/jsx-runtime").JSX.Element;
|
5
|
+
declare const _default: React.ForwardRefExoticComponent<PropSelectType & React.RefAttributes<ProSelectActionType>>;
|
6
6
|
export default _default;
|
@@ -2,65 +2,175 @@ import { ReactNode } from 'react';
|
|
2
2
|
import type { SelectProps } from 'antd';
|
3
3
|
import { Service, Options, Result } from 'ahooks/lib/useRequest/src/types';
|
4
4
|
import { ProFormOtherProps } from '../ProForm/propsType';
|
5
|
-
|
5
|
+
/**
|
6
|
+
* @description 数据选项类型
|
7
|
+
*/
|
8
|
+
export interface DataOptionType {
|
9
|
+
/**
|
10
|
+
* @description 展示标签
|
11
|
+
* @default -
|
12
|
+
*/
|
6
13
|
label?: string;
|
14
|
+
/**
|
15
|
+
* @description 选项值
|
16
|
+
* @default -
|
17
|
+
*/
|
7
18
|
value?: string | number;
|
19
|
+
/**
|
20
|
+
* @description 允许扩展字段
|
21
|
+
*/
|
8
22
|
[key: string]: any;
|
9
23
|
}
|
10
|
-
|
11
|
-
|
24
|
+
/**
|
25
|
+
* @description 选择框属性类型
|
26
|
+
*/
|
27
|
+
export interface PropSelectType extends Omit<SelectProps, 'onSearch'> {
|
28
|
+
/**
|
29
|
+
* @description 是否查看模式
|
30
|
+
* @default false
|
31
|
+
*/
|
12
32
|
isView?: boolean;
|
13
|
-
/**
|
33
|
+
/**
|
34
|
+
* @description 是否开启组件在可视区域中才发起useRequest请求
|
35
|
+
* @default false
|
36
|
+
*/
|
14
37
|
viewportReady?: boolean;
|
15
|
-
/**
|
38
|
+
/**
|
39
|
+
* @description 默认数组第一项
|
40
|
+
* @default false
|
41
|
+
*/
|
16
42
|
defaultOne?: boolean;
|
17
|
-
/**
|
18
|
-
|
19
|
-
|
43
|
+
/**
|
44
|
+
* @description 数据源
|
45
|
+
* @default -
|
46
|
+
*/
|
47
|
+
dataSource?: DataOptionType[];
|
48
|
+
/**
|
49
|
+
* @description list场景中过滤掉已选择的值
|
50
|
+
* @default false
|
51
|
+
*/
|
20
52
|
filterInList?: boolean;
|
21
|
-
/**
|
53
|
+
/**
|
54
|
+
* @deprecated 兼容 2.0 版本、3.0 使用view 模式
|
55
|
+
* @default -
|
56
|
+
*/
|
22
57
|
defaultDisableValue?: string;
|
23
|
-
/**
|
58
|
+
/**
|
59
|
+
* @description 是否展示 tooltip、当 label 特别长的时候使用
|
60
|
+
* @default false
|
61
|
+
*/
|
24
62
|
tooltip?: boolean;
|
25
|
-
/**
|
63
|
+
/**
|
64
|
+
* @description 是否展示 code-label 形式
|
65
|
+
* @default false
|
66
|
+
*/
|
26
67
|
showCodeName?: boolean;
|
27
|
-
/**
|
68
|
+
/**
|
69
|
+
* @description 集成表单 form 的属性
|
70
|
+
* @default -
|
71
|
+
*/
|
28
72
|
otherProps?: ProFormOtherProps;
|
29
|
-
/**
|
73
|
+
/**
|
74
|
+
* @description 下拉框滚动是否跟随父级
|
75
|
+
* @default false
|
76
|
+
*/
|
30
77
|
scrollFollowParent?: boolean;
|
31
|
-
/**
|
78
|
+
/**
|
79
|
+
* @description 远程请求接口
|
80
|
+
* @default -
|
81
|
+
*/
|
32
82
|
useRequest?: {
|
83
|
+
/**
|
84
|
+
* @description 请求服务函数
|
85
|
+
*/
|
33
86
|
service?: Service<any, any>;
|
87
|
+
/**
|
88
|
+
* @description 请求选项
|
89
|
+
*/
|
34
90
|
options?: Options<any, any>;
|
35
91
|
};
|
36
92
|
/**
|
37
93
|
* @deprecated 兼容 2.0 版本、3.0 使用 transformResponse
|
38
|
-
* @param data
|
39
|
-
* @param setSelectList
|
94
|
+
* @param data 数据
|
95
|
+
* @param setSelectList 设置选择列表的函数
|
40
96
|
* @returns
|
41
97
|
*/
|
42
98
|
updateDataSource?: (data: any, setSelectList: any) => void;
|
43
|
-
/**
|
44
|
-
|
45
|
-
|
99
|
+
/**
|
100
|
+
* @description 格式化数据
|
101
|
+
* @param data 后台返回的数据
|
102
|
+
* @returns 格式化后的数据选项
|
103
|
+
*/
|
104
|
+
transformResponse?: (data: any) => DataOptionType[];
|
105
|
+
/**
|
106
|
+
* @description 点击搜索执行
|
107
|
+
* @param value 搜索值
|
108
|
+
* @param useRequest 请求实例
|
109
|
+
*/
|
46
110
|
onSearch?: (value: string, useRequest: Result<any, any>) => void;
|
47
|
-
/**
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
111
|
+
/**
|
112
|
+
* @description 自定义展示
|
113
|
+
* @param value 数据选项
|
114
|
+
* @returns 自定义渲染内容
|
115
|
+
*/
|
116
|
+
optionRender?: (value: DataOptionType) => string | ReactNode;
|
117
|
+
/**
|
118
|
+
* @description 用来转换修改value值 和 getValueProps配合使用
|
119
|
+
* @param value 数据选项
|
120
|
+
* @returns 转换后的值
|
121
|
+
*/
|
122
|
+
getChangeValue?: (value: DataOptionType) => any;
|
123
|
+
/**
|
124
|
+
* @description 用来转换传入的value值 getChangeValue配合使用
|
125
|
+
* @param value 数据选项
|
126
|
+
* @returns 转换后的值属性
|
127
|
+
*/
|
128
|
+
getValueProps?: (value: DataOptionType) => any;
|
53
129
|
}
|
54
|
-
|
55
|
-
|
130
|
+
/**
|
131
|
+
* @description ProSelect操作接口类型
|
132
|
+
*/
|
133
|
+
export interface ProSelectActionType {
|
134
|
+
/**
|
135
|
+
* @description 实例方法、根据 code | code[] 批量获取数据
|
136
|
+
* @param code 代码或代码数组
|
137
|
+
* @param key 可选键名
|
138
|
+
* @returns 获取的数据
|
139
|
+
*/
|
56
140
|
getValueObject: (code: string | string[], key?: string) => any;
|
57
|
-
/**
|
141
|
+
/**
|
142
|
+
* @description 获取发生请求的 useRequest 的 ref
|
143
|
+
*/
|
58
144
|
useRequestRef: Result<any, any>;
|
59
145
|
}
|
60
|
-
|
146
|
+
/**
|
147
|
+
* @description 响应数据接口类型
|
148
|
+
*/
|
149
|
+
export interface ResponseDataType {
|
150
|
+
/**
|
151
|
+
* @description 状态码
|
152
|
+
*/
|
61
153
|
status: number;
|
154
|
+
/**
|
155
|
+
* @description 消息
|
156
|
+
*/
|
62
157
|
message: string;
|
158
|
+
/**
|
159
|
+
* @description 数据
|
160
|
+
*/
|
63
161
|
data: any;
|
162
|
+
/**
|
163
|
+
* @description 是否成功
|
164
|
+
* @default -
|
165
|
+
*/
|
64
166
|
success?: boolean;
|
167
|
+
/**
|
168
|
+
* @description 代码
|
169
|
+
* @default -
|
170
|
+
*/
|
65
171
|
code?: number;
|
66
172
|
}
|
173
|
+
export type DataOption = DataOptionType;
|
174
|
+
export type PropSelectProps = PropSelectType;
|
175
|
+
export type ProSelectAction = ProSelectActionType;
|
176
|
+
export type ResponseData = ResponseDataType;
|
package/es/ProTabs/index.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
import type {
|
3
|
-
declare const _default: React.ForwardRefExoticComponent<Omit<
|
2
|
+
import type { ProTabsType } from './propType';
|
3
|
+
declare const _default: React.ForwardRefExoticComponent<Omit<ProTabsType, "ref"> & React.RefAttributes<unknown>>;
|
4
4
|
export default _default;
|
package/es/ProTabs/index.js
CHANGED
@@ -59,12 +59,12 @@ var ProTabs = function ProTabs(props, ref) {
|
|
59
59
|
total: itemProps.total,
|
60
60
|
label: itemProps.label,
|
61
61
|
icon: itemProps.icon,
|
62
|
-
mode: mode
|
62
|
+
mode: mode,
|
63
|
+
title: itemProps.title || itemProps.label,
|
64
|
+
loading: fetchFunction === null || fetchFunction === void 0 ? void 0 : fetchFunction.loading
|
63
65
|
};
|
64
66
|
return _objectSpread(_objectSpread({}, omit(itemProps, ['total', 'label', 'icon'])), {}, {
|
65
|
-
label: _jsx(Card, _objectSpread({
|
66
|
-
loading: fetchFunction === null || fetchFunction === void 0 ? void 0 : fetchFunction.loading
|
67
|
-
}, cardItemProps))
|
67
|
+
label: _jsx(Card, _objectSpread({}, cardItemProps))
|
68
68
|
});
|
69
69
|
});
|
70
70
|
}, [selectList, fetchFunction === null || fetchFunction === void 0 ? void 0 : fetchFunction.loading]);
|
package/es/ProTabs/propType.d.ts
CHANGED
@@ -1,36 +1,93 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import type { TabsProps } from 'antd';
|
3
3
|
import { Service, Options, Result } from 'ahooks/lib/useRequest/src/types';
|
4
|
-
export interface
|
4
|
+
export interface CardType {
|
5
|
+
/**
|
6
|
+
* @description 卡片标题
|
7
|
+
* @default -
|
8
|
+
*/
|
9
|
+
title: string | React.ReactNode;
|
10
|
+
/**
|
11
|
+
* @description 卡片数量
|
12
|
+
* @default -
|
13
|
+
*/
|
5
14
|
total: number;
|
15
|
+
/**
|
16
|
+
* @description 卡片标签
|
17
|
+
* @default -
|
18
|
+
*/
|
6
19
|
label: string | React.ReactNode;
|
20
|
+
/**
|
21
|
+
* @description 卡片图标
|
22
|
+
* @default -
|
23
|
+
*/
|
7
24
|
icon: React.ReactNode;
|
25
|
+
/**
|
26
|
+
* @description 卡片模式
|
27
|
+
* @default card
|
28
|
+
*/
|
8
29
|
mode?: TabModeEnum;
|
30
|
+
/**
|
31
|
+
* @description 卡片是否加载中
|
32
|
+
* @default false
|
33
|
+
*/
|
9
34
|
loading?: boolean;
|
10
35
|
[key: string]: any;
|
11
36
|
}
|
12
|
-
export interface
|
37
|
+
export interface ProTabsItemType extends CardType {
|
38
|
+
/**
|
39
|
+
* @description 卡片唯一key
|
40
|
+
* @default -
|
41
|
+
*/
|
13
42
|
key: string;
|
43
|
+
/**
|
44
|
+
* @description 卡片内容
|
45
|
+
* @default -
|
46
|
+
*/
|
14
47
|
children?: React.ReactNode;
|
48
|
+
/**
|
49
|
+
* @description 卡片是否禁用
|
50
|
+
* @default false
|
51
|
+
*/
|
15
52
|
disabled?: boolean;
|
16
53
|
[key: string]: any;
|
17
54
|
}
|
18
|
-
export interface
|
19
|
-
/**
|
55
|
+
export interface ProTabsActionType {
|
56
|
+
/**
|
57
|
+
* @description 获取发生请求的 useRequest 的 ref
|
58
|
+
* @default -
|
59
|
+
*/
|
20
60
|
useRequestRef: Result<any, any>;
|
21
61
|
}
|
22
62
|
export type TabModeEnum = 'card' | 'line';
|
23
|
-
export interface
|
24
|
-
|
25
|
-
|
63
|
+
export interface ProTabsType extends Omit<TabsProps, 'items' | 'onChange'> {
|
64
|
+
/**
|
65
|
+
* @description 卡片数据源
|
66
|
+
* @default -
|
67
|
+
*/
|
68
|
+
dataSource: ProTabsItemType[];
|
69
|
+
/**
|
70
|
+
* @description 是否开启tab切换查询
|
71
|
+
* @default false
|
72
|
+
*/
|
26
73
|
tabSearch?: boolean;
|
27
74
|
onChange?: (activeKey: string, useRequest: Result<any, any>) => void;
|
28
|
-
/**
|
75
|
+
/**
|
76
|
+
* @description card:卡片模式 tab tab模式
|
77
|
+
* @default card
|
78
|
+
*/
|
29
79
|
mode?: TabModeEnum;
|
30
|
-
/**
|
80
|
+
/**
|
81
|
+
* @description 远程请求接口
|
82
|
+
* @default -
|
83
|
+
*/
|
31
84
|
useRequest?: {
|
32
85
|
service: Service<any, any>;
|
33
86
|
options?: Options<any, any>;
|
34
87
|
};
|
35
88
|
[key: string]: any;
|
36
89
|
}
|
90
|
+
export type ProTabsProps = ProTabsType;
|
91
|
+
export type ProTabsItemsProps = ProTabsItemType;
|
92
|
+
export type ProTabsAction = ProTabsActionType;
|
93
|
+
export type CardProps = CardType;
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import type {
|
1
|
+
import type { ProThemeToolsType } from './propsType';
|
2
2
|
declare const ProThemeTools: {
|
3
|
-
({ size, className, cacheTime, color, mode, iconFollowTheme, prefixCls, tableBorder, tableStripe, theme, onChange, ...props }:
|
3
|
+
({ size, className, cacheTime, color, mode, iconFollowTheme, prefixCls, tableBorder, tableStripe, theme, onChange, ...props }: ProThemeToolsType): import("react/jsx-runtime").JSX.Element;
|
4
4
|
defaultProps: {
|
5
5
|
size: number;
|
6
6
|
mode: string;
|