@flatbiz/antd 4.2.80 → 4.2.82
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/esm/button-wrapper/index.css +1 -1
- package/esm/button-wrapper/index.js +1 -1
- package/esm/button-wrapper/index.js.map +1 -1
- package/esm/dialog-drawer/index.js +1 -1
- package/esm/dialog-drawer/index.js.map +1 -1
- package/esm/dialog-drawer-content/index.js +1 -1
- package/esm/dialog-drawer-content/index.js.map +1 -1
- package/esm/drag-collapse-form-list/index.js +1 -1
- package/esm/drag-collapse-form-list/index.js.map +1 -1
- package/esm/drag-form-list/index.css +1 -0
- package/esm/drag-form-list/index.js +5 -0
- package/esm/drag-form-list/index.js.map +1 -0
- package/esm/easy-table/index.js +2 -1
- package/esm/easy-table/index.js.map +1 -1
- package/esm/editable-table/index.js +1 -1
- package/esm/editable-table/index.js.map +1 -1
- package/esm/form-grid/index.js.map +1 -1
- package/esm/form-item-group/index.js.map +1 -1
- package/esm/form-list-wrapper/index.css +1 -0
- package/esm/form-list-wrapper/index.js +5 -0
- package/esm/form-list-wrapper/index.js.map +1 -0
- package/esm/index.js +4 -1
- package/esm/label-value-layout/index.js +1 -1
- package/esm/label-value-layout/index.js.map +1 -1
- package/esm/pre-defined-class-name/index.css +1 -1
- package/esm/pre-defined-class-name/index.js +1 -1
- package/esm/pre-defined-class-name/index.js.map +1 -1
- package/esm/simple-layout/index.css +1 -1
- package/esm/switch-confirm-wrapper/index.js +1 -1
- package/esm/switch-confirm-wrapper/index.js.map +1 -1
- package/esm/table-title-tooltip/index.js.map +1 -1
- package/esm/text-overflow-render/index.js +1 -1
- package/esm/text-overflow-render/index.js.map +1 -1
- package/esm/tips-wrapper/index.css +0 -0
- package/esm/tips-wrapper/index.js +5 -0
- package/esm/tips-wrapper/index.js.map +1 -0
- package/esm/use-responsive-point-21b8c601.js.map +1 -1
- package/index.d.ts +259 -27
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { API, ModelType } from '@dimjs/model';
|
|
6
6
|
import { DateFormatType, TAny, TNoopDefine, TPlainObject } from '@flatbiz/utils';
|
|
7
7
|
import { IAllProps } from '@tinymce/tinymce-react';
|
|
8
|
-
import { ButtonProps, CascaderProps, CheckboxProps, CollapseProps, ColorPickerProps, DrawerProps, DropdownProps, FormInstance, FormItemProps, FormListFieldData, FormListOperation, InputNumberProps, InputProps, ModalProps, PaginationProps, PopconfirmProps, RadioGroupProps, RowProps, SelectProps, SpaceProps, SwitchProps, TableProps, TabsProps, TagProps, TimePickerProps, TimeRangePickerProps, TooltipProps, TreeProps, TreeSelectProps, UploadProps } from 'antd';
|
|
8
|
+
import { ButtonProps, CascaderProps, CheckboxProps, CollapseProps, ColorPickerProps, DrawerProps, DropdownProps, FormInstance, FormItemProps, FormListFieldData, FormListOperation, InputNumberProps, InputProps, ModalProps, PaginationProps, PopconfirmProps, PopoverProps, RadioGroupProps, RowProps, SelectProps, SpaceProps, SwitchProps, TableProps, TabsProps, TagProps, TimePickerProps, TimeRangePickerProps, TooltipProps, TreeProps, TreeSelectProps, UploadProps } from 'antd';
|
|
9
9
|
import { ConfigProviderProps } from 'antd/es/config-provider';
|
|
10
10
|
import { PickerDateProps, RangePickerDateProps } from 'antd/es/date-picker/generatePicker';
|
|
11
11
|
import { FormListProps } from 'antd/es/form';
|
|
@@ -59,6 +59,10 @@ export type ButtonWrapperProps = Omit<ButtonProps, "onClick"> & {
|
|
|
59
59
|
hidden?: boolean;
|
|
60
60
|
/** loading 显示位置,默认值:left */
|
|
61
61
|
loadingPosition?: "left" | "center";
|
|
62
|
+
/**
|
|
63
|
+
* 移除间隙,一般用于 type=link 类型下
|
|
64
|
+
*/
|
|
65
|
+
removeGap?: boolean;
|
|
62
66
|
};
|
|
63
67
|
/**
|
|
64
68
|
* antd Button包装组件
|
|
@@ -676,24 +680,22 @@ export type DragCollapseProps = {
|
|
|
676
680
|
* @returns
|
|
677
681
|
*/
|
|
678
682
|
export declare const DragCollapse: (props: DragCollapseProps) => import("react/jsx-runtime").JSX.Element;
|
|
679
|
-
export type DragCollapseFormListHeaderProps = {
|
|
680
|
-
/** Form.List item fieldData */
|
|
681
|
-
formListFieldData: FormListFieldData;
|
|
682
|
-
/** 当前阶段 完整 formItem name */
|
|
683
|
-
formStageCompleteName: string | number | (string | number)[];
|
|
684
|
-
/** Form.List 操作项 */
|
|
685
|
-
operation: FormListOperation;
|
|
686
|
-
uid: string | number;
|
|
687
|
-
};
|
|
688
683
|
export type DragCollapseFormListContentProps = {
|
|
689
684
|
/** Form.List item fieldData */
|
|
690
685
|
formListFieldData: FormListFieldData;
|
|
691
686
|
/** 当前阶段 完整 formItem name */
|
|
692
|
-
formStageCompleteName: string | number
|
|
687
|
+
formStageCompleteName: Array<string | number>;
|
|
693
688
|
/** Form.List 操作项 */
|
|
694
689
|
operation: FormListOperation;
|
|
695
690
|
uid: string | number;
|
|
696
|
-
|
|
691
|
+
/** 获取当前FormList 内部 Form.Item name */
|
|
692
|
+
getInsideFormItemName: (key: string) => Array<string | number>;
|
|
693
|
+
/** 获取当前 FormList Item 数据 */
|
|
694
|
+
getInsideFormItemData: () => TPlainObject;
|
|
695
|
+
/** 索引 */
|
|
696
|
+
index: number;
|
|
697
|
+
};
|
|
698
|
+
export type DragCollapseFormListHeaderProps = DragCollapseFormListContentProps;
|
|
697
699
|
export type DragCollapseFormListProps = {
|
|
698
700
|
/** formList item 数据中的唯一值,默认值:uid */
|
|
699
701
|
uidFieldName?: string;
|
|
@@ -737,6 +739,80 @@ export type DragCollapseFormListProps = {
|
|
|
737
739
|
* ```
|
|
738
740
|
*/
|
|
739
741
|
export declare const DragCollapseFormList: (props: DragCollapseFormListProps) => import("react/jsx-runtime").JSX.Element;
|
|
742
|
+
export type DragFormListContentProps = {
|
|
743
|
+
/** Form.List item fieldData */
|
|
744
|
+
formListFieldData: FormListFieldData;
|
|
745
|
+
/**
|
|
746
|
+
* 当前阶段 完整 formItem name
|
|
747
|
+
* ```
|
|
748
|
+
* 1. 获取当前输入项Item数据
|
|
749
|
+
* form.getFieldValue(props.formStageCompleteName);
|
|
750
|
+
* 2. 获取当前输入项Item指定字段数据
|
|
751
|
+
* form.getFieldValue([...props.formStageCompleteName, 'key']);
|
|
752
|
+
* ```
|
|
753
|
+
*/
|
|
754
|
+
formStageCompleteName: (string | number)[];
|
|
755
|
+
/**
|
|
756
|
+
* formList上一级 formItem完整name
|
|
757
|
+
*/
|
|
758
|
+
prevCompleteName: (string | number)[];
|
|
759
|
+
/** Form.List 操作项 */
|
|
760
|
+
operation: FormListOperation;
|
|
761
|
+
/** 索引 */
|
|
762
|
+
index: number;
|
|
763
|
+
/** 获取当前FormList 内部 Form.Item name */
|
|
764
|
+
getInsideFormItemName: (key: string) => Array<string | number>;
|
|
765
|
+
/** 获取当前 FormList Item 数据 */
|
|
766
|
+
getInsideFormItemData: () => TPlainObject;
|
|
767
|
+
/** 唯一值字段Key */
|
|
768
|
+
uidKey: string;
|
|
769
|
+
};
|
|
770
|
+
export type DragFormListProps = {
|
|
771
|
+
className?: string;
|
|
772
|
+
style?: CSSProperties;
|
|
773
|
+
/** formList item 数据中的唯一值,默认值:uid */
|
|
774
|
+
uidFieldName?: string;
|
|
775
|
+
/** formList name */
|
|
776
|
+
name: string | number | (string | number)[];
|
|
777
|
+
/**
|
|
778
|
+
* formList上一级 formItem完整name
|
|
779
|
+
* ```
|
|
780
|
+
* 1. 如果没有传 []
|
|
781
|
+
* 2. FormList内部通过 Form.useWatch 取值需要完整 name
|
|
782
|
+
* ```
|
|
783
|
+
*/
|
|
784
|
+
prevCompleteName: (string | number)[];
|
|
785
|
+
/** 拖拽回调 */
|
|
786
|
+
onDropChange?: (items: TPlainObject[]) => void;
|
|
787
|
+
/** 设置拖拽图标 */
|
|
788
|
+
dragIcon?: ReactElement;
|
|
789
|
+
/** 禁用拖拽,拖拽图标隐藏 */
|
|
790
|
+
dragDisabled?: boolean;
|
|
791
|
+
/** 设置item禁止拖拽 */
|
|
792
|
+
getItemDragDisabled?: (uid: string | number, index: number) => boolean;
|
|
793
|
+
/** 新增行默认值,自定义onTableAfterRender后失效 */
|
|
794
|
+
getAddRowDefaultValues?: () => TPlainObject;
|
|
795
|
+
/** 隐藏新增行按钮 */
|
|
796
|
+
hiddenAddRowButton?: boolean;
|
|
797
|
+
/** 自定义新增行按钮,getAddRowDefaultValues配置失效 */
|
|
798
|
+
onCustomAddRowButton?: (operation: FormListOperation) => ReactElement;
|
|
799
|
+
/** formListItem 内容 */
|
|
800
|
+
children: (data: DragFormListContentProps) => ReactElement;
|
|
801
|
+
/** 隐藏数据为空渲染 */
|
|
802
|
+
hiddenEmptyRender?: boolean;
|
|
803
|
+
/** formList内部渲染包装,多用于FormListWrapper嵌套布局 */
|
|
804
|
+
formListChildrenWrapper?: (props: {
|
|
805
|
+
children: ReactElement;
|
|
806
|
+
}) => ReactElement;
|
|
807
|
+
};
|
|
808
|
+
/**
|
|
809
|
+
* 可拖拽FormList
|
|
810
|
+
* ```
|
|
811
|
+
* 1. FormList数组中必须要有唯一值字段,默认值字段名称uid,可通过uidFieldName自定义设置
|
|
812
|
+
* 2. Demo: https://fex.qa.tcshuke.com/docs/admin/main/form/list
|
|
813
|
+
* ```
|
|
814
|
+
*/
|
|
815
|
+
export declare const DragFormList: (props: DragFormListProps) => import("react/jsx-runtime").JSX.Element;
|
|
740
816
|
export interface DrawerOperationProps {
|
|
741
817
|
loading?: boolean;
|
|
742
818
|
okText?: string;
|
|
@@ -936,11 +1012,11 @@ export type EasyTableFilterProps = {
|
|
|
936
1012
|
/** 是否为纯净模式(查询条件布局是否自定义), */
|
|
937
1013
|
isPure?: boolean;
|
|
938
1014
|
/** 查询按钮配置 */
|
|
939
|
-
queryButtonProps?: Omit<
|
|
1015
|
+
queryButtonProps?: Omit<ButtonWrapperProps, "onClick"> & {
|
|
940
1016
|
text?: string;
|
|
941
1017
|
};
|
|
942
1018
|
/** 重置按钮配置 */
|
|
943
|
-
resetButtonProps?: Omit<
|
|
1019
|
+
resetButtonProps?: Omit<ButtonWrapperProps, "onClick"> & {
|
|
944
1020
|
text?: string;
|
|
945
1021
|
};
|
|
946
1022
|
/**
|
|
@@ -956,11 +1032,58 @@ export type EasyTableFilterProps = {
|
|
|
956
1032
|
filterWrapperStyle?: CSSProperties;
|
|
957
1033
|
/** filter Form 外层 SimpleLayout className */
|
|
958
1034
|
filterWrapperClassName?: string;
|
|
1035
|
+
/**
|
|
1036
|
+
* 自定义 filterOperate.rightList 后 默认【查询、重置】按钮处理逻辑
|
|
1037
|
+
* 1. cover:覆盖内部查询重置按钮(默认值)
|
|
1038
|
+
* 2. beforeAppend:添加到【查询重置】按钮前面
|
|
1039
|
+
* 3. afterAppend:添加到【查询重置】按钮后面
|
|
1040
|
+
*
|
|
1041
|
+
* 如果想隐藏【查询、重置】按钮中的某一个,可设置 queryButtonProps.hidden、resetButtonProps.hidden
|
|
1042
|
+
*/
|
|
1043
|
+
rightOperateAreaAppendType?: "cover" | "beforeAppend" | "afterAppend";
|
|
1044
|
+
};
|
|
1045
|
+
export type TipsWrapperProps = {
|
|
1046
|
+
gap?: number;
|
|
1047
|
+
className?: string;
|
|
1048
|
+
style?: CSSProperties;
|
|
1049
|
+
children?: ReactNode;
|
|
1050
|
+
icon?: ReactElement;
|
|
1051
|
+
/** Icon添加点击事件,设置hoverTips后失效 */
|
|
1052
|
+
onClick?: (event: any) => void;
|
|
1053
|
+
/**
|
|
1054
|
+
* 提示效果类型
|
|
1055
|
+
* ```
|
|
1056
|
+
* 1. popover 气泡卡片,内容通过popoverProps设置
|
|
1057
|
+
* 2. tooltip 文字提示,内容通过tooltipProps设置
|
|
1058
|
+
* ```
|
|
1059
|
+
*/
|
|
1060
|
+
tipType?: "popover" | "tooltip";
|
|
1061
|
+
popoverProps?: PopoverProps;
|
|
1062
|
+
tooltipProps?: TooltipProps;
|
|
1063
|
+
trigger?: "icon" | "all";
|
|
959
1064
|
};
|
|
1065
|
+
/**
|
|
1066
|
+
* 为目标元素右侧添加Icon
|
|
1067
|
+
* ```
|
|
1068
|
+
* Icon有两种交互行为
|
|
1069
|
+
* 1. 鼠标悬浮显示提示效果;
|
|
1070
|
+
* 2. 为Icon添加点击事件
|
|
1071
|
+
*
|
|
1072
|
+
* 例如:
|
|
1073
|
+
* 1.
|
|
1074
|
+
* <TipsWrapper tipType="tooltip" tooltipProps={{ title:'说明文案' }}>ABC</TipsWrapper>
|
|
1075
|
+
* 2.
|
|
1076
|
+
* <TipsWrapper tipType="popover" popoverProps={{ title:'说明标题', content:'说明内容' }}>ABC</TipsWrapper>
|
|
1077
|
+
* 3.
|
|
1078
|
+
* <TipsWrapper onClick={noop}>ABC</TipsWrapper>
|
|
1079
|
+
* ```
|
|
1080
|
+
*/
|
|
1081
|
+
export declare const TipsWrapper: (props: TipsWrapperProps) => import("react/jsx-runtime").JSX.Element;
|
|
960
1082
|
export type TEasyTableTableColumn<T> = ColumnsType<T>[0] & {
|
|
961
1083
|
/**
|
|
962
|
-
*
|
|
1084
|
+
* @description 请使用 tipsWrapperProps 属性配置
|
|
963
1085
|
* ```
|
|
1086
|
+
* 会在 title 之后展示一个 icon,hover 之后提示一些信息
|
|
964
1087
|
* 1. title为string类型有效
|
|
965
1088
|
* 2. hoverArea 默认值:icon
|
|
966
1089
|
* ```
|
|
@@ -971,6 +1094,15 @@ export type TEasyTableTableColumn<T> = ColumnsType<T>[0] & {
|
|
|
971
1094
|
hoverArea?: "icon" | "all";
|
|
972
1095
|
};
|
|
973
1096
|
dataIndex?: keyof T | (string & {});
|
|
1097
|
+
/**
|
|
1098
|
+
* 会在 title 之后展示一个 icon
|
|
1099
|
+
* ```
|
|
1100
|
+
* 1. title为string类型有效
|
|
1101
|
+
* 2. 可为icon添加提示效果
|
|
1102
|
+
* 3. 可为icon添加点击事件
|
|
1103
|
+
* ```
|
|
1104
|
+
*/
|
|
1105
|
+
tipsWrapperProps?: TipsWrapperProps;
|
|
974
1106
|
};
|
|
975
1107
|
export type EasyTableTableProps<T> = Omit<TableProps<TAny>, "dataSource" | "loading" | "rowKey" | "columns"> & {
|
|
976
1108
|
children?: ReactElement | ReactElement[];
|
|
@@ -1036,6 +1168,7 @@ export declare const EasyTable: import("react").ForwardRefExoticComponent<EasyTa
|
|
|
1036
1168
|
*3. EasyTable.Filter中内置了 Form 标签,当children为函数时,可获取form实例
|
|
1037
1169
|
*4. 默认布局下,可通过设置 filterOperate 设置操作按钮
|
|
1038
1170
|
*5. Filter 子节点包含 hidden = true 会被忽略
|
|
1171
|
+
*6. 如果想隐藏【查询、重置】按钮中的某一个,可设置 queryButtonProps.hidden、resetButtonProps.hidden
|
|
1039
1172
|
*```
|
|
1040
1173
|
*/
|
|
1041
1174
|
Filter: (props: EasyTableFilterProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1051,7 +1184,9 @@ export declare const EasyTable: import("react").ForwardRefExoticComponent<EasyTa
|
|
|
1051
1184
|
/**
|
|
1052
1185
|
* @deprecated 已过时 4.3.0版本移除,请使用 useEasyTable
|
|
1053
1186
|
*/
|
|
1054
|
-
useEasyTablRef: () =>
|
|
1187
|
+
useEasyTablRef: () => {
|
|
1188
|
+
current: EasyTableRefApi;
|
|
1189
|
+
};
|
|
1055
1190
|
/** 在 EasyTable子组件内才可使用 */
|
|
1056
1191
|
useEasyTable: () => EasyTableRefApi;
|
|
1057
1192
|
};
|
|
@@ -1378,8 +1513,9 @@ export type fieldConfigFunctionParams = {
|
|
|
1378
1513
|
*/
|
|
1379
1514
|
export type EditableTableColumn = Omit<ColumnsType["0"], "render"> & {
|
|
1380
1515
|
/**
|
|
1381
|
-
*
|
|
1516
|
+
* @description 请使用 tipsWrapperProps 属性配置
|
|
1382
1517
|
* ```
|
|
1518
|
+
* 会在 title 之后展示一个 icon,hover 之后提示一些信息
|
|
1383
1519
|
* 1. title为string类型、ReactElement有效
|
|
1384
1520
|
* 2. hoverArea 默认值:icon
|
|
1385
1521
|
* ```
|
|
@@ -1389,6 +1525,15 @@ export type EditableTableColumn = Omit<ColumnsType["0"], "render"> & {
|
|
|
1389
1525
|
icon?: ReactElement;
|
|
1390
1526
|
hoverArea?: "icon" | "all";
|
|
1391
1527
|
};
|
|
1528
|
+
/**
|
|
1529
|
+
* 会在 title 之后展示一个 icon
|
|
1530
|
+
* ```
|
|
1531
|
+
* 1. title为string类型有效
|
|
1532
|
+
* 2. 可为icon添加提示效果
|
|
1533
|
+
* 3. 可为icon添加点击事件
|
|
1534
|
+
* ```
|
|
1535
|
+
*/
|
|
1536
|
+
tipsWrapperProps?: TipsWrapperProps;
|
|
1392
1537
|
dataIndex?: string;
|
|
1393
1538
|
fieldConfig?: FieldSingleConfig | FormListConfig | ((data: fieldConfigFunctionParams) => FieldSingleConfig | FormListConfig);
|
|
1394
1539
|
/** 隐藏域字段 */
|
|
@@ -1412,7 +1557,7 @@ export type EditableTableColumn = Omit<ColumnsType["0"], "render"> & {
|
|
|
1412
1557
|
index: number;
|
|
1413
1558
|
}) => ReactElement | null;
|
|
1414
1559
|
/** table datasource children column 自定义渲染 */
|
|
1415
|
-
tableChildrenColumnRender?: (value:
|
|
1560
|
+
tableChildrenColumnRender?: (value: TAny, record: TPlainObject, index: number) => ReactElement | null;
|
|
1416
1561
|
};
|
|
1417
1562
|
export type EditableTableProps = {
|
|
1418
1563
|
name: EditableTableName;
|
|
@@ -1437,6 +1582,10 @@ export type EditableTableProps = {
|
|
|
1437
1582
|
/** 新增行默认值,自定义onTableAfterRender后失效 */
|
|
1438
1583
|
getAddRowDefaultValues?: () => TPlainObject;
|
|
1439
1584
|
};
|
|
1585
|
+
export type EditableTableRefApi = {
|
|
1586
|
+
/** 可用于表格行选择操作时,获取操作列数据 */
|
|
1587
|
+
getTableItemDataByFormListItemKey: (key: number) => TPlainObject;
|
|
1588
|
+
};
|
|
1440
1589
|
/**
|
|
1441
1590
|
* 可编辑表格
|
|
1442
1591
|
* demo:https://fex.qa.tcshuke.com/docs/admin/main/table/row-editable1
|
|
@@ -1445,9 +1594,10 @@ export type EditableTableProps = {
|
|
|
1445
1594
|
* 1. table children column 不可编辑
|
|
1446
1595
|
* 2. 当存在折叠children数据时,组件会在children中内置_isChildrenItem字段
|
|
1447
1596
|
* 3. 可通过tableChildrenColumnRender自定义渲染 table children column 显示
|
|
1597
|
+
* 4. 设置 rowSelection 后,rowSelection.onChange 通过 ref 的 getTableItemDataByFormListItemKey获取数据
|
|
1448
1598
|
* ```
|
|
1449
1599
|
*/
|
|
1450
|
-
export declare const EditableTable: (
|
|
1600
|
+
export declare const EditableTable: import("react").ForwardRefExoticComponent<EditableTableProps & import("react").RefAttributes<EditableTableRefApi>>;
|
|
1451
1601
|
export type EditorWrapperProps = {
|
|
1452
1602
|
onChange?: (data?: string) => void;
|
|
1453
1603
|
value?: string;
|
|
@@ -1677,14 +1827,14 @@ export declare const FormGrid: {
|
|
|
1677
1827
|
* FormItem网格响应式布局
|
|
1678
1828
|
*```
|
|
1679
1829
|
* 1. 应用场景:Form条件布局
|
|
1680
|
-
* 2. 子元素只能是
|
|
1681
|
-
* 3. 所有子元素中只能存在一个
|
|
1830
|
+
* 2. 子元素只能是 FormGrid.Col、FormGrid.OperateCol,其他会被忽略
|
|
1831
|
+
* 3. 所有子元素中只能存在一个 FormGrid.OperateCol
|
|
1682
1832
|
*/
|
|
1683
1833
|
Row: (props: FormRowProps) => import("react/jsx-runtime").JSX.Element;
|
|
1684
1834
|
/**
|
|
1685
1835
|
* 网格响应式布局,默认值:{ xs: 24, sm: 12, md: 12, lg: 8, xl: 8, xxl: 6 }
|
|
1686
1836
|
*```
|
|
1687
|
-
* 1. 设置 span
|
|
1837
|
+
* 1. 设置 span 栅格占位格数,替换lg、xl、xxl默认数据,不替换xs、sm布局数据
|
|
1688
1838
|
* 2. grid 自定义响应式网格布局
|
|
1689
1839
|
* xs: 屏幕 < 576px
|
|
1690
1840
|
* sm: 屏幕 ≥ 576px
|
|
@@ -1719,6 +1869,15 @@ export type FormItemHorizontalUnionProps = {
|
|
|
1719
1869
|
groupConfigList: {
|
|
1720
1870
|
hidden?: boolean;
|
|
1721
1871
|
before?: ReactElement | string;
|
|
1872
|
+
/**
|
|
1873
|
+
* 设置宽度
|
|
1874
|
+
* ```
|
|
1875
|
+
* 1. 自适应可设置:auto
|
|
1876
|
+
* 2. 可设置具体数值
|
|
1877
|
+
* 3. 不设置会在铺满flex剩余空间
|
|
1878
|
+
* 4. 多个未设置会等分铺满剩余空间
|
|
1879
|
+
* ```
|
|
1880
|
+
*/
|
|
1722
1881
|
width?: number | string;
|
|
1723
1882
|
mainItem: ReactElement;
|
|
1724
1883
|
after?: ReactElement | string;
|
|
@@ -1768,6 +1927,73 @@ export interface FormItemWrapperProps extends FormItemProps {
|
|
|
1768
1927
|
* ```
|
|
1769
1928
|
*/
|
|
1770
1929
|
export declare const FormItemWrapper: (props: FormItemWrapperProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
1930
|
+
export type FormListWrapperContentProps = {
|
|
1931
|
+
/** Form.List item fieldData */
|
|
1932
|
+
formListFieldData: FormListFieldData;
|
|
1933
|
+
/**
|
|
1934
|
+
* 当前阶段 完整 formItem name
|
|
1935
|
+
* ```
|
|
1936
|
+
* 1. 获取当前输入项Item数据
|
|
1937
|
+
* form.getFieldValue(props.formStageCompleteName);
|
|
1938
|
+
* 2. 获取当前输入项Item指定字段数据
|
|
1939
|
+
* form.getFieldValue([...props.formStageCompleteName, 'key']);
|
|
1940
|
+
* ```
|
|
1941
|
+
*/
|
|
1942
|
+
formStageCompleteName: (string | number)[];
|
|
1943
|
+
/**
|
|
1944
|
+
* formList上一级 formItem完整name
|
|
1945
|
+
*/
|
|
1946
|
+
prevCompleteName: (string | number)[];
|
|
1947
|
+
/** Form.List 操作项 */
|
|
1948
|
+
operation: FormListOperation;
|
|
1949
|
+
/** 索引 */
|
|
1950
|
+
index: number;
|
|
1951
|
+
/** 获取当前FormList 内部 Form.Item name */
|
|
1952
|
+
getInsideFormItemName: (key: string) => Array<string | number>;
|
|
1953
|
+
/** 获取当前 FormList Item 数据 */
|
|
1954
|
+
getInsideFormItemData: () => TPlainObject;
|
|
1955
|
+
/** 唯一值字段Key */
|
|
1956
|
+
uidKey: string;
|
|
1957
|
+
};
|
|
1958
|
+
export type FormListWrapperProps = {
|
|
1959
|
+
className?: string;
|
|
1960
|
+
style?: CSSProperties;
|
|
1961
|
+
/** formList item 数据中的唯一值,默认值:uid */
|
|
1962
|
+
uidFieldName?: string;
|
|
1963
|
+
/** formList name */
|
|
1964
|
+
name: string | number | (string | number)[];
|
|
1965
|
+
/**
|
|
1966
|
+
* formList上一级 formItem完整name
|
|
1967
|
+
* ```
|
|
1968
|
+
* 1. 如果没有传 []
|
|
1969
|
+
* 2. FormList内部通过 Form.useWatch 取值需要完整 name
|
|
1970
|
+
* ```
|
|
1971
|
+
*/
|
|
1972
|
+
prevCompleteName: (string | number)[];
|
|
1973
|
+
/** formListItem 内容 */
|
|
1974
|
+
/** 新增行默认值,自定义onTableAfterRender后失效 */
|
|
1975
|
+
getAddRowDefaultValues?: () => TPlainObject;
|
|
1976
|
+
/** 隐藏新增行按钮 */
|
|
1977
|
+
hiddenAddRowButton?: boolean;
|
|
1978
|
+
/** 自定义新增行按钮,getAddRowDefaultValues配置失效 */
|
|
1979
|
+
onCustomAddRowButton?: (operation: FormListOperation) => ReactElement;
|
|
1980
|
+
/** formListItem 内容 */
|
|
1981
|
+
children: (data: FormListWrapperContentProps) => ReactElement;
|
|
1982
|
+
/** 隐藏数据为空渲染 */
|
|
1983
|
+
hiddenEmptyRender?: boolean;
|
|
1984
|
+
/** formList内部渲染包装,多用于FormListWrapper嵌套布局 */
|
|
1985
|
+
formListChildrenWrapper?: (props: {
|
|
1986
|
+
children: ReactElement;
|
|
1987
|
+
}) => ReactElement;
|
|
1988
|
+
};
|
|
1989
|
+
/**
|
|
1990
|
+
* FormList
|
|
1991
|
+
* ```
|
|
1992
|
+
* 1. FormList数组中必须要有唯一值字段,默认值字段名称uid,可通过uidFieldName自定义设置
|
|
1993
|
+
* 2. Demo: https://fex.qa.tcshuke.com/docs/admin/main/form/list
|
|
1994
|
+
* ```
|
|
1995
|
+
*/
|
|
1996
|
+
export declare const FormListWrapper: (props: FormListWrapperProps) => import("react/jsx-runtime").JSX.Element;
|
|
1771
1997
|
export type GapProps = {
|
|
1772
1998
|
height?: number;
|
|
1773
1999
|
width?: number;
|
|
@@ -1853,6 +2079,7 @@ export type LabelValueLayoutProps = {
|
|
|
1853
2079
|
column?: number;
|
|
1854
2080
|
bordered?: boolean;
|
|
1855
2081
|
className?: string;
|
|
2082
|
+
style?: CSSProperties;
|
|
1856
2083
|
};
|
|
1857
2084
|
/**
|
|
1858
2085
|
* options[].span 是 Description.Item 的数量。 span={2} 会占用两个 DescriptionItem 的宽度
|
|
@@ -2020,6 +2247,8 @@ export declare const preDefinedClassName: {
|
|
|
2020
2247
|
label_value_vertical: string;
|
|
2021
2248
|
formItemGap15: string;
|
|
2022
2249
|
formItemGap8: string;
|
|
2250
|
+
formItemGap5: string;
|
|
2251
|
+
formItemGap0: string;
|
|
2023
2252
|
};
|
|
2024
2253
|
formItem: {
|
|
2025
2254
|
label_width_70: string;
|
|
@@ -2390,7 +2619,7 @@ export type SwitchConfirmWrapperProps = Omit<SwitchProps, "defaultChecked" | "on
|
|
|
2390
2619
|
needConfirm?: "close" | "open" | "all" | "none";
|
|
2391
2620
|
noMessage?: boolean;
|
|
2392
2621
|
onChange?: (value: SwitchConfirmWrapperValue) => void;
|
|
2393
|
-
popConfirmProps?: Pick<PopconfirmProps, "disabled" | "title" | "description"
|
|
2622
|
+
popConfirmProps?: Pick<PopconfirmProps, "disabled" | "title" | "description"> | ((checked?: boolean) => Pick<PopconfirmProps, "disabled" | "title" | "description">);
|
|
2394
2623
|
serviceConfig?: {
|
|
2395
2624
|
onRequest: (value: SwitchConfirmWrapperValue) => TAny;
|
|
2396
2625
|
message?: {
|
|
@@ -2406,7 +2635,11 @@ export type SwitchConfirmWrapperProps = Omit<SwitchProps, "defaultChecked" | "on
|
|
|
2406
2635
|
* @param value
|
|
2407
2636
|
* @param checkedValue:选中状态值
|
|
2408
2637
|
* @param unCheckedValue:非选中状态值
|
|
2409
|
-
* @param needConfirm:二次pop拦截时机 可不传
|
|
2638
|
+
* @param needConfirm:二次pop拦截时机 可不传
|
|
2639
|
+
* close:switch 由开启转换成关闭时pop弹出
|
|
2640
|
+
* open:switch 由开启转换成开启时pop弹出
|
|
2641
|
+
* all:switch 一直pop
|
|
2642
|
+
* none:switch 不弹出
|
|
2410
2643
|
* @param noMessage:不采用内置message提示
|
|
2411
2644
|
* @param onChange:switch 有效切换回掉
|
|
2412
2645
|
* @param popConfirmProps:popConfirm中参数 disabled title description
|
|
@@ -2690,7 +2923,7 @@ export type TableTitleTooltipProps = {
|
|
|
2690
2923
|
title: string | ReactElement;
|
|
2691
2924
|
tooltip: string | {
|
|
2692
2925
|
icon?: ReactElement;
|
|
2693
|
-
content
|
|
2926
|
+
content: string;
|
|
2694
2927
|
hoverArea?: "icon" | "all";
|
|
2695
2928
|
};
|
|
2696
2929
|
gap?: number;
|
|
@@ -2699,8 +2932,7 @@ export type TableTitleTooltipProps = {
|
|
|
2699
2932
|
};
|
|
2700
2933
|
/**
|
|
2701
2934
|
* title + tooltip
|
|
2702
|
-
* @
|
|
2703
|
-
* @returns
|
|
2935
|
+
* @deprecated 已过期,请使用 TipsWrapper 组件
|
|
2704
2936
|
*/
|
|
2705
2937
|
export declare const TableTitleTooltip: (props: TableTitleTooltipProps) => import("react/jsx-runtime").JSX.Element;
|
|
2706
2938
|
export type TabsWrapperProps = TabsProps & {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flatbiz/antd",
|
|
3
|
-
"version": "4.2.
|
|
3
|
+
"version": "4.2.82",
|
|
4
4
|
"description": "flat-biz ui components",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"typings": "index.d.ts",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@dimjs/model": ">=1.1.8",
|
|
32
32
|
"@dimjs/model-react": ">=1.1.8",
|
|
33
33
|
"@dimjs/utils": ">=1.3.2",
|
|
34
|
-
"@flatbiz/utils": ">=4.0.
|
|
34
|
+
"@flatbiz/utils": ">=4.0.15",
|
|
35
35
|
"@wove/react": ">=1.2.23",
|
|
36
36
|
"antd": ">=5.5.1",
|
|
37
37
|
"dayjs": ">=1.11.9",
|