@zat-design/sisyphus-react 3.11.14 → 3.12.0-beta.1
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 +26 -15
- package/dist/less.esm.css +26 -15
- package/es/ProAction/index.d.ts +2 -2
- package/es/ProAction/propsType.d.ts +16 -10
- package/es/ProConfigProvider/index.d.ts +7 -7
- 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/ProDrawer/index.js +12 -2
- package/es/ProDrawerForm/components/ProModal/index.d.ts +2 -2
- package/es/ProDrawerForm/components/ProModal/index.js +12 -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/Summary/index.d.ts +2 -2
- package/es/ProEditTable/index.d.ts +2 -2
- package/es/ProEditTable/index.js +18 -16
- package/es/ProEditTable/propsType.d.ts +243 -106
- package/es/ProEditTable/style/index.less +1 -0
- package/es/ProEditTable/utils/index.d.ts +1 -1
- package/es/ProEditTable/utils/index.js +6 -4
- package/es/ProEditTable/utils/tools.d.ts +57 -22
- package/es/ProEditTable/utils/tools.js +47 -21
- package/es/ProEnum/components/Group.d.ts +2 -2
- package/es/ProEnum/components/Tag.d.ts +2 -2
- package/es/ProEnum/hooks/useEnum.d.ts +2 -2
- package/es/ProEnum/hooks/useEnum.js +46 -17
- package/es/ProEnum/hooks/useEnumRequest.d.ts +2 -2
- package/es/ProEnum/index.d.ts +2 -2
- package/es/ProEnum/propsType.d.ts +231 -42
- package/es/ProEnum/propsType.js +0 -6
- package/es/ProEnum/utils/index.d.ts +9 -2
- package/es/ProEnum/utils/index.js +9 -2
- 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/index.js +17 -4
- package/es/ProForm/components/base/Input/propsType.d.ts +10 -6
- 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 +10 -6
- 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 +6 -6
- 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/index.d.ts +2 -2
- package/es/ProForm/components/combination/ProNumberRange/propsType.d.ts +7 -3
- package/es/ProForm/components/combination/ProTimeLimit/index.d.ts +15 -9
- package/es/ProForm/components/old/EnumSelect/index.d.ts +1 -1
- package/es/ProForm/components/old/EnumSelect/interface.d.ts +2 -2
- package/es/ProForm/components/old/InputWithSuffix/index.d.ts +1 -1
- package/es/ProForm/components/old/ProAddress/index.d.ts +1 -1
- package/es/ProForm/components/old/ProCertNo/index.d.ts +1 -1
- package/es/ProForm/components/old/ProCertValidity/index.d.ts +1 -1
- package/es/ProForm/components/old/ProRangeBox/index.d.ts +1 -1
- package/es/ProForm/components/render/ChangedWrapper.d.ts +2 -2
- package/es/ProForm/components/render/ConfirmWrapper.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 +76 -69
- package/es/ProForm/index.d.ts +2 -2
- package/es/ProForm/index.js +3 -1
- package/es/ProForm/propsType.d.ts +26 -17
- package/es/ProForm/propsType.js +0 -1
- package/es/ProForm/utils/transformValue.d.ts +2 -2
- package/es/ProForm/utils/useFieldProps.d.ts +3 -3
- package/es/ProForm/utils/useForm.d.ts +2 -1
- package/es/ProForm/utils/useForm.js +3 -2
- package/es/ProForm/utils/useRules.d.ts +1 -1
- package/es/ProForm/utils/useShouldUpdate.d.ts +3 -3
- package/es/ProIcon/index.d.ts +2 -2
- package/es/ProIcon/propsTypes.d.ts +120 -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/Anchor/index.d.ts +2 -1
- package/es/ProStep/components/Item/index.d.ts +2 -2
- package/es/ProStep/components/Item/index.js +6 -2
- package/es/ProStep/components/Listener/index.d.ts +4 -3
- package/es/ProStep/components/Listener/index.js +18 -4
- package/es/ProStep/components/Step/index.d.ts +2 -2
- package/es/ProStep/index.d.ts +7 -7
- package/es/ProStep/index.js +19 -4
- package/es/ProStep/propsType.d.ts +200 -12
- package/es/ProStep/utils/index.d.ts +17 -4
- package/es/ProStep/utils/index.js +11 -2
- package/es/ProTable/components/FormatColumn/index.d.ts +2 -2
- package/es/ProTable/components/FormatColumn/index.js +5 -8
- package/es/ProTable/components/RenderTabs/index.d.ts +4 -0
- package/es/ProTable/components/RenderTabs/index.js +78 -0
- package/es/ProTable/components/index.d.ts +25 -0
- package/es/ProTable/components/index.js +26 -1
- package/es/ProTable/hooks/useAntdTable.d.ts +2 -93
- package/es/ProTable/hooks/useAntdTable.js +6 -2
- package/es/ProTable/index.d.ts +2 -2
- package/es/ProTable/index.js +6 -3
- package/es/ProTable/propsType.d.ts +630 -39
- 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/ProTooltip/index.d.ts +2 -2
- package/es/ProTooltip/propsType.d.ts +49 -9
- package/es/ProTree/components/List.d.ts +2 -2
- package/es/ProTree/components/List.js +2 -2
- package/es/ProTree/components/ProTree.d.ts +2 -2
- package/es/ProTree/components/ProTreeSelect/index.d.ts +3 -3
- package/es/ProTree/components/ProTreeSelect/propsType.d.ts +372 -34
- package/es/ProTree/components/SearchTitle.d.ts +2 -2
- package/es/ProTree/components/Tree.d.ts +3 -3
- package/es/ProTree/index.d.ts +2 -2
- package/es/ProTree/index.js +1 -1
- package/es/ProTree/propsType.d.ts +694 -103
- package/es/ProTree/utils.d.ts +7 -7
- package/es/ProTreeModal/components/Cascader.d.ts +3 -3
- package/es/ProTreeModal/components/List.d.ts +3 -3
- package/es/ProTreeModal/components/Tree.d.ts +2 -2
- package/es/ProTreeModal/index.d.ts +2 -2
- package/es/ProTreeModal/index.js +2 -2
- package/es/ProTreeModal/propsType.d.ts +258 -49
- package/es/ProTreeModal/utils.d.ts +7 -7
- 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 +15 -6
- package/es/index.js +1 -7
- package/lib/ProAction/index.d.ts +2 -2
- package/lib/ProAction/propsType.d.ts +16 -10
- package/lib/ProConfigProvider/index.d.ts +7 -7
- 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/ProDrawer/index.js +12 -2
- package/lib/ProDrawerForm/components/ProModal/index.d.ts +2 -2
- package/lib/ProDrawerForm/components/ProModal/index.js +12 -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/Summary/index.d.ts +2 -2
- package/lib/ProEditTable/index.d.ts +2 -2
- package/lib/ProEditTable/index.js +18 -16
- package/lib/ProEditTable/propsType.d.ts +243 -106
- package/lib/ProEditTable/style/index.less +1 -0
- package/lib/ProEditTable/utils/index.d.ts +1 -1
- package/lib/ProEditTable/utils/index.js +6 -4
- package/lib/ProEditTable/utils/tools.d.ts +57 -22
- package/lib/ProEditTable/utils/tools.js +47 -21
- package/lib/ProEnum/components/Group.d.ts +2 -2
- package/lib/ProEnum/components/Tag.d.ts +2 -2
- package/lib/ProEnum/hooks/useEnum.d.ts +2 -2
- package/lib/ProEnum/hooks/useEnum.js +48 -17
- package/lib/ProEnum/hooks/useEnumRequest.d.ts +2 -2
- package/lib/ProEnum/index.d.ts +2 -2
- package/lib/ProEnum/propsType.d.ts +231 -42
- package/lib/ProEnum/propsType.js +1 -7
- package/lib/ProEnum/utils/index.d.ts +9 -2
- package/lib/ProEnum/utils/index.js +9 -2
- 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/index.js +17 -4
- package/lib/ProForm/components/base/Input/propsType.d.ts +10 -6
- 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 +10 -6
- 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 +6 -6
- 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/index.d.ts +2 -2
- package/lib/ProForm/components/combination/ProNumberRange/propsType.d.ts +7 -3
- package/lib/ProForm/components/combination/ProTimeLimit/index.d.ts +15 -9
- package/lib/ProForm/components/old/EnumSelect/index.d.ts +1 -1
- package/lib/ProForm/components/old/EnumSelect/interface.d.ts +2 -2
- package/lib/ProForm/components/old/InputWithSuffix/index.d.ts +1 -1
- package/lib/ProForm/components/old/ProAddress/index.d.ts +1 -1
- package/lib/ProForm/components/old/ProCertNo/index.d.ts +1 -1
- package/lib/ProForm/components/old/ProCertValidity/index.d.ts +1 -1
- package/lib/ProForm/components/old/ProRangeBox/index.d.ts +1 -1
- package/lib/ProForm/components/render/ChangedWrapper.d.ts +2 -2
- package/lib/ProForm/components/render/ConfirmWrapper.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 +76 -69
- package/lib/ProForm/index.d.ts +2 -2
- package/lib/ProForm/index.js +3 -1
- package/lib/ProForm/propsType.d.ts +26 -17
- package/lib/ProForm/propsType.js +0 -15
- package/lib/ProForm/utils/transformValue.d.ts +2 -2
- package/lib/ProForm/utils/useFieldProps.d.ts +3 -3
- package/lib/ProForm/utils/useForm.d.ts +2 -1
- package/lib/ProForm/utils/useForm.js +3 -2
- package/lib/ProForm/utils/useRules.d.ts +1 -1
- package/lib/ProForm/utils/useShouldUpdate.d.ts +3 -3
- package/lib/ProIcon/index.d.ts +2 -2
- package/lib/ProIcon/propsTypes.d.ts +120 -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/Anchor/index.d.ts +2 -1
- package/lib/ProStep/components/Item/index.d.ts +2 -2
- package/lib/ProStep/components/Item/index.js +6 -2
- package/lib/ProStep/components/Listener/index.d.ts +4 -3
- package/lib/ProStep/components/Listener/index.js +18 -4
- package/lib/ProStep/components/Step/index.d.ts +2 -2
- package/lib/ProStep/index.d.ts +7 -7
- package/lib/ProStep/index.js +19 -4
- package/lib/ProStep/propsType.d.ts +200 -12
- package/lib/ProStep/utils/index.d.ts +17 -4
- package/lib/ProStep/utils/index.js +11 -2
- package/lib/ProTable/components/FormatColumn/index.d.ts +2 -2
- package/lib/ProTable/components/FormatColumn/index.js +5 -8
- package/lib/ProTable/components/RenderTabs/index.d.ts +4 -0
- package/lib/ProTable/components/RenderTabs/index.js +82 -0
- package/lib/ProTable/components/index.d.ts +25 -0
- package/lib/ProTable/components/index.js +8 -1
- package/lib/ProTable/hooks/useAntdTable.d.ts +2 -93
- package/lib/ProTable/hooks/useAntdTable.js +5 -1
- package/lib/ProTable/index.d.ts +2 -2
- package/lib/ProTable/index.js +5 -2
- package/lib/ProTable/propsType.d.ts +630 -39
- 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/ProTooltip/index.d.ts +2 -2
- package/lib/ProTooltip/propsType.d.ts +49 -9
- package/lib/ProTree/components/List.d.ts +2 -2
- package/lib/ProTree/components/List.js +2 -2
- package/lib/ProTree/components/ProTree.d.ts +2 -2
- package/lib/ProTree/components/ProTreeSelect/index.d.ts +3 -3
- package/lib/ProTree/components/ProTreeSelect/propsType.d.ts +372 -34
- package/lib/ProTree/components/SearchTitle.d.ts +2 -2
- package/lib/ProTree/components/Tree.d.ts +3 -3
- package/lib/ProTree/index.d.ts +2 -2
- package/lib/ProTree/index.js +1 -1
- package/lib/ProTree/propsType.d.ts +694 -103
- package/lib/ProTree/utils.d.ts +7 -7
- package/lib/ProTreeModal/components/Cascader.d.ts +3 -3
- package/lib/ProTreeModal/components/List.d.ts +3 -3
- package/lib/ProTreeModal/components/Tree.d.ts +2 -2
- package/lib/ProTreeModal/index.d.ts +2 -2
- package/lib/ProTreeModal/index.js +2 -2
- package/lib/ProTreeModal/propsType.d.ts +258 -49
- package/lib/ProTreeModal/utils.d.ts +7 -7
- 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 +15 -6
- package/lib/index.js +7 -71
- package/package.json +1 -1
- package/.vscode/extensions.json +0 -5
- package/test/__mocks__/fileMock.js +0 -0
- package/test/__mocks__/styleMock.js +0 -0
@@ -1,49 +1,102 @@
|
|
1
1
|
import { FormInstance, InputProps, SelectProps, ModalProps } from 'antd';
|
2
2
|
import { Service, Options } from 'ahooks/lib/useRequest/src/types';
|
3
3
|
import React from 'react';
|
4
|
-
import {
|
5
|
-
import {
|
4
|
+
import type { ProFormColumnType } from '../../render/propsType';
|
5
|
+
import type { ProFormOtherType } from '../../../propsType';
|
6
|
+
/**
|
7
|
+
* 模态框确认按钮回调函数类型
|
8
|
+
* @param list 选中的数据列表
|
9
|
+
* @returns 返回布尔值或Promise<布尔值>,用于控制模态框是否关闭
|
10
|
+
*/
|
6
11
|
type OnOkFunction = (list?: Record<string, any>[]) => boolean | void | Promise<boolean | void>;
|
12
|
+
/**
|
13
|
+
* 配置选项接口
|
14
|
+
*/
|
7
15
|
interface ConfigOption {
|
16
|
+
/** ahooks的useRequest参数配置 */
|
8
17
|
useRequest?: {
|
18
|
+
/** 请求服务 */
|
9
19
|
service?: Service<any, any>;
|
20
|
+
/** useRequest选项配置 */
|
10
21
|
options?: Options<any, any> & {
|
11
22
|
page?: any;
|
12
23
|
defaultParams?: any;
|
13
24
|
initParams?: any;
|
14
25
|
};
|
26
|
+
/** 初始化参数 */
|
15
27
|
initParams?: any;
|
16
28
|
};
|
17
|
-
|
29
|
+
/** 表单列配置项 */
|
30
|
+
formColumns?: ProFormColumnType[];
|
31
|
+
/** 选择模式:单选(radio)或多选(checkbox) */
|
18
32
|
type?: 'radio' | 'checkbox';
|
33
|
+
/** 是否开启分页功能 */
|
19
34
|
withPagination?: boolean;
|
35
|
+
/** 转换请求参数 */
|
20
36
|
transformParams?: (params: any) => any;
|
37
|
+
/** 转换响应数据 */
|
21
38
|
transformResponse?: (data: any[]) => any[];
|
39
|
+
/** 模态框属性配置 */
|
22
40
|
modalProps?: ModalProps & {
|
23
41
|
onOk?: OnOkFunction;
|
24
42
|
};
|
43
|
+
/** 表格属性配置 */
|
25
44
|
tableProps?: Record<string, any>;
|
26
45
|
}
|
46
|
+
/**
|
47
|
+
* 模态框选择器属性接口
|
48
|
+
*/
|
27
49
|
interface ProModalPropsType {
|
50
|
+
/** 配置选项 */
|
28
51
|
configOption: ConfigOption;
|
52
|
+
/** 值变更回调 */
|
29
53
|
onChange?: (value: number | string | undefined, option?: any) => void;
|
54
|
+
/** 弹框标题 */
|
30
55
|
title: ModalProps['title'];
|
56
|
+
/** 组件引用 */
|
31
57
|
ref?: React.MutableRefObject<any>;
|
58
|
+
/** 自定义格式化显示值 */
|
32
59
|
onFormat?: (value: any) => string;
|
60
|
+
/** 自定义选项渲染函数 */
|
33
61
|
optionRender?: (value: any) => string;
|
62
|
+
/** 自定义字段名映射 */
|
34
63
|
fieldNames?: any;
|
64
|
+
/** 是否为查看模式 */
|
35
65
|
isView?: boolean;
|
66
|
+
/** 自定义组件渲染 */
|
36
67
|
customRender?: React.ReactNode;
|
68
|
+
/** 自定义空数据展示组件 */
|
37
69
|
viewEmpty?: React.ReactNode;
|
38
|
-
|
70
|
+
/** ProForm中传递的其他参数 */
|
71
|
+
otherProps?: ProFormOtherType;
|
72
|
+
/**
|
73
|
+
* 是否将选项的label包装到value中
|
74
|
+
* 会将Select的value类型从string变为{value: string, label: ReactNode}格式
|
75
|
+
*/
|
39
76
|
labelInValue?: boolean;
|
77
|
+
/** 是否默认选择列表第一项 */
|
40
78
|
defaultOne?: boolean;
|
79
|
+
/** 打开弹框前的校验函数 */
|
41
80
|
beforeOpen?: any;
|
81
|
+
/** 打开弹框后的回调函数 */
|
42
82
|
afterOpen?: any;
|
43
|
-
|
83
|
+
/** 是否启用tooltip提示 */
|
84
|
+
isTooltip?: boolean;
|
85
|
+
/** 是否以"值-名称"形式展示 */
|
44
86
|
showCodeName?: boolean;
|
87
|
+
/** 查询表单实例,用于获取查询表单数据 */
|
45
88
|
searchForm?: FormInstance;
|
89
|
+
/** 模糊查询的字段名 */
|
46
90
|
searchKey?: string;
|
47
91
|
}
|
92
|
+
/** 模态框选择器属性类型(结合Select和Input属性) */
|
48
93
|
export declare type ProModalSelectPropsType = SelectProps & InputProps & ProModalPropsType;
|
94
|
+
/** 配置选项类型 */
|
95
|
+
export type ProModalSelectConfigType = ConfigOption;
|
96
|
+
/** 模态框属性类型 */
|
97
|
+
export type ProModalType = Omit<ProModalPropsType, 'configOption'> & {
|
98
|
+
configOption: ProModalSelectConfigType;
|
99
|
+
};
|
100
|
+
/** 模态框选择器类型(结合Select和Input属性) */
|
101
|
+
export type ProModalSelectType = SelectProps & InputProps & ProModalType;
|
49
102
|
export {};
|
@@ -1,3 +1,3 @@
|
|
1
|
-
import {
|
2
|
-
declare const ProNumberRange: (props:
|
1
|
+
import type { ProNumberRangeType } from './propsType';
|
2
|
+
declare const ProNumberRange: (props: ProNumberRangeType) => any;
|
3
3
|
export default ProNumberRange;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
import {
|
3
|
-
export interface
|
2
|
+
import type { ProFormOtherType } from '../../../propsType';
|
3
|
+
export interface ProNumberRangeType {
|
4
4
|
/**
|
5
5
|
* @description 组件的值,[最小值,最大值]
|
6
6
|
* @default []
|
@@ -75,6 +75,10 @@ export interface ProNumberRangeProps {
|
|
75
75
|
*/
|
76
76
|
separator?: React.ReactNode | string;
|
77
77
|
childProps?: any[];
|
78
|
-
otherProps?:
|
78
|
+
otherProps?: ProFormOtherType;
|
79
79
|
id?: string;
|
80
80
|
}
|
81
|
+
/**
|
82
|
+
* 兼容旧命名导出
|
83
|
+
*/
|
84
|
+
export type ProNumberRangeProps = ProNumberRangeType;
|
@@ -2,20 +2,20 @@ import { DatePickerProps, TimePickerProps } from 'antd';
|
|
2
2
|
import { PickerPanelDateProps } from 'antd/lib/calendar/generateCalendar';
|
3
3
|
import { Moment } from 'moment';
|
4
4
|
import React from 'react';
|
5
|
-
import {
|
6
|
-
import { Props as
|
7
|
-
import { DistributiveOmit } from '../../../../ProForm/propsType';
|
5
|
+
import type { ProFormOtherType } from '../../../propsType';
|
6
|
+
import { Props as ProRangeLimitType } from '../ProRangeLimit';
|
7
|
+
import type { DistributiveOmit } from '../../../../ProForm/propsType';
|
8
8
|
export type DateType = DatePickerProps['value'];
|
9
|
-
export type
|
9
|
+
export type ProTimeLimitType = DistributiveOmit<DatePickerProps, 'value' | 'onChange' | 'mode'> & {
|
10
10
|
value?: string;
|
11
|
-
onChange?: (value:
|
11
|
+
onChange?: (value: ProTimeLimitType['value'] | null, valueData: Moment) => void;
|
12
12
|
disabled?: boolean;
|
13
13
|
foreverDate?: string;
|
14
14
|
foreverText?: string;
|
15
15
|
viewEmpty?: React.ReactNode;
|
16
16
|
format?: string;
|
17
17
|
valueType?: 'moment' | 'format' | 'ISO' | 'dateTime' | 'dateStartEndTime';
|
18
|
-
otherProps?:
|
18
|
+
otherProps?: ProFormOtherType;
|
19
19
|
mode?: 'DatePicker';
|
20
20
|
isView?: boolean;
|
21
21
|
/**
|
@@ -26,9 +26,15 @@ export type ProTimeLimitProps = DistributiveOmit<DatePickerProps, 'value' | 'onC
|
|
26
26
|
showTime?: PickerPanelDateProps<Moment>['showTime'];
|
27
27
|
showNow?: boolean;
|
28
28
|
};
|
29
|
-
export declare const ProTimeLimit: React.FC<
|
30
|
-
export type
|
29
|
+
export declare const ProTimeLimit: React.FC<ProTimeLimitType>;
|
30
|
+
export type ProLimitType = ProTimeLimitType | (ProRangeLimitType & {
|
31
31
|
mode: 'RangePicker';
|
32
32
|
});
|
33
|
-
declare const LimitPick: React.FC<
|
33
|
+
declare const LimitPick: React.FC<ProLimitType>;
|
34
34
|
export default LimitPick;
|
35
|
+
/**
|
36
|
+
* 兼容旧命名导出
|
37
|
+
*/
|
38
|
+
export type ProTimeLimitProps = ProTimeLimitType;
|
39
|
+
export type ProLimitProps = ProLimitType;
|
40
|
+
export type Props = ProRangeLimitType;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { InputProps, ModalProps } from 'antd';
|
2
2
|
import React from 'react';
|
3
|
-
import {
|
3
|
+
import type { ProFormColumnType } from '../../render/propsType';
|
4
4
|
type RequestFunction<P = Record<string, any> | void, R = any> = (params: P, ...args: any[]) => Promise<R>;
|
5
5
|
type OnOkFunction = (list: Record<string, any>[]) => boolean;
|
6
6
|
interface IConfigOption {
|
@@ -8,7 +8,7 @@ interface IConfigOption {
|
|
8
8
|
fetchOptions: RequestFunction;
|
9
9
|
useRequestOptions: object;
|
10
10
|
conditionKey: string;
|
11
|
-
conditionColumns:
|
11
|
+
conditionColumns: ProFormColumnType[];
|
12
12
|
defaultParams: Record<string, any>;
|
13
13
|
withPagination: boolean;
|
14
14
|
paginationPosition: 'tableBottom' | 'modalBottom';
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import { ProRangeBoxPropsType } from './propsType';
|
1
|
+
import type { ProRangeBoxPropsType } from './propsType';
|
2
2
|
export default function ProRangeBox({ configOption }: ProRangeBoxPropsType): import("react/jsx-runtime").JSX.Element;
|
@@ -2,12 +2,12 @@ import { FormInstance } from 'antd';
|
|
2
2
|
import { NamePath } from 'antd/lib/form/interface';
|
3
3
|
import React from 'react';
|
4
4
|
import { DiffOriginalParams } from '../../utils/diffOriginal';
|
5
|
-
import {
|
5
|
+
import type { DiffConfigType } from '../../propsType';
|
6
6
|
interface Props {
|
7
7
|
name?: NamePath;
|
8
8
|
names?: NamePath[];
|
9
9
|
namesStr?: string;
|
10
|
-
diffConfig?:
|
10
|
+
diffConfig?: DiffConfigType;
|
11
11
|
form: FormInstance;
|
12
12
|
onDiff?: DiffOriginalParams['onDiff'];
|
13
13
|
valuePropName?: string;
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
import {
|
2
|
+
import type { ProFormColumnType } from '../../propsType';
|
3
3
|
interface Props<T = any> {
|
4
4
|
value?: T;
|
5
5
|
onChange?: (value: T, ...rest: any[]) => void;
|
6
|
-
confirm:
|
6
|
+
confirm: ProFormColumnType['confirm'];
|
7
7
|
[K: string]: any;
|
8
8
|
}
|
9
9
|
declare const ConfirmWrapper: React.FC<Props>;
|
@@ -1,11 +1,11 @@
|
|
1
1
|
import { ColProps } from 'antd';
|
2
2
|
import { FormInstance } from 'antd/es/form/Form';
|
3
3
|
import React from 'react';
|
4
|
-
import {
|
5
|
-
import {
|
4
|
+
import type { ProFormColumnType } from './propsType';
|
5
|
+
import type { DiffConfigType } from '../../propsType';
|
6
6
|
interface Props<T = any> {
|
7
7
|
isView?: boolean;
|
8
|
-
columns:
|
8
|
+
columns: ProFormColumnType[];
|
9
9
|
disabled?: boolean;
|
10
10
|
form: FormInstance<T>;
|
11
11
|
expand?: boolean | number;
|
@@ -15,7 +15,7 @@ interface Props<T = any> {
|
|
15
15
|
viewEmpty?: React.ReactNode;
|
16
16
|
openState?: boolean;
|
17
17
|
labelWidth?: string | number;
|
18
|
-
diffConfig?:
|
18
|
+
diffConfig?: DiffConfigType;
|
19
19
|
clearNotShow?: boolean;
|
20
20
|
requiredOnView?: boolean;
|
21
21
|
required?: boolean | boolean[] | (() => boolean | boolean[]);
|
@@ -1,45 +1,42 @@
|
|
1
|
-
import { ColProps, FormInstance, FormItemProps, ModalFuncProps } from 'antd';
|
2
|
-
import { NamePath } from 'antd/es/form/interface';
|
1
|
+
import type { ColProps, FormInstance, FormItemProps, ModalFuncProps } from 'antd';
|
2
|
+
import type { NamePath } from 'antd/es/form/interface';
|
3
3
|
import React from 'react';
|
4
4
|
import { validate, regExp } from '@zat-design/utils';
|
5
|
-
import { RuleObject } from 'antd/es/form';
|
6
|
-
import
|
7
|
-
import {
|
8
|
-
import { Props as
|
9
|
-
import { Props as
|
10
|
-
import { Props as
|
11
|
-
import { Props as
|
12
|
-
import {
|
13
|
-
import {
|
14
|
-
import { Props as
|
15
|
-
import { Props as
|
16
|
-
import { Props as
|
17
|
-
import { Props as
|
18
|
-
import {
|
19
|
-
import {
|
20
|
-
import {
|
21
|
-
import {
|
22
|
-
import {
|
23
|
-
import {
|
24
|
-
import {
|
25
|
-
import {
|
26
|
-
import {
|
27
|
-
import {
|
28
|
-
import {
|
29
|
-
import {
|
30
|
-
import {
|
31
|
-
import {
|
32
|
-
import {
|
33
|
-
import {
|
34
|
-
import { DiffOriginalParams } from '../../utils/diffOriginal';
|
35
|
-
export type ComponentMap = keyof typeof componentMap;
|
5
|
+
import type { RuleObject } from 'antd/es/form';
|
6
|
+
import type { Props as InputProps } from '../base/Input/propsType';
|
7
|
+
import type { Props as InputNumberProps } from '../base/InputNumber';
|
8
|
+
import type { Props as RadioProps } from '../base/Radio';
|
9
|
+
import type { Props as CheckboxProps } from '../base/Checkbox';
|
10
|
+
import type { Props as DatePickerProps } from '../base/DatePicker';
|
11
|
+
import type { Props as RangePickerProps } from '../base/RangePicker';
|
12
|
+
import type { TypeWithRef as FormListType } from '../combination/FormList/propsType';
|
13
|
+
import type { Props as SelectProps } from '../base/Select';
|
14
|
+
import type { Props as TimePickerProps } from '../base/TimePicker';
|
15
|
+
import type { Props as SwitchProps } from '../base/Switch';
|
16
|
+
import type { Props as SwitchCheckboxProps } from '../base/SwitchCheckbox';
|
17
|
+
import type { Props as TextAreaProps } from '../base/TextArea';
|
18
|
+
import type { ProCascaderType } from '../combination/ProCascader/propsType';
|
19
|
+
import type { ProCombinationType } from '../combination/ProCombination/propsType';
|
20
|
+
import type { ProModalSelectType } from '../combination/ProModalSelect/propsType';
|
21
|
+
import type { ProNumberRangeType } from '../combination/ProNumberRange/propsType';
|
22
|
+
import type { ProLimitProps } from '../combination/ProTimeLimit';
|
23
|
+
import type { Props as ProRangeLimitProps } from '../combination/ProRangeLimit';
|
24
|
+
import type { CheckboxPropsMap, ProEnum, PropProSelectsMap, PropRadioPropsMap } from '../../../ProEnum/propsType';
|
25
|
+
import type { PropSelectProps as ProSelectProps } from '../../../ProSelect/propsType';
|
26
|
+
import type { ProEditTableType } from '../../../ProEditTable/propsType';
|
27
|
+
import type { ProTreeModalType } from '../../../ProTreeModal/propsType';
|
28
|
+
import type { ProUploadType } from '../../../ProUpload/propsType';
|
29
|
+
import type { ProTreeProps } from '../../../ProTree/propsType';
|
30
|
+
import type { GroupType as GroupCopyProps } from '../combination/Group/propsType';
|
31
|
+
import type { ProCollapseProps } from '../../../ProLayout/components/ProCollapse/PropTypes';
|
32
|
+
import type { DistributiveOmit, DiffConfigType } from '../../propsType';
|
33
|
+
import type { DiffOriginalParams } from '../../utils/diffOriginal';
|
36
34
|
type ValidateKey = keyof typeof validate;
|
37
35
|
type RegExpKey = keyof typeof regExp;
|
38
|
-
interface
|
36
|
+
export interface ProRule extends Omit<RuleObject, 'type'> {
|
39
37
|
type?: ValidateKey | RegExpKey;
|
40
38
|
message?: string;
|
41
39
|
}
|
42
|
-
export type ProRule = ExtendType;
|
43
40
|
/**
|
44
41
|
* percent 百分比 permillage 千分比 amount 金额
|
45
42
|
*/
|
@@ -66,9 +63,9 @@ type TransformToFormField<T extends ControlProps, Values> = DistributiveOmit<T,
|
|
66
63
|
/** ProForm disable时,是否完全受控 */
|
67
64
|
disabledStrictly?: boolean;
|
68
65
|
};
|
69
|
-
type
|
70
|
-
type
|
71
|
-
type
|
66
|
+
type ProEnumFormType<Values> = TransformToFormField<ProEnum, Values> | TransformToFormField<ProEnum & PropProSelectsMap, Values> | TransformToFormField<ProEnum & PropRadioPropsMap, Values> | TransformToFormField<ProEnum & CheckboxPropsMap, Values>;
|
67
|
+
type ProEnumTableType<Values> = TransformToTableField<ProEnum, Values> | TransformToTableField<ProEnum & PropProSelectsMap, Values> | TransformToTableField<ProEnum & PropRadioPropsMap, Values> | TransformToTableField<ProEnum & CheckboxPropsMap, Values>;
|
68
|
+
type ProEnumFieldType<Values, TT> = TT extends 'ProForm' ? ProEnumFormType<Values> | ReactiveFunction<Values, ProEnumFormType<Values>> : ProEnumTableType<Values> | ((text: any, values: Values, index: number) => ProEnumTableType<Values>);
|
72
69
|
type TransformToTableField<T extends ControlProps, Values> = Omit<T, 'onChange' | 'value' | 'onBlur'> & {
|
73
70
|
value?: T['value'];
|
74
71
|
onChange?: (value: Parameters<T['onChange']>[0], options: Parameters<T['onChange']>[1], record: any, index: number, form: FormInstance<Values>) => void;
|
@@ -81,83 +78,83 @@ export type ReactiveFunction<Values, R> = (values: Values, { form, index, namePa
|
|
81
78
|
namePath?: NamePath;
|
82
79
|
[key: string]: any;
|
83
80
|
}) => R;
|
84
|
-
type
|
81
|
+
type FieldType<T extends ControlProps, Values, TT> = TT extends 'ProForm' ? TransformToFormField<T, Values> | ReactiveFunction<Values, TransformToFormField<T, Values>> : TransformToTableField<T, Values> | ((text: any, values: Values, index: number) => TransformToTableField<T, Values>);
|
85
82
|
/**
|
86
83
|
* 值转换
|
87
84
|
*/
|
88
85
|
export type ProFormValueType = 'percentage' | 'permillage' | 'thousandth' | 'datePicker' | 'enumName' | 'enumCodeName' | 'address' | 'thousandthCNY' | 'date' | 'dateTime' | 'dateStartTime' | 'dateEndTime' | 'dateStartEndTime' | 'switch' | 'desensitization';
|
89
|
-
export type
|
86
|
+
export type ColumnTypeMap<Values = any, T = 'ProForm'> = {
|
90
87
|
type?: 'Input';
|
91
|
-
fieldProps?:
|
88
|
+
fieldProps?: FieldType<InputProps, Values, T>;
|
92
89
|
} | {
|
93
90
|
type?: 'InputNumber';
|
94
|
-
fieldProps?:
|
91
|
+
fieldProps?: FieldType<InputNumberProps, Values, T>;
|
95
92
|
} | {
|
96
93
|
type?: 'Radio';
|
97
|
-
fieldProps?:
|
94
|
+
fieldProps?: FieldType<RadioProps, Values, T>;
|
98
95
|
} | {
|
99
96
|
type?: 'Checkbox';
|
100
|
-
fieldProps?:
|
97
|
+
fieldProps?: FieldType<CheckboxProps, Values, T>;
|
101
98
|
} | {
|
102
99
|
type?: 'DatePicker';
|
103
|
-
fieldProps?:
|
100
|
+
fieldProps?: FieldType<DatePickerProps, Values, T>;
|
104
101
|
} | {
|
105
102
|
type?: 'RangePicker';
|
106
|
-
fieldProps?:
|
103
|
+
fieldProps?: FieldType<RangePickerProps, Values, T>;
|
107
104
|
} | {
|
108
105
|
type?: 'FormList';
|
109
|
-
fieldProps?:
|
106
|
+
fieldProps?: FieldType<Omit<FormListType, 'fields' | 'operation' | 'meta'>, Values, T>;
|
110
107
|
} | {
|
111
108
|
type?: 'Select';
|
112
|
-
fieldProps?:
|
109
|
+
fieldProps?: FieldType<SelectProps, Values, T>;
|
113
110
|
} | {
|
114
111
|
type?: 'TimePicker';
|
115
|
-
fieldProps?:
|
112
|
+
fieldProps?: FieldType<TimePickerProps, Values, T>;
|
116
113
|
} | {
|
117
114
|
type?: 'Switch';
|
118
|
-
fieldProps?:
|
115
|
+
fieldProps?: FieldType<SwitchProps, Values, T>;
|
119
116
|
} | {
|
120
117
|
type?: 'SwitchCheckbox';
|
121
|
-
fieldProps?:
|
118
|
+
fieldProps?: FieldType<SwitchCheckboxProps, Values, T>;
|
122
119
|
} | {
|
123
120
|
type?: 'TextArea';
|
124
|
-
fieldProps?:
|
121
|
+
fieldProps?: FieldType<TextAreaProps, Values, T>;
|
125
122
|
} | {
|
126
123
|
type?: 'ProCascader';
|
127
|
-
fieldProps?:
|
124
|
+
fieldProps?: FieldType<ProCascaderType, Values, T>;
|
128
125
|
} | {
|
129
126
|
type?: 'ProCombination';
|
130
|
-
fieldProps?:
|
127
|
+
fieldProps?: FieldType<ProCombinationType, Values, T>;
|
131
128
|
} | {
|
132
129
|
type?: 'ProModalSelect';
|
133
|
-
fieldProps?:
|
130
|
+
fieldProps?: FieldType<ProModalSelectType, Values, T>;
|
134
131
|
} | {
|
135
132
|
type?: 'ProNumberRange';
|
136
|
-
fieldProps?:
|
133
|
+
fieldProps?: FieldType<ProNumberRangeType, Values, T>;
|
137
134
|
} | {
|
138
135
|
type?: 'ProRangeLimit';
|
139
|
-
fieldProps?:
|
136
|
+
fieldProps?: FieldType<ProRangeLimitProps, Values, T>;
|
140
137
|
} | {
|
141
138
|
type?: 'ProTimeLimit';
|
142
|
-
fieldProps?:
|
139
|
+
fieldProps?: FieldType<ProLimitProps, Values, T>;
|
143
140
|
} | {
|
144
141
|
type?: 'ProEnum';
|
145
|
-
fieldProps?:
|
142
|
+
fieldProps?: ProEnumFieldType<Values, T>;
|
146
143
|
} | {
|
147
144
|
type?: 'ProSelect';
|
148
|
-
fieldProps?:
|
145
|
+
fieldProps?: FieldType<ProSelectProps, Values, T>;
|
149
146
|
} | {
|
150
147
|
type?: 'ProEditTable';
|
151
|
-
fieldProps?:
|
148
|
+
fieldProps?: FieldType<ProEditTableType, Values, T>;
|
152
149
|
} | {
|
153
150
|
type?: 'ProTreeModal';
|
154
|
-
fieldProps?:
|
151
|
+
fieldProps?: FieldType<ProTreeModalType, Values, T>;
|
155
152
|
} | {
|
156
153
|
type?: 'ProUpload';
|
157
|
-
fieldProps?:
|
154
|
+
fieldProps?: FieldType<ProUploadType, Values, T>;
|
158
155
|
} | {
|
159
156
|
type?: 'ProTree';
|
160
|
-
fieldProps?:
|
157
|
+
fieldProps?: FieldType<ProTreeProps, Values, T>;
|
161
158
|
} | {
|
162
159
|
type?: 'Group';
|
163
160
|
fieldProps?: GroupCopyProps | ReactiveFunction<Values, GroupCopyProps>;
|
@@ -168,7 +165,7 @@ export type ColumnPropsMap<Values = any, T = 'ProForm'> = {
|
|
168
165
|
type?: 'Container';
|
169
166
|
fieldProps?: any;
|
170
167
|
};
|
171
|
-
export interface
|
168
|
+
export interface ProFormColumn<Values = any> extends Omit<FormItemProps<Values>, 'rules' | 'required'> {
|
172
169
|
component?: React.ReactNode | ReactiveFunction<Values, React.ReactNode>;
|
173
170
|
names?: NamePath[];
|
174
171
|
show?: boolean | ReactiveFunction<Values, boolean>;
|
@@ -233,11 +230,11 @@ export interface ProFormColumnProps<Values = any> extends Omit<FormItemProps<Val
|
|
233
230
|
/** 脱敏数据位置下标 */
|
234
231
|
desensitization?: [number, number] | ReactiveFunction<Values, [number, number]>;
|
235
232
|
}
|
236
|
-
export type
|
233
|
+
export type ProFormColumnType<T = any> = ProFormColumn<T> & ColumnTypeMap<T, 'ProForm'>;
|
237
234
|
/**
|
238
235
|
* 表单渲染类型
|
239
236
|
*/
|
240
|
-
export interface
|
237
|
+
export interface RenderType<Values = any> {
|
241
238
|
formDisabled?: boolean;
|
242
239
|
component: any;
|
243
240
|
formItemProps: FormItemProps<Values> & {
|
@@ -278,10 +275,20 @@ export interface RenderProps<Values = any> {
|
|
278
275
|
form: FormInstance<Values>;
|
279
276
|
fieldProps?: ReactiveFunction<Values, React.ReactNode>;
|
280
277
|
isSelect: boolean;
|
281
|
-
diffConfig:
|
278
|
+
diffConfig: DiffConfigType;
|
282
279
|
requiredOnView?: boolean;
|
283
|
-
confirm?:
|
280
|
+
confirm?: ProFormColumnType['confirm'];
|
284
281
|
globalControl?: boolean;
|
285
282
|
[name: string]: any;
|
286
283
|
}
|
284
|
+
/**
|
285
|
+
* 兼容旧命名导出
|
286
|
+
*/
|
287
|
+
export type ProEnumFormProps<Values> = ProEnumFormType<Values>;
|
288
|
+
export type ProEnumTableProps<Values> = ProEnumTableType<Values>;
|
289
|
+
export type ProEnumFieldProps<Values, TT> = ProEnumFieldType<Values, TT>;
|
290
|
+
export type FieldProps<T extends ControlProps, Values, TT> = FieldType<T, Values, TT>;
|
291
|
+
export type ColumnPropsMap<Values = any, T = 'ProForm'> = ColumnTypeMap<Values, T>;
|
292
|
+
export type ProColumnProps<Values = any> = ProFormColumnType<Values>;
|
293
|
+
export type RenderProps<Values = any> = RenderType<Values>;
|
287
294
|
export {};
|
package/lib/ProForm/index.d.ts
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
import { FormInstance } from 'antd';
|
2
2
|
import React, { ForwardRefRenderFunction } from 'react';
|
3
3
|
import { FormProviderProps } from 'antd/es/form/context';
|
4
|
-
import {
|
4
|
+
import type { ProFormType } from './propsType';
|
5
5
|
import { useForm } from './utils/useForm';
|
6
6
|
import useWatch from './utils/useWatch';
|
7
|
-
interface IProForm<T = any> extends ForwardRefRenderFunction<FormInstance<T>,
|
7
|
+
interface IProForm<T = any> extends ForwardRefRenderFunction<FormInstance<T>, ProFormType<T>> {
|
8
8
|
useForm: typeof useForm;
|
9
9
|
useWatch: typeof useWatch;
|
10
10
|
[key: string]: any;
|
package/lib/ProForm/index.js
CHANGED
@@ -74,10 +74,12 @@ var ProForm = function ProForm(props, ref) {
|
|
74
74
|
desensitizationKey = _props$desensitizatio === void 0 ? 'zat-design-pro-component-desensitization' : _props$desensitizatio,
|
75
75
|
otherProps = (0, _objectWithoutProperties2.default)(props, _excluded);
|
76
76
|
var config = (0, _ProConfigProvider.useProConfig)('ProForm');
|
77
|
+
// source: 用于区分是哪个组件调用,用于错误提示
|
77
78
|
var _useForm = (0, _useForm3.useForm)(originForm, {
|
78
79
|
scrollToError: scrollToError,
|
79
80
|
optimize: optimize,
|
80
|
-
formKey: formKey
|
81
|
+
formKey: formKey,
|
82
|
+
source: 'ProForm'
|
81
83
|
}),
|
82
84
|
_useForm2 = (0, _slicedToArray2.default)(_useForm, 1),
|
83
85
|
form = _useForm2[0];
|