@zat-design/sisyphus-react 4.5.5 → 4.5.6-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/es/FormsProvider/index.d.ts +18 -0
- package/es/ProAction/components/CheckModalContent/index.d.ts +8 -0
- package/es/ProAction/index.d.ts +7 -0
- package/es/ProAction/propsType.d.ts +45 -0
- package/es/ProConfigProvider/index.d.ts +9 -0
- package/es/ProConfigProvider/propsType.d.ts +82 -0
- package/es/ProDownload/index.d.ts +6 -0
- package/es/ProDownload/propsType.d.ts +71 -0
- package/es/ProDownload/utils.d.ts +60 -0
- package/es/ProDrawerForm/components/ProDrawer/index.d.ts +7 -0
- package/es/ProDrawerForm/components/ProModal/index.d.ts +7 -0
- package/es/ProDrawerForm/components/index.d.ts +2 -0
- package/es/ProDrawerForm/hooks/useConfirmClose.d.ts +24 -0
- package/es/ProDrawerForm/index.d.ts +6 -0
- package/es/ProDrawerForm/propsType.d.ts +111 -0
- package/es/ProDrawerForm/utils/index.d.ts +25 -0
- package/es/ProEditLabel/components/RenderProForm.d.ts +4 -0
- package/es/ProEditLabel/index.d.ts +4 -0
- package/es/ProEditLabel/propsType.d.ts +163 -0
- package/es/ProEditLabel/utils/index.d.ts +7 -0
- package/es/ProEditTable/components/ActionButton/index.d.ts +2 -0
- package/es/ProEditTable/components/RcTable/BaseTable.d.ts +5 -0
- package/es/ProEditTable/components/RcTable/DraggableTable.d.ts +7 -0
- package/es/ProEditTable/components/RcTable/index.d.ts +4 -0
- package/es/ProEditTable/components/RenderField/ListChangedWrapper.d.ts +4 -0
- package/es/ProEditTable/components/RenderField/index.d.ts +3 -0
- package/es/ProEditTable/components/RenderField/propsType.d.ts +30 -0
- package/es/ProEditTable/components/RenderField/tools.d.ts +22 -0
- package/es/ProEditTable/components/RenderToolbar/index.d.ts +2 -0
- package/es/ProEditTable/components/Summary/index.d.ts +12 -0
- package/es/ProEditTable/components/Validator/index.d.ts +18 -0
- package/es/ProEditTable/components/index.d.ts +5 -0
- package/es/ProEditTable/index.d.ts +4 -0
- package/es/ProEditTable/propsType.d.ts +437 -0
- package/es/ProEditTable/utils/config.d.ts +25 -0
- package/es/ProEditTable/utils/diffOriginal.d.ts +22 -0
- package/es/ProEditTable/utils/getDefaultProps.d.ts +1 -0
- package/es/ProEditTable/utils/index.d.ts +23 -0
- package/es/ProEditTable/utils/tools.d.ts +133 -0
- package/es/ProEditTable/utils/transform.d.ts +13 -0
- package/es/ProEditTable/utils/useEditTableError.d.ts +7 -0
- package/es/ProEditTable/utils/useShouldUpdateForTable.d.ts +16 -0
- package/es/ProEditTable/utils/validateAll.d.ts +89 -0
- package/es/ProEnum/components/Group.d.ts +10 -0
- package/es/ProEnum/components/Tag.d.ts +7 -0
- package/es/ProEnum/hooks/useEnum.d.ts +29 -0
- package/es/ProEnum/hooks/useEnumRequest.d.ts +4 -0
- package/es/ProEnum/hooks/useFrequentEnumRequest.d.ts +14 -0
- package/es/ProEnum/index.d.ts +10 -0
- package/es/ProEnum/index.js +1 -1
- package/es/ProEnum/propsType.d.ts +320 -0
- package/es/ProEnum/utils/eventCenter.d.ts +1 -0
- package/es/ProEnum/utils/frequentEnum.d.ts +39 -0
- package/es/ProEnum/utils/getEnum.d.ts +47 -0
- package/es/ProEnum/utils/getEnumLabel.d.ts +2 -0
- package/es/ProEnum/utils/index.d.ts +98 -0
- package/es/ProForm/components/Container.d.ts +9 -0
- package/es/ProForm/components/FormFooter/index.d.ts +5 -0
- package/es/ProForm/components/FormFooter/propsType.d.ts +21 -0
- package/es/ProForm/components/base/Checkbox/index.d.ts +14 -0
- package/es/ProForm/components/base/DatePicker/index.d.ts +11 -0
- package/es/ProForm/components/base/Input/index.d.ts +3 -0
- package/es/ProForm/components/base/Input/propsType.d.ts +21 -0
- package/es/ProForm/components/base/InputNumber/index.d.ts +11 -0
- package/es/ProForm/components/base/Radio/index.d.ts +15 -0
- package/es/ProForm/components/base/RangePicker/index.d.ts +19 -0
- package/es/ProForm/components/base/RangePicker/useDateRange.d.ts +15 -0
- package/es/ProForm/components/base/Select/index.d.ts +11 -0
- package/es/ProForm/components/base/Switch/index.d.ts +10 -0
- package/es/ProForm/components/base/SwitchCheckbox/index.d.ts +10 -0
- package/es/ProForm/components/base/TextArea/index.d.ts +11 -0
- package/es/ProForm/components/base/TimePicker/index.d.ts +13 -0
- package/es/ProForm/components/combination/Container/index.d.ts +4 -0
- package/es/ProForm/components/combination/Container/propsType.d.ts +13 -0
- package/es/ProForm/components/combination/FormList/components/ActionButton.d.ts +24 -0
- package/es/ProForm/components/combination/FormList/components/BlockFields.d.ts +23 -0
- package/es/ProForm/components/combination/FormList/components/Empty.d.ts +13 -0
- package/es/ProForm/components/combination/FormList/components/LineFields.d.ts +20 -0
- package/es/ProForm/components/combination/FormList/components/ToolbarButton.d.ts +12 -0
- package/es/ProForm/components/combination/FormList/index.d.ts +4 -0
- package/es/ProForm/components/combination/FormList/propsType.d.ts +69 -0
- package/es/ProForm/components/combination/FormList/utils.d.ts +18 -0
- package/es/ProForm/components/combination/Group/component/AddonWrapper/index.d.ts +9 -0
- package/es/ProForm/components/combination/Group/component/ComRender.d.ts +28 -0
- package/es/ProForm/components/combination/Group/component/FlexibleGroup.d.ts +10 -0
- package/es/ProForm/components/combination/Group/hooks/index.d.ts +34 -0
- package/es/ProForm/components/combination/Group/index.d.ts +9 -0
- package/es/ProForm/components/combination/Group/propsType.d.ts +99 -0
- package/es/ProForm/components/combination/Group/utils/index.d.ts +153 -0
- package/es/ProForm/components/combination/ProCascader/index.d.ts +3 -0
- package/es/ProForm/components/combination/ProCascader/propsType.d.ts +48 -0
- package/es/ProForm/components/combination/ProCascader/utils/index.d.ts +14 -0
- package/es/ProForm/components/combination/ProModalSelect/hooks/useRequestList.d.ts +33 -0
- package/es/ProForm/components/combination/ProModalSelect/index.d.ts +4 -0
- package/es/ProForm/components/combination/ProModalSelect/propsType.d.ts +106 -0
- package/es/ProForm/components/combination/ProModalSelect/utils/index.d.ts +15 -0
- package/es/ProForm/components/combination/ProNumberRange/index.d.ts +3 -0
- package/es/ProForm/components/combination/ProNumberRange/propsType.d.ts +85 -0
- package/es/ProForm/components/combination/ProRangeLimit/index.d.ts +4 -0
- package/es/ProForm/components/combination/ProRangeLimit/propsType.d.ts +23 -0
- package/es/ProForm/components/combination/ProTimeLimit/hooks/useControlled.d.ts +8 -0
- package/es/ProForm/components/combination/ProTimeLimit/index.d.ts +33 -0
- package/es/ProForm/components/index.d.ts +29 -0
- package/es/ProForm/components/render/ChangedWrapper.d.ts +17 -0
- package/es/ProForm/components/render/ConfirmWrapper.d.ts +10 -0
- package/es/ProForm/components/render/CustomComponentViewWrapper.d.ts +30 -0
- package/es/ProForm/components/render/Render.d.ts +4 -0
- package/es/ProForm/components/render/RenderFields.d.ts +26 -0
- package/es/ProForm/components/render/propsType.d.ts +279 -0
- package/es/ProForm/hooks/useControlled.d.ts +1 -0
- package/es/ProForm/hooks/useDeepCompareMemo.d.ts +2 -0
- package/es/ProForm/hooks/useFieldProps.d.ts +4 -0
- package/es/ProForm/hooks/useForm.d.ts +8 -0
- package/es/ProForm/hooks/useRules.d.ts +16 -0
- package/es/ProForm/hooks/useShouldUpdate.d.ts +31 -0
- package/es/ProForm/hooks/useWatch.d.ts +22 -0
- package/es/ProForm/index.d.ts +6 -0
- package/es/ProForm/propsType.d.ts +143 -0
- package/es/ProForm/utils/buildFormItemProps.d.ts +25 -0
- package/es/ProForm/utils/diffOriginal.d.ts +10 -0
- package/es/ProForm/utils/getDefaultProps.d.ts +1 -0
- package/es/ProForm/utils/index.d.ts +109 -0
- package/es/ProForm/utils/processDependencies.d.ts +29 -0
- package/es/ProForm/utils/reactiveValues.d.ts +33 -0
- package/es/ProForm/utils/rulesCreator.d.ts +7 -0
- package/es/ProForm/utils/transformNames.d.ts +10 -0
- package/es/ProForm/utils/transformValue.d.ts +6 -0
- package/es/ProForm/utils/valueType.d.ts +70 -0
- package/es/ProIcon/config/index.d.ts +19 -0
- package/es/ProIcon/index.d.ts +4 -0
- package/es/ProIcon/propsTypes.d.ts +175 -0
- package/es/ProIcon/utils/index.d.ts +6 -0
- package/es/ProLayout/components/Layout/Header/index.d.ts +4 -0
- package/es/ProLayout/components/Layout/Menu/FoldMenu/index.d.ts +3 -0
- package/es/ProLayout/components/Layout/Menu/OpenMenu/index.d.ts +3 -0
- package/es/ProLayout/components/Layout/Menu/OpenMenu/propsType.d.ts +15 -0
- package/es/ProLayout/components/Layout/Menu/SideMenu/index.d.ts +3 -0
- package/es/ProLayout/components/Layout/Menu/index.d.ts +4 -0
- package/es/ProLayout/components/Layout/Notice/index.d.ts +4 -0
- package/es/ProLayout/components/Layout/index.d.ts +3 -0
- package/es/ProLayout/components/ProCollapse/PropTypes.d.ts +98 -0
- package/es/ProLayout/components/ProCollapse/index.d.ts +3 -0
- package/es/ProLayout/components/ProFooter/PropTypes.d.ts +27 -0
- package/es/ProLayout/components/ProFooter/index.d.ts +3 -0
- package/es/ProLayout/components/ProHeader/PropTypes.d.ts +206 -0
- package/es/ProLayout/components/ProHeader/components/Copy/index.d.ts +4 -0
- package/es/ProLayout/components/ProHeader/components/ProBackBtn/index.d.ts +9 -0
- package/es/ProLayout/components/ProHeader/components/ProBackBtn/propsType.d.ts +4 -0
- package/es/ProLayout/components/ProHeader/components/index.d.ts +2 -0
- package/es/ProLayout/components/ProHeader/index.d.ts +4 -0
- package/es/ProLayout/components/ProHeader/utils/index.d.ts +5 -0
- package/es/ProLayout/components/TabsManager/components/TabContextMenu.d.ts +7 -0
- package/es/ProLayout/components/TabsManager/components/TabItem.d.ts +26 -0
- package/es/ProLayout/components/TabsManager/components/TabsContext.d.ts +5 -0
- package/es/ProLayout/components/TabsManager/components/TabsHeader.d.ts +10 -0
- package/es/ProLayout/components/TabsManager/hooks/useActiveTab.d.ts +6 -0
- package/es/ProLayout/components/TabsManager/hooks/useIframeRoute.d.ts +25 -0
- package/es/ProLayout/components/TabsManager/hooks/useProLayoutTabs.d.ts +18 -0
- package/es/ProLayout/components/TabsManager/hooks/useTabsCache.d.ts +31 -0
- package/es/ProLayout/components/TabsManager/hooks/useTabsState.d.ts +5 -0
- package/es/ProLayout/components/TabsManager/index.d.ts +6 -0
- package/es/ProLayout/components/TabsManager/propTypes.d.ts +89 -0
- package/es/ProLayout/components/TabsManager/utils/index.d.ts +47 -0
- package/es/ProLayout/components/index.d.ts +3 -0
- package/es/ProLayout/index.d.ts +19 -0
- package/es/ProLayout/propTypes.d.ts +533 -0
- package/es/ProLayout/utils/index.d.ts +43 -0
- package/es/ProSelect/components/AdaptiveTooltip.d.ts +4 -0
- package/es/ProSelect/index.d.ts +5 -0
- package/es/ProSelect/propsType.d.ts +162 -0
- package/es/ProSelect/utils/index.d.ts +86 -0
- package/es/ProStep/components/Anchor/index.d.ts +4 -0
- package/es/ProStep/components/Item/index.d.ts +4 -0
- package/es/ProStep/components/LazyLoad/index.d.ts +19 -0
- package/es/ProStep/components/Listener/index.d.ts +4 -0
- package/es/ProStep/components/Step/index.d.ts +5 -0
- package/es/ProStep/index.d.ts +11 -0
- package/es/ProStep/propsType.d.ts +224 -0
- package/es/ProStep/utils/index.d.ts +22 -0
- package/es/ProStepTab/index.d.ts +22 -0
- package/es/ProStepTab/propsType.d.ts +114 -0
- package/es/ProTable/components/EditableCell/EditIcon.d.ts +6 -0
- package/es/ProTable/components/EditableCell/index.d.ts +4 -0
- package/es/ProTable/components/EditableCell/propsType.d.ts +24 -0
- package/es/ProTable/components/FormatColumn/index.d.ts +22 -0
- package/es/ProTable/components/FormatColumn/propsType.d.ts +29 -0
- package/es/ProTable/components/RcTable/components/BaseTable/index.d.ts +2 -0
- package/es/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.d.ts +18 -0
- package/es/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/utils/index.d.ts +8 -0
- package/es/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/utils/propsType.d.ts +61 -0
- package/es/ProTable/components/RcTable/components/DraggableTable/index.d.ts +2 -0
- package/es/ProTable/components/RcTable/index.d.ts +4 -0
- package/es/ProTable/components/RenderColumn/index.d.ts +22 -0
- package/es/ProTable/components/RenderEmptyText/index.d.ts +3 -0
- package/es/ProTable/components/RenderFooter/index.d.ts +2 -0
- package/es/ProTable/components/RenderSummary/index.d.ts +3 -0
- package/es/ProTable/components/RenderTableHeader/index.d.ts +2 -0
- package/es/ProTable/components/RenderTabs/index.d.ts +3 -0
- package/es/ProTable/components/TableResizable/index.d.ts +13 -0
- package/es/ProTable/components/TooltipTitle/index.d.ts +11 -0
- package/es/ProTable/components/index.d.ts +31 -0
- package/es/ProTable/hooks/useAntdTable.d.ts +7 -0
- package/es/ProTable/index.d.ts +17 -0
- package/es/ProTable/propsType.d.ts +805 -0
- package/es/ProTable/utils/columnStorage.d.ts +35 -0
- package/es/ProTable/utils/index.d.ts +52 -0
- package/es/ProTabs/components/Card/index.d.ts +3 -0
- package/es/ProTabs/components/index.d.ts +1 -0
- package/es/ProTabs/index.d.ts +4 -0
- package/es/ProTabs/propType.d.ts +94 -0
- package/es/ProThemeTools/component/ProTools/index.d.ts +3 -0
- package/es/ProThemeTools/component/index.d.ts +1 -0
- package/es/ProThemeTools/context/ThemeContext.d.ts +43 -0
- package/es/ProThemeTools/index.d.ts +9 -0
- package/es/ProThemeTools/propsType.d.ts +170 -0
- package/es/ProThemeTools/utils/index.d.ts +51 -0
- package/es/ProTooltip/index.d.ts +3 -0
- package/es/ProTooltip/propsType.d.ts +57 -0
- package/es/ProTree/components/AdaptiveTooltip.d.ts +4 -0
- package/es/ProTree/components/CloseIcon.d.ts +2 -0
- package/es/ProTree/components/List.d.ts +17 -0
- package/es/ProTree/components/ProTree.d.ts +3 -0
- package/es/ProTree/components/ProTreeSelect/index.d.ts +5 -0
- package/es/ProTree/components/ProTreeSelect/propsType.d.ts +445 -0
- package/es/ProTree/components/SearchTitle.d.ts +10 -0
- package/es/ProTree/components/Tree.d.ts +27 -0
- package/es/ProTree/components/index.d.ts +4 -0
- package/es/ProTree/index.d.ts +3 -0
- package/es/ProTree/propsType.d.ts +818 -0
- package/es/ProTree/utils.d.ts +62 -0
- package/es/ProTreeModal/components/Cascader.d.ts +14 -0
- package/es/ProTreeModal/components/CloseIcon.d.ts +2 -0
- package/es/ProTreeModal/components/List.d.ts +21 -0
- package/es/ProTreeModal/components/SearchTitle.d.ts +6 -0
- package/es/ProTreeModal/components/SortableItem.d.ts +12 -0
- package/es/ProTreeModal/components/Tree.d.ts +25 -0
- package/es/ProTreeModal/components/Trigger.d.ts +21 -0
- package/es/ProTreeModal/components/index.d.ts +6 -0
- package/es/ProTreeModal/index.d.ts +4 -0
- package/es/ProTreeModal/propsType.d.ts +298 -0
- package/es/ProTreeModal/utils.d.ts +39 -0
- package/es/ProUpload/components/ButtonRender.d.ts +20 -0
- package/es/ProUpload/components/DragRender.d.ts +21 -0
- package/es/ProUpload/components/DraggableUploadListItem.d.ts +2 -0
- package/es/ProUpload/components/Example.d.ts +10 -0
- package/es/ProUpload/components/FileItem.d.ts +33 -0
- package/es/ProUpload/components/ImageRender.d.ts +19 -0
- package/es/ProUpload/index.d.ts +4 -0
- package/es/ProUpload/propsType.d.ts +264 -0
- package/es/ProUpload/uitls.d.ts +3 -0
- package/es/ProUtils/utils/index.d.ts +6 -0
- package/es/ProViewer/index.d.ts +4 -0
- package/es/ProViewer/propsType.d.ts +37 -0
- package/es/ProWaterMark/index.d.ts +4 -0
- package/es/ProWaterMark/propsType.d.ts +6 -0
- package/es/hooks/useDraggableRow.d.ts +34 -0
- package/es/index.d.ts +57 -0
- package/es/index.js +0 -2
- package/es/locale/en_US.d.ts +176 -0
- package/es/locale/index.d.ts +15 -0
- package/es/locale/zh_CN.d.ts +176 -0
- package/es/tokens.d.ts +83 -0
- package/es/utils/index.d.ts +24 -0
- package/package.json +12 -2
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ModifiedFormInstanceType } from '../ProForm/propsType';
|
|
3
|
+
type Forms = Record<string, ModifiedFormInstanceType<any>>;
|
|
4
|
+
export declare const FormsContext: React.Context<Forms>;
|
|
5
|
+
/**
|
|
6
|
+
* @param formKey 表单实例key
|
|
7
|
+
* @param formIst form实例, 如果传了会把传入的实例存入全局
|
|
8
|
+
* @returns 没有入参: 返回表单实例但是不存入全局
|
|
9
|
+
* 有formKey: 取全局中的表单实例返回, 如果不存在则创建后返回
|
|
10
|
+
*/
|
|
11
|
+
export declare const useForms: () => Forms;
|
|
12
|
+
/** 获取所有表单实例 */
|
|
13
|
+
export declare const useContextForms: () => Forms;
|
|
14
|
+
interface FormsProviderProps {
|
|
15
|
+
children?: React.ReactNode;
|
|
16
|
+
}
|
|
17
|
+
declare const FormsProvider: React.FC<FormsProviderProps>;
|
|
18
|
+
export default FormsProvider;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import './index.less';
|
|
2
|
+
interface propsWithCheckModal {
|
|
3
|
+
errorTitle?: string;
|
|
4
|
+
list?: string[];
|
|
5
|
+
[key: string]: any;
|
|
6
|
+
}
|
|
7
|
+
declare const CheckModalContent: (props: propsWithCheckModal) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default CheckModalContent;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { Service, Options } from 'ahooks/lib/useRequest/src/types';
|
|
3
|
+
export interface ProActionType {
|
|
4
|
+
/**
|
|
5
|
+
* @description 模式类型:check执行校验并解析错误信息展示,confirm确认提示
|
|
6
|
+
* @default -
|
|
7
|
+
*/
|
|
8
|
+
mode?: 'check' | 'confirm';
|
|
9
|
+
/**
|
|
10
|
+
* @description 标题
|
|
11
|
+
* @default -
|
|
12
|
+
*/
|
|
13
|
+
title?: string | ReactNode;
|
|
14
|
+
/**
|
|
15
|
+
* @description 操作回调函数
|
|
16
|
+
* @param previousData 接上一个 useRequest 返回的值
|
|
17
|
+
* @param args 接所有链式 useRequest 返回的值
|
|
18
|
+
* @param index 当前操作的索引
|
|
19
|
+
* @returns void或Promise<void>
|
|
20
|
+
* @default -
|
|
21
|
+
*/
|
|
22
|
+
onAction?: (previousData?: any, args?: any[], index?: number) => void | Promise<void>;
|
|
23
|
+
/**
|
|
24
|
+
* @description 自定义请求
|
|
25
|
+
* @param previousData 接上一个 useRequest 返回的值
|
|
26
|
+
* @param args 接所有链式 useRequest 返回的值
|
|
27
|
+
* @returns 包含service、options和transformResponse的对象
|
|
28
|
+
* @default -
|
|
29
|
+
*/
|
|
30
|
+
useRequest?: (previousData: any, args: any) => {
|
|
31
|
+
service?: Service<any, any>;
|
|
32
|
+
options?: Options<any, any>;
|
|
33
|
+
transformResponse?: (data: any) => any;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* @description 是否中断链式操作
|
|
37
|
+
* @param previousData 上一个操作的返回数据
|
|
38
|
+
* @param args 所有链式的数据合集
|
|
39
|
+
* @returns 布尔值,返回true继续执行,返回false中断操作
|
|
40
|
+
* @default -
|
|
41
|
+
*/
|
|
42
|
+
continue?: (previousData: any, args: any[]) => boolean;
|
|
43
|
+
/** 自定义错误弹窗内容视图渲染 */
|
|
44
|
+
contextRender?: (data: any) => string | ReactNode;
|
|
45
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
import 'dayjs/locale/zh-cn';
|
|
3
|
+
import type { ProConfigProviderProps, ConfigContext } from './propsType';
|
|
4
|
+
export declare const ProConfigContext: React.Context<ConfigContext>;
|
|
5
|
+
export declare function useProConfig(): ConfigContext;
|
|
6
|
+
export declare function useProConfig(name: keyof ConfigContext['state']): ConfigContext['state'][keyof ConfigContext['state']];
|
|
7
|
+
export declare const ProConfigProvider: FC<ProConfigProviderProps>;
|
|
8
|
+
export type { ProConfigProviderType, ProConfigProviderProps, GlobalConfig, ProTableGlobalConfig, StorageType, } from './propsType';
|
|
9
|
+
export default ProConfigProvider;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { FormInstance, ThemeConfig } from 'antd';
|
|
3
|
+
import type { PropSelectType } from '../ProSelect/propsType';
|
|
4
|
+
import type { ProModalSelectType } from '../ProForm/components/combination/ProModalSelect/propsType';
|
|
5
|
+
import type { ProCascaderType } from '../ProForm/components/combination/ProCascader/propsType';
|
|
6
|
+
import type { ProEnumConfigType } from '../ProEnum/propsType';
|
|
7
|
+
/** 浏览器缓存类型,与 ProEnum / ProTable 的 StorageType 定义一致 */
|
|
8
|
+
export type StorageType = 'localStorage' | 'sessionStorage' | 'indexedDB';
|
|
9
|
+
/** 项目级全局配置(一处配置,全局生效) */
|
|
10
|
+
export interface GlobalConfig {
|
|
11
|
+
/** 缓存存储位置,影响 ProTable 列配置缓存与 ProEnum 枚举缓存,默认由各组件自身决定 */
|
|
12
|
+
storage?: StorageType;
|
|
13
|
+
}
|
|
14
|
+
/** ProTable 组件全局默认配置,通过 ProConfigProvider 统一设置,无需每个实例单独声明 */
|
|
15
|
+
export interface ProTableGlobalConfig {
|
|
16
|
+
/** 是否开启可伸缩列功能,默认 false */
|
|
17
|
+
resizeColumn?: boolean;
|
|
18
|
+
/** 是否开启列配置功能,开启时默认同步开启缓存,默认 false */
|
|
19
|
+
columnConfig?: boolean | {
|
|
20
|
+
onColumnOk?: (catchColumns: any, columns: any[]) => Promise<void>;
|
|
21
|
+
};
|
|
22
|
+
/** 是否开启列配置缓存,单位为天,true 时缓存一天,默认 false */
|
|
23
|
+
cacheTime?: number | boolean;
|
|
24
|
+
}
|
|
25
|
+
/** 对外配置项类型(value、内部 state 均为此类型,字段均可选) */
|
|
26
|
+
export interface ProConfigProviderType {
|
|
27
|
+
locale?: string;
|
|
28
|
+
/** 项目级全局配置:缓存位置等跨组件通用配置 */
|
|
29
|
+
globalConfig?: GlobalConfig;
|
|
30
|
+
/** ProTable 组件全局默认配置 */
|
|
31
|
+
ProTable?: ProTableGlobalConfig;
|
|
32
|
+
ProEnum?: Partial<ProEnumConfigType>;
|
|
33
|
+
ProSelect?: Partial<PropSelectType> & Record<string, any>;
|
|
34
|
+
ProModalSelect?: Partial<ProModalSelectType> & Record<string, any>;
|
|
35
|
+
ProAddressBar?: Partial<ProCascaderType> & Record<string, any>;
|
|
36
|
+
ProCascader?: Partial<ProCascaderType> & Record<string, any>;
|
|
37
|
+
forms?: Record<string, FormInstance | undefined>;
|
|
38
|
+
[key: string]: any;
|
|
39
|
+
}
|
|
40
|
+
/** ProConfigProvider 组件 Props(内部使用) */
|
|
41
|
+
export interface ProConfigProviderProps {
|
|
42
|
+
value?: ProConfigProviderType;
|
|
43
|
+
locale?: string;
|
|
44
|
+
/** antd 原生主题配置,用法同 antd ConfigProvider 的 theme,会与内部 ThemeContext 的 antdConfig 深度合并后透传 */
|
|
45
|
+
theme?: ThemeConfig;
|
|
46
|
+
onSuccess?: (data: any, params: any) => void;
|
|
47
|
+
children?: React.ReactNode;
|
|
48
|
+
}
|
|
49
|
+
/** Config 上下文 */
|
|
50
|
+
export interface ConfigContext {
|
|
51
|
+
state: ProConfigProviderType;
|
|
52
|
+
dispatch: React.Dispatch<ProConfigActions>;
|
|
53
|
+
}
|
|
54
|
+
/** ThemeAwareConfigProvider 内部组件 Props */
|
|
55
|
+
export interface ThemeAwareConfigProviderProps {
|
|
56
|
+
locale: any;
|
|
57
|
+
/** 外部传入的 antd 主题配置,与 ThemeContext 的 antdConfig 合并 */
|
|
58
|
+
theme?: ThemeConfig;
|
|
59
|
+
children: React.ReactNode;
|
|
60
|
+
}
|
|
61
|
+
/** Reducer Actions */
|
|
62
|
+
export type ProConfigActions = {
|
|
63
|
+
type: 'setFormRef';
|
|
64
|
+
name: string;
|
|
65
|
+
value: FormInstance;
|
|
66
|
+
} | {
|
|
67
|
+
type: 'deleteFormRef';
|
|
68
|
+
name: string;
|
|
69
|
+
} | {
|
|
70
|
+
type: 'set';
|
|
71
|
+
payload: ProConfigProviderType;
|
|
72
|
+
} | {
|
|
73
|
+
type: 'setProEnum';
|
|
74
|
+
payload: Record<string, any>;
|
|
75
|
+
} | {
|
|
76
|
+
type: 'setProEnumDic';
|
|
77
|
+
key: string;
|
|
78
|
+
payload: any;
|
|
79
|
+
} | {
|
|
80
|
+
type: 'setWithLocal';
|
|
81
|
+
payload: ProConfigProviderType;
|
|
82
|
+
};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import type { ButtonProps } from 'antd';
|
|
3
|
+
import type { DownloadRequestProps, PropsWithMakeFilePropsType } from './utils';
|
|
4
|
+
export interface ProDownloadType extends ButtonProps {
|
|
5
|
+
/**
|
|
6
|
+
* @description 下载资源获取来源:api:通过接口获取,url:通过静态资源链接获取
|
|
7
|
+
* @default api
|
|
8
|
+
*/
|
|
9
|
+
source?: string;
|
|
10
|
+
/**
|
|
11
|
+
* @description 下载请求的地址
|
|
12
|
+
* @default (必选)
|
|
13
|
+
*/
|
|
14
|
+
url: string;
|
|
15
|
+
/**
|
|
16
|
+
* @description 下载请求的地址
|
|
17
|
+
* @deprecated 弃用,请使用url进行替换
|
|
18
|
+
* @default (非必选)
|
|
19
|
+
*/
|
|
20
|
+
action?: string;
|
|
21
|
+
/**
|
|
22
|
+
* @description 下载请求的类型
|
|
23
|
+
* @default post
|
|
24
|
+
*/
|
|
25
|
+
method?: 'post' | 'get';
|
|
26
|
+
/**
|
|
27
|
+
* @description 下载所需额外参数或返回上传额外参数的方法
|
|
28
|
+
* @default -
|
|
29
|
+
*/
|
|
30
|
+
params?: any;
|
|
31
|
+
/**
|
|
32
|
+
* @description 下载保存的文件名
|
|
33
|
+
* @default (必选)
|
|
34
|
+
*/
|
|
35
|
+
fileName?: string;
|
|
36
|
+
/**
|
|
37
|
+
* @description 设置上传的请求头部,IE10 以上有效
|
|
38
|
+
* @default -
|
|
39
|
+
*/
|
|
40
|
+
headers?: object;
|
|
41
|
+
/**
|
|
42
|
+
* @description 禁用状态
|
|
43
|
+
* @default false
|
|
44
|
+
*/
|
|
45
|
+
disabled?: boolean;
|
|
46
|
+
/** 格式化数据 */
|
|
47
|
+
transformResponse?: (data: any) => any;
|
|
48
|
+
/**
|
|
49
|
+
* @description 上传文件之前的钩子,若返回 false 则停止下载。支持返回一个 Promise 对象,Promise 对象 reject 时则停止下载
|
|
50
|
+
* @default -
|
|
51
|
+
*/
|
|
52
|
+
beforeDownload?: () => boolean | Promise<any>;
|
|
53
|
+
/**
|
|
54
|
+
* @description service 执行完成时触发
|
|
55
|
+
* @default -
|
|
56
|
+
*/
|
|
57
|
+
/**
|
|
58
|
+
* @description 下载出错的回调
|
|
59
|
+
* @default -
|
|
60
|
+
*/
|
|
61
|
+
onError?: (response: object) => void;
|
|
62
|
+
onFinish?: () => void;
|
|
63
|
+
/**
|
|
64
|
+
* @description 下载按钮的填充内容
|
|
65
|
+
* @default -
|
|
66
|
+
*/
|
|
67
|
+
downLoadRequest?: DownloadRequestProps;
|
|
68
|
+
downLoadBlobUrl?: PropsWithMakeFilePropsType;
|
|
69
|
+
children?: string | ReactNode;
|
|
70
|
+
[key: string]: any;
|
|
71
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
export interface PropsWithMakeFilePropsType {
|
|
2
|
+
blob?: Blob;
|
|
3
|
+
fileName: string;
|
|
4
|
+
url?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface IDownloadRequestPropsType {
|
|
7
|
+
/**
|
|
8
|
+
* @description 下载请求的地址
|
|
9
|
+
* @default (必选)
|
|
10
|
+
*/
|
|
11
|
+
url: string;
|
|
12
|
+
/**
|
|
13
|
+
* @description 下载请求的类型
|
|
14
|
+
* @default post
|
|
15
|
+
*/
|
|
16
|
+
method?: 'post' | 'get';
|
|
17
|
+
/**
|
|
18
|
+
* @description 下载所需额外参数或返回上传额外参数的方法
|
|
19
|
+
* @default -
|
|
20
|
+
*/
|
|
21
|
+
params?: any;
|
|
22
|
+
headers?: any;
|
|
23
|
+
/** 格式化数据 */
|
|
24
|
+
transformResponse?: (data: any) => any;
|
|
25
|
+
/**
|
|
26
|
+
* @description service 执行完成时触发
|
|
27
|
+
* @default -
|
|
28
|
+
*/
|
|
29
|
+
onFinish?: (response: object, params: object) => void;
|
|
30
|
+
/**
|
|
31
|
+
* @description 下载保存的文件名
|
|
32
|
+
* @default (必选)
|
|
33
|
+
*/
|
|
34
|
+
fileName?: string;
|
|
35
|
+
/**
|
|
36
|
+
* @description 下载出错的回调
|
|
37
|
+
* @default -
|
|
38
|
+
*/
|
|
39
|
+
onError?: (response: object) => void;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* 下载Blob
|
|
43
|
+
*
|
|
44
|
+
* @param response
|
|
45
|
+
* @param fileName
|
|
46
|
+
* @param extendName
|
|
47
|
+
* @constructor
|
|
48
|
+
*/
|
|
49
|
+
export declare function BlobMakeFile({ blob, fileName, url }: PropsWithMakeFilePropsType): void;
|
|
50
|
+
export type DownloadRequestProps = (props: IDownloadRequestPropsType) => Promise<Response>;
|
|
51
|
+
type convertBase64ToBlobType = (base64: string, fileType?: string, slice?: number) => Blob;
|
|
52
|
+
export declare const convertBase64ToBlob: convertBase64ToBlobType;
|
|
53
|
+
/**
|
|
54
|
+
* 从Content-Disposition获取filename
|
|
55
|
+
* @param contentDisposition string
|
|
56
|
+
* @returns string
|
|
57
|
+
*/
|
|
58
|
+
export declare function getFilenameFromContentDisposition(contentDisposition: any): string;
|
|
59
|
+
export declare const DownloadRequest: DownloadRequestProps;
|
|
60
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ProDrawerFormType } from '../propsType';
|
|
2
|
+
interface UseConfirmCloseParams {
|
|
3
|
+
open?: boolean;
|
|
4
|
+
isView?: boolean;
|
|
5
|
+
isConfirmClose?: boolean;
|
|
6
|
+
isConfirmCloseModalProps?: ProDrawerFormType['isConfirmCloseModalProps'];
|
|
7
|
+
onCancel?: ProDrawerFormType['onCancel'];
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* 关闭抽屉/弹窗时的二次确认逻辑
|
|
11
|
+
*
|
|
12
|
+
* - markInteracted:绑定到内容容器的 input / change 事件,标记用户真实交互过。
|
|
13
|
+
* setFieldsValue 等程序回填不会派发用户输入事件,因此异步回填不会误触发二次确认。
|
|
14
|
+
* - onConfirm:组件自带关闭入口(右上角 × / 遮罩)的关闭处理。未交互、查看模式或
|
|
15
|
+
* 未开启二次确认时直接关闭;否则弹出二次确认。底部取消按钮不走此逻辑。
|
|
16
|
+
* - contextHolder:Modal.useModal 的上下文占位,需渲染进组件,使二次确认弹框能继承
|
|
17
|
+
* ConfigProvider 的主题 / 国际化(替代静态 Modal.confirm,消除上下文告警)。
|
|
18
|
+
*/
|
|
19
|
+
export declare const useConfirmClose: ({ open, isView, isConfirmClose, isConfirmCloseModalProps, onCancel, }: UseConfirmCloseParams) => {
|
|
20
|
+
markInteracted: () => void;
|
|
21
|
+
onConfirm: () => void;
|
|
22
|
+
contextHolder: import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
23
|
+
};
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FormInstance } from 'antd/es/form/Form';
|
|
3
|
+
import { ProDrawerFormType } from './propsType';
|
|
4
|
+
export declare const useProDrawerFormContext: () => any;
|
|
5
|
+
declare const ProDrawerForm: React.ForwardRefExoticComponent<ProDrawerFormType & React.RefAttributes<FormInstance<any>>>;
|
|
6
|
+
export default ProDrawerForm;
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import type { ModalProps, DrawerProps, FormInstance, ModalFuncProps } from 'antd';
|
|
3
|
+
import type { ProFormType } from '../ProForm/propsType';
|
|
4
|
+
/**
|
|
5
|
+
* 抽屉尺寸类型定义
|
|
6
|
+
*/
|
|
7
|
+
export type DrawerSizePropsType = 'small' | 'middle' | 'large';
|
|
8
|
+
export type DrawerSizeType = DrawerSizePropsType;
|
|
9
|
+
/**
|
|
10
|
+
* 显示类型定义
|
|
11
|
+
*/
|
|
12
|
+
export type ShowTypePropsType = 'Modal' | 'Drawer';
|
|
13
|
+
export type ShowType = ShowTypePropsType;
|
|
14
|
+
export interface ProDrawerFormType {
|
|
15
|
+
/** @name 内部form实例 */
|
|
16
|
+
form?: FormInstance<any>;
|
|
17
|
+
/** @name 自定义className */
|
|
18
|
+
className?: string;
|
|
19
|
+
/** @name 控制显示隐藏 */
|
|
20
|
+
open: ModalProps['open'] | DrawerProps['open'];
|
|
21
|
+
/** @name 标题 */
|
|
22
|
+
title?: ModalProps['title'] | DrawerProps['title'];
|
|
23
|
+
/** @name 点击蒙层是否允许关闭 */
|
|
24
|
+
maskClosable?: ModalProps['maskClosable'] | DrawerProps['maskClosable'];
|
|
25
|
+
/** @name 禁止选项 */
|
|
26
|
+
disabled?: boolean | undefined;
|
|
27
|
+
/** @name 是否查看模式 */
|
|
28
|
+
isView?: boolean | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* @name 宽度
|
|
31
|
+
* @deprecated 请改用 `size`,`width` 仅作向后兼容保留,后续版本将移除
|
|
32
|
+
*/
|
|
33
|
+
width?: string | number;
|
|
34
|
+
/** @name 取消按钮文字 */
|
|
35
|
+
cancelText?: ModalProps['cancelText'];
|
|
36
|
+
/** @name 确认按钮文字 */
|
|
37
|
+
okText?: ModalProps['okText'];
|
|
38
|
+
/** @name 确认按钮loading状态 */
|
|
39
|
+
okLoading?: boolean;
|
|
40
|
+
/** @name 确认按钮禁用状态 */
|
|
41
|
+
okDisabled?: boolean;
|
|
42
|
+
/** @name 显示方式 */
|
|
43
|
+
mode?: ShowType;
|
|
44
|
+
/**
|
|
45
|
+
* @name 尺寸
|
|
46
|
+
* @description 设计规范三档枚举(small/middle/large),亦支持自定义数字 / 像素 / 百分比
|
|
47
|
+
*/
|
|
48
|
+
size?: DrawerSizeType | number | string;
|
|
49
|
+
/**
|
|
50
|
+
* @name 自动选中第一项
|
|
51
|
+
* @description 只对有input的类型有效
|
|
52
|
+
*/
|
|
53
|
+
autoFocusFirstInput?: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* @name 关闭时是否开启二次确认弹框
|
|
56
|
+
* @description 只对Drawer的类型有效
|
|
57
|
+
*/
|
|
58
|
+
isConfirmClose?: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* @name 关闭时二次确认弹框的属性
|
|
61
|
+
* @description 只对Drawer的类型有效
|
|
62
|
+
*/
|
|
63
|
+
isConfirmCloseModalProps?: Omit<ModalFuncProps, 'content' | 'onOk' | 'onCancel'>;
|
|
64
|
+
/**
|
|
65
|
+
* @name 底部默认取消按钮事件
|
|
66
|
+
* @returns 返回Promise或布尔值可控制弹窗关闭行为
|
|
67
|
+
*/
|
|
68
|
+
onCancel?: () => Promise<boolean | void | unknown> | boolean | void | unknown;
|
|
69
|
+
/**
|
|
70
|
+
* @name 底部默认确定按钮事件
|
|
71
|
+
* @param values 表单值
|
|
72
|
+
* @param form 表单实例
|
|
73
|
+
* @returns 返回Promise或布尔值可控制弹窗关闭行为
|
|
74
|
+
*/
|
|
75
|
+
onOk?: (values?: any, form?: FormInstance) => Promise<boolean | void | unknown> | boolean | void | unknown;
|
|
76
|
+
/**
|
|
77
|
+
* @name 底部自定义按钮配置
|
|
78
|
+
*/
|
|
79
|
+
footer?: ReactNode | ReactNode[];
|
|
80
|
+
/**
|
|
81
|
+
* @name 底部左侧自定义渲染
|
|
82
|
+
*/
|
|
83
|
+
extraLeft?: ReactNode;
|
|
84
|
+
/**
|
|
85
|
+
* @name proForm的属性
|
|
86
|
+
* @description 配置后children不展示
|
|
87
|
+
*/
|
|
88
|
+
proFormProps?: Omit<ProFormType, 'form'>;
|
|
89
|
+
/**
|
|
90
|
+
* @name 弹框的属性
|
|
91
|
+
*/
|
|
92
|
+
modalProps?: ModalProps;
|
|
93
|
+
/**
|
|
94
|
+
* @name 抽屉的属性
|
|
95
|
+
*/
|
|
96
|
+
drawerProps?: DrawerProps;
|
|
97
|
+
/**
|
|
98
|
+
* @name 关闭时弹框或者抽屉是否清空formValues
|
|
99
|
+
*/
|
|
100
|
+
onCloseClean?: boolean;
|
|
101
|
+
/**
|
|
102
|
+
* @name 隐藏时销毁内容
|
|
103
|
+
* @description 透传给底层 antd Drawer/Modal
|
|
104
|
+
*/
|
|
105
|
+
destroyOnHidden?: ModalProps['destroyOnHidden'] | DrawerProps['destroyOnHidden'];
|
|
106
|
+
/** @name 子组件 */
|
|
107
|
+
children?: React.ReactNode;
|
|
108
|
+
/** @name z轴层级 */
|
|
109
|
+
zIndex?: number;
|
|
110
|
+
}
|
|
111
|
+
export type ProDrawerFormPropsType = ProDrawerFormType;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { DrawerSizeType } from '../propsType';
|
|
2
|
+
/**
|
|
3
|
+
* 将枚举值转成数值px,暴露枚举,隐藏真实数值,暂时不让用户自定义
|
|
4
|
+
* @param size 设计规范的三个尺寸 460 960 1200 对应 'small' | 'middle' | 'large'
|
|
5
|
+
*/
|
|
6
|
+
export declare const transformBySize: (size: DrawerSizeType) => number;
|
|
7
|
+
/**
|
|
8
|
+
* 解析最终尺寸
|
|
9
|
+
*
|
|
10
|
+
* - 显式传入(已废弃的)`width` 时打印警告并优先生效,保证向后兼容。
|
|
11
|
+
* - `size` 命中三档枚举走 `transformBySize`;否则视为自定义数字 / 像素 / 百分比直接返回。
|
|
12
|
+
*/
|
|
13
|
+
export declare const resolveDrawerSize: (size: DrawerSizeType | number | string | undefined, width: number | string | undefined) => number | string | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* 关闭抽屉时是否需要弹出二次确认
|
|
16
|
+
*
|
|
17
|
+
* 判定「用户是否真实改动过」依据 userInteracted —— 它由抽屉内容容器上监听到的
|
|
18
|
+
* 真实用户输入事件(input / change)置位。打开后通过 setFieldsValue 异步回填
|
|
19
|
+
* 详情数据属于程序行为,不会派发这些用户事件,因此不会误触发二次确认。
|
|
20
|
+
*/
|
|
21
|
+
export declare const shouldConfirmClose: (params: {
|
|
22
|
+
isView?: boolean;
|
|
23
|
+
isConfirmClose?: boolean;
|
|
24
|
+
userInteracted: boolean;
|
|
25
|
+
}) => boolean;
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import { InputProps } from 'antd/es/input';
|
|
2
|
+
import { PopconfirmProps } from 'antd/es/popconfirm';
|
|
3
|
+
import { FormInstance } from 'antd/es/form';
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import type { ProFormColumnType } from '../ProForm/propsType';
|
|
6
|
+
export interface ContainerType {
|
|
7
|
+
/**
|
|
8
|
+
* @description 触发方式
|
|
9
|
+
* @default "click"
|
|
10
|
+
*/
|
|
11
|
+
trigger?: 'click' | 'hover';
|
|
12
|
+
/**
|
|
13
|
+
* @description 尺寸
|
|
14
|
+
* @default "middle"
|
|
15
|
+
*/
|
|
16
|
+
size?: 'small' | 'middle' | 'large';
|
|
17
|
+
/**
|
|
18
|
+
* @description 显示模式
|
|
19
|
+
* @default "popup"
|
|
20
|
+
*/
|
|
21
|
+
mode?: 'popup' | 'current';
|
|
22
|
+
/**
|
|
23
|
+
* @description 类型
|
|
24
|
+
* @default "input"
|
|
25
|
+
*/
|
|
26
|
+
type?: 'input' | 'select';
|
|
27
|
+
}
|
|
28
|
+
export interface StateType {
|
|
29
|
+
/**
|
|
30
|
+
* @description 弹出值
|
|
31
|
+
* @default ""
|
|
32
|
+
*/
|
|
33
|
+
popValue?: string;
|
|
34
|
+
/**
|
|
35
|
+
* @description 确认值
|
|
36
|
+
* @default ""
|
|
37
|
+
*/
|
|
38
|
+
confirmValue?: string;
|
|
39
|
+
}
|
|
40
|
+
export interface PopupType {
|
|
41
|
+
/**
|
|
42
|
+
* @description 类型
|
|
43
|
+
* @default -
|
|
44
|
+
*/
|
|
45
|
+
type?: string;
|
|
46
|
+
/**
|
|
47
|
+
* @description 标签
|
|
48
|
+
* @default -
|
|
49
|
+
*/
|
|
50
|
+
label?: string | React.ReactNode;
|
|
51
|
+
/**
|
|
52
|
+
* @description 标题
|
|
53
|
+
* @default -
|
|
54
|
+
*/
|
|
55
|
+
title?: string | React.ReactNode;
|
|
56
|
+
/**
|
|
57
|
+
* @description 提示
|
|
58
|
+
* @default -
|
|
59
|
+
*/
|
|
60
|
+
tip?: string | React.ReactNode;
|
|
61
|
+
/**
|
|
62
|
+
* @description 是否去除空格
|
|
63
|
+
* @default false
|
|
64
|
+
*/
|
|
65
|
+
trim?: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* @description 标签宽度
|
|
68
|
+
* @default -
|
|
69
|
+
*/
|
|
70
|
+
labelWidth?: string | number;
|
|
71
|
+
/**
|
|
72
|
+
* @description 字段属性
|
|
73
|
+
* @default -
|
|
74
|
+
*/
|
|
75
|
+
fieldProps?: any;
|
|
76
|
+
/**
|
|
77
|
+
* @description 列配置
|
|
78
|
+
* @default -
|
|
79
|
+
*/
|
|
80
|
+
columns?: ProFormColumnType[];
|
|
81
|
+
/**
|
|
82
|
+
* @description 允许扩展字段
|
|
83
|
+
*/
|
|
84
|
+
[key: string]: any;
|
|
85
|
+
}
|
|
86
|
+
export interface LabelType extends Omit<InputProps, 'onChange'> {
|
|
87
|
+
/**
|
|
88
|
+
* @description 是否打开
|
|
89
|
+
* @default false
|
|
90
|
+
*/
|
|
91
|
+
open?: boolean;
|
|
92
|
+
/**
|
|
93
|
+
* @description 可见性变化回调
|
|
94
|
+
* @default -
|
|
95
|
+
*/
|
|
96
|
+
onOpenChange?: (open: boolean) => void;
|
|
97
|
+
/**
|
|
98
|
+
* @description 值变化回调
|
|
99
|
+
* @default -
|
|
100
|
+
*/
|
|
101
|
+
onChange?: (value: any) => void;
|
|
102
|
+
/**
|
|
103
|
+
* @description 是否可编辑
|
|
104
|
+
* @default false
|
|
105
|
+
*/
|
|
106
|
+
editable?: boolean;
|
|
107
|
+
/**
|
|
108
|
+
* @description 编辑回调
|
|
109
|
+
* @default -
|
|
110
|
+
*/
|
|
111
|
+
onEdit?: () => void;
|
|
112
|
+
}
|
|
113
|
+
export interface ProEditLabelType extends Partial<PopconfirmProps> {
|
|
114
|
+
/**
|
|
115
|
+
* @description 弹出属性
|
|
116
|
+
* @default -
|
|
117
|
+
*/
|
|
118
|
+
popupProps?: PopupType;
|
|
119
|
+
/**
|
|
120
|
+
* @description 空值显示
|
|
121
|
+
* @default "-"
|
|
122
|
+
*/
|
|
123
|
+
viewEmpty?: '-';
|
|
124
|
+
/**
|
|
125
|
+
* @description 确认回调
|
|
126
|
+
* @default -
|
|
127
|
+
*/
|
|
128
|
+
onConfirm?: (e?: any) => void;
|
|
129
|
+
/**
|
|
130
|
+
* @description 完成回调
|
|
131
|
+
* @default -
|
|
132
|
+
*/
|
|
133
|
+
onFinish?: (e?: any) => void;
|
|
134
|
+
/**
|
|
135
|
+
* @description 打开状态变化回调
|
|
136
|
+
* @default -
|
|
137
|
+
*/
|
|
138
|
+
onOpenChange?: (e?: any) => void;
|
|
139
|
+
/**
|
|
140
|
+
* @description 触发方式
|
|
141
|
+
* @default "click"
|
|
142
|
+
*/
|
|
143
|
+
trigger?: 'click' | 'hover';
|
|
144
|
+
/**
|
|
145
|
+
* @description 值
|
|
146
|
+
* @default -
|
|
147
|
+
*/
|
|
148
|
+
value?: any;
|
|
149
|
+
/**
|
|
150
|
+
* @description 表单实例
|
|
151
|
+
* @default -
|
|
152
|
+
*/
|
|
153
|
+
form?: FormInstance;
|
|
154
|
+
/**
|
|
155
|
+
* @description 是否禁用
|
|
156
|
+
* @default false
|
|
157
|
+
*/
|
|
158
|
+
disabled?: boolean;
|
|
159
|
+
/**
|
|
160
|
+
* @description 允许扩展字段
|
|
161
|
+
*/
|
|
162
|
+
[key: string]: any;
|
|
163
|
+
}
|