@flatbiz/antd 3.2.1 → 3.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/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/index.d.ts +42 -15
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -667,8 +667,8 @@ export type EasyTableFilterProps = {
|
|
|
667
667
|
export declare const EasyTableFilter: (props: EasyTableFilterProps) => JSX.Element;
|
|
668
668
|
export type EasyTableTableProps = Omit<TableProps<TAny>, "dataSource" | "loading" | "rowKey"> & {
|
|
669
669
|
children?: ReactElement;
|
|
670
|
-
/** 表格行 key
|
|
671
|
-
rowKey: string
|
|
670
|
+
/** 表格行 key 的取值 */
|
|
671
|
+
rowKey: string;
|
|
672
672
|
};
|
|
673
673
|
/**
|
|
674
674
|
* 表格渲染
|
|
@@ -679,6 +679,7 @@ export type EasyTableTableProps = Omit<TableProps<TAny>, "dataSource" | "loading
|
|
|
679
679
|
*/
|
|
680
680
|
export declare const EasyTableTable: (props: EasyTableTableProps) => JSX.Element;
|
|
681
681
|
export interface EditableFieldProps {
|
|
682
|
+
className?: string;
|
|
682
683
|
editRender: ReactElement | ((data: {
|
|
683
684
|
value?: TAny;
|
|
684
685
|
onChange?: (data?: TAny) => void;
|
|
@@ -687,13 +688,30 @@ export interface EditableFieldProps {
|
|
|
687
688
|
value?: TAny;
|
|
688
689
|
onChange?: (data?: TAny) => void;
|
|
689
690
|
placeholderValue?: string;
|
|
690
|
-
className?: string;
|
|
691
691
|
/** edit 区域是否铺满,editableIcon=false 无效 */
|
|
692
692
|
isEditFull?: boolean;
|
|
693
693
|
/** 是否可编辑 */
|
|
694
694
|
editable?: boolean;
|
|
695
|
-
/**
|
|
696
|
-
|
|
695
|
+
/** 是否显示编辑、确认、取消操作icon,默认值:true */
|
|
696
|
+
showEditableIcon?: boolean;
|
|
697
|
+
/** 点击编辑按钮,操作前,返回reject不会开启编辑效果 */
|
|
698
|
+
onClickEditIconPre?: (value?: TAny) => Promise<void>;
|
|
699
|
+
onEditCallback?: (value?: TAny) => void;
|
|
700
|
+
/** 点击确定按钮,操作前,返回reject不会执行确定功能 */
|
|
701
|
+
onClickConfirmIconPre?: (value?: TAny, preValue?: TAny) => Promise<void>;
|
|
702
|
+
onConfirmCallback?: (value?: TAny, preValue?: TAny) => void;
|
|
703
|
+
/** 组件操作Icon配置 */
|
|
704
|
+
iconConfig?: {
|
|
705
|
+
editIcon?: (options: {
|
|
706
|
+
onClick: () => void;
|
|
707
|
+
}) => ReactElement;
|
|
708
|
+
confirmIcon?: (options: {
|
|
709
|
+
onClick: () => void;
|
|
710
|
+
}) => ReactElement;
|
|
711
|
+
cancelIcon?: (options: {
|
|
712
|
+
onClick: () => void;
|
|
713
|
+
}) => ReactElement;
|
|
714
|
+
};
|
|
697
715
|
}
|
|
698
716
|
/**
|
|
699
717
|
* 可编辑字段组件
|
|
@@ -702,17 +720,19 @@ export interface EditableFieldProps {
|
|
|
702
720
|
* ```
|
|
703
721
|
* 字段渲染有两种状态
|
|
704
722
|
* 1. 只读:如果value类型为复杂格式,必须要通过【viewRender】来进行处理操作,转成简单数据类型
|
|
705
|
-
* 2.
|
|
723
|
+
* 2. 编辑:参数value的格式要求必须满足编辑组件入参value要求
|
|
724
|
+
* 3. 可自定义编辑Icon、确定Icon、取消Icon
|
|
725
|
+
* 4. 可拦截编辑操作、确定操作
|
|
706
726
|
* ```
|
|
707
727
|
*/
|
|
708
728
|
export declare const EditableField: (props: EditableFieldProps) => any;
|
|
709
729
|
export interface EditableFieldProviderProps {
|
|
710
730
|
children: ReactElement;
|
|
711
731
|
editable?: boolean;
|
|
712
|
-
|
|
732
|
+
showEditableIcon?: boolean;
|
|
713
733
|
}
|
|
714
734
|
/**
|
|
715
|
-
* EditableField
|
|
735
|
+
* EditableFieldProvider 控制内部使有的 EditableField 状态
|
|
716
736
|
* @param props
|
|
717
737
|
* @returns
|
|
718
738
|
*/
|
|
@@ -1148,6 +1168,10 @@ export declare const FormItemGroup: {
|
|
|
1148
1168
|
};
|
|
1149
1169
|
export interface FormItemWrapperProps extends FormItemProps {
|
|
1150
1170
|
wrapper?: (children: ReactNode) => ReactElement;
|
|
1171
|
+
/** 设置wrapper后,before、after失效 */
|
|
1172
|
+
before?: ReactNode;
|
|
1173
|
+
/** 设置wrapper后,before、after失效 */
|
|
1174
|
+
after?: ReactNode;
|
|
1151
1175
|
}
|
|
1152
1176
|
/**
|
|
1153
1177
|
* 对 Form.Item 的 children 增加 before、after
|
|
@@ -1695,24 +1719,27 @@ export type TagListSelectProps = {
|
|
|
1695
1719
|
*/
|
|
1696
1720
|
export declare const TagListSelect: FC<TagListSelectProps>;
|
|
1697
1721
|
export type TableColumnIconRenderProps = {
|
|
1698
|
-
/**
|
|
1722
|
+
/** 额外内容,一般为Icon */
|
|
1699
1723
|
extra: ReactElement;
|
|
1724
|
+
extraPosition?: "before" | "after";
|
|
1700
1725
|
onClick?: (e: any) => void;
|
|
1726
|
+
/** 是否显示原单元格数据,默认值:true */
|
|
1701
1727
|
showData?: boolean;
|
|
1728
|
+
/** 溢出显示【...】, 最大长度(默认:20个字节) */
|
|
1702
1729
|
showMaxNumber?: number;
|
|
1703
|
-
|
|
1730
|
+
/** 未溢出显示【extra】配置,默认值:true */
|
|
1731
|
+
notOverflowShowExtra?: boolean;
|
|
1704
1732
|
};
|
|
1705
1733
|
export declare const tableCellRender: {
|
|
1706
1734
|
/**
|
|
1707
1735
|
* 表格单元格 拼接额外内容渲染
|
|
1708
1736
|
* ```
|
|
1709
1737
|
* 1. extra 额外内容
|
|
1710
|
-
* 2. showData
|
|
1711
|
-
* 3.
|
|
1712
|
-
* 4. showMaxNumber 显示最大长度,作用于原单元格字符串数据
|
|
1738
|
+
* 2. showData 是否显示原单元格数据,默认值:true
|
|
1739
|
+
* 3. showMaxNumber 显示最大长度,作用于原单元格字符串数据
|
|
1713
1740
|
* ```
|
|
1714
1741
|
*/
|
|
1715
|
-
extraContentRender: (handle: (item: TPlainObject) => TableColumnIconRenderProps) => (value: TAny, item: TPlainObject) =>
|
|
1742
|
+
extraContentRender: (handle: (item: TPlainObject) => TableColumnIconRenderProps) => (value: TAny, item: TPlainObject) => any;
|
|
1716
1743
|
/**
|
|
1717
1744
|
* table 索引展示,如果存在pageSize、pageNo参数可分页展示索引,否则每页都从1开始
|
|
1718
1745
|
*/
|
|
@@ -1746,7 +1773,7 @@ export declare const tableCellRender: {
|
|
|
1746
1773
|
* }))
|
|
1747
1774
|
* ```
|
|
1748
1775
|
*/
|
|
1749
|
-
operateCell: (options: (item: TAny) => ButtonOperateProps) => (_value: string | number, record: any) => JSX.Element;
|
|
1776
|
+
operateCell: (options: (item: TAny, index: number) => ButtonOperateProps) => (_value: string | number, record: any, index: number) => JSX.Element;
|
|
1750
1777
|
/**
|
|
1751
1778
|
* 实现字段超出隐藏,默认长度10个字符
|
|
1752
1779
|
* ```
|