/** * @author linhd * @date 2024/8/16 16:33 * @description 验证码 */ import React, { ReactNode } from 'react'; import { HelperTextDetailProps } from "../HelperText"; import InputCodeCard from './inputCodeCard'; import InputCodeInput from './inputCodeInput'; import './index.scss'; import { TextFieldProps } from "../TextField"; import { LabelTooltipProps } from "../Label"; export interface InputCodeCardProps extends HelperTextDetailProps { /** 样式class */ className?: string; /** style */ style?: React.CSSProperties; /** 大小 */ size?: 'small' | 'medium' | 'large'; /** 类型 */ type?: 'card' | 'underline'; /** 卡片数量 */ cardNumber?: number; /** 分隔符 没值 不带 */ separator?: ReactNode; /** 辅助文案 */ sendText?: ReactNode; /** 倒计时 */ countdown?: number; /** 倒计时开始计时,不等于undefined就开始计时 */ refreshCountdown?: number | undefined; /** 默认值 不受控 */ defaultValue?: string[]; /** 默认值 受控 */ value?: string[]; /** 输入框props */ inputProps?: (index: number) => TextFieldProps; onChange?: (val: string[]) => void; /** 最后一个输入框完成输入 */ onFinish?: (val: string) => void; /** 重新发送 */ onReset?: () => Promise | boolean; [name: string]: any; } export interface InputCodeInputProps extends HelperTextDetailProps { /** 样式class */ className?: string; /** style */ style?: React.CSSProperties; /** 大小 */ size?: 'small' | 'medium' | 'large'; /** 类型 */ type?: 'btnIntegrated' | 'btnSplit'; /** 标题 */ label?: ReactNode; /** label 提示信息 */ labelTooltip?: LabelTooltipProps; /** 提示语 */ placeholder?: ReactNode; /** 是否必填 */ required?: boolean; /** 倒计时 */ countdown?: number; /** 默认值 不受控 */ defaultValue?: string; /** 默认值 受控 */ value?: string; /** 获取验证码宽度 */ getCodeWidth?: string; /** 输入框props */ inputProps?: TextFieldProps; onChange?: (val: string) => void; /** 获取验证码事件 */ onGetCode?: () => Promise | boolean; [name: string]: any; } type MergedInputCode = { Card: typeof InputCodeCard; Input: typeof InputCodeInput; }; export declare const InputCode: MergedInputCode; export default InputCode;