$ui/components/my-timer

计时器组件

Source:

Members

(inner) props

Source:
Properties:
Name Type Attributes Default Description
target string | number <optional>

设定值,String为时间格式,Number是秒数, countdown为true, 是开始值, countdown为false时结束值

format string <optional>
HH:mm:ss

显示格式

countdown boolean <optional>
false

倒数模式

type string <optional>

颜色,可选值 'primary', 'success', 'warning', 'danger', 'info'

auto boolean <optional>
false

自动运行

interval boolean <optional>
1000

执行时间隔 单位 ms

属性参数

Methods

(inner) reset()

Source:

重置

(inner) start()

Source:

开始运行

(inner) stop()

Source:

停止运行

Events

finish

Source:

完成时触发

Parameters:
Name Type Description
dayjs Dayjs

时间对象

reset

Source:

重置时触发

Parameters:
Name Type Description
dayjs Dayjs

时间对象

start

Source:

开始运行时触发

Parameters:
Name Type Description
dayjs Dayjs

时间对象

stop

Source:

停止时触发

Parameters:
Name Type Description
dayjs Dayjs

时间对象

tick

Source:

时间跳动时触发

Parameters:
Name Type Description
dayjs Dayjs

时间对象