@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,66 +1,176 @@
|
|
1
1
|
import { ReactNode } from 'react';
|
2
2
|
import type { SelectProps } from 'antd';
|
3
3
|
import { Service, Options, Result } from 'ahooks/lib/useRequest/src/types';
|
4
|
-
import {
|
5
|
-
|
4
|
+
import { ProFormOtherType } from '../ProForm/propsType';
|
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
|
-
/**
|
28
|
-
|
29
|
-
|
68
|
+
/**
|
69
|
+
* @description 集成表单 form 的属性
|
70
|
+
* @default -
|
71
|
+
*/
|
72
|
+
otherProps?: ProFormOtherType;
|
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;
|
@@ -1,3 +1,3 @@
|
|
1
|
-
import {
|
2
|
-
declare const ProStepItem: ({ id, title, collapse: collapseItem, children, lazyLoad: stepLazyLoad, ...restProps }:
|
1
|
+
import { ProStepItemType } from '../../propsType';
|
2
|
+
declare const ProStepItem: ({ id, title, collapse: collapseItem, children, lazyLoad: stepLazyLoad, ...restProps }: ProStepItemType) => import("react/jsx-runtime").JSX.Element;
|
3
3
|
export default ProStepItem;
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import {
|
2
|
-
export declare const Step: ({ fixedTop, dataSource, activeKey, errorCollection, style, targetOffset, scrollToError, }: ProStepPropsType & {
|
1
|
+
import { ProStepType } from '../../propsType';
|
2
|
+
export declare const Step: ({ fixedTop, dataSource, activeKey, errorCollection, style, targetOffset, scrollToError, }: import("../../propsType").ProStepPropsType & {
|
3
3
|
errorCollection: object;
|
4
4
|
}) => import("react/jsx-runtime").JSX.Element;
|
5
5
|
export default Step;
|
package/es/ProStep/index.d.ts
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
/// <reference types="react" />
|
2
|
-
import {
|
2
|
+
import { ProStepType } from './propsType';
|
3
3
|
import './style/index.less';
|
4
4
|
export declare const ProStepContext: import("react").Context<any>;
|
5
5
|
export declare const useStep: () => any;
|
6
6
|
declare const ProStep: {
|
7
|
-
({ children, ...resetProps }:
|
7
|
+
({ children, ...resetProps }: ProStepType): import("react/jsx-runtime").JSX.Element;
|
8
8
|
useStep: () => any;
|
9
9
|
Item: ({ id, title, collapse: collapseItem, children, lazyLoad: stepLazyLoad, ...restProps }: import("./propsType").ProStepItemPropsType) => import("react/jsx-runtime").JSX.Element;
|
10
10
|
Listener: ({ children, delayTime, excludes, ...props }: any) => import("react").DetailedReactHTMLElement<any, HTMLElement>;
|
package/es/ProStep/index.js
CHANGED
@@ -133,6 +133,16 @@ var ProStep = function ProStep(_ref) {
|
|
133
133
|
record.subEvent = subEvent;
|
134
134
|
registerMap.current[id] = record;
|
135
135
|
};
|
136
|
+
// 取消注册
|
137
|
+
var unNotify = function unNotify(keys) {
|
138
|
+
if (typeof keys === 'string') {
|
139
|
+
delete registerMap.current[keys];
|
140
|
+
} else if (Array.isArray(keys)) {
|
141
|
+
keys.forEach(function (key) {
|
142
|
+
delete registerMap.current[key];
|
143
|
+
});
|
144
|
+
}
|
145
|
+
};
|
136
146
|
var handleScrollError = function handleScrollError(data) {
|
137
147
|
var errorModuleKeys = Object.keys(data).reverse();
|
138
148
|
if (errorModuleKeys === null || errorModuleKeys === void 0 ? void 0 : errorModuleKeys.length) {
|
@@ -237,7 +247,8 @@ var ProStep = function ProStep(_ref) {
|
|
237
247
|
notify: notify,
|
238
248
|
triggerTo: triggerTo,
|
239
249
|
handleScroll: handleScroll,
|
240
|
-
lazyLoad: lazyLoad
|
250
|
+
lazyLoad: lazyLoad,
|
251
|
+
unNotify: unNotify
|
241
252
|
},
|
242
253
|
children: _jsxs("div", {
|
243
254
|
className: "pro-step-wrapper",
|
@@ -1,42 +1,90 @@
|
|
1
|
-
import { ReactNode } from 'react';
|
1
|
+
import { ReactNode, CSSProperties } from 'react';
|
2
2
|
import { LazyLoadProps } from 'react-lazyload';
|
3
|
+
/**
|
4
|
+
* 步骤项基础类型定义
|
5
|
+
* @interface ItemType
|
6
|
+
*/
|
3
7
|
export interface ItemType {
|
8
|
+
/** 步骤名称 */
|
4
9
|
name: string;
|
10
|
+
/** 步骤唯一标识码 */
|
5
11
|
code: string;
|
12
|
+
/** 步骤排序值,越小越靠前 */
|
6
13
|
order?: number;
|
7
14
|
}
|
15
|
+
/**
|
16
|
+
* 已加载地图项属性类型
|
17
|
+
* @interface LoadedMapPropsType
|
18
|
+
*/
|
8
19
|
export interface LoadedMapPropsType {
|
20
|
+
/** 唯一标识符 */
|
9
21
|
id: string;
|
22
|
+
/** 排序值 */
|
10
23
|
order: number;
|
24
|
+
/** 标题文本 */
|
11
25
|
title: string;
|
26
|
+
/** 是否已加载 */
|
12
27
|
loaded: boolean;
|
13
28
|
}
|
29
|
+
/**
|
30
|
+
* @type LoadedMapType
|
31
|
+
*/
|
32
|
+
export type LoadedMapType = LoadedMapPropsType;
|
33
|
+
/**
|
34
|
+
* ProStep 组件属性类型
|
35
|
+
* @interface ProStepPropsType
|
36
|
+
*/
|
14
37
|
export interface ProStepPropsType {
|
15
|
-
/**
|
38
|
+
/** 步骤条配置项 */
|
16
39
|
dataSource?: ItemType[];
|
17
|
-
/**
|
40
|
+
/** 距离顶部的偏移量(单位:像素) */
|
18
41
|
fixedTop: number;
|
19
|
-
/**
|
42
|
+
/** 当前激活的步骤标识 */
|
20
43
|
activeKey?: string;
|
21
|
-
/**
|
44
|
+
/** 子组件内容 */
|
22
45
|
children?: ReactNode;
|
23
|
-
/**
|
24
|
-
style?:
|
25
|
-
/**
|
46
|
+
/** 组件自定义样式 */
|
47
|
+
style?: CSSProperties;
|
48
|
+
/** 滚动偏移量(单位:像素) */
|
26
49
|
targetOffset?: number;
|
27
|
-
/**
|
50
|
+
/** 是否使用折叠标题 */
|
28
51
|
collapse?: boolean;
|
29
|
-
/**
|
52
|
+
/** 是否自动滚动到第一个报错的步骤 */
|
30
53
|
scrollToError?: boolean;
|
31
|
-
/**
|
54
|
+
/**
|
55
|
+
* 模块可视区域懒加载
|
56
|
+
* @description 为true时使用默认配置,或传入自定义懒加载配置
|
57
|
+
*/
|
32
58
|
lazyLoad?: boolean | LazyLoadProps;
|
33
59
|
}
|
60
|
+
/**
|
61
|
+
* ProStep 组件基础类型
|
62
|
+
* @type ProStepType
|
63
|
+
*/
|
64
|
+
export type ProStepType = ProStepPropsType;
|
65
|
+
/**
|
66
|
+
* ProStep 子项组件属性类型
|
67
|
+
* @interface ProStepItemPropsType
|
68
|
+
*/
|
34
69
|
export interface ProStepItemPropsType {
|
70
|
+
/** 唯一标识符 */
|
35
71
|
id: string;
|
72
|
+
/** 步骤标题 */
|
36
73
|
title?: string;
|
74
|
+
/** 是否使用折叠模式 */
|
37
75
|
collapse?: boolean;
|
76
|
+
/** 排序值,越小越靠前 */
|
38
77
|
order?: number;
|
39
|
-
/**
|
78
|
+
/**
|
79
|
+
* 模块可视区域懒加载
|
80
|
+
* @description 为true时使用默认配置,或传入自定义懒加载配置
|
81
|
+
*/
|
40
82
|
lazyLoad?: boolean | LazyLoadProps;
|
83
|
+
/** 允许其他任意属性 */
|
41
84
|
[key: string]: any;
|
42
85
|
}
|
86
|
+
/**
|
87
|
+
* ProStep 子项组件基础类型
|
88
|
+
* @type ProStepItemType
|
89
|
+
*/
|
90
|
+
export type ProStepItemType = ProStepItemPropsType;
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import type {
|
1
|
+
import type { LoadedMapType } from '../propsType';
|
2
2
|
export declare const handleScroll: (id: any, options: any) => void;
|
3
3
|
/** 获取加载模块数据信息 */
|
4
|
-
export declare const getLoadedMap: (registerMap: any) =>
|
4
|
+
export declare const getLoadedMap: (registerMap: any) => LoadedMapType[];
|
5
5
|
export default handleScroll;
|
@@ -2,9 +2,9 @@
|
|
2
2
|
* 调整点:
|
3
3
|
*/
|
4
4
|
import React from 'react';
|
5
|
-
import {
|
5
|
+
import type { ProTableColumnType } from '../../propsType';
|
6
6
|
export declare const formatColumn: ({ column, originalObj, rowKey, wrapToolTipProps, scroll, onUpdateMinWidth, isInNewRow, diffConfig, }: {
|
7
|
-
column:
|
7
|
+
column: ProTableColumnType;
|
8
8
|
originalObj: any;
|
9
9
|
rowKey: any;
|
10
10
|
wrapToolTipProps?: any;
|
@@ -216,7 +216,7 @@ export var formatColumn = function formatColumn(_ref2) {
|
|
216
216
|
}
|
217
217
|
var valueTypePrecision = precision;
|
218
218
|
if (['percentage', 'permillage', 'thousandth', 'thousandthCNY'].includes(valueType)) {
|
219
|
-
valueTypePrecision = precision
|
219
|
+
valueTypePrecision = precision !== null && precision !== void 0 ? precision : 2;
|
220
220
|
}
|
221
221
|
// 百分比、千分比
|
222
222
|
if (['percentage', 'permillage'].includes(valueType)) {
|
@@ -264,7 +264,7 @@ export var formatColumn = function formatColumn(_ref2) {
|
|
264
264
|
// 千分位, 千分位带CNY前缀
|
265
265
|
} else if (['thousandth', 'thousandthCNY'].includes(valueType)) {
|
266
266
|
column.render = function (value, record, index) {
|
267
|
-
var valueStr = valueTypePrecision ? "".concat(Number(value).toFixed(valueTypePrecision)) : "".concat(value);
|
267
|
+
var valueStr = valueTypePrecision || valueTypePrecision === 0 ? "".concat(Number(value).toFixed(valueTypePrecision)) : "".concat(value);
|
268
268
|
var renderValue = valueStr.replace(/\B(?=(\d{3})+(?!\d))/g, ',');
|
269
269
|
var originalResult = getOriginalValue(value, record, originalObj, rowKey, dataIndex);
|
270
270
|
var isChanged = originalResult.isChanged,
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { Key } from 'react';
|
2
2
|
import { useRequest } from 'ahooks';
|
3
|
-
import {
|
4
|
-
declare function useAntdTable<I, R extends Record<string, any>, S extends
|
3
|
+
import type { ProTableRequestOptionsType, ProTableServiceType } from '../propsType';
|
4
|
+
declare function useAntdTable<I, R extends Record<string, any>, S extends ProTableServiceType<I, R>>(service: S, options?: ProTableRequestOptionsType<I, R>, useRequestOptions?: Parameters<typeof useRequest>[1]): {
|
5
5
|
data: R[];
|
6
6
|
params: any;
|
7
7
|
rowSelection: {
|
package/es/ProTable/index.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/// <reference types="react" />
|
2
|
-
import {
|
2
|
+
import type { ProTableType } from './propsType';
|
3
3
|
import useAntdTable from './hooks/useAntdTable';
|
4
4
|
export declare const TableContext: import("react").Context<{}>;
|
5
5
|
export declare const defaultPage: {
|
@@ -7,7 +7,7 @@ export declare const defaultPage: {
|
|
7
7
|
pageSize: number;
|
8
8
|
};
|
9
9
|
declare const ProTable: {
|
10
|
-
(props:
|
10
|
+
(props: ProTableType): import("react/jsx-runtime").JSX.Element;
|
11
11
|
defaultProps: {
|
12
12
|
quickConfig: boolean;
|
13
13
|
stripe: boolean;
|