This commit is contained in:
yumoqing 2025-03-20 11:57:37 +08:00
parent cdfe924a65
commit b988f7826f

View File

@ -7,6 +7,10 @@ bricks.Countdown = class extends bricks.VBox {
text_rate:
event:
timeout
timeout event is fired after the countdown time is over.
method:
start
start method is to start the countdown, step is 1 secord
*/
constructor(opts){
super(opts);
@ -41,6 +45,8 @@ bricks.Countdown = class extends bricks.VBox {
rate:this.text_rate
});
this.add_widget(this.text_w);
}
start(){
schedule_once(this.time_down_second.bind(this), 1)
}
formatTime(seconds) {