@para-ui/core 2.2.1-beta → 2.2.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/AutoBox/index.d.ts +34 -0
- package/AutoBox/index.js +15 -0
- package/AutoTips/index.d.ts +27 -0
- package/AutoTips/index.js +15 -0
- package/Breadcrumbs/index.d.ts +39 -0
- package/Breadcrumbs/index.js +15 -0
- package/Button/SplitButton.d.ts +61 -0
- package/Button/index.d.ts +56 -0
- package/Button/index.js +14 -0
- package/Button/lang/en_US.d.ts +4 -0
- package/Button/lang/index.d.ts +9 -0
- package/Button/lang/zh_CN.d.ts +4 -0
- package/ButtonGroup/index.d.ts +33 -0
- package/ButtonGroup/index.js +14 -0
- package/Carousel/index.d.ts +30 -0
- package/Carousel/index.js +15 -0
- package/Cascader/index.d.ts +52 -0
- package/Cascader/index.js +15 -0
- package/Cascader/lang/en_US.d.ts +4 -0
- package/Cascader/lang/index.d.ts +9 -0
- package/Cascader/lang/zh_CN.d.ts +4 -0
- package/Checkbox/index.d.ts +40 -0
- package/Checkbox/index.js +14 -0
- package/CheckboxGroup/index.d.ts +46 -0
- package/CheckboxGroup/index.js +14 -0
- package/Collapse/collapsePanel.d.ts +30 -0
- package/Collapse/index.d.ts +57 -0
- package/Collapse/index.js +15 -0
- package/Collapse/motion.d.ts +5 -0
- package/Collapse/util.d.ts +11 -0
- package/CollapseBox/index.d.ts +27 -0
- package/CollapseBox/index.js +15 -0
- package/CollapseBox/util.d.ts +5 -0
- package/ColorPicker/index.d.ts +4 -0
- package/ColorPicker/index.js +1 -0
- package/ComboSelect/WithTabsCombo/index.d.ts +11 -0
- package/ComboSelect/WithTabsCombo/interface.d.ts +141 -0
- package/ComboSelect/index.d.ts +11 -0
- package/ComboSelect/index.js +14 -0
- package/ComboSelect/interface.d.ts +141 -0
- package/ComboSelect/lang/en_US.d.ts +8 -0
- package/ComboSelect/lang/index.d.ts +17 -0
- package/ComboSelect/lang/zh_CN.d.ts +8 -0
- package/ComboSelect/utils.d.ts +13 -0
- package/Container/index.d.ts +77 -0
- package/Container/index.js +15 -0
- package/DatePicker/PickerButton.d.ts +3 -0
- package/DatePicker/PickerTag.d.ts +3 -0
- package/DatePicker/generatePicker/generateRangePicker.d.ts +4 -0
- package/DatePicker/generatePicker/generateSinglePicker.d.ts +11 -0
- package/DatePicker/generatePicker/index.d.ts +77 -0
- package/DatePicker/index.d.ts +18 -0
- package/DatePicker/index.js +14 -0
- package/DatePicker/lang/en_US.d.ts +3 -0
- package/DatePicker/lang/index.d.ts +7 -0
- package/DatePicker/lang/zh_CN.d.ts +3 -0
- package/DatePicker/util.d.ts +20 -0
- package/Desktop/index.d.ts +55 -0
- package/Desktop/index.js +14 -0
- package/Drawer/index.d.ts +11 -0
- package/Drawer/index.js +14 -0
- package/Drawer/interface.d.ts +83 -0
- package/Drawer/lang/en_US.d.ts +5 -0
- package/Drawer/lang/index.d.ts +11 -0
- package/Drawer/lang/zh_CN.d.ts +5 -0
- package/Empty/images/index.d.ts +2 -0
- package/Empty/index.d.ts +30 -0
- package/Empty/index.js +14 -0
- package/Empty/lang/en_US.d.ts +6 -0
- package/Empty/lang/index.d.ts +13 -0
- package/Empty/lang/zh_CN.d.ts +6 -0
- package/Form/index.d.ts +181 -0
- package/Form/index.js +14 -0
- package/FormItem/compoments/defaultCompoments/index.d.ts +19 -0
- package/FormItem/compoments/formCheckboxGroup/index.d.ts +8 -0
- package/FormItem/compoments/formFile/index.d.ts +38 -0
- package/FormItem/compoments/formRadioGroup/index.d.ts +8 -0
- package/FormItem/compoments/formSelect/index.d.ts +18 -0
- package/FormItem/errorTips.d.ts +12 -0
- package/FormItem/index.d.ts +152 -0
- package/FormItem/index.js +14 -0
- package/FormItem/itemType.d.ts +42 -0
- package/FormItem/validateFunction.d.ts +15 -0
- package/FunctionModal/dialog.d.ts +58 -0
- package/FunctionModal/index.d.ts +8 -0
- package/FunctionModal/index.js +14 -0
- package/FunctionModal/modalContext.d.ts +14 -0
- package/GlobalContext/componentsProps.d.ts +19 -0
- package/GlobalContext/confirmLocale.d.ts +7 -0
- package/GlobalContext/index.d.ts +28 -0
- package/GlobalContext/index.js +16 -0
- package/GlobalContext/intl.d.ts +34 -0
- package/GlobalContext/useFormatMessage.d.ts +3 -0
- package/Help/index.d.ts +20 -0
- package/Help/index.js +15 -0
- package/HelperText/index.d.ts +19 -0
- package/HelperText/index.js +15 -0
- package/Hooks/useGlobalProps.d.ts +1 -0
- package/InputLang/index.d.ts +49 -0
- package/InputLang/index.js +14 -0
- package/InputNumber/index.d.ts +74 -0
- package/InputNumber/index.js +14 -0
- package/Label/index.d.ts +35 -0
- package/Label/index.js +14 -0
- package/Loading/index.d.ts +17 -0
- package/Loading/index.js +15 -0
- package/Menu/footerExpansion.d.ts +9 -0
- package/Menu/index.d.ts +10 -0
- package/Menu/index.js +14 -0
- package/Menu/interface.d.ts +139 -0
- package/Menu/logo.d.ts +9 -0
- package/Menu/verticalMenuList.d.ts +14 -0
- package/Message/index.d.ts +59 -0
- package/Message/index.js +15 -0
- package/Modal/Confirm/index.d.ts +66 -0
- package/Modal/index.d.ts +61 -0
- package/Modal/index.js +14 -0
- package/Modal/lang/en_US.d.ts +5 -0
- package/Modal/lang/index.d.ts +11 -0
- package/Modal/lang/zh_CN.d.ts +5 -0
- package/MultiBox/index.d.ts +54 -0
- package/MultiBox/index.js +14 -0
- package/Notification/index.d.ts +52 -0
- package/Notification/index.js +15 -0
- package/OperateBtn/index.d.ts +59 -0
- package/OperateBtn/index.js +14 -0
- package/OperateBtn/lang/en_US.d.ts +4 -0
- package/OperateBtn/lang/index.d.ts +9 -0
- package/OperateBtn/lang/zh_CN.d.ts +4 -0
- package/PageHeader/horizontalMeun.d.ts +9 -0
- package/PageHeader/horizontalMeunRight.d.ts +9 -0
- package/PageHeader/index.d.ts +10 -0
- package/PageHeader/index.js +14 -0
- package/PageHeader/interface.d.ts +167 -0
- package/Pagination/index.d.ts +33 -0
- package/Pagination/index.js +14 -0
- package/Pagination/lang/en_US.d.ts +8 -0
- package/Pagination/lang/index.d.ts +17 -0
- package/Pagination/lang/zh_CN.d.ts +8 -0
- package/ParauiProvider/index.d.ts +12 -0
- package/ParauiProvider/index.js +15 -0
- package/PopConfirm/index.d.ts +56 -0
- package/PopConfirm/index.js +14 -0
- package/PopConfirm/lang/en_US.d.ts +5 -0
- package/PopConfirm/lang/index.d.ts +11 -0
- package/PopConfirm/lang/zh_CN.d.ts +5 -0
- package/Popover/index.d.ts +14 -0
- package/Popover/index.js +15 -0
- package/Popper/index.d.ts +13 -0
- package/Popper/index.js +16 -0
- package/Progress/Line.d.ts +47 -0
- package/Progress/Steps.d.ts +17 -0
- package/Progress/index.d.ts +81 -0
- package/Progress/index.js +20 -0
- package/Progress/utils.d.ts +6 -0
- package/Querying/images/index.d.ts +2 -0
- package/Querying/index.d.ts +26 -0
- package/Querying/index.js +14 -0
- package/Querying/lang/en_US.d.ts +4 -0
- package/Querying/lang/index.d.ts +9 -0
- package/Querying/lang/zh_CN.d.ts +4 -0
- package/README.md +481 -0
- package/Radio/index.d.ts +38 -0
- package/Radio/index.js +14 -0
- package/RadioGroup/index.d.ts +47 -0
- package/RadioGroup/index.js +14 -0
- package/Search/index.d.ts +56 -0
- package/Search/index.js +14 -0
- package/Select/index.d.ts +86 -0
- package/Select/index.js +14 -0
- package/Select/lang/en_US.d.ts +5 -0
- package/Select/lang/index.d.ts +11 -0
- package/Select/lang/zh_CN.d.ts +5 -0
- package/SelectInput/index.d.ts +11 -0
- package/SelectInput/index.js +14 -0
- package/SingleBox/index.d.ts +42 -0
- package/SingleBox/index.js +14 -0
- package/Slider/index.d.ts +14 -0
- package/Slider/index.js +15 -0
- package/Slider/interface.d.ts +102 -0
- package/Split/index.d.ts +7 -0
- package/Split/index.js +15 -0
- package/Stepper/icons.d.ts +5 -0
- package/Stepper/index.d.ts +39 -0
- package/Stepper/index.js +15 -0
- package/Switch/index.d.ts +78 -0
- package/Switch/index.js +14 -0
- package/Table/index.d.ts +10 -0
- package/Table/index.js +14 -0
- package/Table/interface.d.ts +202 -0
- package/Table/lang/en_US.d.ts +6 -0
- package/Table/lang/index.d.ts +13 -0
- package/Table/lang/zh_CN.d.ts +6 -0
- package/Table/tableBody.d.ts +9 -0
- package/Table/tableBodyElement/index.d.ts +15 -0
- package/Table/tableBodyInterface.d.ts +67 -0
- package/Table/tableContainer/index.d.ts +16 -0
- package/Table/tableElement/index.d.ts +17 -0
- package/Table/tableHead.d.ts +9 -0
- package/Table/tableHeadElement/index.d.ts +15 -0
- package/Table/tableHeadInterface.d.ts +30 -0
- package/Table/tablePagination.d.ts +9 -0
- package/Table/tablePaginationInterFace.d.ts +24 -0
- package/Table/tdElement/index.d.ts +15 -0
- package/Table/thElement/index.d.ts +15 -0
- package/Table/trElement/index.d.ts +15 -0
- package/Table/util.d.ts +16 -0
- package/Tabs/index.d.ts +48 -0
- package/Tabs/index.js +14 -0
- package/Tag/TagGroup.d.ts +66 -0
- package/Tag/index.d.ts +34 -0
- package/Tag/index.js +14 -0
- package/Test/index.d.ts +2 -0
- package/Test/index.js +16 -0
- package/TextField/index.d.ts +93 -0
- package/TextField/index.js +14 -0
- package/TimePicker/index.d.ts +22 -0
- package/TimePicker/index.js +14 -0
- package/TimePicker/locale/en_US.d.ts +3 -0
- package/TimePicker/locale/zh_CN.d.ts +3 -0
- package/TimePicker/style/index.d.ts +1 -0
- package/Timeline/index.d.ts +22 -0
- package/Timeline/index.js +15 -0
- package/ToggleButton/ToggleButtonGroup.d.ts +49 -0
- package/ToggleButton/index.d.ts +49 -0
- package/ToggleButton/index.js +14 -0
- package/Tooltip/index.d.ts +14 -0
- package/Tooltip/index.js +15 -0
- package/Transfer/index.d.ts +17 -0
- package/Transfer/index.js +14 -0
- package/Transfer/lang/en_US.d.ts +6 -0
- package/Transfer/lang/index.d.ts +13 -0
- package/Transfer/lang/zh_CN.d.ts +6 -0
- package/Tree/OperateBar/index.d.ts +13 -0
- package/Tree/Tree.d.ts +4 -0
- package/Tree/index.d.ts +5 -0
- package/Tree/index.js +14 -0
- package/Tree/interface.d.ts +207 -0
- package/Tree/lang/en_US.d.ts +8 -0
- package/Tree/lang/index.d.ts +17 -0
- package/Tree/lang/zh_CN.d.ts +8 -0
- package/Tree/utils/closestPolyfill.d.ts +0 -0
- package/Tree/utils/tools.d.ts +26 -0
- package/Tree/utils/treeUtil.d.ts +15 -0
- package/Upload/Dragger/index.d.ts +10 -0
- package/Upload/ErroTip/index.d.ts +13 -0
- package/Upload/ImageUpload/index.d.ts +14 -0
- package/Upload/ImgCrop/EasyCrop.d.ts +17 -0
- package/Upload/ImgCrop/constants.d.ts +7 -0
- package/Upload/ImgCrop/index.d.ts +6 -0
- package/Upload/ImgCrop/interface.d.ts +24 -0
- package/Upload/UploadList/index.d.ts +5 -0
- package/Upload/index.d.ts +15 -0
- package/Upload/index.js +14 -0
- package/Upload/interface.d.ts +134 -0
- package/Upload/lang/en_US.d.ts +12 -0
- package/Upload/lang/index.d.ts +25 -0
- package/Upload/lang/zh_CN.d.ts +12 -0
- package/cdn/AutoBox/index.js +29 -0
- package/cdn/AutoTips/index.js +40 -0
- package/cdn/Breadcrumbs/index.js +53 -0
- package/cdn/Button/index.js +79 -0
- package/cdn/ButtonGroup/index.js +79 -0
- package/cdn/Carousel/index.js +6 -0
- package/cdn/Cascader/index.js +42 -0
- package/cdn/Checkbox/index.js +53 -0
- package/cdn/CheckboxGroup/index.js +53 -0
- package/cdn/Collapse/index.js +27 -0
- package/cdn/CollapseBox/index.js +1 -0
- package/cdn/ColorPicker/index.js +1 -0
- package/cdn/ComboSelect/index.js +438 -0
- package/cdn/Container/index.js +1 -0
- package/cdn/DatePicker/index.js +185 -0
- package/cdn/Desktop/index.js +24 -0
- package/cdn/Drawer/index.js +84 -0
- package/cdn/Empty/index.js +1 -0
- package/cdn/Form/index.js +477 -0
- package/cdn/FormItem/index.js +477 -0
- package/cdn/FunctionModal/index.js +144 -0
- package/cdn/GlobalContext/index.js +1 -0
- package/cdn/Help/index.js +53 -0
- package/cdn/HelperText/index.js +1 -0
- package/cdn/InputLang/index.js +144 -0
- package/cdn/InputNumber/index.js +118 -0
- package/cdn/Label/index.js +53 -0
- package/cdn/Loading/index.js +14 -0
- package/cdn/Menu/index.js +40 -0
- package/cdn/Message/index.js +53 -0
- package/cdn/Modal/index.js +144 -0
- package/cdn/MultiBox/index.js +131 -0
- package/cdn/Notification/index.js +66 -0
- package/cdn/OperateBtn/index.js +92 -0
- package/cdn/PageHeader/index.js +92 -0
- package/cdn/Pagination/index.js +214 -0
- package/cdn/ParauiProvider/index.js +9 -0
- package/cdn/PopConfirm/index.js +131 -0
- package/cdn/Popover/index.js +16 -0
- package/cdn/Popper/index.js +26 -0
- package/cdn/Progress/index.js +58 -0
- package/cdn/Querying/index.js +1 -0
- package/cdn/Radio/index.js +53 -0
- package/cdn/RadioGroup/index.js +53 -0
- package/cdn/Search/index.js +144 -0
- package/cdn/Select/index.js +131 -0
- package/cdn/SelectInput/index.js +131 -0
- package/cdn/SingleBox/index.js +131 -0
- package/cdn/Slider/index.js +16 -0
- package/cdn/Split/index.js +1 -0
- package/cdn/Stepper/index.js +154 -0
- package/cdn/Switch/index.js +71 -0
- package/cdn/Table/index.js +292 -0
- package/cdn/Tabs/index.js +165 -0
- package/cdn/Tag/index.js +27 -0
- package/cdn/Test/index.js +1 -0
- package/cdn/TextField/index.js +105 -0
- package/cdn/TimePicker/index.js +185 -0
- package/cdn/Timeline/index.js +16 -0
- package/cdn/ToggleButton/index.js +79 -0
- package/cdn/Tooltip/index.js +40 -0
- package/cdn/Transfer/index.js +170 -0
- package/cdn/Tree/index.js +170 -0
- package/cdn/Upload/index.js +252 -0
- package/index.d.ts +128 -0
- package/index.js +19 -0
- package/package.json +21 -21
- package/style.css +72 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
interface DefaultCompomentsProps {
|
|
3
|
+
moudle: any;
|
|
4
|
+
error: boolean;
|
|
5
|
+
placeholder: string;
|
|
6
|
+
defaultValue: any;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
onChange: (e: any) => void;
|
|
9
|
+
inputProps?: {
|
|
10
|
+
[name: string]: any;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* @module src\FormItem\compoments\defaultCompoments\index.tsx
|
|
15
|
+
* @author zhanzl
|
|
16
|
+
* @date 2022/06/02
|
|
17
|
+
*/
|
|
18
|
+
declare const DefaultCompoments: FC<DefaultCompomentsProps>;
|
|
19
|
+
export default DefaultCompoments;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
import { CheckboxGroupProps } from '../../../CheckboxGroup';
|
|
3
|
+
export interface FormCheckboxGroupProps extends CheckboxGroupProps {
|
|
4
|
+
defaultValue?: any[];
|
|
5
|
+
change?: (value: any) => any;
|
|
6
|
+
}
|
|
7
|
+
declare const FormCheckboxGroup: FC<FormCheckboxGroupProps>;
|
|
8
|
+
export default FormCheckboxGroup;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { FC, InputHTMLAttributes } from "react";
|
|
2
|
+
import { ButtonProps } from "../../../Button";
|
|
3
|
+
import './index.scss';
|
|
4
|
+
export interface FormFileProps {
|
|
5
|
+
/**
|
|
6
|
+
* 禁用
|
|
7
|
+
*/
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* 文件类型 可接受字符串 或数组
|
|
11
|
+
*/
|
|
12
|
+
fileType?: string | Array<string>;
|
|
13
|
+
/**
|
|
14
|
+
* 按钮名称 默认 选择文件
|
|
15
|
+
*/
|
|
16
|
+
buttonLabel?: string;
|
|
17
|
+
/**
|
|
18
|
+
* 值改变传出
|
|
19
|
+
*/
|
|
20
|
+
onChange?: (value: FileList) => any;
|
|
21
|
+
/**
|
|
22
|
+
* 默认值
|
|
23
|
+
*/
|
|
24
|
+
defaultValue?: string | FileList;
|
|
25
|
+
/**
|
|
26
|
+
* input 其他属性
|
|
27
|
+
*/
|
|
28
|
+
inputProps?: InputHTMLAttributes<HTMLInputElement>;
|
|
29
|
+
/**
|
|
30
|
+
* 按钮配置
|
|
31
|
+
*/
|
|
32
|
+
buttonProps?: ButtonProps;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* 文件组件
|
|
36
|
+
*/
|
|
37
|
+
declare const FormFile: FC<FormFileProps>;
|
|
38
|
+
export default FormFile;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
import { RadioGroupProps } from '../../../RadioGroup';
|
|
3
|
+
export interface FormRadioGroupProps extends RadioGroupProps {
|
|
4
|
+
defaultValue?: string;
|
|
5
|
+
change?: (value: any) => any;
|
|
6
|
+
}
|
|
7
|
+
declare const FormRadioGroup: FC<FormRadioGroupProps>;
|
|
8
|
+
export default FormRadioGroup;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
import { SelectProps } from '../../../Select';
|
|
3
|
+
export interface FormSelectProps extends SelectProps {
|
|
4
|
+
/**
|
|
5
|
+
* 默认值
|
|
6
|
+
*/
|
|
7
|
+
defaultValue?: string;
|
|
8
|
+
/**
|
|
9
|
+
* 改变方法
|
|
10
|
+
*/
|
|
11
|
+
change?: (value: any) => any;
|
|
12
|
+
/**
|
|
13
|
+
* 绑定值
|
|
14
|
+
*/
|
|
15
|
+
value?: string;
|
|
16
|
+
}
|
|
17
|
+
declare const FormSelect: FC<FormSelectProps>;
|
|
18
|
+
export default FormSelect;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { HelperTextProps } from '../HelperText';
|
|
2
|
+
import { FC } from 'react';
|
|
3
|
+
/**
|
|
4
|
+
* 报错信息组件
|
|
5
|
+
* @description 为了解决,在主组件设置state,导致输入框中内容刷新,且失去焦点
|
|
6
|
+
*/
|
|
7
|
+
declare const ErrorTips: FC<{
|
|
8
|
+
getSetError?: Function;
|
|
9
|
+
errorMessage?: string;
|
|
10
|
+
helperTextProps?: HelperTextProps;
|
|
11
|
+
}>;
|
|
12
|
+
export default ErrorTips;
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import { FC, ReactElement, ReactNode } from 'react';
|
|
2
|
+
import { ItemTypeProps } from './itemType';
|
|
3
|
+
import { validateFunctionType } from './validateFunction';
|
|
4
|
+
import { LabelProps } from '../Label';
|
|
5
|
+
import { HelperTextProps } from '../HelperText';
|
|
6
|
+
import './index.scss';
|
|
7
|
+
export declare type formInputType = 'checkGroup' | 'select' | 'radioGroup' | 'textarea' | 'default' | 'switch' | 'number' | 'file' | 'comboSelect' | ReactNode | string | FC<ItemTypeProps>;
|
|
8
|
+
/**
|
|
9
|
+
* 表单操作项的其他配置
|
|
10
|
+
*/
|
|
11
|
+
interface inputProps {
|
|
12
|
+
[name: string]: any;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* 校验规则
|
|
16
|
+
* 一条校验规则对应一个错误提示
|
|
17
|
+
*/
|
|
18
|
+
export interface ruleType {
|
|
19
|
+
/**
|
|
20
|
+
* 校验方法
|
|
21
|
+
* @return {boolean | string}, 子定义校验方法时 返回 false 或 字符串 均为校验失败 true为校验通过
|
|
22
|
+
*/
|
|
23
|
+
validate?: {
|
|
24
|
+
'required'?: boolean | validateFunctionType;
|
|
25
|
+
'maxlength'?: number | validateFunctionType;
|
|
26
|
+
'minLength'?: number | validateFunctionType;
|
|
27
|
+
'pattern'?: RegExp | validateFunctionType;
|
|
28
|
+
'disOnlySpace'?: boolean | validateFunctionType;
|
|
29
|
+
[name: string]: validateFunctionType | boolean | number | RegExp | undefined;
|
|
30
|
+
};
|
|
31
|
+
message?: {
|
|
32
|
+
[name: string]: string;
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* form 表单组件属性
|
|
37
|
+
* @typedef {Object} FormItemProps
|
|
38
|
+
*/
|
|
39
|
+
export interface FormItemProps {
|
|
40
|
+
/**
|
|
41
|
+
* 表单项形态,默认 horizontal
|
|
42
|
+
*/
|
|
43
|
+
type?: 'vertical' | 'horizontal';
|
|
44
|
+
/**
|
|
45
|
+
* 输入框类型
|
|
46
|
+
* 仅支持para-ui/code/里面有的数据组件
|
|
47
|
+
*/
|
|
48
|
+
itemType?: formInputType;
|
|
49
|
+
/**
|
|
50
|
+
* 输入框类型
|
|
51
|
+
* 仅支持para-ui/code/里面有的数据组件
|
|
52
|
+
*/
|
|
53
|
+
InputType?: formInputType;
|
|
54
|
+
/**
|
|
55
|
+
* 输入框其他属性配置
|
|
56
|
+
*/
|
|
57
|
+
inputProps?: inputProps;
|
|
58
|
+
/**
|
|
59
|
+
* label props
|
|
60
|
+
*/
|
|
61
|
+
labelProps?: LabelProps;
|
|
62
|
+
/**
|
|
63
|
+
* 报错提示其他配置
|
|
64
|
+
*/
|
|
65
|
+
helperTextProps?: HelperTextProps;
|
|
66
|
+
/**
|
|
67
|
+
* 文字宽度, 只对 type === vertical,状态下生效
|
|
68
|
+
*/
|
|
69
|
+
labelWidth?: number;
|
|
70
|
+
/**
|
|
71
|
+
* 是否禁用
|
|
72
|
+
*/
|
|
73
|
+
disabled?: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* 值改变传出
|
|
76
|
+
*/
|
|
77
|
+
change?: (value: any) => void;
|
|
78
|
+
/**
|
|
79
|
+
* 不显示 该选项
|
|
80
|
+
*/
|
|
81
|
+
hide?: boolean;
|
|
82
|
+
/**
|
|
83
|
+
* 提示。会有label上出现个图标提示
|
|
84
|
+
*/
|
|
85
|
+
tips?: string;
|
|
86
|
+
/**
|
|
87
|
+
* 文字描述
|
|
88
|
+
*/
|
|
89
|
+
label?: string | ((props: FormItemProps) => ReactNode);
|
|
90
|
+
/**
|
|
91
|
+
* 隐藏 label
|
|
92
|
+
*/
|
|
93
|
+
hideLabel?: boolean;
|
|
94
|
+
/**
|
|
95
|
+
* 隐藏 error
|
|
96
|
+
*/
|
|
97
|
+
hideError?: boolean;
|
|
98
|
+
/**
|
|
99
|
+
* name,一般对应后台属性,需要唯一性
|
|
100
|
+
*/
|
|
101
|
+
name: string;
|
|
102
|
+
/**
|
|
103
|
+
* 校验规则
|
|
104
|
+
*/
|
|
105
|
+
rules?: ruleType;
|
|
106
|
+
/**
|
|
107
|
+
* 设置值的方法
|
|
108
|
+
*/
|
|
109
|
+
setValue?: Function;
|
|
110
|
+
/**
|
|
111
|
+
* 报错信息
|
|
112
|
+
*/
|
|
113
|
+
errorMessage?: string;
|
|
114
|
+
/**
|
|
115
|
+
* 回填数据
|
|
116
|
+
*/
|
|
117
|
+
backData?: {
|
|
118
|
+
[name: string]: any;
|
|
119
|
+
};
|
|
120
|
+
/**
|
|
121
|
+
* 是否启用必填框,不允许输入纯空格
|
|
122
|
+
*/
|
|
123
|
+
disOnlySpace?: boolean;
|
|
124
|
+
/**
|
|
125
|
+
* 必填显示渲染方式
|
|
126
|
+
*/
|
|
127
|
+
requiredElement?: ReactElement | string;
|
|
128
|
+
/**
|
|
129
|
+
* 隐藏默认必填标记
|
|
130
|
+
*/
|
|
131
|
+
disRequiredElement?: boolean;
|
|
132
|
+
/**
|
|
133
|
+
* 其他配置
|
|
134
|
+
*/
|
|
135
|
+
[name: string]: any;
|
|
136
|
+
/**
|
|
137
|
+
* 自定义class
|
|
138
|
+
*/
|
|
139
|
+
className?: string;
|
|
140
|
+
/**
|
|
141
|
+
* 默认值
|
|
142
|
+
* 会被backData,回填数据替换
|
|
143
|
+
*/
|
|
144
|
+
defaultValue?: any;
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* form 表单单行组件
|
|
148
|
+
* @author zhanzl
|
|
149
|
+
* @description 用于根据配置自动生成表单
|
|
150
|
+
*/
|
|
151
|
+
declare const FormItem: FC<FormItemProps>;
|
|
152
|
+
export default FormItem;
|