antd-mini
Version:
antd-mini 是支付宝小程序 UI 组件库,遵循 Ant Design 规范。
95 lines (94 loc) • 2.25 kB
TypeScript
import { IButtonProps } from '../Button/props';
import { IBaseProps } from '../_util/base';
export interface Button extends IButtonProps {
key?: string;
text: string;
countdownTime?: number;
}
interface Term {
key?: string;
name?: string;
[propName: string]: unknown;
}
type Type = '' | 'check' | 'read';
export interface IProps extends IBaseProps {
/**
* @description 协议展示类型
* @default ""
*/
type?: Type;
/**
* @description 协议列表
* @default -
*/
terms?: Term[];
/**
* @description 按钮列表
* @default -
*/
buttons?: Button[];
/**
* @description 按钮区是否吸底
* @default false
*/
buttonsFixed?: boolean;
/**
* @description 分割线方向,默认纵向
* @default "vertical"
*/
buttonsDirection?: 'horizontal' | 'vertical';
/**
* @description 协议前缀
* @default ""
*/
termPrefix?: string;
/**
* @description 协议后缀
* @default ""
*/
termSuffix?: string;
/**
* @description 勾选框引导文案
* @default ""
*/
checkboxTipsText?: string;
/**
* @description 勾选框引导显示状态
* @default false
*/
checkboxTipsVisible?: boolean;
/**
* @description 阅读的当前序号
*/
readCurrent?: number;
/**
* @description 默认阅读的当前序号
*/
defaultReadCurrent?: number;
/**
* @description 行动点按钮点击回调
*/
onButtonTap?: (b?: Button, index?: number, checked?: boolean, event?: any) => void;
/**
* @description 协议点击回调
*/
onTermTap?: (t?: Term, index?: number, event?: any) => void;
/**
* @description 勾选回调
*/
onCheckChange?: (c?: boolean) => void;
/**
* @description 协议前缀点击回调
*/
onTermPrefixTap?: (c?: boolean) => void;
/**
* @description 倒计时结束回调
*/
onCountdownFinish?: (b?: Button, index?: number, event?: any) => void;
/**
* @description 协议阅读切换
*/
onReadChange?: (index?: number) => void;
}
export declare const DefaultProps: IProps;
export {};