@zat-design/sisyphus-react 4.5.5 → 4.5.6-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 +1 -1
- package/dist/less.esm.css +1 -1
- 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/Describe/index.d.ts +26 -0
- package/es/ProLayout/components/ProHeader/components/Describe/index.js +106 -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/index.js +54 -118
- package/es/ProLayout/components/ProHeader/utils/index.d.ts +20 -0
- package/es/ProLayout/components/ProHeader/utils/index.js +23 -1
- 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/index.js +87 -3
- package/es/ProLayout/components/TabsManager/propTypes.d.ts +89 -0
- package/es/ProLayout/components/TabsManager/style/index.less +6 -3
- 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/index.js +28 -10
- package/es/ProLayout/propTypes.d.ts +550 -0
- package/es/ProLayout/style/index.less +32 -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,143 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import { ButtonProps, ColProps, RowProps } from 'antd';
|
|
3
|
+
import { FormProps, FormInstance } from 'antd/es/form/Form';
|
|
4
|
+
import { NamePath } from 'antd/es/form/interface';
|
|
5
|
+
import type { StoreValue, Store, ValuedNotifyInfo } from '@rc-component/form/es/interface';
|
|
6
|
+
import type { ShouldUpdate } from '@rc-component/form/es/Field';
|
|
7
|
+
import type { ProFormColumnType, ViewType } from './components/render/propsType';
|
|
8
|
+
import type { ProFormComponentType } from './components';
|
|
9
|
+
export type ModifiedFormInstanceType<T> = FormInstance<T> & {
|
|
10
|
+
isModified?: boolean;
|
|
11
|
+
/** 默认清空设置值的报错状态 */
|
|
12
|
+
setFieldValue: (name: NamePath, value: any, info?: ValuedNotifyInfo) => void;
|
|
13
|
+
formKey?: string;
|
|
14
|
+
_init?: boolean;
|
|
15
|
+
__INTERNAL_CONFIG__?: {
|
|
16
|
+
fields?: any[];
|
|
17
|
+
stopOnFirstError?: boolean;
|
|
18
|
+
[key: string]: any;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
export interface ButtonType extends ButtonProps {
|
|
22
|
+
children?: any;
|
|
23
|
+
}
|
|
24
|
+
export interface FooterButtonType {
|
|
25
|
+
okButtonProps?: ButtonType;
|
|
26
|
+
cancelButtonProps?: ButtonType;
|
|
27
|
+
}
|
|
28
|
+
export interface ProFormItemChildType {
|
|
29
|
+
value?: any;
|
|
30
|
+
onChange?: () => void;
|
|
31
|
+
[key: string]: any;
|
|
32
|
+
}
|
|
33
|
+
export type ModeEnum = 'search' | 'drawer';
|
|
34
|
+
type FooterType = ReactNode | {
|
|
35
|
+
okButtonProps: ButtonType;
|
|
36
|
+
cancelButtonProps: ButtonType;
|
|
37
|
+
} | boolean;
|
|
38
|
+
export declare const otherKeys: string[];
|
|
39
|
+
export interface ProFormOtherType {
|
|
40
|
+
isView?: boolean;
|
|
41
|
+
viewEmpty?: React.ReactNode;
|
|
42
|
+
label?: React.ReactNode;
|
|
43
|
+
valueType?: string;
|
|
44
|
+
viewType?: ViewType;
|
|
45
|
+
name?: NamePath;
|
|
46
|
+
names?: NamePath[];
|
|
47
|
+
form?: FormInstance;
|
|
48
|
+
type?: ProFormComponentType;
|
|
49
|
+
hiddenNames?: string[] | any[];
|
|
50
|
+
colProps: ColProps;
|
|
51
|
+
disabled: boolean;
|
|
52
|
+
show?: boolean | (() => boolean);
|
|
53
|
+
required?: boolean | boolean[] | (() => boolean | boolean[]);
|
|
54
|
+
mode?: string;
|
|
55
|
+
namePath?: any[] | string | number;
|
|
56
|
+
listName?: any[] | string | number;
|
|
57
|
+
globalControl?: boolean;
|
|
58
|
+
formDisabled?: boolean;
|
|
59
|
+
isDiffChange?: boolean;
|
|
60
|
+
diffConfig?: DiffConfigType;
|
|
61
|
+
shouldUpdateDebounce?: number;
|
|
62
|
+
/** 灵活模式 Group 相关属性,独立管理灵活模式配置 */
|
|
63
|
+
flexibleGroupProps?: {
|
|
64
|
+
className?: string;
|
|
65
|
+
style?: React.CSSProperties;
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
export interface DiffConfigType<Values = any> {
|
|
69
|
+
/** 比对原始数据源 */
|
|
70
|
+
originalValues: Values;
|
|
71
|
+
/** 是否显示对比值气泡 */
|
|
72
|
+
toolTip?: boolean;
|
|
73
|
+
/** 变更提示颜色 */
|
|
74
|
+
changeTipColor?: string;
|
|
75
|
+
/** 新增提示颜色 */
|
|
76
|
+
addTipColor?: string;
|
|
77
|
+
/** 是否跟随父组件滚动 */
|
|
78
|
+
scrollFollowParent?: string;
|
|
79
|
+
}
|
|
80
|
+
export interface ProFormType<Values = any> extends FormProps<Values> {
|
|
81
|
+
disabled?: boolean;
|
|
82
|
+
/** 全局控制优先 */
|
|
83
|
+
globalControl?: boolean;
|
|
84
|
+
mode?: ModeEnum;
|
|
85
|
+
/**
|
|
86
|
+
* 如果有formKey,则会在全局中查找或创建表单实例
|
|
87
|
+
* 可以不需要手动传入form实例 且formKey的优先级高于form
|
|
88
|
+
*/
|
|
89
|
+
formKey?: string;
|
|
90
|
+
/** 是否查看 */
|
|
91
|
+
isView?: boolean;
|
|
92
|
+
span?: number;
|
|
93
|
+
columns?: ProFormColumnType<Values>[];
|
|
94
|
+
rowProps?: RowProps;
|
|
95
|
+
footer?: FooterType;
|
|
96
|
+
expand?: boolean | number;
|
|
97
|
+
expandOpen?: boolean;
|
|
98
|
+
expandOpenChange?: (open: boolean) => void;
|
|
99
|
+
onOk?: () => void;
|
|
100
|
+
okText?: string;
|
|
101
|
+
onCancel?: () => void;
|
|
102
|
+
cancelText?: string;
|
|
103
|
+
viewEmpty?: React.ReactNode | string;
|
|
104
|
+
confirmLoading?: boolean;
|
|
105
|
+
labelWidth?: string | number;
|
|
106
|
+
/** 是否回车提交 */
|
|
107
|
+
submitOnEnter?: boolean;
|
|
108
|
+
clearNotShow?: boolean;
|
|
109
|
+
requiredOnView?: boolean;
|
|
110
|
+
formId?: string;
|
|
111
|
+
required?: boolean | boolean[];
|
|
112
|
+
/** 表单比对配置 */
|
|
113
|
+
diffConfig?: DiffConfigType;
|
|
114
|
+
scrollToError?: boolean;
|
|
115
|
+
/** 性能模式,谨慎使用,默认不开启
|
|
116
|
+
* 1. 开启不过滤names的中间态值
|
|
117
|
+
*/
|
|
118
|
+
optimize?: boolean;
|
|
119
|
+
/** 是否在遇到第一个错误时停止验证 */
|
|
120
|
+
stopOnFirstError?: boolean;
|
|
121
|
+
/** shouldUpdate防抖延迟时间,默认500ms,设置为0则不防抖 */
|
|
122
|
+
shouldUpdateDebounce?: number;
|
|
123
|
+
/** label 对齐方式 */
|
|
124
|
+
labelAlign?: 'left' | 'right';
|
|
125
|
+
}
|
|
126
|
+
export interface TransformType<T = any> {
|
|
127
|
+
normalize?: (value: StoreValue, prevValue: StoreValue, allValues: Store) => StoreValue;
|
|
128
|
+
getValueProps?: (value: StoreValue) => Record<string, unknown>;
|
|
129
|
+
shouldUpdate?: ShouldUpdate<T>;
|
|
130
|
+
}
|
|
131
|
+
export type DistributiveOmit<T, K extends keyof any> = T extends any ? Omit<T, K> : never;
|
|
132
|
+
/**
|
|
133
|
+
* ProForm 组件接口类型
|
|
134
|
+
* 用于定义 ProForm 组件及其静态方法的类型
|
|
135
|
+
* 注意:此接口的具体实现方法类型在组件文件中定义,这里只提供基础结构
|
|
136
|
+
*/
|
|
137
|
+
export interface ProFormInstanceType<T = any> extends React.ForwardRefExoticComponent<ProFormType<T> & React.RefAttributes<FormInstance<T>>> {
|
|
138
|
+
useForm: any;
|
|
139
|
+
useWatch: any;
|
|
140
|
+
useFormInstances: any;
|
|
141
|
+
[key: string]: any;
|
|
142
|
+
}
|
|
143
|
+
export type { ProFormColumnType } from './components/render/propsType';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { FormItemProps } from 'antd';
|
|
2
|
+
interface BuildFormItemPropsParams {
|
|
3
|
+
baseFormItemProps: any;
|
|
4
|
+
otherProps: any;
|
|
5
|
+
form: any;
|
|
6
|
+
namesStr: any;
|
|
7
|
+
internalRule: any;
|
|
8
|
+
resolvedRequired: any;
|
|
9
|
+
rules: any;
|
|
10
|
+
labelRequired: any;
|
|
11
|
+
requiredOnView?: boolean;
|
|
12
|
+
type: string;
|
|
13
|
+
trim?: boolean;
|
|
14
|
+
upperCase?: boolean;
|
|
15
|
+
proConfig: any;
|
|
16
|
+
validateFirst: any;
|
|
17
|
+
lastDisabled: any;
|
|
18
|
+
labelWidth?: string | number;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* 将列配置整理为最终透传给 Form.Item 的 props(纯函数)
|
|
22
|
+
* 聚合 valueType transform / transformNames / 校验规则 / disabled 优先级 / omit
|
|
23
|
+
*/
|
|
24
|
+
export declare const buildFormItemProps: (params: BuildFormItemPropsParams) => FormItemProps & Record<string, any>;
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FormInstance } from 'antd';
|
|
2
|
+
export interface DiffOriginalParams {
|
|
3
|
+
originalValue: any;
|
|
4
|
+
value: any;
|
|
5
|
+
form: FormInstance;
|
|
6
|
+
type?: string;
|
|
7
|
+
onDiff?: (originalValue: any, currentValue: any) => DiffType | boolean | undefined;
|
|
8
|
+
}
|
|
9
|
+
export type DiffType = 'same' | 'add' | 'changed';
|
|
10
|
+
export declare const diffOriginal: (params: DiffOriginalParams) => DiffType;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getDefaultProps: (props: any) => any;
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { ColProps, FormProps, FormInstance } from 'antd';
|
|
2
|
+
import { InternalNamePath, NamePath } from 'antd/es/form/interface';
|
|
3
|
+
interface transProps {
|
|
4
|
+
formProps: FormProps;
|
|
5
|
+
colProps: ColProps;
|
|
6
|
+
[name: string]: any;
|
|
7
|
+
}
|
|
8
|
+
interface AnyObject {
|
|
9
|
+
[key: string]: any;
|
|
10
|
+
}
|
|
11
|
+
export declare const getLayout: (params: any) => transProps;
|
|
12
|
+
export declare const isSelect: (props: any) => any;
|
|
13
|
+
/**
|
|
14
|
+
* Input TextArea 移除前后空格
|
|
15
|
+
* @param type 组件类型
|
|
16
|
+
* @param trim 是否移除前后空格
|
|
17
|
+
* @returns {}
|
|
18
|
+
*/
|
|
19
|
+
export declare const isTrim: (type: string, trim: boolean, configData: any) => any;
|
|
20
|
+
/**
|
|
21
|
+
* Input TextArea 小写自动转大写
|
|
22
|
+
* @param type 组件类型
|
|
23
|
+
* @param upperCase 是否小写转大写
|
|
24
|
+
* @returns {}
|
|
25
|
+
*/
|
|
26
|
+
export declare const isUpperCase: (type: string, upperCase: boolean) => any;
|
|
27
|
+
export declare const diffField: (prevValues: any, curValues: any, names: NamePath[]) => boolean;
|
|
28
|
+
export declare const splitNameStr: (name: string) => string[][];
|
|
29
|
+
export declare const filterInternalFields: (values: any, optimize?: boolean) => any;
|
|
30
|
+
export declare const getAllNamePath: (object: Record<string, any>, currentPath?: InternalNamePath) => InternalNamePath[];
|
|
31
|
+
export declare const isNullValue: (value: any) => boolean;
|
|
32
|
+
/**
|
|
33
|
+
* 判断数组中是否包含空值 一个为空则为true
|
|
34
|
+
* @param arr 值
|
|
35
|
+
* @returns boole
|
|
36
|
+
*/
|
|
37
|
+
export declare const isNotFullArray: (arr: any, length: any, required: any) => boolean;
|
|
38
|
+
/**
|
|
39
|
+
* 判断数组中值是否都为空 全部为空则为true
|
|
40
|
+
* @param arr 值
|
|
41
|
+
* @returns boole
|
|
42
|
+
*/
|
|
43
|
+
export declare const isNullArray: (arr: any) => boolean;
|
|
44
|
+
/**
|
|
45
|
+
* 判断数组中值是否全部为空 如果值不是数组返回false
|
|
46
|
+
* @param arr 值
|
|
47
|
+
* @returns boole
|
|
48
|
+
*/
|
|
49
|
+
export declare const isEmptyArray: (arr: any) => boolean;
|
|
50
|
+
export declare function toArray<T>(value?: T | T[] | null): T[];
|
|
51
|
+
/**
|
|
52
|
+
* 初始化值names值合并
|
|
53
|
+
* @param obj AnyObject
|
|
54
|
+
* @returns AnyObject
|
|
55
|
+
*/
|
|
56
|
+
export declare function initialValuesToNames(values: AnyObject, columns: AnyObject): AnyObject;
|
|
57
|
+
/**
|
|
58
|
+
* 获取数组含数字的新数组
|
|
59
|
+
* @returns ['group-7x19no', 0, 'abc'] =>['group-7x19no', 0]
|
|
60
|
+
*/
|
|
61
|
+
export declare function getArrayBeforeNumber(arr: (string | number)[]): (string | number)[];
|
|
62
|
+
/**
|
|
63
|
+
* 查询数据中是否包含rowKey
|
|
64
|
+
*/
|
|
65
|
+
export declare const hasRowKey: (obj: any) => boolean;
|
|
66
|
+
/**
|
|
67
|
+
* 获取小数点后的位数
|
|
68
|
+
* @param num 数字
|
|
69
|
+
* @returns 位数
|
|
70
|
+
*/
|
|
71
|
+
export declare const getDecimalDigits: (num: number) => number;
|
|
72
|
+
/**
|
|
73
|
+
* 获取树状结构option
|
|
74
|
+
* @param treeData 树数据源
|
|
75
|
+
* @param value 选中值
|
|
76
|
+
* @returns {}
|
|
77
|
+
*/
|
|
78
|
+
export declare const findOptionByValue: (treeData: any[], value: string | number, fieldNames: {
|
|
79
|
+
label?: string;
|
|
80
|
+
value?: string;
|
|
81
|
+
children?: string;
|
|
82
|
+
[key: string]: any;
|
|
83
|
+
}) => any;
|
|
84
|
+
/** 解析namePath */
|
|
85
|
+
export declare const parseNamePath: (input: string) => any;
|
|
86
|
+
/**
|
|
87
|
+
* 获取表单所有字段路径的简化函数
|
|
88
|
+
* @param form 表单实例
|
|
89
|
+
* @returns 所有字段路径数组
|
|
90
|
+
*/
|
|
91
|
+
export declare const getFormFieldPaths: (form: FormInstance) => any[];
|
|
92
|
+
export declare function findNamesKeyInArray(arr: string[], key: string): string | null;
|
|
93
|
+
type DataItem = (string | number)[];
|
|
94
|
+
/**
|
|
95
|
+
* 根据特定规则合并两个数据源 (TypeScript 版本)
|
|
96
|
+
* @param data1 第一个数据源
|
|
97
|
+
* @param data2 第二个数据源
|
|
98
|
+
* @returns 合并后的结果数组
|
|
99
|
+
*/
|
|
100
|
+
export declare const mergeNames: (data1: DataItem[], data2: DataItem[]) => DataItem[];
|
|
101
|
+
/**
|
|
102
|
+
* 是否 formlist或者pro-edit-table 场景
|
|
103
|
+
* 使用正则表达式判断一个由逗号分隔的字符串中,是否包含一个纯数字的片段。
|
|
104
|
+
* @param {string} str - 输入的字符串。
|
|
105
|
+
* @returns {boolean} - 如果匹配成功,返回 true;否则返回 false。
|
|
106
|
+
*/
|
|
107
|
+
export declare const isListForm: (str: string) => boolean;
|
|
108
|
+
export * from './buildFormItemProps';
|
|
109
|
+
export * from './reactiveValues';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { NamePath } from 'antd/es/form/interface';
|
|
2
|
+
/**
|
|
3
|
+
* 定义支持多字段依赖的类型
|
|
4
|
+
*/
|
|
5
|
+
export interface NamePathsDependencyType {
|
|
6
|
+
type: 'namesPaths';
|
|
7
|
+
paths: NamePath[][];
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* dependencies支持的类型
|
|
11
|
+
*/
|
|
12
|
+
export type Dependencies = NamePath[] | NamePathsDependencyType;
|
|
13
|
+
/**
|
|
14
|
+
* 处理表单依赖项
|
|
15
|
+
*
|
|
16
|
+
* 将常规的依赖项数组与namesPaths类型的依赖项进行处理
|
|
17
|
+
* 对于namesPaths类型,将其转换为特定格式的字符串:
|
|
18
|
+
* - 同一路径内的多级通过下划线(_)连接
|
|
19
|
+
* - 不同路径之间通过连字符(-)连接
|
|
20
|
+
*
|
|
21
|
+
* 例如:
|
|
22
|
+
* { type: 'namesPaths', paths: [['a', 'b'], ['c', 'd']] }
|
|
23
|
+
* 会被转换成: ['a_b-c_d']
|
|
24
|
+
*
|
|
25
|
+
* @param dependencies 依赖项配置
|
|
26
|
+
* @returns 处理后的依赖项数组
|
|
27
|
+
*/
|
|
28
|
+
export declare function processDependencies(dependencies?: any): any;
|
|
29
|
+
export default processDependencies;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/** 列级响应式配置(可能为静态值或 ReactiveFunction) */
|
|
2
|
+
export interface ReactiveProps {
|
|
3
|
+
show?: any;
|
|
4
|
+
disabled?: any;
|
|
5
|
+
required?: any;
|
|
6
|
+
rules?: any;
|
|
7
|
+
fieldProps?: any;
|
|
8
|
+
desensitization?: any;
|
|
9
|
+
}
|
|
10
|
+
/** 解析后的列级响应式值 */
|
|
11
|
+
export interface ReactiveValues {
|
|
12
|
+
show: any;
|
|
13
|
+
disabled: any;
|
|
14
|
+
required: any;
|
|
15
|
+
rules: any;
|
|
16
|
+
fieldProps: any;
|
|
17
|
+
desensitization: any;
|
|
18
|
+
}
|
|
19
|
+
/** 持有解析值的 ref 集合 */
|
|
20
|
+
export interface ReactiveRefs {
|
|
21
|
+
showRef: React.MutableRefObject<any>;
|
|
22
|
+
disabledRef: React.MutableRefObject<any>;
|
|
23
|
+
requiredRef: React.MutableRefObject<any>;
|
|
24
|
+
rulesRef: React.MutableRefObject<any>;
|
|
25
|
+
fieldPropsRef: React.MutableRefObject<any>;
|
|
26
|
+
desensitizationRef: React.MutableRefObject<any>;
|
|
27
|
+
}
|
|
28
|
+
/** 按当前表单值解析 show/disabled/required/rules/fieldProps/desensitization(纯函数,无副作用) */
|
|
29
|
+
export declare const resolveReactiveValues: (reactiveProps: ReactiveProps, currentValues: any, ctx: any) => ReactiveValues;
|
|
30
|
+
/** 比较解析值与上一次 ref 值是否有变化(纯函数,无副作用) */
|
|
31
|
+
export declare const hasReactiveDiff: (refs: ReactiveRefs, next: ReactiveValues) => boolean;
|
|
32
|
+
/** 将解析值写回 ref 集合 */
|
|
33
|
+
export declare const commitReactiveValues: (refs: ReactiveRefs, next: ReactiveValues) => void;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FormInstance, FormItemProps } from 'antd';
|
|
2
|
+
import { NamePath } from 'antd/es/form/interface';
|
|
3
|
+
interface TransformProps extends FormItemProps {
|
|
4
|
+
names: NamePath[];
|
|
5
|
+
form: FormInstance;
|
|
6
|
+
namePath: any[];
|
|
7
|
+
}
|
|
8
|
+
type TransformFun = 'normalize' | 'getValueProps' | 'shouldUpdate' | 'name';
|
|
9
|
+
declare const transformNames: (formItem: TransformProps, form: FormInstance, names: NamePath[], fieldName: string, type?: string) => Pick<TransformProps, TransformFun>;
|
|
10
|
+
export default transformNames;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { FormInstance, FormItemProps } from 'antd';
|
|
2
|
+
import { NamePath } from 'antd/es/form/interface';
|
|
3
|
+
import type { StoreValue, Store } from '@rc-component/form/es/interface';
|
|
4
|
+
import type { TransformType } from '../propsType';
|
|
5
|
+
export declare const transformValue: (names: NamePath[], form: FormInstance, fieldName: NamePath, normalize?: (value: StoreValue, prevValue: StoreValue, allValues: Store) => StoreValue, getValueProps?: FormItemProps["getValueProps"]) => TransformType;
|
|
6
|
+
export default transformValue;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/** 脱敏处理函数 */
|
|
2
|
+
export declare const maskStringRangeWithRegex: (input: string, range: [number, number]) => string;
|
|
3
|
+
declare const _default: {
|
|
4
|
+
/** 年月日 */
|
|
5
|
+
date: ({ type, toISOString, toCSTString, mode }: {
|
|
6
|
+
type: any;
|
|
7
|
+
toISOString: any;
|
|
8
|
+
toCSTString: any;
|
|
9
|
+
mode: any;
|
|
10
|
+
}) => {};
|
|
11
|
+
/** 年月日 时分秒 */
|
|
12
|
+
dateTime: ({ type, toISOString, toCSTString, mode }: {
|
|
13
|
+
type: any;
|
|
14
|
+
toISOString: any;
|
|
15
|
+
toCSTString: any;
|
|
16
|
+
mode: any;
|
|
17
|
+
}) => {};
|
|
18
|
+
/** 年月日 00:00:00 */
|
|
19
|
+
dateStartTime: ({ type, toISOString, toCSTString, mode }: {
|
|
20
|
+
type: any;
|
|
21
|
+
toISOString: any;
|
|
22
|
+
toCSTString: any;
|
|
23
|
+
mode: any;
|
|
24
|
+
}) => {};
|
|
25
|
+
/** 年月日 23:59:59 */
|
|
26
|
+
dateEndTime: ({ type, toISOString, toCSTString, mode }: {
|
|
27
|
+
type: any;
|
|
28
|
+
toISOString: any;
|
|
29
|
+
toCSTString: any;
|
|
30
|
+
mode: any;
|
|
31
|
+
}) => {};
|
|
32
|
+
/** 年月日 00:00:00 ~ 年月日 23:59:59 */
|
|
33
|
+
dateStartEndTime: ({ type, toISOString, toCSTString, mode }: {
|
|
34
|
+
type: any;
|
|
35
|
+
toISOString: any;
|
|
36
|
+
toCSTString: any;
|
|
37
|
+
mode: any;
|
|
38
|
+
}) => {};
|
|
39
|
+
/** 百分比 */
|
|
40
|
+
percentage: ({ type, valueType }: {
|
|
41
|
+
type: any;
|
|
42
|
+
valueType: any;
|
|
43
|
+
}) => {
|
|
44
|
+
normalize: (value: any) => any;
|
|
45
|
+
getValueProps: (value: any) => {
|
|
46
|
+
value: any;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
/** 千分比 */
|
|
50
|
+
permillage: ({ type, valueType }: {
|
|
51
|
+
type: any;
|
|
52
|
+
valueType: any;
|
|
53
|
+
}) => {
|
|
54
|
+
normalize: (value: any) => any;
|
|
55
|
+
getValueProps: (value: any) => {
|
|
56
|
+
value: any;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
/** 开关 YN转换 */
|
|
60
|
+
switch: ({ switchValue }: {
|
|
61
|
+
switchValue: any;
|
|
62
|
+
}) => Error | {
|
|
63
|
+
normalize: (value: boolean) => any;
|
|
64
|
+
getValueProps: (value: any) => {
|
|
65
|
+
checked: boolean;
|
|
66
|
+
value: any;
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
export default _default;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare const iconMap: {
|
|
2
|
+
type: string;
|
|
3
|
+
'text-cn': string;
|
|
4
|
+
'text-en': string;
|
|
5
|
+
}[];
|
|
6
|
+
export declare const themeMap: {
|
|
7
|
+
'#006AFF': string[];
|
|
8
|
+
'#00BC70': string[];
|
|
9
|
+
'#FF8C16': string[];
|
|
10
|
+
'#A00F20': string[];
|
|
11
|
+
'#31AF96': string[];
|
|
12
|
+
};
|
|
13
|
+
export declare const themeFillMap: {
|
|
14
|
+
'#006AFF': string[];
|
|
15
|
+
'#00BC70': string[];
|
|
16
|
+
'#FF8C16': string[];
|
|
17
|
+
'#A00F20': string[];
|
|
18
|
+
'#31AF96': string[];
|
|
19
|
+
};
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import { CSSProperties, ReactNode, MouseEventHandler, ComponentType, ReactElement } from 'react';
|
|
2
|
+
import { ButtonProps } from 'antd/lib/button';
|
|
3
|
+
/**
|
|
4
|
+
* 图标模式
|
|
5
|
+
* @description 定义图标的显示模式:纯图标或按钮形式
|
|
6
|
+
*/
|
|
7
|
+
export type ProIconModeType = 'icon' | 'button';
|
|
8
|
+
/**
|
|
9
|
+
* 图标映射对象
|
|
10
|
+
*/
|
|
11
|
+
export interface ProIconMapType {
|
|
12
|
+
/**
|
|
13
|
+
* 图标类型
|
|
14
|
+
* @description 唯一标识图标的类型名称
|
|
15
|
+
* @default undefined
|
|
16
|
+
*/
|
|
17
|
+
type: string;
|
|
18
|
+
/**
|
|
19
|
+
* 中文显示文本
|
|
20
|
+
* @description 图标对应的中文描述
|
|
21
|
+
* @default undefined
|
|
22
|
+
*/
|
|
23
|
+
'text-cn'?: string;
|
|
24
|
+
/**
|
|
25
|
+
* 英文显示文本
|
|
26
|
+
* @description 图标对应的英文描述
|
|
27
|
+
* @default undefined
|
|
28
|
+
*/
|
|
29
|
+
'text-en'?: string;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* 主题映射对象
|
|
33
|
+
*/
|
|
34
|
+
interface ProIconThemeMapType {
|
|
35
|
+
/**
|
|
36
|
+
* 主题颜色映射
|
|
37
|
+
* @description 不同主题下的颜色值数组
|
|
38
|
+
* @default undefined
|
|
39
|
+
*/
|
|
40
|
+
[key: string]: string[];
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* 操作映射对象
|
|
44
|
+
*/
|
|
45
|
+
export interface ProIconActionMapType {
|
|
46
|
+
/**
|
|
47
|
+
* 主题颜色映射
|
|
48
|
+
* @description 不同主题下的颜色映射
|
|
49
|
+
* @default undefined
|
|
50
|
+
*/
|
|
51
|
+
themeMap?: ProIconThemeMapType;
|
|
52
|
+
/**
|
|
53
|
+
* 主题填充颜色映射
|
|
54
|
+
* @description 不同主题下的填充颜色映射
|
|
55
|
+
* @default undefined
|
|
56
|
+
*/
|
|
57
|
+
themeFillMap?: ProIconThemeMapType;
|
|
58
|
+
/**
|
|
59
|
+
* 渐变色值
|
|
60
|
+
* @description 渐变色值数组
|
|
61
|
+
* @default undefined
|
|
62
|
+
*/
|
|
63
|
+
gradation?: string[];
|
|
64
|
+
/**
|
|
65
|
+
* 填充色值
|
|
66
|
+
* @description 填充色值数组
|
|
67
|
+
* @default undefined
|
|
68
|
+
*/
|
|
69
|
+
fill?: string[];
|
|
70
|
+
}
|
|
71
|
+
export interface ProIconType {
|
|
72
|
+
/**
|
|
73
|
+
* 自定义 SVG 组件
|
|
74
|
+
* @description 自定义 SVG React 组件或 SVG 文件路径,支持传入组件类型、组件实例或字符串路径,优先级高于 src 和 type
|
|
75
|
+
* @default undefined
|
|
76
|
+
*/
|
|
77
|
+
component?: ComponentType<any> | ReactElement | string;
|
|
78
|
+
/**
|
|
79
|
+
* 图标路径
|
|
80
|
+
* @description 本地import引入的图标路径
|
|
81
|
+
* @default undefined
|
|
82
|
+
*/
|
|
83
|
+
src?: string;
|
|
84
|
+
/**
|
|
85
|
+
* 图标名称
|
|
86
|
+
* @description 图标的类型名称,用于识别特定图标
|
|
87
|
+
* @default null
|
|
88
|
+
*/
|
|
89
|
+
type?: string | null;
|
|
90
|
+
/**
|
|
91
|
+
* 图标大小
|
|
92
|
+
* @description 图标的大小,同时设置图标的width以及height
|
|
93
|
+
* @default '1em'
|
|
94
|
+
*/
|
|
95
|
+
size?: number | string;
|
|
96
|
+
/**
|
|
97
|
+
* 旋转角度
|
|
98
|
+
* @description 图标旋转角度(IE9 无效)
|
|
99
|
+
* @default undefined
|
|
100
|
+
*/
|
|
101
|
+
rotate?: number;
|
|
102
|
+
/**
|
|
103
|
+
* 是否旋转
|
|
104
|
+
* @description 图标是否旋转loading效果
|
|
105
|
+
* @default false
|
|
106
|
+
*/
|
|
107
|
+
spin?: boolean;
|
|
108
|
+
/**
|
|
109
|
+
* 图标颜色
|
|
110
|
+
* @description 图标的颜色,设置svg的fill属性
|
|
111
|
+
* @default undefined
|
|
112
|
+
*/
|
|
113
|
+
color?: string;
|
|
114
|
+
/**
|
|
115
|
+
* 是否禁用
|
|
116
|
+
* @description 设置图标为禁用状态
|
|
117
|
+
* @default false
|
|
118
|
+
*/
|
|
119
|
+
disabled?: boolean;
|
|
120
|
+
/**
|
|
121
|
+
* 提示信息
|
|
122
|
+
* @description 鼠标悬停时显示的提示信息
|
|
123
|
+
* @default undefined
|
|
124
|
+
*/
|
|
125
|
+
tooltip?: string | ReactNode;
|
|
126
|
+
/**
|
|
127
|
+
* 是否跟随主题
|
|
128
|
+
* @description 是否跟随系统主题色变化
|
|
129
|
+
* @default false
|
|
130
|
+
*/
|
|
131
|
+
theme?: boolean;
|
|
132
|
+
/**
|
|
133
|
+
* 点击事件
|
|
134
|
+
* @description 图标的点击事件处理函数
|
|
135
|
+
* @default undefined
|
|
136
|
+
*/
|
|
137
|
+
onClick?: MouseEventHandler<SVGSVGElement>;
|
|
138
|
+
/**
|
|
139
|
+
* 自定义类名
|
|
140
|
+
* @description 自定义图标的CSS类名
|
|
141
|
+
* @default undefined
|
|
142
|
+
*/
|
|
143
|
+
className?: string;
|
|
144
|
+
/**
|
|
145
|
+
* 自定义样式
|
|
146
|
+
* @description 计算后的svg元素样式,优先级高于size/color/rotate属性
|
|
147
|
+
* @default {}
|
|
148
|
+
*/
|
|
149
|
+
style?: CSSProperties;
|
|
150
|
+
/**
|
|
151
|
+
* 显示模式
|
|
152
|
+
* @description 图标的显示模式:图标或按钮
|
|
153
|
+
* @default 'icon'
|
|
154
|
+
*/
|
|
155
|
+
mode?: ProIconModeType;
|
|
156
|
+
/**
|
|
157
|
+
* 按钮属性
|
|
158
|
+
* @description mode为button时的按钮属性,与antd Button接收props一致
|
|
159
|
+
* @default {}
|
|
160
|
+
*/
|
|
161
|
+
buttonProps?: ButtonProps;
|
|
162
|
+
/**
|
|
163
|
+
* 图标映射表
|
|
164
|
+
* @description 图标与中英文文本的映射表
|
|
165
|
+
* @default []
|
|
166
|
+
*/
|
|
167
|
+
mapList?: ProIconMapType[];
|
|
168
|
+
/**
|
|
169
|
+
* SVG操作表
|
|
170
|
+
* @description SVG变更操作表,用于主题配置
|
|
171
|
+
* @default undefined
|
|
172
|
+
*/
|
|
173
|
+
actionMap?: ProIconActionMapType;
|
|
174
|
+
}
|
|
175
|
+
export {};
|