tsp-component
Version:
提供多端和react版本的UI组件
36 lines (35 loc) • 613 B
TypeScript
interface VerificationProps {
className?: string;
/**
* 输入框的ID
*/
inputId: string;
/**
* 验证码获取间隔时间
*/
time?: number;
/**
* 按钮被禁止时的发送文本
*/
disabledLabel?: string;
/**
* 验证码发送前的验证函数
*/
validate?: () => boolean;
/**
* 父组件传递下来的回调
*/
callback: () => void;
}
interface VerificationState {
/**
* 按钮显示的文本
* @type {string}
*/
label: string;
/**
* 按钮倒计时时间
* @type {number}
*/
time: number;
}