From b988f7826fcaace3763bb03b8523f5cd746eab98 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Thu, 20 Mar 2025 11:57:37 +0800 Subject: [PATCH] bugfix --- bricks/countdown.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bricks/countdown.js b/bricks/countdown.js index 599ba80..889f97a 100644 --- a/bricks/countdown.js +++ b/bricks/countdown.js @@ -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) {