@flatbiz/antd 3.2.1 → 3.2.3
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/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/index.d.ts +57 -20
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -513,7 +513,7 @@ export interface DropdownMenuWrapperProps extends Omit<DropdownProps, "overlay">
|
|
|
513
513
|
}
|
|
514
514
|
export declare const DropdownMenuWrapper: (props: DropdownMenuWrapperProps) => JSX.Element;
|
|
515
515
|
export type EasyTableServiceConfig = {
|
|
516
|
-
onRequest: (params?: TPlainObject) => Promise<TPlainObject>;
|
|
516
|
+
onRequest: (params?: TPlainObject) => Promise<TPlainObject | TPlainObject[]>;
|
|
517
517
|
requestParamsAdapter?: (params: TPlainObject) => TPlainObject;
|
|
518
518
|
/**
|
|
519
519
|
* 接口相应数据处理
|
|
@@ -529,22 +529,32 @@ export type EasyTableServiceConfig = {
|
|
|
529
529
|
};
|
|
530
530
|
export type EasyTableRefApi = {
|
|
531
531
|
onRequest: (params?: TPlainObject) => void;
|
|
532
|
-
|
|
533
|
-
clearQueryCondition: (values?: TPlainObject) => void
|
|
532
|
+
getRequestParams: () => TPlainObject;
|
|
533
|
+
clearQueryCondition: (values?: TPlainObject) => Promise<void>;
|
|
534
|
+
form: FormInstance;
|
|
535
|
+
onResetRequest: (params?: TPlainObject) => void;
|
|
534
536
|
};
|
|
535
537
|
export type EasyTableProps = {
|
|
536
538
|
children: ReactElement | ReactElement[];
|
|
537
539
|
modelKey: string;
|
|
538
540
|
serviceConfig: EasyTableServiceConfig;
|
|
541
|
+
/** Form initialValues、其他接口参数 */
|
|
539
542
|
initialValues?: TPlainObject;
|
|
543
|
+
/** 分页初始化参数,默认值: pageSiz = 10 */
|
|
544
|
+
initialPaginationParams?: {
|
|
545
|
+
pageSize?: number;
|
|
546
|
+
};
|
|
547
|
+
/** 字段映射 */
|
|
540
548
|
fieldNames?: {
|
|
541
549
|
list?: string;
|
|
542
550
|
total?: string;
|
|
543
551
|
pageNo?: string;
|
|
544
552
|
pageSize?: string;
|
|
553
|
+
uid?: string;
|
|
545
554
|
};
|
|
546
555
|
/** 初始化是否请求,默认值:true */
|
|
547
556
|
initRequest?: boolean;
|
|
557
|
+
onDataSourceChange?: (dataSource: TAny) => void;
|
|
548
558
|
};
|
|
549
559
|
/**
|
|
550
560
|
* 对 查询条件+表格数据 进行深度封装,内置数据交互处理
|
|
@@ -592,8 +602,8 @@ export declare const FormCol: {
|
|
|
592
602
|
};
|
|
593
603
|
export type FormOperateColProps = {
|
|
594
604
|
className?: string;
|
|
595
|
-
leftList?: ReactElement
|
|
596
|
-
rightList?: ReactElement
|
|
605
|
+
leftList?: Array<ReactElement | null>;
|
|
606
|
+
rightList?: Array<ReactElement | null>;
|
|
597
607
|
justify?: RowProps["justify"];
|
|
598
608
|
/** 强制单独一行 */
|
|
599
609
|
forceAloneRow?: boolean;
|
|
@@ -667,8 +677,8 @@ export type EasyTableFilterProps = {
|
|
|
667
677
|
export declare const EasyTableFilter: (props: EasyTableFilterProps) => JSX.Element;
|
|
668
678
|
export type EasyTableTableProps = Omit<TableProps<TAny>, "dataSource" | "loading" | "rowKey"> & {
|
|
669
679
|
children?: ReactElement;
|
|
670
|
-
/** 表格行 key
|
|
671
|
-
rowKey: string
|
|
680
|
+
/** 表格行 key 的取值 */
|
|
681
|
+
rowKey: string;
|
|
672
682
|
};
|
|
673
683
|
/**
|
|
674
684
|
* 表格渲染
|
|
@@ -679,6 +689,7 @@ export type EasyTableTableProps = Omit<TableProps<TAny>, "dataSource" | "loading
|
|
|
679
689
|
*/
|
|
680
690
|
export declare const EasyTableTable: (props: EasyTableTableProps) => JSX.Element;
|
|
681
691
|
export interface EditableFieldProps {
|
|
692
|
+
className?: string;
|
|
682
693
|
editRender: ReactElement | ((data: {
|
|
683
694
|
value?: TAny;
|
|
684
695
|
onChange?: (data?: TAny) => void;
|
|
@@ -687,13 +698,30 @@ export interface EditableFieldProps {
|
|
|
687
698
|
value?: TAny;
|
|
688
699
|
onChange?: (data?: TAny) => void;
|
|
689
700
|
placeholderValue?: string;
|
|
690
|
-
className?: string;
|
|
691
701
|
/** edit 区域是否铺满,editableIcon=false 无效 */
|
|
692
702
|
isEditFull?: boolean;
|
|
693
703
|
/** 是否可编辑 */
|
|
694
704
|
editable?: boolean;
|
|
695
|
-
/**
|
|
696
|
-
|
|
705
|
+
/** 是否显示编辑、确认、取消操作icon,默认值:true */
|
|
706
|
+
showEditableIcon?: boolean;
|
|
707
|
+
/** 点击编辑按钮,操作前,返回reject不会开启编辑效果 */
|
|
708
|
+
onClickEditIconPre?: (value?: TAny) => Promise<void>;
|
|
709
|
+
onEditCallback?: (value?: TAny) => void;
|
|
710
|
+
/** 点击确定按钮,操作前,返回reject不会执行确定功能 */
|
|
711
|
+
onClickConfirmIconPre?: (value?: TAny, preValue?: TAny) => Promise<void>;
|
|
712
|
+
onConfirmCallback?: (value?: TAny, preValue?: TAny) => void;
|
|
713
|
+
/** 组件操作Icon配置 */
|
|
714
|
+
iconConfig?: {
|
|
715
|
+
editIcon?: (options: {
|
|
716
|
+
onClick: () => void;
|
|
717
|
+
}) => ReactElement;
|
|
718
|
+
confirmIcon?: (options: {
|
|
719
|
+
onClick: () => void;
|
|
720
|
+
}) => ReactElement;
|
|
721
|
+
cancelIcon?: (options: {
|
|
722
|
+
onClick: () => void;
|
|
723
|
+
}) => ReactElement;
|
|
724
|
+
};
|
|
697
725
|
}
|
|
698
726
|
/**
|
|
699
727
|
* 可编辑字段组件
|
|
@@ -702,17 +730,19 @@ export interface EditableFieldProps {
|
|
|
702
730
|
* ```
|
|
703
731
|
* 字段渲染有两种状态
|
|
704
732
|
* 1. 只读:如果value类型为复杂格式,必须要通过【viewRender】来进行处理操作,转成简单数据类型
|
|
705
|
-
* 2.
|
|
733
|
+
* 2. 编辑:参数value的格式要求必须满足编辑组件入参value要求
|
|
734
|
+
* 3. 可自定义编辑Icon、确定Icon、取消Icon
|
|
735
|
+
* 4. 可拦截编辑操作、确定操作
|
|
706
736
|
* ```
|
|
707
737
|
*/
|
|
708
738
|
export declare const EditableField: (props: EditableFieldProps) => any;
|
|
709
739
|
export interface EditableFieldProviderProps {
|
|
710
740
|
children: ReactElement;
|
|
711
741
|
editable?: boolean;
|
|
712
|
-
|
|
742
|
+
showEditableIcon?: boolean;
|
|
713
743
|
}
|
|
714
744
|
/**
|
|
715
|
-
* EditableField
|
|
745
|
+
* EditableFieldProvider 控制内部使有的 EditableField 状态
|
|
716
746
|
* @param props
|
|
717
747
|
* @returns
|
|
718
748
|
*/
|
|
@@ -1148,6 +1178,10 @@ export declare const FormItemGroup: {
|
|
|
1148
1178
|
};
|
|
1149
1179
|
export interface FormItemWrapperProps extends FormItemProps {
|
|
1150
1180
|
wrapper?: (children: ReactNode) => ReactElement;
|
|
1181
|
+
/** 设置wrapper后,before、after失效 */
|
|
1182
|
+
before?: ReactNode;
|
|
1183
|
+
/** 设置wrapper后,before、after失效 */
|
|
1184
|
+
after?: ReactNode;
|
|
1151
1185
|
}
|
|
1152
1186
|
/**
|
|
1153
1187
|
* 对 Form.Item 的 children 增加 before、after
|
|
@@ -1695,24 +1729,27 @@ export type TagListSelectProps = {
|
|
|
1695
1729
|
*/
|
|
1696
1730
|
export declare const TagListSelect: FC<TagListSelectProps>;
|
|
1697
1731
|
export type TableColumnIconRenderProps = {
|
|
1698
|
-
/**
|
|
1732
|
+
/** 额外内容,一般为Icon */
|
|
1699
1733
|
extra: ReactElement;
|
|
1734
|
+
extraPosition?: "before" | "after";
|
|
1700
1735
|
onClick?: (e: any) => void;
|
|
1736
|
+
/** 是否显示原单元格数据,默认值:true */
|
|
1701
1737
|
showData?: boolean;
|
|
1738
|
+
/** 溢出显示【...】, 最大长度(默认:20个字节) */
|
|
1702
1739
|
showMaxNumber?: number;
|
|
1703
|
-
|
|
1740
|
+
/** 未溢出显示【extra】配置,默认值:true */
|
|
1741
|
+
notOverflowShowExtra?: boolean;
|
|
1704
1742
|
};
|
|
1705
1743
|
export declare const tableCellRender: {
|
|
1706
1744
|
/**
|
|
1707
1745
|
* 表格单元格 拼接额外内容渲染
|
|
1708
1746
|
* ```
|
|
1709
1747
|
* 1. extra 额外内容
|
|
1710
|
-
* 2. showData
|
|
1711
|
-
* 3.
|
|
1712
|
-
* 4. showMaxNumber 显示最大长度,作用于原单元格字符串数据
|
|
1748
|
+
* 2. showData 是否显示原单元格数据,默认值:true
|
|
1749
|
+
* 3. showMaxNumber 显示最大长度,作用于原单元格字符串数据
|
|
1713
1750
|
* ```
|
|
1714
1751
|
*/
|
|
1715
|
-
extraContentRender: (handle: (item: TPlainObject) => TableColumnIconRenderProps) => (value: TAny, item: TPlainObject) =>
|
|
1752
|
+
extraContentRender: (handle: (item: TPlainObject) => TableColumnIconRenderProps) => (value: TAny, item: TPlainObject) => any;
|
|
1716
1753
|
/**
|
|
1717
1754
|
* table 索引展示,如果存在pageSize、pageNo参数可分页展示索引,否则每页都从1开始
|
|
1718
1755
|
*/
|
|
@@ -1746,7 +1783,7 @@ export declare const tableCellRender: {
|
|
|
1746
1783
|
* }))
|
|
1747
1784
|
* ```
|
|
1748
1785
|
*/
|
|
1749
|
-
operateCell: (options: (item: TAny) => ButtonOperateProps) => (_value: string | number, record: any) => JSX.Element;
|
|
1786
|
+
operateCell: (options: (item: TAny, index: number) => ButtonOperateProps) => (_value: string | number, record: any, index: number) => JSX.Element;
|
|
1750
1787
|
/**
|
|
1751
1788
|
* 实现字段超出隐藏,默认长度10个字符
|
|
1752
1789
|
* ```
|