xverse-components-count-down
Version:
xverse components count-down
52 lines (51 loc) • 1.08 kB
TypeScript
/**
* @componentName CountDown
* @title 倒计时
* @type 2D
* @contributor 时猛
*/
export interface ICountDownProps {
/**
* @title 倒计时的开始时间
* @description 如 '23:56'
*/
time: string;
/**
* @title 倒计时展示格式
*/
format?: 'mm:ss' | 'm:s' | 'ss' | 's';
/**
* @title 倒计时 文案颜色
* @setter ColorSetter
*/
textColor?: string;
/**
* @title 倒计时 展示数字的图片
* @setter ImageSetter
*/
numberImgList?: string[];
/**
* @title 倒计时 展示数字的图片宽度
*/
imageWidth?: number;
/**
* @title 倒计时 展示数字的图片高度
*/
imageHeight?: number;
/**
* @title 倒计时的标题
*/
title?: string;
/**
* @title 倒计时的时长秒数,不填根据time的时间 倒计时到0
*/
countDownTime?: number;
/**
* @title 是否会展示0
*/
toZero?: boolean;
/**
* @title 倒计时结束的回调
*/
onNext?: () => void;
}