@zat-design/sisyphus-react 3.11.14 → 3.12.0-beta.2
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 +2 -2
- package/es/ProDrawerForm/index.js +10 -3
- 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 +51 -25
- 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 +9 -3
- 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 +2 -2
- package/lib/ProDrawerForm/index.js +9 -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 +51 -25
- 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 +9 -3
- 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,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 type { 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, order, ...restProps }: ProStepItemType) => JSX.Element;
|
3
3
|
export default ProStepItem;
|
@@ -14,7 +14,8 @@ var _reactLazyload = _interopRequireWildcard(require("react-lazyload"));
|
|
14
14
|
var _lodash = require("lodash");
|
15
15
|
var _index = require("../../index");
|
16
16
|
var _ProCollapse = _interopRequireDefault(require("../../../ProLayout/components/ProCollapse"));
|
17
|
-
var _excluded = ["id", "title", "collapse", "children", "lazyLoad"];
|
17
|
+
var _excluded = ["id", "title", "collapse", "children", "lazyLoad", "order"];
|
18
|
+
// 默认的懒加载配置
|
18
19
|
var defaultLazyLoadConfig = {
|
19
20
|
height: 200,
|
20
21
|
offset: 100,
|
@@ -27,6 +28,8 @@ var ProStepItem = function ProStepItem(_ref) {
|
|
27
28
|
collapseItem = _ref$collapse === void 0 ? true : _ref$collapse,
|
28
29
|
children = _ref.children,
|
29
30
|
stepLazyLoad = _ref.lazyLoad,
|
31
|
+
_ref$order = _ref.order,
|
32
|
+
order = _ref$order === void 0 ? 0 : _ref$order,
|
30
33
|
restProps = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
31
34
|
var _useStep = (0, _index.useStep)(),
|
32
35
|
register = _useStep.register,
|
@@ -39,13 +42,14 @@ var ProStepItem = function ProStepItem(_ref) {
|
|
39
42
|
register === null || register === void 0 ? void 0 : register((0, _objectSpread2.default)({
|
40
43
|
id: id,
|
41
44
|
title: title,
|
45
|
+
order: order,
|
42
46
|
lazyLoad: lazyLoad
|
43
47
|
}, restProps));
|
44
48
|
}, 0);
|
45
49
|
return function () {
|
46
50
|
clearTimeout(timeoutId);
|
47
51
|
};
|
48
|
-
}, [id, title, lazyLoad, restProps, register]);
|
52
|
+
}, [id, title, order, lazyLoad, restProps, register]);
|
49
53
|
var renderChildren = function renderChildren() {
|
50
54
|
if (lazyLoad) {
|
51
55
|
var lazyLoadProps = (0, _lodash.isBoolean)(lazyLoad) ? defaultLazyLoadConfig : lazyLoad;
|
@@ -1,3 +1,4 @@
|
|
1
|
-
import
|
2
|
-
|
3
|
-
|
1
|
+
import { ReactElement } from 'react';
|
2
|
+
import type { ListenerProps } from '../../propsType';
|
3
|
+
declare const Listener: ({ children, delayTime, excludes, ...props }: ListenerProps) => ReactElement;
|
4
|
+
export default Listener;
|
@@ -15,6 +15,11 @@ var _reactLazyload = require("react-lazyload");
|
|
15
15
|
var _index = require("../../index");
|
16
16
|
var _utils = require("../../utils");
|
17
17
|
var _excluded = ["children", "delayTime", "excludes"];
|
18
|
+
/**
|
19
|
+
* 检查错误列表并返回第一个错误项
|
20
|
+
* @param arr DOM元素数组
|
21
|
+
* @returns 错误元素信息
|
22
|
+
*/
|
18
23
|
var checkErrorList = function checkErrorList(arr) {
|
19
24
|
for (var i = 0; i < arr.length; i++) {
|
20
25
|
if (arr[i].className.includes('errored')) {
|
@@ -26,8 +31,12 @@ var checkErrorList = function checkErrorList(arr) {
|
|
26
31
|
}
|
27
32
|
return null;
|
28
33
|
};
|
34
|
+
/**
|
35
|
+
* 查找第一个错误的DOM元素
|
36
|
+
* @returns 错误元素信息
|
37
|
+
*/
|
29
38
|
var findFirstErrorDom = function findFirstErrorDom() {
|
30
|
-
var errorList = document.querySelectorAll('.pro-step-com-menu-item')
|
39
|
+
var errorList = document.querySelectorAll('.pro-step-com-menu-item');
|
31
40
|
var hasErrorItem = document.querySelectorAll('.pro-step-com-menu-item .errored');
|
32
41
|
var hasFormError = document.querySelector('.ant-form-item-explain-error');
|
33
42
|
if ((hasErrorItem === null || hasErrorItem === void 0 ? void 0 : hasErrorItem.length) && !hasFormError) {
|
@@ -35,13 +44,17 @@ var findFirstErrorDom = function findFirstErrorDom() {
|
|
35
44
|
}
|
36
45
|
return null;
|
37
46
|
};
|
38
|
-
|
47
|
+
/**
|
48
|
+
* 检查所有模块是否已加载完成
|
49
|
+
* @param data 模块加载数据
|
50
|
+
* @returns 是否所有模块都已加载
|
51
|
+
*/
|
39
52
|
var areAllModulesLoaded = function areAllModulesLoaded(data) {
|
40
53
|
return data.every(function (item) {
|
41
54
|
return (item === null || item === void 0 ? void 0 : item.loaded) === true;
|
42
55
|
});
|
43
56
|
};
|
44
|
-
var
|
57
|
+
var Listener = function Listener(_ref) {
|
45
58
|
var children = _ref.children,
|
46
59
|
delayTime = _ref.delayTime,
|
47
60
|
excludes = _ref.excludes,
|
@@ -95,4 +108,5 @@ var _default = exports.default = function _default(_ref) {
|
|
95
108
|
}, _callee);
|
96
109
|
})), 3000)
|
97
110
|
}));
|
98
|
-
};
|
111
|
+
};
|
112
|
+
var _default = exports.default = Listener;
|
@@ -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/lib/ProStep/index.d.ts
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
/// <reference types="react" />
|
2
|
-
import {
|
2
|
+
import { ProStepType, ProStepContextType } from './propsType';
|
3
3
|
import './style/index.less';
|
4
|
-
export declare const ProStepContext: import("react").Context<
|
5
|
-
export declare const useStep: () =>
|
4
|
+
export declare const ProStepContext: import("react").Context<ProStepContextType>;
|
5
|
+
export declare const useStep: () => Partial<ProStepContextType>;
|
6
6
|
declare const ProStep: {
|
7
|
-
({ children, ...resetProps }:
|
8
|
-
useStep: () =>
|
9
|
-
Item: ({ id, title, collapse: collapseItem, children, lazyLoad: stepLazyLoad, ...restProps }: import("./propsType").ProStepItemPropsType) =>
|
10
|
-
Listener: ({ children, delayTime, excludes, ...props }:
|
7
|
+
({ children, ...resetProps }: ProStepType): JSX.Element;
|
8
|
+
useStep: () => Partial<ProStepContextType>;
|
9
|
+
Item: ({ id, title, collapse: collapseItem, children, lazyLoad: stepLazyLoad, order, ...restProps }: import("./propsType").ProStepItemPropsType) => JSX.Element;
|
10
|
+
Listener: ({ children, delayTime, excludes, ...props }: import("./propsType").ListenerProps) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
11
11
|
};
|
12
12
|
export default ProStep;
|
package/lib/ProStep/index.js
CHANGED
@@ -19,7 +19,9 @@ var _Step = _interopRequireDefault(require("./components/Step"));
|
|
19
19
|
var _Item = _interopRequireDefault(require("./components/Item"));
|
20
20
|
var _Listener = _interopRequireDefault(require("./components/Listener"));
|
21
21
|
require("./style/index.less");
|
22
|
-
var _excluded = ["children"]
|
22
|
+
var _excluded = ["children"],
|
23
|
+
_excluded2 = ["id", "form", "title", "validator", "order", "disabled", "lazyLoad"];
|
24
|
+
// 创建上下文并提供类型
|
23
25
|
var ProStepContext = exports.ProStepContext = /*#__PURE__*/(0, _react.createContext)(null);
|
24
26
|
var useStep = exports.useStep = function useStep() {
|
25
27
|
return (0, _react.useContext)(ProStepContext) || {};
|
@@ -82,7 +84,9 @@ var ProStep = function ProStep(_ref) {
|
|
82
84
|
title = _ref4.title,
|
83
85
|
validator = _ref4.validator,
|
84
86
|
order = _ref4.order,
|
85
|
-
disabled = _ref4.disabled
|
87
|
+
disabled = _ref4.disabled,
|
88
|
+
lazyLoad = _ref4.lazyLoad,
|
89
|
+
rest = (0, _objectWithoutProperties2.default)(_ref4, _excluded2);
|
86
90
|
var record = {};
|
87
91
|
record.id = id;
|
88
92
|
record.title = title;
|
@@ -92,7 +96,7 @@ var ProStep = function ProStep(_ref) {
|
|
92
96
|
}
|
93
97
|
if (disabled) {
|
94
98
|
registerMap.current[id] = record;
|
95
|
-
return
|
99
|
+
return;
|
96
100
|
}
|
97
101
|
var subEvent = /*#__PURE__*/function () {
|
98
102
|
var _ref5 = (0, _asyncToGenerator2.default)(/*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee() {
|
@@ -140,6 +144,16 @@ var ProStep = function ProStep(_ref) {
|
|
140
144
|
record.subEvent = subEvent;
|
141
145
|
registerMap.current[id] = record;
|
142
146
|
};
|
147
|
+
// 取消注册
|
148
|
+
var unNotify = function unNotify(keys) {
|
149
|
+
if (typeof keys === 'string') {
|
150
|
+
delete registerMap.current[keys];
|
151
|
+
} else if (Array.isArray(keys)) {
|
152
|
+
keys.forEach(function (key) {
|
153
|
+
delete registerMap.current[key];
|
154
|
+
});
|
155
|
+
}
|
156
|
+
};
|
143
157
|
var handleScrollError = function handleScrollError(data) {
|
144
158
|
var errorModuleKeys = Object.keys(data).reverse();
|
145
159
|
if (errorModuleKeys === null || errorModuleKeys === void 0 ? void 0 : errorModuleKeys.length) {
|
@@ -244,7 +258,8 @@ var ProStep = function ProStep(_ref) {
|
|
244
258
|
notify: notify,
|
245
259
|
triggerTo: triggerTo,
|
246
260
|
handleScroll: _utils.handleScroll,
|
247
|
-
lazyLoad: lazyLoad
|
261
|
+
lazyLoad: lazyLoad,
|
262
|
+
unNotify: unNotify
|
248
263
|
},
|
249
264
|
children: (0, _jsxRuntime.jsxs)("div", {
|
250
265
|
className: "pro-step-wrapper",
|
@@ -1,42 +1,230 @@
|
|
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
|
+
* @interface ProStepItemPropsType
|
63
|
+
*/
|
34
64
|
export interface ProStepItemPropsType {
|
65
|
+
/** 唯一标识符 */
|
35
66
|
id: string;
|
67
|
+
/** 步骤标题 */
|
36
68
|
title?: string;
|
69
|
+
/** 是否使用折叠模式 */
|
37
70
|
collapse?: boolean;
|
71
|
+
/** 排序值,越小越靠前 */
|
38
72
|
order?: number;
|
39
|
-
/**
|
73
|
+
/**
|
74
|
+
* 模块可视区域懒加载
|
75
|
+
* @description 为true时使用默认配置,或传入自定义懒加载配置
|
76
|
+
*/
|
40
77
|
lazyLoad?: boolean | LazyLoadProps;
|
78
|
+
/** 允许其他任意属性 */
|
41
79
|
[key: string]: any;
|
42
80
|
}
|
81
|
+
/**
|
82
|
+
* ProStep 子项组件基础类型
|
83
|
+
* @type ProStepItemType
|
84
|
+
*/
|
85
|
+
export type ProStepItemType = ProStepItemPropsType;
|
86
|
+
/**
|
87
|
+
* ProStep组件上下文类型
|
88
|
+
* @interface ProStepContextType
|
89
|
+
*/
|
90
|
+
export interface ProStepContextType {
|
91
|
+
/** 注册映射引用 */
|
92
|
+
registerMap: React.MutableRefObject<Record<string, RegisterMapItem>>;
|
93
|
+
/** 是否折叠 */
|
94
|
+
collapse?: boolean;
|
95
|
+
/** 注册函数 */
|
96
|
+
register: (params: RegisterParams) => void;
|
97
|
+
/** 通知函数 */
|
98
|
+
notify: (params?: NotifyParams) => Promise<any[]>;
|
99
|
+
/** 触发特定项的函数 */
|
100
|
+
triggerTo: (keys: string[]) => Promise<any[]>;
|
101
|
+
/** 处理滚动的函数 */
|
102
|
+
handleScroll: (id: string, options?: ScrollOptions) => void;
|
103
|
+
/** 懒加载配置 */
|
104
|
+
lazyLoad?: boolean | any;
|
105
|
+
/** 取消注册函数 */
|
106
|
+
unNotify: (keys: string | string[]) => void;
|
107
|
+
}
|
108
|
+
/**
|
109
|
+
* 注册参数类型
|
110
|
+
* @interface RegisterParams
|
111
|
+
*/
|
112
|
+
export interface RegisterParams {
|
113
|
+
/** 唯一标识符 */
|
114
|
+
id: string;
|
115
|
+
/** 表单实例 */
|
116
|
+
form?: any;
|
117
|
+
/** 标题 */
|
118
|
+
title: string;
|
119
|
+
/** 自定义验证器 */
|
120
|
+
validator?: () => Promise<any>;
|
121
|
+
/** 排序值 */
|
122
|
+
order: number;
|
123
|
+
/** 是否禁用 */
|
124
|
+
disabled?: boolean;
|
125
|
+
/** 懒加载配置 */
|
126
|
+
lazyLoad?: boolean | any;
|
127
|
+
/** 允许其他任意属性 */
|
128
|
+
[key: string]: any;
|
129
|
+
}
|
130
|
+
/**
|
131
|
+
* 注册映射项类型
|
132
|
+
* @interface RegisterMapItem
|
133
|
+
*/
|
134
|
+
export interface RegisterMapItem {
|
135
|
+
/** 唯一标识符 */
|
136
|
+
id: string;
|
137
|
+
/** 标题 */
|
138
|
+
title: string;
|
139
|
+
/** 排序值 */
|
140
|
+
order: number;
|
141
|
+
/** 提交事件 */
|
142
|
+
subEvent?: () => Promise<any>;
|
143
|
+
/** 允许其他任意属性 */
|
144
|
+
[key: string]: any;
|
145
|
+
}
|
146
|
+
/**
|
147
|
+
* 通知参数类型
|
148
|
+
* @interface NotifyParams
|
149
|
+
*/
|
150
|
+
export interface NotifyParams {
|
151
|
+
/** 排除项 */
|
152
|
+
excludes?: string[];
|
153
|
+
}
|
154
|
+
/**
|
155
|
+
* 滚动选项类型
|
156
|
+
* @interface ScrollOptions
|
157
|
+
*/
|
158
|
+
export interface ScrollOptions {
|
159
|
+
/** 目标偏移量 */
|
160
|
+
targetOffset?: number;
|
161
|
+
/** 是否滚动到错误位置 */
|
162
|
+
scrollToError?: boolean;
|
163
|
+
}
|
164
|
+
/**
|
165
|
+
* ProStep监听器属性类型
|
166
|
+
* @interface ListenerProps
|
167
|
+
*/
|
168
|
+
export interface ListenerProps {
|
169
|
+
/** 子元素 */
|
170
|
+
children: React.ReactElement;
|
171
|
+
/** 延迟时间 */
|
172
|
+
delayTime?: number;
|
173
|
+
/** 排除项 */
|
174
|
+
excludes?: string[];
|
175
|
+
/** 允许其他任意属性 */
|
176
|
+
[key: string]: any;
|
177
|
+
}
|
178
|
+
/**
|
179
|
+
* 错误结果类型
|
180
|
+
* @interface ErrorResult
|
181
|
+
*/
|
182
|
+
export interface ErrorResult {
|
183
|
+
/** 错误DOM元素 */
|
184
|
+
errorDom: HTMLElement | null;
|
185
|
+
/** 索引 */
|
186
|
+
index: number;
|
187
|
+
}
|
188
|
+
/**
|
189
|
+
* 锚点SVG属性类型
|
190
|
+
* @interface AnchorSvgProps
|
191
|
+
*/
|
192
|
+
export interface AnchorSvgProps {
|
193
|
+
/** 颜色 */
|
194
|
+
color?: string;
|
195
|
+
}
|
196
|
+
/**
|
197
|
+
* 菜单项属性类型
|
198
|
+
* @interface MenuItemProps
|
199
|
+
*/
|
200
|
+
export interface MenuItemProps {
|
201
|
+
/** 名称 */
|
202
|
+
name: string;
|
203
|
+
/** 编码 */
|
204
|
+
code: string;
|
205
|
+
/** 是否开启 */
|
206
|
+
onOff: boolean;
|
207
|
+
/** 是否是开始项 */
|
208
|
+
isStart?: boolean;
|
209
|
+
/** 是否是结束项 */
|
210
|
+
isEnd?: boolean;
|
211
|
+
/** 是否禁用 */
|
212
|
+
isDisabled?: boolean;
|
213
|
+
/** 是否是当前步骤 */
|
214
|
+
isCurrentStep?: boolean;
|
215
|
+
/** 是否已检查 */
|
216
|
+
isChecked?: boolean;
|
217
|
+
/** 错误数量 */
|
218
|
+
errorNum?: number;
|
219
|
+
/** 当前数量 */
|
220
|
+
currentNum?: number;
|
221
|
+
/** 目标偏移量 */
|
222
|
+
targetOffset?: number;
|
223
|
+
/** 是否滚动到错误位置 */
|
224
|
+
scrollToError?: boolean;
|
225
|
+
}
|
226
|
+
/**
|
227
|
+
* ProStep 组件基础类型
|
228
|
+
* @type ProStepType
|
229
|
+
*/
|
230
|
+
export type ProStepType = ProStepPropsType;
|
@@ -1,5 +1,18 @@
|
|
1
|
-
import
|
2
|
-
|
3
|
-
/**
|
4
|
-
|
1
|
+
import React from 'react';
|
2
|
+
import type { LoadedMapType } from '../propsType';
|
3
|
+
/**
|
4
|
+
* 处理滚动到指定元素位置
|
5
|
+
* @param id 目标元素的ID
|
6
|
+
* @param options 滚动选项
|
7
|
+
*/
|
8
|
+
export declare const handleScroll: (id: string, options?: {
|
9
|
+
targetOffset?: number;
|
10
|
+
scrollToError?: boolean;
|
11
|
+
}) => void;
|
12
|
+
/**
|
13
|
+
* 获取加载模块数据信息
|
14
|
+
* @param registerMap 注册映射对象
|
15
|
+
* @returns 模块加载状态列表
|
16
|
+
*/
|
17
|
+
export declare const getLoadedMap: (registerMap: React.MutableRefObject<Record<string, any>>) => LoadedMapType[];
|
5
18
|
export default handleScroll;
|