UNPKG

mobile-more

Version:

基于 antd-mobile v5 扩展移动端 UI 组件

38 lines (37 loc) 1.1 kB
import React from 'react'; import { ButtonProps, ButtonRef } from 'antd-mobile'; export type { ButtonRef }; export interface BizCaptchaButtonProps extends ButtonProps { /** * @description 是否开始倒计时。 * @default false */ start?: boolean; /** * @description 倒计时时长,单位秒。 * @default 60 */ second?: number; /** * @description 倒计时结束触发,可用于重置 `start`。 * @returns */ onEnd?: () => void; /** * @description 初始显示文本。 * @default '获取验证码' */ initText?: string; /** * @description 倒计时显示文本,包含 `%s` 会自动替换为秒数 * @default '%s秒后重新获取' */ runText?: string; /** * @description 倒计时显示文本,包含 `%s` 会自动替换为秒数 * @default '重新获取验证码' */ resetText?: string; } declare const BizCaptchaButton: React.ForwardRefExoticComponent<BizCaptchaButtonProps & React.RefAttributes<ButtonRef>>; export default BizCaptchaButton;