@zat-design/sisyphus-react 3.11.14 → 3.12.0
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/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/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/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/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 +1 -1
- 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/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/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/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/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 +1 -1
- 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
@@ -6,276 +6,413 @@ import type { TooltipProps } from 'antd/es/tooltip';
|
|
6
6
|
import type { NamePath } from 'antd/es/form/interface';
|
7
7
|
import type { ColumnType, TableProps } from 'antd/es/table';
|
8
8
|
import type { FormInstance, FormItemProps } from 'antd/es/form';
|
9
|
-
import type { FunctionArgs, ProRule } from '../ProForm/propsType';
|
10
|
-
import {
|
11
|
-
|
9
|
+
import type { ProFormValueType, FunctionArgs, ProRule } from '../ProForm/components/render/propsType';
|
10
|
+
import type { DiffOriginalParams } from '../ProForm/utils/diffOriginal';
|
11
|
+
/**
|
12
|
+
* 操作类型定义
|
13
|
+
*/
|
12
14
|
export type ActionType = 'edit' | 'delete' | 'save' | 'cancel' | 'add' | 'mulDelete' | 'custom';
|
13
|
-
|
15
|
+
/**
|
16
|
+
* 操作按钮展示控制函数类型
|
17
|
+
* @template T 记录类型
|
18
|
+
*/
|
19
|
+
export type ShowFunction<T = any> = (record?: T, options?: {
|
14
20
|
index: number;
|
15
21
|
form: FormInstance;
|
16
22
|
name: NamePath;
|
17
23
|
namePath: NamePath;
|
18
24
|
tableLength: number;
|
19
25
|
selectedRows: T[];
|
20
|
-
}) => Promise<
|
26
|
+
}) => Promise<boolean> | boolean | void;
|
27
|
+
/**
|
28
|
+
* 选项属性接口
|
29
|
+
*/
|
21
30
|
export interface OptionsProps {
|
31
|
+
/** 索引 */
|
22
32
|
index: number;
|
33
|
+
/** 表单实例 */
|
23
34
|
form: FormInstance;
|
35
|
+
/** 名称路径 */
|
24
36
|
namePath: NamePath;
|
37
|
+
/** 名称 */
|
25
38
|
name: NamePath;
|
26
39
|
}
|
40
|
+
/**
|
41
|
+
* 选项属性类型(基于接口)
|
42
|
+
*/
|
43
|
+
export type OptionsType = OptionsProps;
|
44
|
+
/**
|
45
|
+
* 汇总列属性
|
46
|
+
*/
|
27
47
|
export interface SummaryColumnProps {
|
48
|
+
/** 列唯一标识 */
|
28
49
|
key: string;
|
50
|
+
/** 列索引 */
|
29
51
|
index: number;
|
52
|
+
/** 列标题 */
|
30
53
|
title?: string;
|
54
|
+
/** 跨列数 */
|
31
55
|
colSpan?: number;
|
56
|
+
/** 值类型 */
|
32
57
|
valueType?: string;
|
58
|
+
/** 精度 */
|
33
59
|
precision?: number;
|
60
|
+
/** 前缀 */
|
34
61
|
prefix?: ReactNode | string;
|
35
62
|
}
|
63
|
+
/**
|
64
|
+
* 基础操作按钮属性
|
65
|
+
* @template T 记录类型
|
66
|
+
*/
|
36
67
|
export interface BaseActionProps<T = any> {
|
37
68
|
/**
|
38
|
-
*
|
39
|
-
* @default -
|
69
|
+
* 按钮类型
|
40
70
|
*/
|
41
71
|
type?: ActionType;
|
42
72
|
/**
|
43
|
-
*
|
44
|
-
* @default -
|
73
|
+
* 按钮名称
|
45
74
|
*/
|
46
75
|
label?: string | ReactNode;
|
47
76
|
/**
|
48
|
-
*
|
49
|
-
* @default
|
77
|
+
* 是否显示按钮
|
78
|
+
* @default true
|
50
79
|
*/
|
51
80
|
show?: boolean | ShowFunction<T>;
|
52
81
|
/**
|
53
|
-
|
54
|
-
|
55
|
-
|
82
|
+
* 是否持久化(一直显示)操作按钮
|
83
|
+
* @default true
|
84
|
+
*/
|
56
85
|
persistence?: boolean;
|
57
86
|
/**
|
58
|
-
*
|
59
|
-
* @default
|
87
|
+
* 是否禁止操作
|
88
|
+
* @default true
|
60
89
|
*/
|
61
90
|
disabled?: boolean | ShowFunction<T>;
|
62
91
|
/**
|
63
|
-
*
|
64
|
-
* @default
|
92
|
+
* 添加是否自定义打开弹框
|
93
|
+
* @default false
|
65
94
|
*/
|
66
95
|
isSelectModal?: boolean;
|
67
96
|
/**
|
68
|
-
*
|
69
|
-
* @default
|
97
|
+
* 删除是否开启二次确认
|
98
|
+
* @default true
|
70
99
|
*/
|
71
100
|
needConfirm?: boolean;
|
72
101
|
/**
|
73
|
-
*
|
74
|
-
* @default -
|
102
|
+
* 按钮是否禁止操作
|
75
103
|
*/
|
76
104
|
isEditable?: boolean;
|
77
105
|
/**
|
78
|
-
*
|
79
|
-
* @default -
|
106
|
+
* 按钮前置校验事件
|
80
107
|
*/
|
81
|
-
onClick?: (record?:
|
108
|
+
onClick?: (record?: T, index?: number) => any;
|
82
109
|
/**
|
83
|
-
*
|
84
|
-
* @default -
|
110
|
+
* 按钮前置校验事件
|
85
111
|
*/
|
86
|
-
onHandle?: (record?:
|
112
|
+
onHandle?: (record?: T, index?: number) => any;
|
87
113
|
/**
|
88
|
-
*
|
89
|
-
* @default -
|
114
|
+
* 支持antd的Button属性
|
90
115
|
*/
|
91
116
|
buttonProps?: Omit<ButtonProps, 'type' | 'onClick'>;
|
92
117
|
}
|
93
|
-
|
94
|
-
|
95
|
-
|
118
|
+
/**
|
119
|
+
* 规则函数类型
|
120
|
+
* @template T 记录类型
|
121
|
+
*/
|
122
|
+
export type RulesFn<T = any> = (text?: any, record?: T, options?: OptionsProps) => ProRule[] | void;
|
123
|
+
/**
|
124
|
+
* 必填函数类型
|
125
|
+
* @template T 记录类型
|
126
|
+
*/
|
127
|
+
export type RequiredFn<T = any> = (text?: any, record?: T, options?: OptionsProps) => boolean | void;
|
128
|
+
/**
|
129
|
+
* 视图渲染函数类型
|
130
|
+
* @template T 记录类型
|
131
|
+
*/
|
132
|
+
export type viewRenderFn<T = any> = (text?: any, record?: T, options?: OptionsProps) => string | number | ReactNode | void;
|
133
|
+
/**
|
134
|
+
* 表格列属性接口
|
135
|
+
* @template Values 值类型
|
136
|
+
* @template T 记录类型
|
137
|
+
*/
|
96
138
|
export interface ProColumnsProps<Values = any, T = any> extends Omit<FormItemProps<Values>, 'rules' | 'required'>, ColumnType<Values> {
|
139
|
+
/** 是否必填 */
|
97
140
|
required?: boolean | RequiredFn<T>;
|
141
|
+
/** 标签是否必填 */
|
98
142
|
labelRequired?: boolean;
|
143
|
+
/** 字段名 */
|
99
144
|
name?: NamePath;
|
145
|
+
/** 多字段名 */
|
100
146
|
names?: NamePath[];
|
147
|
+
/** 是否可编辑 */
|
101
148
|
isEditable?: boolean | RequiredFn<T>;
|
102
|
-
|
149
|
+
/** 值类型 */
|
150
|
+
valueType?: ProFormValueType | ((text?: any, record?: T, options?: OptionsProps) => ProFormValueType);
|
151
|
+
/** 提示信息 */
|
103
152
|
tooltip?: string | ({
|
104
153
|
icon?: string | ReactNode;
|
105
154
|
} & TooltipProps);
|
155
|
+
/** 组件 */
|
106
156
|
component?: string | number | ReactNode | viewRenderFn<T>;
|
157
|
+
/** 视图渲染 */
|
107
158
|
viewRender?: string | number | ReactNode | viewRenderFn<T>;
|
159
|
+
/** 隐藏的字段名 */
|
108
160
|
hiddenNames?: NamePath[] | NamePath[][];
|
161
|
+
/** 校验规则 */
|
109
162
|
rules?: ProRule[] | RulesFn<T>;
|
163
|
+
/** 确认操作 */
|
110
164
|
confirm?: boolean | ModalFuncProps | FunctionArgs<Values, boolean | ModalFuncProps | void>;
|
165
|
+
/** 依赖项 */
|
111
166
|
dependencies?: NamePath[];
|
167
|
+
/** 差异处理 */
|
112
168
|
onDiff?: DiffOriginalParams['onDiff'];
|
113
169
|
[key: string]: any;
|
114
170
|
}
|
115
|
-
|
116
|
-
|
171
|
+
/**
|
172
|
+
* 表格列属性类型(基于接口)
|
173
|
+
* @template Values 值类型
|
174
|
+
* @template T 记录类型
|
175
|
+
*/
|
176
|
+
export type ProColumnsType<Values = any, T = any> = ProColumnsProps<Values, T>;
|
177
|
+
/**
|
178
|
+
* 可编辑表格列属性
|
179
|
+
* @template K 键类型
|
180
|
+
*/
|
181
|
+
export type ProEditTableColumnsProps<K = any> = ProColumnsProps<K, 'ProEditTable'>;
|
182
|
+
/**
|
183
|
+
* 状态接口
|
184
|
+
*/
|
185
|
+
export interface StateProps {
|
186
|
+
/** 单元格名称路径 */
|
117
187
|
cellNamePath: NamePath[];
|
118
|
-
|
188
|
+
/** 表格内部强制刷新开关 */
|
189
|
+
forceUpdate: Record<string, any>;
|
190
|
+
/** 正在编辑行的row-key集合 */
|
119
191
|
editingKeys: string[];
|
192
|
+
/** 当前选中行的row-key集合 */
|
120
193
|
selectedRowKeys: Key[];
|
194
|
+
/** 当前选中行数据集合 */
|
121
195
|
selectedRows: any[];
|
196
|
+
/** 虚拟键 */
|
122
197
|
virtualKey: string;
|
198
|
+
/** 分页信息 */
|
123
199
|
page: {
|
124
200
|
pageNum: number;
|
125
201
|
pageSize: number;
|
126
202
|
};
|
127
203
|
}
|
204
|
+
/**
|
205
|
+
* 状态类型(基于接口)
|
206
|
+
*/
|
207
|
+
export type StateType = StateProps;
|
208
|
+
/**
|
209
|
+
* 可编辑表格引用属性
|
210
|
+
*/
|
128
211
|
export interface ProEditTableRefProps {
|
129
|
-
|
212
|
+
/** 获取内部状态 */
|
213
|
+
getInternalState: () => StateProps;
|
214
|
+
/** 设置内部状态 */
|
215
|
+
setInternalState: (state: Partial<StateProps>) => void;
|
130
216
|
}
|
217
|
+
/**
|
218
|
+
* 可编辑表格引用属性类型(基于接口)
|
219
|
+
*/
|
220
|
+
export type ProEditTableRefType = ProEditTableRefProps;
|
221
|
+
/**
|
222
|
+
* 可编辑表格模式类型
|
223
|
+
*/
|
224
|
+
export type ProEditTableMode = 'single' | 'multiple' | 'cell';
|
225
|
+
export type ProEditTableModeType = ProEditTableMode;
|
226
|
+
/**
|
227
|
+
* 表格插入类型
|
228
|
+
*/
|
229
|
+
export type InsertType = 'before' | 'after';
|
230
|
+
/**
|
231
|
+
* 操作按钮方向
|
232
|
+
*/
|
233
|
+
export type ActionDirection = 'vertical' | 'horizontal';
|
234
|
+
export type ActionDirectionType = ActionDirection;
|
235
|
+
/**
|
236
|
+
* 汇总信息配置
|
237
|
+
* @template T 记录类型
|
238
|
+
*/
|
239
|
+
export type SummaryProps<T = any> = {
|
240
|
+
columns: ProEditTableSummaryColumnType[];
|
241
|
+
total?: boolean;
|
242
|
+
fixed?: boolean | 'top' | 'bottom';
|
243
|
+
} | TableProps<T>['summary'];
|
244
|
+
/**
|
245
|
+
* 可编辑表格属性接口
|
246
|
+
* @template T 记录类型
|
247
|
+
*/
|
131
248
|
export interface ProEditTableProps<T = any> extends Omit<TableProps<T>, 'onChange' | 'summary'> {
|
132
249
|
/**
|
133
|
-
*
|
134
|
-
* @default -
|
250
|
+
* 可编辑表格的 form 实例,使用 Form.useForm 生成后使用
|
135
251
|
*/
|
136
252
|
form?: FormInstance;
|
137
253
|
/**
|
138
|
-
*
|
139
|
-
* @default -
|
254
|
+
* 原始数据源,设置后可以对比更新后的数值
|
140
255
|
*/
|
141
|
-
originalValues?: any
|
256
|
+
originalValues?: Record<string, any>;
|
142
257
|
/**
|
143
|
-
*
|
144
|
-
* @default
|
258
|
+
* 可编辑表格的模式
|
259
|
+
* @default multiple
|
145
260
|
*/
|
146
|
-
mode?:
|
261
|
+
mode?: ProEditTableMode;
|
147
262
|
/**
|
148
|
-
*
|
149
|
-
* @deprecated
|
150
|
-
* @default
|
263
|
+
* 可编辑表格的类型,单行编辑或者多行编辑
|
264
|
+
* @deprecated 将于下个版本 4.0.0 被弃用
|
265
|
+
* @default multiple
|
151
266
|
*/
|
152
|
-
type?:
|
267
|
+
type?: ProEditTableMode;
|
153
268
|
/**
|
154
|
-
*
|
155
|
-
* @default
|
269
|
+
* 必填对齐方式, 默认右对齐
|
270
|
+
* @default right
|
156
271
|
*/
|
157
272
|
requiredAlign?: 'left' | 'right';
|
158
273
|
/**
|
159
|
-
*
|
160
|
-
* @default
|
274
|
+
* 同 dataSource,传入一个数组,是 table 渲染的元数据
|
275
|
+
* @default undefined
|
161
276
|
*/
|
162
277
|
value?: T[];
|
163
278
|
/**
|
164
|
-
*
|
165
|
-
* @default -
|
279
|
+
* dataSource 修改时触发,删除和修改都会触发,如果设置了 value,ProEditTable 会成为一个受控组件
|
166
280
|
*/
|
167
281
|
onChange?: (list: T[]) => void;
|
168
282
|
/**
|
169
|
-
*
|
170
|
-
* @default
|
283
|
+
* 表格列的配置描述,扩展了FormItemProps属性
|
284
|
+
* @default []
|
171
285
|
*/
|
172
|
-
columns:
|
286
|
+
columns: ProEditTableColumnType<T>[];
|
173
287
|
/**
|
174
|
-
*
|
175
|
-
* @default
|
288
|
+
* 是否禁止编辑
|
289
|
+
* @default false
|
176
290
|
*/
|
177
291
|
disabled?: boolean;
|
178
292
|
/**
|
179
|
-
*
|
180
|
-
* @default
|
293
|
+
* 是否开启斑马纹
|
294
|
+
* @default true
|
181
295
|
*/
|
182
296
|
stripe?: boolean;
|
183
297
|
/**
|
184
|
-
*
|
185
|
-
* @default
|
298
|
+
* 可编辑表格新增时数据插入方式,头部插入或者尾部插入
|
299
|
+
* @default after
|
186
300
|
*/
|
187
|
-
insertType?:
|
301
|
+
insertType?: InsertType;
|
188
302
|
/**
|
189
|
-
*
|
190
|
-
* @default -
|
303
|
+
* 字段名,支持数组
|
191
304
|
*/
|
192
305
|
name?: string | number | (string | number)[];
|
193
306
|
/**
|
194
|
-
*
|
195
|
-
* @default -
|
307
|
+
* 是否可拖拽排序
|
196
308
|
*/
|
197
309
|
draggable?: boolean;
|
198
310
|
/**
|
199
|
-
|
200
|
-
|
201
|
-
*/
|
311
|
+
* 是否开启虚拟列表(scroll,x,y必须为固定值)
|
312
|
+
*/
|
202
313
|
virtual?: boolean;
|
203
314
|
/**
|
204
|
-
*
|
205
|
-
* @default
|
315
|
+
* 空列表状态时,自定义添加按钮
|
316
|
+
* @default 点击添加
|
206
317
|
*/
|
207
318
|
emptyBtnText?: string;
|
208
319
|
/**
|
209
|
-
*
|
210
|
-
* @default
|
320
|
+
* 只能编辑一行的的提示
|
321
|
+
* @default 请先保存数据
|
211
322
|
*/
|
212
323
|
onlyOneLineMsg?: string;
|
213
324
|
/**
|
214
|
-
*
|
215
|
-
* @default
|
325
|
+
* 单行删除时弹出的确认框提示消息
|
326
|
+
* @default 您确定要删除该行数据吗?
|
216
327
|
*/
|
217
328
|
deletePoConfirmMsg?: string;
|
218
329
|
/**
|
219
|
-
*
|
220
|
-
* @default
|
330
|
+
* 多行删除时弹出的确认框提示消息
|
331
|
+
* @default 您确定要删除选中的数据吗?
|
221
332
|
*/
|
222
333
|
mulDeletePoConfirmMsg?: string;
|
223
334
|
/**
|
224
|
-
*
|
225
|
-
* @default -
|
335
|
+
* 自定义编辑模式的操作栏宽度
|
226
336
|
*/
|
227
337
|
actionWidth?: ColumnType<T>['width'];
|
228
338
|
/**
|
229
|
-
*
|
230
|
-
* @default -
|
339
|
+
* 自定义编辑模式的操作栏 单行编辑默认为编辑、删除、保存、取消;多行编辑为删除
|
231
340
|
*/
|
232
341
|
actionProps?: BaseActionProps<T>[] | boolean;
|
233
342
|
/**
|
234
|
-
*
|
235
|
-
* @default -
|
343
|
+
* 自定义 table footer 左侧渲染, 配置后toolbarProps会失效
|
236
344
|
*/
|
237
345
|
footerRender?: ReactNode;
|
238
346
|
/**
|
239
|
-
*
|
240
|
-
* @default -
|
347
|
+
* 自定义底部操作栏 默认为添加、删除(批量)
|
241
348
|
*/
|
242
349
|
toolbarProps?: BaseActionProps<T>[] | boolean;
|
243
350
|
/**
|
244
|
-
*
|
245
|
-
* @default -
|
351
|
+
* 自定义底部操作栏跟随页面滚动
|
246
352
|
*/
|
247
353
|
toolbarSticky?: boolean | Omit<AffixProps, 'children'>;
|
248
354
|
/**
|
249
|
-
*
|
250
|
-
* @default -
|
355
|
+
* 最大可添加数量
|
251
356
|
*/
|
252
357
|
max?: number;
|
253
358
|
/**
|
254
|
-
*
|
255
|
-
* @default -
|
359
|
+
* formItem的props
|
256
360
|
*/
|
257
|
-
otherProps?: any
|
361
|
+
otherProps?: Record<string, any>;
|
258
362
|
/**
|
259
|
-
*
|
260
|
-
* @default -
|
363
|
+
* 底部合计配置
|
261
364
|
*/
|
262
|
-
summary?:
|
263
|
-
columns: SummaryColumnProps[];
|
264
|
-
total?: boolean;
|
265
|
-
fixed?: boolean | 'top' | 'bottom';
|
266
|
-
} | TableProps<T>['summary'];
|
365
|
+
summary?: ProEditTableSummaryConfigType<T>;
|
267
366
|
/**
|
268
|
-
*
|
269
|
-
* @default -
|
367
|
+
* 自定义头部渲染
|
270
368
|
*/
|
271
369
|
headerRender?: ReactNode;
|
370
|
+
/**
|
371
|
+
* 行是否禁用
|
372
|
+
*/
|
272
373
|
rowDisabled?: (record?: T) => string | boolean;
|
374
|
+
/**
|
375
|
+
* 行是否可拖拽
|
376
|
+
*/
|
273
377
|
rowDraggable?: (record?: T) => string | boolean;
|
378
|
+
/**
|
379
|
+
* 拖拽事件处理
|
380
|
+
*/
|
274
381
|
onDrag?: (event: DragEndEvent, dataSource: T[]) => T[];
|
382
|
+
/**
|
383
|
+
* 引用对象
|
384
|
+
*/
|
275
385
|
ref?: any;
|
276
|
-
|
386
|
+
/**
|
387
|
+
* 操作按钮方向
|
388
|
+
*/
|
389
|
+
actionDirection?: ActionDirection;
|
390
|
+
/**
|
391
|
+
* 校验触发方式
|
392
|
+
*/
|
277
393
|
validateTrigger?: string | string[];
|
394
|
+
/**
|
395
|
+
* 差异配置
|
396
|
+
*/
|
278
397
|
diffConfig?: {
|
398
|
+
/** 是否跟随父元素滚动 */
|
279
399
|
scrollFollowParent?: boolean;
|
280
400
|
};
|
281
401
|
}
|
402
|
+
/**
|
403
|
+
* 基础操作按钮类型(基于接口)
|
404
|
+
* @template T 记录类型
|
405
|
+
*/
|
406
|
+
export type ProEditTableActionType<T = any> = BaseActionProps<T>;
|
407
|
+
export type ProEditTableSummaryConfigType<T = any> = SummaryProps<T>;
|
408
|
+
export type ProEditTableSummaryColumnType = SummaryColumnProps;
|
409
|
+
/**
|
410
|
+
* 可编辑表格列属性类型(基于类型)
|
411
|
+
* @template K 键类型
|
412
|
+
*/
|
413
|
+
export type ProEditTableColumnType<K = any> = ProEditTableColumnsProps<K>;
|
414
|
+
/**
|
415
|
+
* 可编辑表格属性类型(基于接口)
|
416
|
+
* @template T 记录类型
|
417
|
+
*/
|
418
|
+
export type ProEditTableType<T = any> = ProEditTableProps<T>;
|
@@ -262,11 +262,12 @@ var transformColumns = exports.transformColumns = function transformColumns() {
|
|
262
262
|
var required = (0, _lodash.isBoolean)(item.required) ? item.required : false;
|
263
263
|
if (typeof item.required === 'function') {
|
264
264
|
var namePath = (0, _tools.getNamePath)(name, virtualKey);
|
265
|
-
var
|
265
|
+
var namePathArray = Array.isArray(namePath) ? namePath : [namePath];
|
266
|
+
var rowData = form.getFieldValue([].concat((0, _toConsumableArray2.default)(namePathArray), [index])) || {};
|
266
267
|
required = item.required(rowData[columnName], rowData, {
|
267
268
|
form: form,
|
268
269
|
index: index,
|
269
|
-
namePath: [].concat((0, _toConsumableArray2.default)(
|
270
|
+
namePath: [].concat((0, _toConsumableArray2.default)(namePathArray), [index])
|
270
271
|
});
|
271
272
|
}
|
272
273
|
// 样式处理
|
@@ -286,17 +287,18 @@ var transformColumns = exports.transformColumns = function transformColumns() {
|
|
286
287
|
if (virtualKey && editingKeys.includes(record.rowKey)) {
|
287
288
|
namePath = (0, _tools.getNamePath)(name, virtualKey);
|
288
289
|
}
|
290
|
+
var namePathArray = Array.isArray(namePath) ? namePath : [namePath];
|
289
291
|
var columnNamePath = (0, _lodash.isArray)(columnName) ? columnName : [columnName];
|
290
292
|
index = _utils.tools.calc(firstIndex, '+', index);
|
291
293
|
// 设置单元格formItem的namePath
|
292
|
-
var cellName = columnName ? [].concat((0, _toConsumableArray2.default)(
|
294
|
+
var cellName = columnName ? [].concat((0, _toConsumableArray2.default)(namePathArray), [index], (0, _toConsumableArray2.default)(columnNamePath)) : [].concat((0, _toConsumableArray2.default)(namePathArray), [index]);
|
293
295
|
var _text = text;
|
294
296
|
// 当传入组合组件时,name需要重新组合一下,以防names中key与dataIndex重叠
|
295
297
|
if (names === null || names === void 0 ? void 0 : names.length) {
|
296
298
|
var nextDataIndex = (0, _tools.splitNames)(names);
|
297
299
|
item.dataIndex = nextDataIndex;
|
298
300
|
item.key = nextDataIndex;
|
299
|
-
cellName = [].concat((0, _toConsumableArray2.default)(
|
301
|
+
cellName = [].concat((0, _toConsumableArray2.default)(namePathArray), [index, nextDataIndex]);
|
300
302
|
// 给names返回数组值
|
301
303
|
_text = names.map(function (item) {
|
302
304
|
return record === null || record === void 0 ? void 0 : record[item];
|
@@ -1,32 +1,67 @@
|
|
1
|
+
import { Key } from 'react';
|
2
|
+
import { FormInstance } from 'antd/es/form';
|
3
|
+
import { NamePath } from 'antd/es/form/interface';
|
4
|
+
/**
|
5
|
+
* 生成随机字符串
|
6
|
+
* @returns 随机字符串
|
7
|
+
*/
|
1
8
|
export declare const getRandom: () => string;
|
2
|
-
|
3
|
-
|
9
|
+
/**
|
10
|
+
* 深层次对比两个对象且取出来差异值
|
11
|
+
* @param object 比较对象
|
12
|
+
* @param base 基准对象
|
13
|
+
* @returns 差异对象
|
14
|
+
*/
|
15
|
+
export declare const difference: <T extends Record<string, any>, U extends Record<string, any>>(object: T, base: U) => Record<string, any>;
|
16
|
+
/**
|
17
|
+
* 数组字段循环校验,解决validateFields无法批量校验的问题
|
18
|
+
* @param validateKeys 校验键数组
|
19
|
+
* @param form 表单实例
|
20
|
+
* @param rowName 行名称路径
|
21
|
+
* @returns 校验结果Promise
|
22
|
+
*/
|
23
|
+
export declare const customValidate: (validateKeys: string[], form: FormInstance, rowName: NamePath) => Promise<any>;
|
4
24
|
/**
|
5
25
|
* 拆解数组names
|
6
|
-
* @param names
|
7
|
-
* @returns
|
26
|
+
* @param names 名称数组
|
27
|
+
* @returns 拆解后的字符串
|
8
28
|
*/
|
9
|
-
export declare const splitNames: (names: any[]) =>
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
29
|
+
export declare const splitNames: (names: any[]) => string;
|
30
|
+
/**
|
31
|
+
* 获取中间formItem的name
|
32
|
+
* @param name 名称路径
|
33
|
+
* @param virtualKey 虚拟键
|
34
|
+
* @returns 完整名称路径数组
|
35
|
+
*/
|
36
|
+
export declare const getNamePath: (name: NamePath, virtualKey?: string) => (string | number)[];
|
37
|
+
/**
|
38
|
+
* 删除操作
|
39
|
+
* @param params 删除参数
|
40
|
+
*/
|
41
|
+
export declare const onDelete: ({ name, form, virtualKey, selectedRowKeys, }: {
|
42
|
+
name: NamePath;
|
43
|
+
form: FormInstance;
|
44
|
+
virtualKey?: string;
|
45
|
+
selectedRowKeys: Key[];
|
16
46
|
}) => void;
|
17
|
-
/**
|
47
|
+
/**
|
48
|
+
* 获取最终的disabled, 两张模式【子级优先,全局优先
|
18
49
|
* 全局优先:globalControl为true时,全局控制
|
19
50
|
* 子级优先:globalControl为false时,子级控制
|
20
|
-
* @param
|
21
|
-
* @
|
22
|
-
* @param column 当前列
|
23
|
-
* @param tabledDisabled 表格的disabled
|
24
|
-
* @param columnFieldProps 当前列的fieldProps
|
25
|
-
* @param params 当前列的参数
|
26
|
-
* @param rowDisabled 行禁用参数
|
51
|
+
* @param params 禁用参数
|
52
|
+
* @returns 是否禁用
|
27
53
|
*/
|
28
|
-
export declare const getDisabled: ({ globalControl, formDisabled, column, tabledDisabled, columnFieldProps, params, rowDisabled, }:
|
29
|
-
|
54
|
+
export declare const getDisabled: ({ globalControl, formDisabled, column, tabledDisabled, columnFieldProps, params, rowDisabled, }: {
|
55
|
+
globalControl: boolean;
|
56
|
+
formDisabled?: boolean | ((record: any) => boolean);
|
57
|
+
column: any;
|
58
|
+
tabledDisabled?: boolean;
|
59
|
+
columnFieldProps?: any;
|
60
|
+
params: any[];
|
61
|
+
rowDisabled?: any;
|
62
|
+
}) => boolean;
|
63
|
+
/**
|
64
|
+
* 表格自动滚动到报错位置
|
30
65
|
*/
|
31
66
|
export declare const handleScrollToError: () => void;
|
32
67
|
/**
|
@@ -34,7 +69,7 @@ export declare const handleScrollToError: () => void;
|
|
34
69
|
* @param value 需要深拷贝的对象
|
35
70
|
* @returns 深拷贝后的对象,其中的React节点会被保留
|
36
71
|
*/
|
37
|
-
export declare function cloneDeepFilterNode(value:
|
72
|
+
export declare function cloneDeepFilterNode<T>(value: T): T;
|
38
73
|
/**
|
39
74
|
* 分页校验
|
40
75
|
*/
|