@zat-design/sisyphus-react 3.11.13 → 3.11.14-beta.10
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/coverage/lcov-report/src/.umi/core/history.ts.html +148 -0
- package/coverage/lcov-report/src/.umi/core/index.html +146 -0
- package/coverage/lcov-report/src/.umi/core/plugin.ts.html +109 -0
- package/coverage/lcov-report/src/.umi/core/pluginRegister.ts.html +160 -0
- package/coverage/lcov-report/src/.umi/core/polyfill.ts.html +97 -0
- package/coverage/src/.umi/core/history.ts.html +148 -0
- package/coverage/src/.umi/core/index.html +146 -0
- package/coverage/src/.umi/core/plugin.ts.html +109 -0
- package/coverage/src/.umi/core/pluginRegister.ts.html +160 -0
- package/coverage/src/.umi/core/polyfill.ts.html +97 -0
- package/dist/index.esm.css +33 -19
- package/dist/less.esm.css +33 -19
- 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/ProDrawerForm/components/ProDrawer/index.d.ts +2 -2
- package/es/ProDrawerForm/components/ProModal/index.d.ts +2 -2
- package/es/ProDrawerForm/index.d.ts +1 -2
- package/es/ProDrawerForm/propsType.d.ts +38 -27
- package/es/ProDrawerForm/utils/index.d.ts +2 -2
- package/es/ProEditLabel/components/RenderProForm.d.ts +2 -2
- package/es/ProEditLabel/index.d.ts +2 -2
- package/es/ProEditLabel/propsType.d.ts +135 -8
- package/es/ProEditLabel/style/index.less +24 -25
- package/es/ProEditTable/components/ActionButton/index.js +2 -2
- package/es/ProEditTable/components/RenderField/index.js +4 -4
- package/es/ProEditTable/components/Summary/index.d.ts +2 -2
- package/es/ProEditTable/index.d.ts +2 -2
- package/es/ProEditTable/index.js +6 -8
- package/es/ProEditTable/propsType.d.ts +232 -93
- package/es/ProEditTable/style/index.less +1 -0
- package/es/ProEditTable/utils/config.js +10 -10
- package/es/ProEditTable/utils/index.js +3 -3
- 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 +230 -41
- package/es/ProEnum/propsType.js +0 -6
- package/es/ProEnum/utils/index.d.ts +1 -1
- package/es/ProForm/components/FormFooter/index.d.ts +2 -2
- package/es/ProForm/components/FormFooter/propsType.d.ts +8 -3
- package/es/ProForm/components/base/Checkbox/index.d.ts +2 -2
- package/es/ProForm/components/base/Input/index.d.ts +2 -2
- package/es/ProForm/components/base/Input/propsType.d.ts +8 -4
- package/es/ProForm/components/base/InputNumber/index.d.ts +2 -2
- package/es/ProForm/components/base/Radio/index.d.ts +2 -2
- package/es/ProForm/components/base/RangePicker/index.d.ts +2 -2
- package/es/ProForm/components/base/Select/index.d.ts +2 -2
- package/es/ProForm/components/base/Switch/index.d.ts +2 -2
- package/es/ProForm/components/base/SwitchCheckbox/index.d.ts +2 -2
- package/es/ProForm/components/base/TextArea/index.d.ts +2 -2
- package/es/ProForm/components/base/TimePicker/index.d.ts +2 -2
- package/es/ProForm/components/combination/Container/index.d.ts +2 -2
- package/es/ProForm/components/combination/Container/propsType.d.ts +9 -5
- package/es/ProForm/components/combination/FormList/components/ActionButton.d.ts +4 -4
- package/es/ProForm/components/combination/FormList/components/BlockFields.d.ts +4 -4
- package/es/ProForm/components/combination/FormList/components/LineFields.d.ts +4 -4
- package/es/ProForm/components/combination/FormList/components/ToolbarButton.d.ts +2 -2
- package/es/ProForm/components/combination/FormList/index.d.ts +2 -2
- package/es/ProForm/components/combination/FormList/propsType.d.ts +18 -10
- package/es/ProForm/components/combination/Group/index.d.ts +2 -2
- package/es/ProForm/components/combination/Group/propsType.d.ts +10 -5
- package/es/ProForm/components/combination/Group/utils.d.ts +4 -4
- package/es/ProForm/components/combination/ProCascader/index.d.ts +2 -2
- package/es/ProForm/components/combination/ProCascader/propsType.d.ts +8 -3
- package/es/ProForm/components/combination/ProCombination/index.d.ts +3 -3
- package/es/ProForm/components/combination/ProCombination/propsType.d.ts +10 -5
- package/es/ProForm/components/combination/ProModalSelect/index.d.ts +2 -2
- package/es/ProForm/components/combination/ProModalSelect/propsType.d.ts +58 -5
- package/es/ProForm/components/combination/ProNumberRange/propsType.d.ts +7 -3
- package/es/ProForm/components/combination/ProTimeLimit/index.d.ts +14 -8
- package/es/ProForm/components/render/ChangedWrapper.d.ts +2 -2
- package/es/ProForm/components/render/Render.d.ts +2 -2
- package/es/ProForm/components/render/RenderFields.d.ts +4 -4
- package/es/ProForm/components/render/propsType.d.ts +54 -43
- package/es/ProForm/index.d.ts +2 -2
- package/es/ProForm/propsType.d.ts +22 -15
- package/es/ProForm/utils/transformValue.d.ts +2 -2
- package/es/ProForm/utils/useFieldProps.d.ts +3 -3
- package/es/ProForm/utils/useShouldUpdate.d.ts +3 -3
- package/es/ProIcon/index.d.ts +2 -2
- package/es/ProIcon/propsTypes.d.ts +124 -49
- 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 +9 -2
- package/es/ProLayout/components/ProCollapse/index.d.ts +2 -2
- package/es/ProLayout/components/ProCollapse/index.js +12 -4
- package/es/ProLayout/components/ProFooter/PropTypes.d.ts +18 -1
- package/es/ProLayout/components/ProFooter/index.d.ts +2 -2
- package/es/ProLayout/components/ProHeader/PropTypes.d.ts +121 -14
- 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 +182 -25
- package/es/ProLayout/utils/index.d.ts +2 -2
- package/es/ProSelect/index.d.ts +3 -3
- package/es/ProSelect/propsType.d.ts +141 -31
- package/es/ProStep/components/Item/index.d.ts +2 -2
- package/es/ProStep/components/Step/index.d.ts +2 -2
- package/es/ProStep/index.d.ts +2 -2
- package/es/ProStep/index.js +12 -1
- package/es/ProStep/propsType.d.ts +60 -12
- package/es/ProStep/utils/index.d.ts +2 -2
- package/es/ProTable/components/FormatColumn/index.d.ts +2 -2
- package/es/ProTable/components/FormatColumn/index.js +2 -2
- package/es/ProTable/hooks/useAntdTable.d.ts +2 -2
- package/es/ProTable/index.d.ts +2 -2
- package/es/ProTable/propsType.d.ts +590 -39
- package/es/ProTable/style/index.less +12 -5
- 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/ProTooltip/index.d.ts +2 -2
- package/es/ProTooltip/propsType.d.ts +52 -9
- package/es/ProTree/components/ProTreeSelect/index.js +3 -6
- package/es/ProTree/components/ProTreeSelect/propsType.d.ts +2 -2
- package/es/ProTree/components/SearchTitle.d.ts +2 -2
- package/es/ProTree/propsType.d.ts +651 -62
- package/es/ProTreeModal/propsType.d.ts +2 -2
- 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 +7 -9
- package/es/ProUpload/propsType.d.ts +65 -8
- package/es/ProWaterMark/index.d.ts +2 -2
- package/es/ProWaterMark/propsType.d.ts +2 -1
- package/es/index.d.ts +1 -0
- package/es/index.js +1 -0
- 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/ProDrawerForm/components/ProDrawer/index.d.ts +2 -2
- package/lib/ProDrawerForm/components/ProModal/index.d.ts +2 -2
- package/lib/ProDrawerForm/index.d.ts +1 -2
- package/lib/ProDrawerForm/propsType.d.ts +38 -27
- package/lib/ProDrawerForm/utils/index.d.ts +2 -2
- package/lib/ProEditLabel/components/RenderProForm.d.ts +2 -2
- package/lib/ProEditLabel/index.d.ts +2 -2
- package/lib/ProEditLabel/propsType.d.ts +135 -8
- package/lib/ProEditLabel/style/index.less +24 -25
- package/lib/ProEditTable/components/ActionButton/index.js +2 -2
- package/lib/ProEditTable/components/RenderField/index.js +4 -4
- package/lib/ProEditTable/components/Summary/index.d.ts +2 -2
- package/lib/ProEditTable/index.d.ts +2 -2
- package/lib/ProEditTable/index.js +6 -8
- package/lib/ProEditTable/propsType.d.ts +232 -93
- package/lib/ProEditTable/style/index.less +1 -0
- package/lib/ProEditTable/utils/config.js +10 -10
- package/lib/ProEditTable/utils/index.js +3 -3
- 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 +230 -41
- package/lib/ProEnum/propsType.js +1 -7
- package/lib/ProEnum/utils/index.d.ts +1 -1
- package/lib/ProForm/components/FormFooter/index.d.ts +2 -2
- package/lib/ProForm/components/FormFooter/propsType.d.ts +8 -3
- package/lib/ProForm/components/base/Checkbox/index.d.ts +2 -2
- package/lib/ProForm/components/base/Input/index.d.ts +2 -2
- package/lib/ProForm/components/base/Input/propsType.d.ts +8 -4
- package/lib/ProForm/components/base/InputNumber/index.d.ts +2 -2
- package/lib/ProForm/components/base/Radio/index.d.ts +2 -2
- package/lib/ProForm/components/base/RangePicker/index.d.ts +2 -2
- package/lib/ProForm/components/base/Select/index.d.ts +2 -2
- package/lib/ProForm/components/base/Switch/index.d.ts +2 -2
- package/lib/ProForm/components/base/SwitchCheckbox/index.d.ts +2 -2
- package/lib/ProForm/components/base/TextArea/index.d.ts +2 -2
- package/lib/ProForm/components/base/TimePicker/index.d.ts +2 -2
- package/lib/ProForm/components/combination/Container/index.d.ts +2 -2
- package/lib/ProForm/components/combination/Container/propsType.d.ts +9 -5
- package/lib/ProForm/components/combination/FormList/components/ActionButton.d.ts +4 -4
- package/lib/ProForm/components/combination/FormList/components/BlockFields.d.ts +4 -4
- package/lib/ProForm/components/combination/FormList/components/LineFields.d.ts +4 -4
- package/lib/ProForm/components/combination/FormList/components/ToolbarButton.d.ts +2 -2
- package/lib/ProForm/components/combination/FormList/index.d.ts +2 -2
- package/lib/ProForm/components/combination/FormList/propsType.d.ts +18 -10
- package/lib/ProForm/components/combination/Group/index.d.ts +2 -2
- package/lib/ProForm/components/combination/Group/propsType.d.ts +10 -5
- package/lib/ProForm/components/combination/Group/utils.d.ts +4 -4
- package/lib/ProForm/components/combination/ProCascader/index.d.ts +2 -2
- package/lib/ProForm/components/combination/ProCascader/propsType.d.ts +8 -3
- package/lib/ProForm/components/combination/ProCombination/index.d.ts +3 -3
- package/lib/ProForm/components/combination/ProCombination/propsType.d.ts +10 -5
- package/lib/ProForm/components/combination/ProModalSelect/index.d.ts +2 -2
- package/lib/ProForm/components/combination/ProModalSelect/propsType.d.ts +58 -5
- package/lib/ProForm/components/combination/ProNumberRange/propsType.d.ts +7 -3
- package/lib/ProForm/components/combination/ProTimeLimit/index.d.ts +14 -8
- package/lib/ProForm/components/render/ChangedWrapper.d.ts +2 -2
- package/lib/ProForm/components/render/Render.d.ts +2 -2
- package/lib/ProForm/components/render/RenderFields.d.ts +4 -4
- package/lib/ProForm/components/render/propsType.d.ts +54 -43
- package/lib/ProForm/index.d.ts +2 -2
- package/lib/ProForm/propsType.d.ts +22 -15
- package/lib/ProForm/utils/transformValue.d.ts +2 -2
- package/lib/ProForm/utils/useFieldProps.d.ts +3 -3
- package/lib/ProForm/utils/useShouldUpdate.d.ts +3 -3
- package/lib/ProIcon/index.d.ts +2 -2
- package/lib/ProIcon/propsTypes.d.ts +124 -49
- 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 +9 -2
- package/lib/ProLayout/components/ProCollapse/index.d.ts +2 -2
- package/lib/ProLayout/components/ProCollapse/index.js +12 -4
- package/lib/ProLayout/components/ProFooter/PropTypes.d.ts +18 -1
- package/lib/ProLayout/components/ProFooter/index.d.ts +2 -2
- package/lib/ProLayout/components/ProHeader/PropTypes.d.ts +121 -14
- 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 +182 -25
- package/lib/ProLayout/utils/index.d.ts +2 -2
- package/lib/ProSelect/index.d.ts +3 -3
- package/lib/ProSelect/propsType.d.ts +141 -31
- package/lib/ProStep/components/Item/index.d.ts +2 -2
- package/lib/ProStep/components/Step/index.d.ts +2 -2
- package/lib/ProStep/index.d.ts +2 -2
- package/lib/ProStep/index.js +12 -1
- package/lib/ProStep/propsType.d.ts +60 -12
- package/lib/ProStep/utils/index.d.ts +2 -2
- package/lib/ProTable/components/FormatColumn/index.d.ts +2 -2
- package/lib/ProTable/components/FormatColumn/index.js +2 -2
- package/lib/ProTable/hooks/useAntdTable.d.ts +2 -2
- package/lib/ProTable/index.d.ts +2 -2
- package/lib/ProTable/propsType.d.ts +590 -39
- package/lib/ProTable/style/index.less +12 -5
- 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/ProTooltip/index.d.ts +2 -2
- package/lib/ProTooltip/propsType.d.ts +52 -9
- package/lib/ProTree/components/ProTreeSelect/index.js +3 -6
- package/lib/ProTree/components/ProTreeSelect/propsType.d.ts +2 -2
- package/lib/ProTree/components/SearchTitle.d.ts +2 -2
- package/lib/ProTree/propsType.d.ts +651 -62
- package/lib/ProTreeModal/propsType.d.ts +2 -2
- 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 +7 -9
- package/lib/ProUpload/propsType.d.ts +65 -8
- package/lib/ProWaterMark/index.d.ts +2 -2
- package/lib/ProWaterMark/propsType.d.ts +2 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +12 -0
- package/package.json +1 -1
@@ -1,95 +1,284 @@
|
|
1
1
|
import React, { ReactNode } from 'react';
|
2
2
|
import { RadioProps, CheckboxProps } from 'antd';
|
3
3
|
import { Service, Options } from 'ahooks/lib/useRequest/src/types';
|
4
|
-
import {
|
4
|
+
import { ProFormOtherType } from '../index';
|
5
5
|
import { PropSelectProps } from '../ProSelect/propsType';
|
6
|
-
|
6
|
+
/**
|
7
|
+
* @description 数据选项类型
|
8
|
+
*/
|
9
|
+
export interface DataOptionType {
|
10
|
+
/**
|
11
|
+
* @description 展示标签
|
12
|
+
* @default -
|
13
|
+
*/
|
7
14
|
label?: string;
|
15
|
+
/**
|
16
|
+
* @description 选项值
|
17
|
+
* @default -
|
18
|
+
*/
|
8
19
|
value?: string;
|
20
|
+
/**
|
21
|
+
* @description 是否禁用
|
22
|
+
* @default false
|
23
|
+
*/
|
9
24
|
disabled?: boolean;
|
25
|
+
/**
|
26
|
+
* @description 允许扩展字段
|
27
|
+
*/
|
10
28
|
[key: string]: any;
|
11
29
|
}
|
12
|
-
|
13
|
-
|
30
|
+
/**
|
31
|
+
* @description ProEnum配置类型
|
32
|
+
*/
|
33
|
+
export interface ProEnumConfigType {
|
34
|
+
/**
|
35
|
+
* @description 是否枚举主入口
|
36
|
+
* @default false
|
37
|
+
*/
|
14
38
|
main?: boolean;
|
15
|
-
/**
|
39
|
+
/**
|
40
|
+
* @description 是否使用主入口枚举
|
41
|
+
* @default false
|
42
|
+
*/
|
16
43
|
share?: boolean;
|
17
|
-
/**
|
44
|
+
/**
|
45
|
+
* @description 是否开启调试 log
|
46
|
+
* @default false
|
47
|
+
*/
|
18
48
|
debugger?: boolean;
|
19
|
-
/**
|
49
|
+
/**
|
50
|
+
* @description 是否对数据进行清洗
|
51
|
+
* @default false
|
52
|
+
*/
|
20
53
|
clear?: boolean;
|
21
|
-
/**
|
54
|
+
/**
|
55
|
+
* @description 字段别名
|
56
|
+
* @default { label: 'label', value: 'value', children: 'children' }
|
57
|
+
*/
|
22
58
|
fieldNames?: Record<'label' | 'value' | 'children', string>;
|
23
|
-
/**
|
59
|
+
/**
|
60
|
+
* @description 缓存的key、默认 zat-design-pro-component-cacheKey
|
61
|
+
* @default "zat-design-pro-component-cacheKey"
|
62
|
+
*/
|
24
63
|
cacheKey: string;
|
25
|
-
/**
|
64
|
+
/**
|
65
|
+
* @description 刷新请求、设置后每次进入都会重新请求
|
66
|
+
* @default false
|
67
|
+
*/
|
26
68
|
requestRefresh: boolean;
|
27
|
-
/**
|
69
|
+
/**
|
70
|
+
* @description 存储位置、不设置、默认读取 globalConfig 里面的
|
71
|
+
* @default "localStorage"
|
72
|
+
*/
|
28
73
|
storage: 'localStorage' | 'sessionStorage';
|
29
|
-
/**
|
30
|
-
|
31
|
-
|
74
|
+
/**
|
75
|
+
* @description 默认静态枚举数据
|
76
|
+
* @default {}
|
77
|
+
*/
|
78
|
+
dataSource: Record<string, DataOptionType[]>;
|
79
|
+
/**
|
80
|
+
* @description 对后台返回数据进行格式化
|
81
|
+
* @param data 后台返回的数据
|
82
|
+
* @returns 格式化后的枚举数据
|
83
|
+
* @default -
|
84
|
+
*/
|
32
85
|
transformResponse?: (data: {
|
33
|
-
data: Record<string,
|
34
|
-
}) => Record<string,
|
35
|
-
/**
|
86
|
+
data: Record<string, DataOptionType[]>;
|
87
|
+
}) => Record<string, DataOptionType[]> | Promise<Record<string, DataOptionType[]>>;
|
88
|
+
/**
|
89
|
+
* @description 批量请求枚举接口
|
90
|
+
* @default -
|
91
|
+
*/
|
36
92
|
useRequest?: {
|
93
|
+
/**
|
94
|
+
* @description 请求服务函数
|
95
|
+
*/
|
37
96
|
service: Service<any, any>;
|
97
|
+
/**
|
98
|
+
* @description 请求选项配置
|
99
|
+
*/
|
38
100
|
options?: Options<any, any> & {
|
101
|
+
/**
|
102
|
+
* @description 指定请求的枚举码
|
103
|
+
*/
|
39
104
|
codes?: string[];
|
105
|
+
/**
|
106
|
+
* @description 忽略的枚举码
|
107
|
+
*/
|
40
108
|
ignoreCodes?: string[];
|
41
109
|
};
|
42
110
|
};
|
43
|
-
|
111
|
+
/**
|
112
|
+
* @description 字典数据
|
113
|
+
* @default {}
|
114
|
+
*/
|
115
|
+
dics: Record<string, DataOptionType[]>;
|
44
116
|
}
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
117
|
+
/**
|
118
|
+
* @description 枚举组件类型枚举
|
119
|
+
*/
|
120
|
+
type EnumComponentType = 'ProSelect' | 'Radio' | 'Checkbox' | 'Tag' | 'Group';
|
121
|
+
/**
|
122
|
+
* @description ProEnum基础属性类型
|
123
|
+
*/
|
124
|
+
export interface ProEnumBaseType {
|
125
|
+
/**
|
126
|
+
* @description 组件展示类型、默认 ProSelect
|
127
|
+
* @default "ProSelect"
|
128
|
+
*/
|
129
|
+
type?: EnumComponentType;
|
130
|
+
/**
|
131
|
+
* @description 用于自定义组件
|
132
|
+
* @default -
|
133
|
+
*/
|
50
134
|
component?: ReactNode;
|
51
|
-
/**
|
135
|
+
/**
|
136
|
+
* @description 用于提交 code
|
137
|
+
* @default -
|
138
|
+
*/
|
52
139
|
code?: string | string[];
|
53
|
-
/**
|
140
|
+
/**
|
141
|
+
* @description 字段别名
|
142
|
+
* @default -
|
143
|
+
*/
|
54
144
|
fieldNames?: Record<string, string>;
|
55
|
-
/**
|
145
|
+
/**
|
146
|
+
* @description 是否查看模式
|
147
|
+
* @default false
|
148
|
+
*/
|
56
149
|
isView?: boolean;
|
57
|
-
/**
|
58
|
-
|
150
|
+
/**
|
151
|
+
* @description 数据源
|
152
|
+
* @default -
|
153
|
+
*/
|
154
|
+
dataSource?: DataOptionType[];
|
155
|
+
/**
|
156
|
+
* @description 当前值
|
157
|
+
* @default -
|
158
|
+
*/
|
59
159
|
value: any;
|
160
|
+
/**
|
161
|
+
* @description 值变化回调
|
162
|
+
* @default -
|
163
|
+
*/
|
60
164
|
onChange?: (value: any) => void;
|
61
|
-
/**
|
165
|
+
/**
|
166
|
+
* @description 远程请求接口
|
167
|
+
* @default -
|
168
|
+
*/
|
62
169
|
useRequest?: {
|
170
|
+
/**
|
171
|
+
* @description 请求服务函数
|
172
|
+
*/
|
63
173
|
service: Service<any, any>;
|
174
|
+
/**
|
175
|
+
* @description 请求选项
|
176
|
+
*/
|
64
177
|
options?: Options<any, any>;
|
65
178
|
};
|
66
|
-
/**
|
67
|
-
|
68
|
-
|
179
|
+
/**
|
180
|
+
* @description 对后台返回数据进行格式化
|
181
|
+
* @param data 后台返回的数据
|
182
|
+
* @returns 格式化后的选项数据
|
183
|
+
* @default -
|
184
|
+
*/
|
185
|
+
transformResponse?: (data: any) => DataOptionType[];
|
186
|
+
/**
|
187
|
+
* @description 是否合并数据
|
188
|
+
* @default false
|
189
|
+
*/
|
69
190
|
merge?: boolean;
|
70
|
-
/**
|
191
|
+
/**
|
192
|
+
* @description 查看模式下为空展示
|
193
|
+
* @default "-"
|
194
|
+
*/
|
71
195
|
viewEmpty?: React.ReactNode;
|
196
|
+
/**
|
197
|
+
* @description 自定义选项渲染
|
198
|
+
* @default -
|
199
|
+
*/
|
72
200
|
optionRender?: any;
|
73
|
-
/**
|
201
|
+
/**
|
202
|
+
* @description 显示 code-value 形式
|
203
|
+
* @default false
|
204
|
+
*/
|
74
205
|
showCodeName?: boolean;
|
75
|
-
/**
|
206
|
+
/**
|
207
|
+
* @description 支持 {label:xx, value: xx} 形式
|
208
|
+
* @default false
|
209
|
+
*/
|
76
210
|
labelInValue?: boolean;
|
77
|
-
|
211
|
+
/**
|
212
|
+
* @description 其他表单属性
|
213
|
+
* @default -
|
214
|
+
*/
|
215
|
+
otherProps?: ProFormOtherType;
|
216
|
+
/**
|
217
|
+
* @description 是否允许清除
|
218
|
+
* @default false
|
219
|
+
*/
|
78
220
|
allowClear?: boolean;
|
221
|
+
/**
|
222
|
+
* @description 组件ID
|
223
|
+
* @default -
|
224
|
+
*/
|
79
225
|
id?: string;
|
226
|
+
/**
|
227
|
+
* @description 默认值
|
228
|
+
* @default -
|
229
|
+
*/
|
80
230
|
defaultValue?: any;
|
81
231
|
}
|
82
|
-
|
232
|
+
/**
|
233
|
+
* @description ProSelect类型映射
|
234
|
+
*/
|
235
|
+
export type PropProSelectsMapType = {
|
236
|
+
/**
|
237
|
+
* @description 类型为ProSelect
|
238
|
+
* @default "ProSelect"
|
239
|
+
*/
|
83
240
|
type?: 'ProSelect';
|
84
241
|
} & PropSelectProps;
|
85
|
-
|
242
|
+
/**
|
243
|
+
* @description Radio类型映射
|
244
|
+
*/
|
245
|
+
export type PropRadioPropsMapType = {
|
246
|
+
/**
|
247
|
+
* @description 类型为Radio
|
248
|
+
* @default "Radio"
|
249
|
+
*/
|
86
250
|
type?: 'Radio';
|
87
251
|
} & RadioProps;
|
88
|
-
|
252
|
+
/**
|
253
|
+
* @description Checkbox类型映射
|
254
|
+
*/
|
255
|
+
export type CheckboxPropsMapType = {
|
256
|
+
/**
|
257
|
+
* @description 类型为Checkbox
|
258
|
+
* @default "Checkbox"
|
259
|
+
*/
|
89
260
|
type?: 'Checkbox';
|
90
261
|
} & CheckboxProps;
|
91
|
-
|
262
|
+
/**
|
263
|
+
* @description Tag类型映射
|
264
|
+
*/
|
265
|
+
export interface TagPropsMapType {
|
266
|
+
/**
|
267
|
+
* @description 类型为Tag或Group
|
268
|
+
* @default -
|
269
|
+
*/
|
92
270
|
type?: 'Tag' | 'Group';
|
93
271
|
}
|
94
|
-
|
272
|
+
/**
|
273
|
+
* @description ProEnum组件属性类型
|
274
|
+
*/
|
275
|
+
export type ProEnumType = Omit<ProEnumBaseType, 'type'> & (PropProSelectsMapType | PropRadioPropsMapType | CheckboxPropsMapType | TagPropsMapType);
|
276
|
+
export type DataOption = DataOptionType;
|
277
|
+
export type ProEnumConfig = ProEnumConfigType;
|
278
|
+
export type ProEnum = ProEnumBaseType;
|
279
|
+
export type PropProSelectsMap = PropProSelectsMapType;
|
280
|
+
export type PropRadioPropsMap = PropRadioPropsMapType;
|
281
|
+
export type CheckboxPropsMap = CheckboxPropsMapType;
|
282
|
+
export type TagPropsMap = TagPropsMapType;
|
283
|
+
export type ProEnumProps = ProEnumBaseType;
|
95
284
|
export {};
|
package/es/ProEnum/propsType.js
CHANGED
@@ -6,7 +6,7 @@ interface EnumRes {
|
|
6
6
|
}
|
7
7
|
export declare function getEnumData(storage: StorageType, cacheKey: string, baseEnumStorage?: any): EnumRes;
|
8
8
|
export declare function setEnumData(storage: StorageType, cacheKey: string, data: any): boolean;
|
9
|
-
export declare function hasEnumList(storage: StorageType, cacheKey: any, code: string):
|
9
|
+
export declare function hasEnumList(storage: StorageType, cacheKey: any, code: string): import("../propsType").DataOptionType[];
|
10
10
|
export declare function isObject(obj: any): boolean;
|
11
11
|
export declare function mergeCacheData(storage: string, code: string, cacheKey: string, responseData: any): void;
|
12
12
|
/**
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
import {
|
2
|
+
import { FooterRenderType } from './propsType';
|
3
3
|
export declare const PRO_FORM_CACHE = "PRO_FORM_CACHE";
|
4
|
-
declare const FormFooter: React.FC<
|
4
|
+
declare const FormFooter: React.FC<FooterRenderType>;
|
5
5
|
export default FormFooter;
|
@@ -2,18 +2,23 @@ import { ButtonProps, ColProps, FormInstance } from 'antd';
|
|
2
2
|
export interface ButtonItem extends ButtonProps {
|
3
3
|
children?: any;
|
4
4
|
}
|
5
|
-
export interface
|
5
|
+
export interface FooterButtonType {
|
6
6
|
okButtonProps?: ButtonItem;
|
7
7
|
cancelButtonProps?: ButtonItem;
|
8
8
|
}
|
9
|
-
export interface
|
9
|
+
export interface FooterRenderType {
|
10
10
|
okText?: string;
|
11
11
|
cancelText?: string;
|
12
12
|
onOk?: () => void;
|
13
13
|
onCancel?: () => void;
|
14
14
|
footerColProps?: ColProps;
|
15
|
-
footer?:
|
15
|
+
footer?: FooterButtonType;
|
16
16
|
confirmLoading?: boolean;
|
17
17
|
formId?: string;
|
18
18
|
form: FormInstance;
|
19
19
|
}
|
20
|
+
/**
|
21
|
+
* 兼容旧命名导出
|
22
|
+
*/
|
23
|
+
export type FooterButtonProps = FooterButtonType;
|
24
|
+
export type FooterRenderProps = FooterRenderType;
|
@@ -1,13 +1,13 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { CheckboxGroupProps } from 'antd/es/checkbox';
|
3
|
-
import {
|
3
|
+
import { ProFormOtherType } from '../../../propsType';
|
4
4
|
export interface Props extends Omit<CheckboxGroupProps, 'options'> {
|
5
5
|
dataSource: any[];
|
6
6
|
fieldNames?: {
|
7
7
|
label: string;
|
8
8
|
value: string;
|
9
9
|
};
|
10
|
-
otherProps?:
|
10
|
+
otherProps?: ProFormOtherType;
|
11
11
|
isView?: boolean;
|
12
12
|
}
|
13
13
|
declare const Checkbox: React.FC<Props>;
|
@@ -1,3 +1,3 @@
|
|
1
|
-
import {
|
2
|
-
declare const Input: (props:
|
1
|
+
import { Props } from './propsType';
|
2
|
+
declare const Input: (props: Props) => import("react/jsx-runtime").JSX.Element;
|
3
3
|
export default Input;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { InputProps } from 'antd';
|
2
2
|
import { FormInstance } from 'antd/es/form/Form';
|
3
|
-
import {
|
4
|
-
export interface
|
3
|
+
import { ProFormOtherType } from '../../../propsType';
|
4
|
+
export interface ProFieldType<T = any> {
|
5
5
|
from?: FormInstance<T>;
|
6
6
|
label?: string;
|
7
7
|
name?: string;
|
@@ -9,9 +9,13 @@ export interface ProFieldProps<T = any> {
|
|
9
9
|
fieldName?: string;
|
10
10
|
placeholder?: string;
|
11
11
|
}
|
12
|
-
export interface
|
13
|
-
otherProps?:
|
12
|
+
export interface Props extends InputProps, ProFieldType {
|
13
|
+
otherProps?: ProFormOtherType;
|
14
14
|
isView?: boolean;
|
15
15
|
/** 脱敏数据位置下标 */
|
16
16
|
desensitization?: [number, number];
|
17
17
|
}
|
18
|
+
/**
|
19
|
+
* 兼容旧命名导出
|
20
|
+
*/
|
21
|
+
export type ProFieldProps<T = any> = ProFieldType<T>;
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { InputNumberProps } from 'antd';
|
3
|
-
import {
|
3
|
+
import { ProFormOtherType } from '../../../propsType';
|
4
4
|
export interface Props extends Omit<InputNumberProps, 'onBlur'> {
|
5
|
-
otherProps?:
|
5
|
+
otherProps?: ProFormOtherType;
|
6
6
|
range?: string;
|
7
7
|
onBlur?: (value?: number, record?: any, object?: any) => void;
|
8
8
|
isView?: boolean;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { RadioChangeEvent, RadioProps } from 'antd';
|
2
2
|
import React from 'react';
|
3
|
-
import {
|
3
|
+
import { ProFormOtherType } from '../../../propsType';
|
4
4
|
export interface Props extends Omit<RadioProps, 'options' | 'onChange'> {
|
5
5
|
dataSource: any[];
|
6
6
|
onChange: (value: any, e: RadioChangeEvent) => void;
|
@@ -8,7 +8,7 @@ export interface Props extends Omit<RadioProps, 'options' | 'onChange'> {
|
|
8
8
|
label: string;
|
9
9
|
value: string;
|
10
10
|
};
|
11
|
-
otherProps?:
|
11
|
+
otherProps?: ProFormOtherType;
|
12
12
|
isView?: boolean;
|
13
13
|
}
|
14
14
|
declare const Radio: React.FC<Props>;
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import type { RangePickerProps } from 'antd/es/date-picker';
|
2
2
|
import React from 'react';
|
3
|
-
import {
|
3
|
+
import { ProFormOtherType } from '../../../propsType';
|
4
4
|
import { Props as RangeProps } from './useDateRange';
|
5
5
|
export type Props = {
|
6
|
-
otherProps?:
|
6
|
+
otherProps?: ProFormOtherType;
|
7
7
|
separator?: any;
|
8
8
|
showTime?: any;
|
9
9
|
isView?: boolean;
|
@@ -1,10 +1,10 @@
|
|
1
1
|
import { SelectProps } from 'antd';
|
2
2
|
import React from 'react';
|
3
|
-
import {
|
3
|
+
import { ProFormOtherType } from '../../../propsType';
|
4
4
|
export interface Props extends SelectProps {
|
5
5
|
dataSource?: any[];
|
6
6
|
scrollFollowParent?: boolean;
|
7
|
-
otherProps?:
|
7
|
+
otherProps?: ProFormOtherType;
|
8
8
|
isView?: boolean;
|
9
9
|
}
|
10
10
|
declare const Select: React.FC<Props>;
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import { SwitchProps } from 'antd';
|
2
2
|
import React from 'react';
|
3
|
-
import {
|
3
|
+
import { ProFormOtherType } from '../../../propsType';
|
4
4
|
export interface Props extends Omit<SwitchProps, 'value'> {
|
5
5
|
value: any;
|
6
|
-
otherProps?:
|
6
|
+
otherProps?: ProFormOtherType;
|
7
7
|
isView?: boolean;
|
8
8
|
}
|
9
9
|
declare const Switch: React.FC<Props>;
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import * as React from 'react';
|
2
2
|
import { CheckboxProps } from 'antd';
|
3
|
-
import {
|
3
|
+
import { ProFormOtherType } from '../../../propsType';
|
4
4
|
export interface Props extends CheckboxProps {
|
5
5
|
label?: string;
|
6
|
-
otherProps?:
|
6
|
+
otherProps?: ProFormOtherType;
|
7
7
|
isView?: boolean;
|
8
8
|
}
|
9
9
|
declare const SwitchCheckbox: React.FC<Props>;
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import { TextAreaProps } from 'antd/es/input';
|
2
2
|
import React from 'react';
|
3
|
-
import {
|
3
|
+
import { ProFormOtherType } from '../../../propsType';
|
4
4
|
import './index.less';
|
5
5
|
export interface Props extends TextAreaProps {
|
6
|
-
otherProps?:
|
6
|
+
otherProps?: ProFormOtherType;
|
7
7
|
isView?: boolean;
|
8
8
|
tooltip?: boolean;
|
9
9
|
}
|
@@ -1,13 +1,13 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import type { TimePickerProps } from 'antd/es/time-picker';
|
3
|
-
import {
|
3
|
+
import { ProFormOtherType } from '../../../propsType';
|
4
4
|
import './style/index.less';
|
5
5
|
export interface Props {
|
6
6
|
valueType?: string;
|
7
7
|
format?: string;
|
8
8
|
onChange?: (value: string) => void;
|
9
9
|
value?: string;
|
10
|
-
otherProps?:
|
10
|
+
otherProps?: ProFormOtherType;
|
11
11
|
isView?: boolean;
|
12
12
|
}
|
13
13
|
declare const TimePicker: React.FC<Props & TimePickerProps>;
|
@@ -1,13 +1,17 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { RowProps } from 'antd';
|
3
|
-
import {
|
4
|
-
export interface
|
5
|
-
children?:
|
6
|
-
otherProps?:
|
3
|
+
import { ProColumnType, ProFormOtherType, DiffConfigType } from '../../../propsType';
|
4
|
+
export interface ContainerType {
|
5
|
+
children?: ProColumnType[];
|
6
|
+
otherProps?: ProFormOtherType;
|
7
7
|
rowProps?: RowProps;
|
8
8
|
className?: string;
|
9
9
|
container?: string | React.ReactNode;
|
10
10
|
show?: boolean | (() => boolean);
|
11
|
-
diffConfig?:
|
11
|
+
diffConfig?: DiffConfigType;
|
12
12
|
clearNotShow?: boolean;
|
13
13
|
}
|
14
|
+
/**
|
15
|
+
* 兼容旧命名导出
|
16
|
+
*/
|
17
|
+
export type ContainerProps = ContainerType;
|
@@ -1,11 +1,11 @@
|
|
1
1
|
import { FormInstance, FormListFieldData, FormListOperation } from 'antd';
|
2
2
|
import { InternalNamePath } from 'antd/es/form/interface';
|
3
3
|
import React from 'react';
|
4
|
-
import {
|
4
|
+
import { FormListType, ActionType, FormListMode } from '../propsType';
|
5
5
|
export interface Props {
|
6
|
-
min?:
|
7
|
-
max?:
|
8
|
-
actionProps:
|
6
|
+
min?: FormListType['min'];
|
7
|
+
max?: FormListType['max'];
|
8
|
+
actionProps: ActionType[];
|
9
9
|
namePath: InternalNamePath;
|
10
10
|
form: FormInstance;
|
11
11
|
field: Omit<FormListFieldData, 'key'> & {
|
@@ -2,9 +2,9 @@ import { ColProps, FormListFieldData } from 'antd';
|
|
2
2
|
import React from 'react';
|
3
3
|
import { InternalNamePath } from 'antd/es/form/interface';
|
4
4
|
import type { levelType } from '../../../../../ProLayout/components/ProCollapse/PropTypes';
|
5
|
-
import type {
|
6
|
-
import {
|
7
|
-
interface Props extends Omit<
|
5
|
+
import type { FormListType } from '../propsType';
|
6
|
+
import { DiffConfigType } from '../../../../propsType';
|
7
|
+
interface Props extends Omit<FormListType, 'toolbarProps'> {
|
8
8
|
index: number;
|
9
9
|
namePath: InternalNamePath;
|
10
10
|
disabled?: boolean;
|
@@ -15,7 +15,7 @@ interface Props extends Omit<FormListProps, 'toolbarProps'> {
|
|
15
15
|
};
|
16
16
|
level?: levelType;
|
17
17
|
towCollapse?: boolean;
|
18
|
-
diffConfig?:
|
18
|
+
diffConfig?: DiffConfigType;
|
19
19
|
}
|
20
20
|
declare const BlockFields: React.FC<Props>;
|
21
21
|
export default BlockFields;
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import { ColProps, FormListFieldData } from 'antd';
|
2
2
|
import React from 'react';
|
3
3
|
import { InternalNamePath } from 'antd/es/form/interface';
|
4
|
-
import {
|
5
|
-
import {
|
6
|
-
interface Props extends Omit<
|
4
|
+
import { FormListType } from '../propsType';
|
5
|
+
import { DiffConfigType } from '../../../../propsType';
|
6
|
+
interface Props extends Omit<FormListType, 'toolbarProps'> {
|
7
7
|
className?: string;
|
8
8
|
index: number;
|
9
9
|
namePath: InternalNamePath;
|
@@ -13,7 +13,7 @@ interface Props extends Omit<FormListProps, 'toolbarProps'> {
|
|
13
13
|
field: Omit<FormListFieldData, 'key'> & {
|
14
14
|
key: string;
|
15
15
|
};
|
16
|
-
diffConfig?:
|
16
|
+
diffConfig?: DiffConfigType;
|
17
17
|
}
|
18
18
|
declare const LineFields: React.FC<Props>;
|
19
19
|
export default LineFields;
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import { InternalNamePath } from 'antd/es/form/interface';
|
2
2
|
import React from 'react';
|
3
|
-
import {
|
3
|
+
import { ToolbarActionType } from '../propsType';
|
4
4
|
import { Props as ActionButtonProps } from './ActionButton';
|
5
5
|
interface Props extends Omit<ActionButtonProps, 'actionProps' | 'field' | 'index' | 'mode' | 'namePath'> {
|
6
|
-
toolbarProps:
|
6
|
+
toolbarProps: ToolbarActionType[];
|
7
7
|
namePath: InternalNamePath;
|
8
8
|
disabled?: boolean;
|
9
9
|
isView?: boolean;
|
@@ -1,4 +1,4 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
import type {
|
3
|
-
declare const _default: React.ForwardRefExoticComponent<
|
2
|
+
import type { FormListRefType, FormListType } from './propsType';
|
3
|
+
declare const _default: React.ForwardRefExoticComponent<FormListType & React.RefAttributes<FormListRefType>>;
|
4
4
|
export default _default;
|