jiaqingjiayi-xiaochengxu/甲情_甲意/node_modules/antd-mini/es/SwipeAction/props.d.ts

67 lines
1.6 KiB
TypeScript
Raw Normal View History

2024-11-15 03:51:28 +00:00
import { IBaseProps } from '../_util/base';
interface SwipeButton {
text: string;
width?: number;
bgColor?: string;
color?: string;
slotName?: string;
confirmType?: '' | 'move' | 'tap';
confirmText?: string;
}
interface SwipeData {
direction: 'right' | 'left' | '';
btnIdx?: number;
swiped?: boolean;
}
export interface ISwipeActionProps extends IBaseProps {
/**
* @description
* @default []
*/
leftButtons: SwipeButton[];
/**
* @description
* @default []
*/
rightButtons: SwipeButton[];
/**
* @description
* @default 70
*/
damping: number | string;
/**
* @description
* @default false
*/
disabled: boolean;
/**
* @description
* @default ''
*/
swiped: '' | 'left' | 'right' | boolean;
/**
* @description
* @default ''
*/
defaultSwiped: '' | 'left' | 'right';
/**
* @description
* @default true
*/
elasticity: boolean;
/**
* @description
*/
onSwipeEnd: (data: SwipeData, e: Record<string, any>) => void;
/**
* @description
*/
onSwipeStart: (data: SwipeData, e: Record<string, any>) => void;
/**
* @description
*/
onButtonTap: (data: SwipeData, e: Record<string, any>) => void;
}
export declare const SwipeActionDefaultProps: Partial<ISwipeActionProps>;
export {};