choerodon-ui
Version:
An enterprise-class UI design language and React-based implementation
43 lines (42 loc) • 1.22 kB
TypeScript
import { Component } from 'react';
import ConfigContext, { ConfigContextValue } from '../../../lib/config-provider/ConfigContext';
import EventManager from '../_util/EventManager';
interface VerifySliderProps {
onSuccess?: () => void;
onCancel?: (value?: any) => void;
}
export default class VerifySlider extends Component<VerifySliderProps> {
static get contextType(): typeof ConfigContext;
static displayName: string;
context: ConfigContextValue;
get prefixCls(): string;
/**
* 初始数据
*/
/** x */
private x1;
private x2;
/** 鼠标是否按下 */
private isMousedown;
/** 是否已经成功 */
private isSuccess;
/** 最大滑动距离 */
private max;
private contentEle;
private slideEle;
private barEle;
private tipEle;
moveEvent: EventManager | null;
contentOnRef: (ele: any) => void;
slideOnRef: (ele: any) => void;
barOnRef: (ele: any) => void;
tipOnRef: (ele: any) => void;
handleMouseDown(e: any): void;
handleMouseMove(e: any): void;
handleMouseUp(): void;
/** 滑块取消 */
private handleSlider;
componentWillUnmount(): void;
render(): JSX.Element;
}
export {};