@tplc/wot
Version:
56 lines (55 loc) • 1.12 kB
TypeScript
import type { ComponentPublicInstance, ExtractPropTypes } from 'vue'
export declare const countDownProps: {
/**
* 倒计时时长,单位毫秒
*/
time: {
type: NumberConstructor
required: true
}
/**
* 是否开启毫秒
*/
millisecond: {
type: BooleanConstructor
default: boolean
}
/**
* 格式化时间
*/
format: {
type: import('vue').PropType<string>
default: string
}
/**
* 是否自动开始
*/
autoStart: {
type: BooleanConstructor
default: boolean
}
customStyle: {
type: import('vue').PropType<string>
default: string
}
customClass: {
type: import('vue').PropType<string>
default: string
}
}
export type CountDownProps = ExtractPropTypes<typeof countDownProps>
export type CountDownExpose = {
/**
* 开始倒计时
*/
start: () => void
/**
* 暂停倒计时
*/
pause: () => void
/**
* 重设倒计时,若 auto-start 为 true,重设后会自动开始倒计时
*/
reset: () => void
}
export type CountDownInstance = ComponentPublicInstance<CountDownProps, CountDownExpose>