@flatbiz/antd 4.0.25 → 4.0.27
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 +33 -8
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -517,7 +517,7 @@ export interface DropdownMenuWrapperProps extends Omit<DropdownProps, "menu"> {
|
|
|
517
517
|
}
|
|
518
518
|
export declare const DropdownMenuWrapper: (props: DropdownMenuWrapperProps) => JSX.Element;
|
|
519
519
|
export type EasyTableServiceConfig = {
|
|
520
|
-
onRequest: (params?: TPlainObject) => Promise<TPlainObject>;
|
|
520
|
+
onRequest: (params?: TPlainObject) => Promise<TPlainObject | TPlainObject[]>;
|
|
521
521
|
requestParamsAdapter?: (params: TPlainObject) => TPlainObject;
|
|
522
522
|
/**
|
|
523
523
|
* 接口相应数据处理
|
|
@@ -684,6 +684,7 @@ export type EasyTableTableProps = Omit<TableProps<TAny>, "dataSource" | "loading
|
|
|
684
684
|
*/
|
|
685
685
|
export declare const EasyTableTable: (props: EasyTableTableProps) => JSX.Element;
|
|
686
686
|
export interface EditableFieldProps {
|
|
687
|
+
className?: string;
|
|
687
688
|
editRender: ReactElement | ((data: {
|
|
688
689
|
value?: TAny;
|
|
689
690
|
onChange?: (data?: TAny) => void;
|
|
@@ -692,13 +693,30 @@ export interface EditableFieldProps {
|
|
|
692
693
|
value?: TAny;
|
|
693
694
|
onChange?: (data?: TAny) => void;
|
|
694
695
|
placeholderValue?: string;
|
|
695
|
-
className?: string;
|
|
696
696
|
/** edit 区域是否铺满,editableIcon=false 无效 */
|
|
697
697
|
isEditFull?: boolean;
|
|
698
698
|
/** 是否可编辑 */
|
|
699
699
|
editable?: boolean;
|
|
700
|
-
/**
|
|
701
|
-
|
|
700
|
+
/** 是否显示编辑、确认、取消操作icon,默认值:true */
|
|
701
|
+
showEditableIcon?: boolean;
|
|
702
|
+
/** 点击编辑按钮,操作前,返回reject不会开启编辑效果 */
|
|
703
|
+
onClickEditIconPre?: (value?: TAny) => Promise<void>;
|
|
704
|
+
onEditCallback?: (value?: TAny) => void;
|
|
705
|
+
/** 点击确定按钮,操作前,返回reject不会执行确定功能 */
|
|
706
|
+
onClickConfirmIconPre?: (value?: TAny, preValue?: TAny) => Promise<void>;
|
|
707
|
+
onConfirmCallback?: (value?: TAny, preValue?: TAny) => void;
|
|
708
|
+
/** 组件操作Icon配置 */
|
|
709
|
+
iconConfig?: {
|
|
710
|
+
editIcon?: (options: {
|
|
711
|
+
onClick: () => void;
|
|
712
|
+
}) => ReactElement;
|
|
713
|
+
confirmIcon?: (options: {
|
|
714
|
+
onClick: () => void;
|
|
715
|
+
}) => ReactElement;
|
|
716
|
+
cancelIcon?: (options: {
|
|
717
|
+
onClick: () => void;
|
|
718
|
+
}) => ReactElement;
|
|
719
|
+
};
|
|
702
720
|
}
|
|
703
721
|
/**
|
|
704
722
|
* 可编辑字段组件
|
|
@@ -707,17 +725,19 @@ export interface EditableFieldProps {
|
|
|
707
725
|
* ```
|
|
708
726
|
* 字段渲染有两种状态
|
|
709
727
|
* 1. 只读:如果value类型为复杂格式,必须要通过【viewRender】来进行处理操作,转成简单数据类型
|
|
710
|
-
* 2.
|
|
728
|
+
* 2. 编辑:参数value的格式要求必须满足编辑组件入参value要求
|
|
729
|
+
* 3. 可自定义编辑Icon、确定Icon、取消Icon
|
|
730
|
+
* 4. 可拦截编辑操作、确定操作
|
|
711
731
|
* ```
|
|
712
732
|
*/
|
|
713
733
|
export declare const EditableField: (props: EditableFieldProps) => any;
|
|
714
734
|
export interface EditableFieldProviderProps {
|
|
715
735
|
children: ReactElement;
|
|
716
736
|
editable?: boolean;
|
|
717
|
-
|
|
737
|
+
showEditableIcon?: boolean;
|
|
718
738
|
}
|
|
719
739
|
/**
|
|
720
|
-
* EditableField
|
|
740
|
+
* EditableFieldProvider 控制内部使有的 EditableField 状态
|
|
721
741
|
* @param props
|
|
722
742
|
* @returns
|
|
723
743
|
*/
|
|
@@ -1138,6 +1158,11 @@ export declare const useSafeState: <S extends unknown>(initialState?: S | (() =>
|
|
|
1138
1158
|
export declare const useThemeToken: () => import("antd/es/theme/interface").GlobalToken;
|
|
1139
1159
|
export type IconWrapperProps = {
|
|
1140
1160
|
hoverTips?: string | React.ReactElement;
|
|
1161
|
+
/**
|
|
1162
|
+
* 提示类型
|
|
1163
|
+
* @default 'tooltip'
|
|
1164
|
+
*/
|
|
1165
|
+
tipsType?: "popover" | "tooltip";
|
|
1141
1166
|
icon?: React.ReactNode;
|
|
1142
1167
|
style?: CSSProperties;
|
|
1143
1168
|
text?: string | React.ReactElement;
|
|
@@ -1723,7 +1748,7 @@ export declare const tableCellRender: {
|
|
|
1723
1748
|
* }))
|
|
1724
1749
|
* ```
|
|
1725
1750
|
*/
|
|
1726
|
-
operateCell: (options: (item: TAny) => ButtonOperateProps) => (_value: string | number, record: any) => JSX.Element;
|
|
1751
|
+
operateCell: (options: (item: TAny, index: number) => ButtonOperateProps) => (_value: string | number, record: any, index: number) => JSX.Element;
|
|
1727
1752
|
/**
|
|
1728
1753
|
* 实现字段超出隐藏,默认长度10个字符
|
|
1729
1754
|
* ```
|