new Countdown(secs, cbopt)
倒计时类。
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
secs |
number | 总秒数。 | |
cb |
countdownCallback |
<optional> |
回调函数。 |
- Source:
Example
const countdown = new Countdown(60, (rest) => {
console.dir(rest);
});
countdown.start();
Methods
start()
开始倒计时。
- Source:
stop()
停止倒计时。
- Source:
Type Definitions
countdownCallback(rest)
倒计时回调函数。
Parameters:
Name | Type | Description | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
rest |
Object | 剩余的时间。
Properties
|
- Source: