@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
@@ -7,7 +7,7 @@ export interface fieldNamesProps {
|
|
7
7
|
children?: string;
|
8
8
|
[key: string]: string;
|
9
9
|
}
|
10
|
-
export interface
|
10
|
+
export interface ProCascaderType {
|
11
11
|
className?: string;
|
12
12
|
mode?: 'address' | 'default';
|
13
13
|
isView?: boolean;
|
@@ -38,3 +38,4 @@ export interface ProCascaderProps {
|
|
38
38
|
scrollFollowParent?: boolean;
|
39
39
|
desensitization?: [number, number];
|
40
40
|
}
|
41
|
+
export type ProCascaderProps = ProCascaderType;
|
@@ -24,7 +24,7 @@ interface ConfigOption {
|
|
24
24
|
};
|
25
25
|
tableProps?: Record<string, any>;
|
26
26
|
}
|
27
|
-
interface
|
27
|
+
export interface ProModalSelectType {
|
28
28
|
configOption: ConfigOption;
|
29
29
|
onChange?: (value: number | string | undefined, option?: any) => void;
|
30
30
|
title: ModalProps['title'];
|
@@ -45,5 +45,6 @@ interface ProModalPropsType {
|
|
45
45
|
searchForm?: FormInstance;
|
46
46
|
searchKey?: string;
|
47
47
|
}
|
48
|
-
export declare type ProModalSelectPropsType = SelectProps & InputProps &
|
48
|
+
export declare type ProModalSelectPropsType = SelectProps & InputProps & ProModalSelectType;
|
49
|
+
export type ProModalSelectProps = ProModalSelectType;
|
49
50
|
export {};
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import React, { CSSProperties } from 'react';
|
2
2
|
import { CollapseProps, CollapsePanelProps } from 'antd/es/collapse';
|
3
3
|
export type levelType = '1' | '2';
|
4
|
-
export interface
|
4
|
+
export interface TitleListType {
|
5
5
|
/**
|
6
6
|
* @description 描述的标题
|
7
7
|
* @default -
|
@@ -13,7 +13,7 @@ export interface TitleListProps {
|
|
13
13
|
*/
|
14
14
|
value: string | number | undefined | React.ReactNode;
|
15
15
|
}
|
16
|
-
export interface
|
16
|
+
export interface ProCollapseType {
|
17
17
|
/**
|
18
18
|
* @description 折叠头部标题
|
19
19
|
* @default -
|
@@ -91,3 +91,5 @@ export interface ProCollapseProps {
|
|
91
91
|
collapsePanelProps?: CollapsePanelProps;
|
92
92
|
[key: string]: any;
|
93
93
|
}
|
94
|
+
export type ProCollapseProps = ProCollapseType;
|
95
|
+
export type TitleListProps = TitleListType;
|
@@ -1,3 +1,3 @@
|
|
1
|
-
import {
|
2
|
-
declare const ProCollapse: (props:
|
1
|
+
import type { ProCollapseType } from './PropTypes';
|
2
|
+
declare const ProCollapse: (props: ProCollapseType) => import("react/jsx-runtime").JSX.Element;
|
3
3
|
export default ProCollapse;
|
@@ -2,7 +2,7 @@ export interface stateProps {
|
|
2
2
|
width?: number;
|
3
3
|
[key: string]: any;
|
4
4
|
}
|
5
|
-
export interface
|
5
|
+
export interface ProFooterType {
|
6
6
|
/**
|
7
7
|
* @description 是否显示
|
8
8
|
* @default true
|
@@ -25,3 +25,4 @@ export interface ProFooterProps {
|
|
25
25
|
contentDom?: string;
|
26
26
|
[key: string]: any;
|
27
27
|
}
|
28
|
+
export type ProFooterProps = ProFooterType;
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/// <reference types="react" />
|
2
|
-
import {
|
3
|
-
declare const _default: import("react").MemoExoticComponent<(props:
|
2
|
+
import type { ProFooterType } from './PropTypes';
|
3
|
+
declare const _default: import("react").MemoExoticComponent<(props: ProFooterType) => import("react/jsx-runtime").JSX.Element>;
|
4
4
|
export default _default;
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
2
2
|
import type { ModalProps } from 'antd';
|
3
3
|
export type BreadcrumbType = 'breadcrumb' | 'copy' | 'info' | 'version' | 'tag';
|
4
4
|
export type NavType = 'money' | 'thousandth' | 'enumName' | 'enumCodeName' | 'date' | 'dateTime';
|
5
|
-
export interface
|
5
|
+
export interface BreadcrumbColumnType {
|
6
6
|
/**
|
7
7
|
* @description 类型
|
8
8
|
* @default -
|
@@ -34,7 +34,7 @@ export interface BreadcrumbColumnsProps {
|
|
34
34
|
*/
|
35
35
|
tag?: string | React.ReactNode | (string | React.ReactNode)[];
|
36
36
|
}
|
37
|
-
export interface
|
37
|
+
export interface SubDescribeColumnType {
|
38
38
|
/**
|
39
39
|
* @description 描述内容
|
40
40
|
* @default -
|
@@ -71,7 +71,7 @@ export interface SubDescribeColumnsProps {
|
|
71
71
|
*/
|
72
72
|
code?: string;
|
73
73
|
}
|
74
|
-
export interface
|
74
|
+
export interface DescribeColumnType {
|
75
75
|
/**
|
76
76
|
* @description 描述内容
|
77
77
|
* @default -
|
@@ -118,7 +118,7 @@ export interface DescribeColumnsProps {
|
|
118
118
|
*/
|
119
119
|
tag?: string | React.ReactNode | (string | React.ReactNode)[];
|
120
120
|
}
|
121
|
-
export interface
|
121
|
+
export interface ProHeaderType {
|
122
122
|
/**
|
123
123
|
* @description 标题
|
124
124
|
* @default -
|
@@ -129,12 +129,12 @@ export interface ProHeaderProps {
|
|
129
129
|
* @deprecated 将于下个版本 4.0.0 被弃用
|
130
130
|
* @default -
|
131
131
|
*/
|
132
|
-
breadcrumbList?:
|
132
|
+
breadcrumbList?: BreadcrumbColumnType[];
|
133
133
|
/**
|
134
134
|
* @description 面包屑配置数据
|
135
135
|
* @default -
|
136
136
|
*/
|
137
|
-
breadcrumbColumns?:
|
137
|
+
breadcrumbColumns?: BreadcrumbColumnType[];
|
138
138
|
/**
|
139
139
|
* @description 是否隐藏溢出
|
140
140
|
* @default -
|
@@ -150,17 +150,17 @@ export interface ProHeaderProps {
|
|
150
150
|
* @deprecated 将于下个版本 4.0.0 被弃用
|
151
151
|
* @default -
|
152
152
|
*/
|
153
|
-
describeList?:
|
153
|
+
describeList?: SubDescribeColumnType[];
|
154
154
|
/**
|
155
155
|
* @description 主要描述数据源配置
|
156
156
|
* @default -
|
157
157
|
*/
|
158
|
-
describeColumns?:
|
158
|
+
describeColumns?: DescribeColumnType[];
|
159
159
|
/**
|
160
160
|
* @description 次级描述数据源配置
|
161
161
|
* @default -
|
162
162
|
*/
|
163
|
-
subDescribeColumns?:
|
163
|
+
subDescribeColumns?: SubDescribeColumnType[];
|
164
164
|
/**
|
165
165
|
* @description 次级描述是否展开
|
166
166
|
* @default -
|
@@ -204,3 +204,7 @@ export interface ProHeaderProps {
|
|
204
204
|
onBack?: () => void;
|
205
205
|
[key: string]: any;
|
206
206
|
}
|
207
|
+
export type ProHeaderProps = ProHeaderType;
|
208
|
+
export type BreadcrumbColumnsProps = BreadcrumbColumnType;
|
209
|
+
export type SubDescribeColumnsProps = SubDescribeColumnType;
|
210
|
+
export type DescribeColumnsProps = DescribeColumnType;
|
@@ -1,4 +1,4 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
import type {
|
3
|
-
declare const _default: React.MemoExoticComponent<(props:
|
2
|
+
import type { ProHeaderType } from './PropTypes';
|
3
|
+
declare const _default: React.MemoExoticComponent<(props: ProHeaderType) => import("react/jsx-runtime").JSX.Element>;
|
4
4
|
export default _default;
|
package/lib/ProLayout/index.d.ts
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
/// <reference types="react" />
|
2
|
-
import type {
|
2
|
+
import type { ProLayoutType } from './propTypes';
|
3
3
|
export declare const LayoutContext: import("react").Context<{
|
4
4
|
selectedPath: string;
|
5
5
|
onSelected: (params: any) => void;
|
6
6
|
target: '_blank' | '_parent' | '_self' | '_top';
|
7
7
|
}>;
|
8
8
|
declare const ProLayout: {
|
9
|
-
(props:
|
9
|
+
(props: ProLayoutType): import("react/jsx-runtime").JSX.Element;
|
10
10
|
defaultProps: {
|
11
11
|
menus: any[];
|
12
12
|
iconfontUrl: string;
|
@@ -18,8 +18,8 @@ declare const ProLayout: {
|
|
18
18
|
headerHeight: number;
|
19
19
|
contentStyle: {};
|
20
20
|
};
|
21
|
-
ProCollapse: (props: import("./components/ProCollapse/PropTypes").
|
22
|
-
ProFooter: import("react").MemoExoticComponent<(props: import("./components/ProFooter/PropTypes").
|
23
|
-
ProHeader: import("react").MemoExoticComponent<(props: import("./components/ProHeader/PropTypes").
|
21
|
+
ProCollapse: (props: import("./components/ProCollapse/PropTypes").ProCollapseType) => import("react/jsx-runtime").JSX.Element;
|
22
|
+
ProFooter: import("react").MemoExoticComponent<(props: import("./components/ProFooter/PropTypes").ProFooterType) => import("react/jsx-runtime").JSX.Element>;
|
23
|
+
ProHeader: import("react").MemoExoticComponent<(props: import("./components/ProHeader/PropTypes").ProHeaderType) => import("react/jsx-runtime").JSX.Element>;
|
24
24
|
};
|
25
25
|
export default ProLayout;
|
package/lib/ProLayout/index.js
CHANGED
@@ -62,8 +62,10 @@ var ProLayout = function ProLayout(props) {
|
|
62
62
|
return _antd.message.warning('Warning: Missing menu data source, or menu data source is not an array');
|
63
63
|
}
|
64
64
|
var userData = (0, _utils.transformMenus)(dataSource, pathPrefix);
|
65
|
+
// 确保 menus 始终是一个数组
|
66
|
+
var menuData = Array.isArray(userData) ? userData : (userData === null || userData === void 0 ? void 0 : userData.menus) || [];
|
65
67
|
setState({
|
66
|
-
menus:
|
68
|
+
menus: menuData
|
67
69
|
});
|
68
70
|
}, [dataSource]);
|
69
71
|
/**
|
@@ -94,7 +96,9 @@ var ProLayout = function ProLayout(props) {
|
|
94
96
|
})), (0, _jsxRuntime.jsxs)("div", {
|
95
97
|
className: contentCls,
|
96
98
|
children: [(0, _jsxRuntime.jsx)(_index2.Menu, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
|
97
|
-
dataSource: menus
|
99
|
+
dataSource: Array.isArray(menus) ? {
|
100
|
+
menus: menus
|
101
|
+
} : menus,
|
98
102
|
notice: notice,
|
99
103
|
collapsed: collapsed,
|
100
104
|
onToggle: function onToggle() {
|
@@ -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/lib/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/lib/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;
|