Files

63 lines
1.5 KiB
TypeScript
Raw Permalink Normal View History

2026-02-10 08:05:03 +08:00
/* eslint-disable */
/**
* PMC
* */
import type { TdCountDownProps } from './type';
export default {
/** 是否自动开始倒计时 */
autoStart: {
type: Boolean,
default: true,
},
/** 最终倒计时的展示内容,值为'default'时使用默认的格式,否则使用自定义样式插槽 */
content: {
type: String,
default: 'default' as TdCountDownProps['content'],
},
/** 时间格式DD-日HH-时mm-分ss-秒SSS-毫秒 */
format: {
type: String,
default: 'HH:mm:ss',
},
/** 是否开启毫秒级渲染 */
millisecond: Boolean,
/** 倒计时尺寸 */
size: {
type: String,
default: 'medium' as TdCountDownProps['size'],
validator(val: TdCountDownProps['size']): boolean {
if (!val) return true;
return ['small', 'medium', 'large'].includes(val);
},
},
/** 使用时间单位分割 */
splitWithUnit: Boolean,
/** 倒计时风格 */
theme: {
type: String,
default: 'default' as TdCountDownProps['theme'],
validator(val: TdCountDownProps['theme']): boolean {
if (!val) return true;
return ['default', 'round', 'square'].includes(val);
},
},
/** 倒计时时长,单位毫秒 */
time: {
type: Number,
default: 0,
required: true,
},
/** 时间变化时触发 */
onChange: {
type: Function,
default: () => ({}),
},
/** 倒计时结束时触发 */
onFinish: {
type: Function,
default: () => ({}),
},
};