123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- 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 {};
|