bricks/dist/docs/ja/countdown.md
yumoqing 1291f7fee3 fix: UiCode build_options uses valueField/textField fallback to 'value'/'text'
When valueField/textField are not explicitly set in opts, the auto-select
logic (line 1140) and nullable empty-option creation (lines 1144-1145) used
data[0][undefined] which returned undefined, causing:
- Single-option selects to show blank (auto-select failed)
- nullable empty options to have undefined keys

Now extracts vf/tf local variables with ||'value'/||'text' fallback at the
top of build_options(), used consistently throughout.
2026-05-29 23:03:52 +08:00

36 lines
1.9 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# TimePassed
コントロール機能:タイマー開始からの経過時間を「時:分:秒」形式で表示し、毎秒自動的に更新します。
タイプ:通常コントロール
親クラスコントロールbricks.VBox
## 初期化パラメータ
- `opts`VBoxから継承されるオプションオブジェクト。特別なパラメータはありません。
- コントロール内部の初期化時に0秒からカウントを開始し、`bricks.formatTime` を使って時間の表示をフォーマットします。
## 主なイベント
- カスタムイベントは発行されません。
- 内部では `schedule_once` を使って定期的な更新を行いますが、外部にイベントを送出することはありません。
---
# Countdown
コントロール機能:初期時間を設定可能な(例: "01:00:00")カウントダウンコントロールで、開始後は毎秒カウントが減少し、表示が更新されます。カウントダウン終了時には `timeout` イベントが発生します。
タイプ:通常コントロール
親クラスコントロールbricks.VBox
## 初期化パラメータ
- `opts.limit_time`:文字列型。カウントダウンの総時間を表し、フォーマットは `\"HH:MM:SS\"``\"MM:SS\"`、または `\"SS\"` のいずれかです。
- 使用例:
- `\"30\"` → 30秒
- `\"01:30\"` → 1分30秒
- `\"01:00:00\"` → 1時間
- `opts.text_rate`オプションパラメータ。テキスト表示のリフレッシュレートを設定するためのもの基盤のTextコントロールがサポートしている場合
## 主なイベント
- `timeout`:カウントダウンがゼロになると、コントロールは `this.dispatch('timeout')` を呼び出してこのイベントを発行します。これにより、外部のロジックに後続処理を通知できます。